comboboxbutton.h
Go to the documentation of this file.
1 #ifndef COMBOBOXBUTTON_H
2 #define COMBOBOXBUTTON_H
3 
4 
5 #include <QComboBox>
6 
7 class ComboBoxButton : public QComboBox
8 {
9  Q_OBJECT
10 
11 public:
12  explicit ComboBoxButton(const QAbstractItemModel* model, const QString& scenarioName, QWidget* parent = 0);
14  void setIceStatesActive(bool active);
15 
16 signals:
17  void released(QString, const QAbstractItemModel*, QString);
18 
19 
20 protected:
21  virtual void mouseReleaseEvent(QMouseEvent* e);
22  virtual void mousePressEvent(QMouseEvent* e);
23  virtual void paintEvent(QPaintEvent* e);
24 
25 private slots:
26  void onIndexChange(const QString& text);
27 
28 
29 private:
30  const QAbstractItemModel* model;
31  bool buttonPress;
32  QString scenarioName;
33 };
34 
35 #endif // COMBOBOXBUTTON_H
ComboBoxButton::~ComboBoxButton
~ComboBoxButton()
Definition: comboboxbutton.cpp:16
ComboBoxButton::mousePressEvent
virtual void mousePressEvent(QMouseEvent *e)
Definition: comboboxbutton.cpp:54
ComboBoxButton::paintEvent
virtual void paintEvent(QPaintEvent *e)
Definition: comboboxbutton.cpp:33
ComboBoxButton::released
void released(QString, const QAbstractItemModel *, QString)
ComboBoxButton::setIceStatesActive
void setIceStatesActive(bool active)
Definition: comboboxbutton.cpp:21
ComboBoxButton::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *e)
Definition: comboboxbutton.cpp:66
ComboBoxButton
Definition: comboboxbutton.h:7
ComboBoxButton::ComboBoxButton
ComboBoxButton(const QAbstractItemModel *model, const QString &scenarioName, QWidget *parent=0)
Definition: comboboxbutton.cpp:11