• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

parley

kvttabledelegate.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 
00003                              kvttabledelegate
00004 
00005     -----------------------------------------------------------------------
00006 
00007     copyright     : (C) 2006, 2007 Peter Hedlund <peter.hedlund@kdemail.net>
00008 
00009     -----------------------------------------------------------------------
00010 
00011  ***************************************************************************/
00012 
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 
00022 #ifndef KVTTABLEDELEGATE_H
00023 #define KVTTABLEDELEGATE_H
00024 
00025 #include <QItemDelegate>
00026 #include <QModelIndex>
00027 
00031 class KVTTableDelegate : public QItemDelegate
00032 {
00033     Q_OBJECT
00034 public:
00035     KVTTableDelegate(QObject *parent = 0);
00036 
00037     QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
00038 
00039     void setEditorData(QWidget *editor, const QModelIndex &index) const;
00040     void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
00041     void setCurrentIndex(const QModelIndex &index);
00042 
00043     void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
00044     QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
00045     void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
00046 protected:
00047     void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const;
00048     void drawFocus(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const;
00049 
00050 private slots:
00051     void commitAndCloseEditor();
00052 
00053 private:
00060 //     QPair< QString, QString > guessWordType(const QString & entry, int language) const;
00061     QModelIndex m_currentIndex;
00062 };
00063 
00064 #endif

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal