blob: ab6861af005434d83f08c93448bab563e0281515 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#ifndef MOBJECTMENUBASICVIEW_H
#define MOBJECTMENUBASICVIEW_H
#include "mscenewindowview.h"
#include "mobjectmenumodel.h"
#include "mobjectmenubasicstyle.h"
#include <mnamespace.h>
#ifdef HAVE_CONTENTACTION
#include <contentaction/contentaction.h>
#endif
class MObjectMenu;
class MButton;
class MAction;
class MLayout;
class MLinearLayoutPolicy;
class MGridLayoutPolicy;
class MObjectMenuBasicView : public MSceneWindowView
{
Q_OBJECT
Q_DISABLE_COPY(MObjectMenuBasicView)
M_VIEW(MObjectMenuModel, MObjectMenuBasicStyle)
public:
MObjectMenuBasicView(MObjectMenu *controller);
virtual ~MObjectMenuBasicView();
protected:
//! \reimp
virtual void setupModel();
virtual void updateData(const QList<const char *> &modifications);
//! \reimp_end
protected slots:
void actionAdded(MAction *action);
void actionModified(MAction *action);
void actionRemoved(MAction *action);
private slots:
void contentActionTriggered();
private:
#ifdef HAVE_CONTENTACTION
QHash<MAction*, ContentAction::Action> contentActions;
#endif
QHash<MAction *, MButton *> buttons;
MLayout *layout;
MLinearLayoutPolicy *portraitPolicy;
MGridLayoutPolicy *landscapePolicy;
MObjectMenu *controller;
};
#endif
|