diff options
| author | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:12 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:12 +0100 |
| commit | 98c02f78b26811ba5d9962ba27ec24cacf82bb22 (patch) | |
| tree | daaf609cde31d8fb3b6c3457c43663d14f0dda80 /widgets/CheckableItemComboBox.hpp | |
| parent | 332d2ce88c2f0bc2908cacdc6707e2f9fa49f26d (diff) | |
| parent | 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (diff) | |
Update upstream source from tag 'upstream/2.7.0_rc8+repack'
Update to upstream version '2.7.0~rc8+repack'
with Debian dir 6fce941c8282d35c8df23d3de779a42e27688bc1
Diffstat (limited to 'widgets/CheckableItemComboBox.hpp')
| -rwxr-xr-x | widgets/CheckableItemComboBox.hpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/widgets/CheckableItemComboBox.hpp b/widgets/CheckableItemComboBox.hpp index 21223536..21e75116 100755 --- a/widgets/CheckableItemComboBox.hpp +++ b/widgets/CheckableItemComboBox.hpp @@ -1,37 +1,37 @@ -#ifndef CHECKABLE_ITEM_COMBO_BOX_HPP__
-#define CHECKABLE_ITEM_COMBO_BOX_HPP__
-
-#include <QScopedPointer>
-
-#include "LazyFillComboBox.hpp"
-
-class QStandardItemModel;
-class QStandardItem;
-
-/**
- * @brief QComboBox with support of checkboxes
- * http://stackoverflow.com/questions/8422760/combobox-of-checkboxes
- */
-class CheckableItemComboBox
- : public LazyFillComboBox
-{
- Q_OBJECT
-
-public:
- explicit CheckableItemComboBox (QWidget * parent = nullptr);
- QStandardItem * addCheckItem (QString const& label, QVariant const& data, Qt::CheckState checkState);
-
-protected:
- bool eventFilter (QObject *, QEvent *) override;
-
-private:
- void update_text();
-
- Q_SLOT void model_data_changed ();
- Q_SLOT void item_pressed (QModelIndex const&);
-
-private:
- QScopedPointer<QStandardItemModel> model_;
-};
-
-#endif
+#ifndef CHECKABLE_ITEM_COMBO_BOX_HPP__ +#define CHECKABLE_ITEM_COMBO_BOX_HPP__ + +#include <QScopedPointer> + +#include "LazyFillComboBox.hpp" + +class QStandardItemModel; +class QStandardItem; + +/** + * @brief QComboBox with support of checkboxes + * http://stackoverflow.com/questions/8422760/combobox-of-checkboxes + */ +class CheckableItemComboBox + : public LazyFillComboBox +{ + Q_OBJECT + +public: + explicit CheckableItemComboBox (QWidget * parent = nullptr); + QStandardItem * addCheckItem (QString const& label, QVariant const& data, Qt::CheckState checkState); + +protected: + bool eventFilter (QObject *, QEvent *) override; + +private: + void update_text(); + + Q_SLOT void model_data_changed (); + Q_SLOT void item_pressed (QModelIndex const&); + +private: + QScopedPointer<QStandardItemModel> model_; +}; + +#endif |
