Rev 158 | Rev 201 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 158 | Rev 180 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | #include <QSqlQuery>
|
9 | #include <QSqlQuery>
|
10 | #include <QtSql>
|
10 | #include <QtSql>
|
11 | #include <QtGui>
|
11 | #include <QtGui>
|
12 | #include <QSqlDatabase>
|
12 | #include <QSqlDatabase>
|
13 | #include <QMessageBox>
|
13 | #include <QMessageBox>
|
- | 14 | ||
- | 15 | #include "iconform.h"
|
|
- | 16 | ||
14 | //#include <QMainWindow>
|
17 | //#include <QMainWindow>
|
15 | //! [0]
|
18 | //! [0]
|
16 | class SpinBoxDelegate : public QItemDelegate |
19 | class SpinBoxDelegate : public QItemDelegate |
17 | {
|
20 | {
|
18 | Q_OBJECT |
21 | Q_OBJECT |
Line 87... | Line 90... | ||
87 | 90 | ||
88 | //QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
91 | //QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
89 | }; |
92 | }; |
90 | 93 | ||
91 | 94 | ||
- | 95 | class IconDelegate : public QItemDelegate |
|
- | 96 | {
|
|
- | 97 | mutable QPixmap m_pxPicture;
|
|
- | 98 | private: |
|
- | 99 | QTableView *tblView; |
|
- | 100 | ||
- | 101 | public: |
|
- | 102 | IconDelegate ( QObject *parent ); |
|
- | 103 | ||
- | 104 | QWidget *createEditor( |
|
- | 105 | QWidget *parent,
|
|
- | 106 | const QStyleOptionViewItem &option, |
|
- | 107 | const QModelIndex &index) const; |
|
- | 108 | ||
- | 109 | void setEditorData(QWidget *editor, |
|
- | 110 | const QModelIndex &index) const; |
|
- | 111 | ||
- | 112 | void setModelData(QWidget *editor, |
|
- | 113 | QAbstractItemModel *model,
|
|
- | 114 | const QModelIndex &index) const; |
|
- | 115 | ||
- | 116 | ||
- | 117 | void updateEditorGeometry( |
|
- | 118 | QWidget *editor,
|
|
- | 119 | const QStyleOptionViewItem &option, |
|
- | 120 | const QModelIndex &index) const; |
|
- | 121 | ||
- | 122 | void paint(QPainter *painter, const QStyleOptionViewItem &option, |
|
- | 123 | const QModelIndex &index) const; |
|
- | 124 | ||
- | 125 | void setTableView(QTableView* table); |
|
- | 126 | ||
- | 127 | ||
- | 128 | //QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
- | 129 | }; |
|
92 | 130 | ||
93 | 131 | ||
94 | 132 | ||
95 | class TimeEditDelegate : public QItemDelegate |
133 | class TimeEditDelegate : public QItemDelegate |
96 | {
|
134 | {
|