summaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-07-16 15:31:44 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-07-16 15:31:44 -0300
commitc5a0c4e0d7f69be9341cc5c8815afe9761e5c47c (patch)
tree6eb3532a89e3ab292ec9ab2314ba702c797226a4 /qt-ui/modeldelegates.h
parentee25edc28ec8b254d31e24d7ba16642a60793289 (diff)
downloadsubsurface-c5a0c4e0d7f69be9341cc5c8815afe9761e5c47c.tar.gz
Support for key_up and down in the combobox delegate.
Adds spport for key_up and key_down in the combobox delegates, now when you press key_up or down, it will show the list of choices instead of going one-by-one in the lineedit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/modeldelegates.h')
-rw-r--r--qt-ui/modeldelegates.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h
index a33fc891b..e57c8729f 100644
--- a/qt-ui/modeldelegates.h
+++ b/qt-ui/modeldelegates.h
@@ -2,6 +2,7 @@
#define MODELDELEGATES_H
#include <QStyledItemDelegate>
+class QComboBox;
class StarWidgetsDelegate : public QStyledItemDelegate {
Q_OBJECT
@@ -20,8 +21,10 @@ public:
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
virtual void setEditorData(QWidget* editor, const QModelIndex& index) const;
virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;
+ virtual bool eventFilter(QObject* object, QEvent* event);
protected:
QAbstractItemModel *model;
+ QComboBox *comboBox; // warning - it's null everytime a edit's finished.
};
class TankInfoDelegate : public ComboBoxDelegate{