-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcfavaction.h
86 lines (75 loc) · 1.92 KB
/
cfavaction.h
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*********************** Information *************************\
| $HeadURL$
|
| Author: Jo2003
|
| Begin: 18.01.2010 / 16:16:25
|
| Last edited by: $Author$
|
| $Id$
\*************************************************************/
#ifndef __022510__CFAVACTION_H
#define __022510__CFAVACTION_H
#include <QAction>
// -----------------------------------------------------------------------------
// namespace
// -----------------------------------------------------------------------------
namespace kartinafav
{
class CFavAction;
enum eAct
{
FAV_ADD,
FAV_DEL,
FAV_WHAT = 255
};
}
/********************************************************************\
| Class: CFavAction
| Date: 25.02.2010 / 10:45:59
| Author: Jo2003
| Description: customized QAction for favourite handling
|
\********************************************************************/
class CFavAction : public QAction
{
public:
CFavAction (QObject * parent) : QAction(parent)
{
iCid = -1;
action = kartinafav::FAV_WHAT;
}
CFavAction (const QString & text, QObject * parent) : QAction(text, parent)
{
iCid = -1;
action = kartinafav::FAV_WHAT;
}
CFavAction (const QIcon & icon, const QString & text, QObject * parent)
: QAction (icon, text, parent)
{
iCid = -1;
action = kartinafav::FAV_WHAT;
}
virtual ~CFavAction ()
{
// nothing to do ...
}
void setFavData (int cid, kartinafav::eAct act)
{
iCid = cid;
action = act;
}
void favData (int &cid, kartinafav::eAct &act)
{
cid = iCid;
act = action;
}
private:
int iCid;
kartinafav::eAct action;
};
#endif /* __022510__CFAVACTION_H */
/************************* History ***************************\
| $Log$
\*************************************************************/