QSS Solver GUI  4.5.3
comboboxdelegate.hpp
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  This file is part of QSS Solver.
4 
5  QSS Solver is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  QSS Solver is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QSS Solver. If not, see <http://www.gnu.org/licenses/>.
17 
18  ******************************************************************************/
19 
20 #ifndef COMBOBOXDELEGATE_H_
21 #define CODEEDITOR_H_
22 
23 #include <QItemDelegate>
24 
28 class ComboBoxDelegate : public QItemDelegate {
29  Q_OBJECT
30  public:
35  ComboBoxDelegate(QObject *parent = 0);
43  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
49  void setEditorData(QWidget *editor, const QModelIndex &index) const;
56  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
63  void updateEditorGeometry(QWidget *editor,
67  const QStyleOptionViewItem &option, const QModelIndex &index) const;
68 };
69 
70 #endif /* CODEEDITOR_H_ */
ComboBoxDelegate
Definition: comboboxdelegate.hpp:28
ComboBoxDelegate::createEditor
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: comboboxdelegate.cpp:26
ComboBoxDelegate::updateEditorGeometry
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: comboboxdelegate.cpp:53
ComboBoxDelegate::setEditorData
void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: comboboxdelegate.cpp:37
ComboBoxDelegate::ComboBoxDelegate
ComboBoxDelegate(QObject *parent=0)
Definition: comboboxdelegate.cpp:24
ComboBoxDelegate::setModelData
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: comboboxdelegate.cpp:45