Rev 180 | Rev 219 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 180 | Rev 201 | ||
---|---|---|---|
Line 11... | Line 11... | ||
11 | #include <QtGui>
|
11 | #include <QtGui>
|
12 | #include <QSqlDatabase>
|
12 | #include <QSqlDatabase>
|
13 | #include <QMessageBox>
|
13 | #include <QMessageBox>
|
14 | 14 | ||
15 | #include "iconform.h"
|
15 | #include "iconform.h"
|
- | 16 | #include "fileform.h"
|
|
16 | 17 | ||
17 | //#include <QMainWindow>
|
18 | //#include <QMainWindow>
|
18 | //! [0]
|
19 | //! [0]
|
19 | class SpinBoxDelegate : public QItemDelegate |
20 | class SpinBoxDelegate : public QItemDelegate |
20 | {
|
21 | {
|
Line 126... | Line 127... | ||
126 | 127 | ||
127 | 128 | ||
128 | //QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
129 | //QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
129 | }; |
130 | }; |
130 | 131 | ||
- | 132 | class FileDelegate : public QItemDelegate |
|
- | 133 | {
|
|
- | 134 | mutable QByteArray m_Data;
|
|
- | 135 | private: |
|
- | 136 | // QTableView *tblView;
|
|
- | 137 | ||
- | 138 | public: |
|
- | 139 | FileDelegate ( QObject *parent ); |
|
- | 140 | ||
- | 141 | QWidget *createEditor( |
|
- | 142 | QWidget *parent,
|
|
- | 143 | const QStyleOptionViewItem &option, |
|
- | 144 | const QModelIndex &index) const; |
|
- | 145 | ||
- | 146 | void setEditorData(QWidget *editor, |
|
- | 147 | const QModelIndex &index) const; |
|
- | 148 | ||
- | 149 | void setModelData(QWidget *editor, |
|
- | 150 | QAbstractItemModel *model,
|
|
- | 151 | const QModelIndex &index) const; |
|
131 | 152 | ||
132 | 153 | ||
- | 154 | void updateEditorGeometry( |
|
- | 155 | QWidget *editor,
|
|
- | 156 | const QStyleOptionViewItem &option, |
|
- | 157 | const QModelIndex &index) const; |
|
- | 158 | ||
- | 159 | /*
|
|
- | 160 | void paint(QPainter *painter, const QStyleOptionViewItem &option,
|
|
- | 161 | const QModelIndex &index) const;
|
|
- | 162 | */
|
|
- | 163 | ||
- | 164 | ||
- | 165 | ||
- | 166 | // void setTableView(QTableView* table);
|
|
- | 167 | ||
- | 168 | ||
- | 169 | //QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
- | 170 | }; |
|
- | 171 | ||
133 | class TimeEditDelegate : public QItemDelegate |
172 | class TimeEditDelegate : public QItemDelegate |
134 | {
|
173 | {
|
135 | Q_OBJECT |
174 | Q_OBJECT |
136 | 175 | ||
137 | public: |
176 | public: |