20#ifndef MODELACTIONROOTSTATE_H
21#define MODELACTIONROOTSTATE_H
23#include "lomiriindicatorsglobal.h"
25#include "rootstateparser.h"
27class AyatanaMenuModel;
29class LOMIRIINDICATORS_EXPORT ModelActionRootState :
public RootStateObject
32 Q_PROPERTY(AyatanaMenuModel* menu READ menu WRITE setMenu NOTIFY menuChanged)
33 Q_PROPERTY(QString secondaryAction READ secondaryAction NOTIFY secondaryActionChanged)
34 Q_PROPERTY(QString scrollAction READ scrollAction NOTIFY scrollActionChanged)
35 Q_PROPERTY(QString submenuAction READ submenuAction NOTIFY submenuActionChanged)
37 ModelActionRootState(QObject *parent = 0);
38 virtual ~ModelActionRootState();
40 AyatanaMenuModel* menu()
const;
41 void setMenu(AyatanaMenuModel* menu);
43 QString secondaryAction()
const;
44 QString scrollAction()
const;
45 QString submenuAction()
const;
47 bool valid()
const override;
51 void secondaryActionChanged();
52 void scrollActionChanged();
53 void submenuActionChanged();
56 void onModelRowsAdded(
const QModelIndex& parent,
int start,
int end);
57 void onModelRowsRemoved(
const QModelIndex& parent,
int start,
int end);
58 void onModelDataChanged(
const QModelIndex& topLeft,
const QModelIndex& bottomRight,
const QVector<int>&);
62 void updateActionState();
63 void updateOtherActions();
65 AyatanaMenuModel* m_menu;
66 QString m_secondaryAction;
67 QString m_scrollAction;
68 QString m_submenuAction;