• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

E:/sqlmaster/src/delegate.h

Go to the documentation of this file.
00001 #ifndef DELEGATE_H
00002  #define DELEGATE_H
00003 
00004  #include <QItemDelegate>
00005  #include <QModelIndex>
00006  #include <QObject>
00007  #include <QSize>
00008  #include <QSpinBox>
00009 #include <QComboBox>
00010  class SpinBoxDelegate : public QItemDelegate
00011  {
00012      Q_OBJECT
00013 
00014  public:
00015      SpinBoxDelegate(QObject *parent = 0);
00016 
00017      QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
00018                            const QModelIndex &index) const;
00019 
00020      void setEditorData(QWidget *editor, const QModelIndex &index) const;
00021      void setModelData(QWidget *editor, QAbstractItemModel *model,
00022                        const QModelIndex &index) const;
00023 
00024      void updateEditorGeometry(QWidget *editor,
00025          const QStyleOptionViewItem &option, const QModelIndex &index) const;
00026  };
00027 
00028 
00029  class ComboBoxDelegate : public QItemDelegate
00030  {
00031      Q_OBJECT
00032  public:
00033      ComboBoxDelegate(QObject *parent = 0);
00034 
00035      QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
00036      void setEditorData(QWidget *editor, const QModelIndex &index) const;
00037      void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
00038      void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
00039 
00040  };
00041 
00042  #endif

Generated on Wed Dec 1 2010 08:43:39 for SQL Master by  doxygen 1.7.2