diff options
Diffstat (limited to 'libqmenumodel/src/qmenumodel.h')
-rw-r--r-- | libqmenumodel/src/qmenumodel.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libqmenumodel/src/qmenumodel.h b/libqmenumodel/src/qmenumodel.h index 8887c81..54c09f5 100644 --- a/libqmenumodel/src/qmenumodel.h +++ b/libqmenumodel/src/qmenumodel.h @@ -21,6 +21,7 @@ #define QMENUTREEMODEL_H #include <QAbstractItemModel> +#include <QEvent> class MenuNode; typedef struct _GMenuModel GMenuModel; @@ -28,7 +29,6 @@ typedef struct _GMenuModel GMenuModel; class QMenuModel : public QAbstractItemModel { Q_OBJECT - public: enum MenuRoles { Action = Qt::DisplayRole + 1, @@ -52,14 +52,13 @@ public: Q_SIGNALS: void countChanged(); -public Q_SLOTS: - void onItemsChanged(MenuNode *node, int position, int removed, int added); - protected: QMenuModel(GMenuModel *other=0, QObject *parent=0); void setMenuModel(GMenuModel *model); GMenuModel *menuModel() const; + virtual bool event(QEvent* e); + private: MenuNode *m_root; @@ -74,4 +73,15 @@ private: void clearModel(); }; +class MenuModelEvent : public QEvent +{ +public: + static const QEvent::Type eventType; + + MenuModelEvent(GMenuModel *model); + ~MenuModelEvent(); + + GMenuModel *model; +}; + #endif |