ibus-qt
1.3.4
Toggle main menu visibility
Loading...
Searching...
No Matches
builddir
build
BUILD
ibus-qt-1.3.4-build
ibus-qt-1.3.4-Source
src
qibusproperty.h
1
#ifndef __Q_IBUS_PROPERTY_H_
2
#define __Q_IBUS_PROPERTY_H_
3
4
#include "qibusserializable.h"
5
#include "qibusproplist.h"
6
#include "qibustext.h"
7
8
namespace
IBus
{
9
10
/* type of QIBusProperty */
11
typedef
enum
12
{
13
TypeNormal = 0,
14
TypeToggle = 1,
15
TypeRadio = 2,
16
TypeMenu = 3,
17
TypeSeparator = 4,
18
}PropType;
19
20
/*
21
* State of QIBusProperty. The actual effect
22
* depends on #QIBusPropType of the QIBusProperty.
23
*/
24
typedef
enum
25
{
26
StateUnchecked = 0,
27
StateChecked = 1,
28
StateInconsistent = 2,
29
} PropState;
30
31
class
Property
;
32
class
PropList
;
33
typedef
Pointer<PropList>
PropListPointer;
34
typedef
Pointer<Property>
PropertyPointer;
35
36
class
Property :
public
Serializable
37
{
38
Q_OBJECT;
39
40
41
public
:
42
Property () {}
43
Property (
const
QString key,
44
const
QString icon,
45
const
TextPointer &label,
46
const
TextPointer &tooltip,
47
bool
sensitive,
48
bool
visible,
49
uint type,
50
uint state,
51
const
PropListPointer &subProps):
52
m_key(key),
53
m_icon(icon),
54
m_label(label),
55
m_tooltip(tooltip),
56
m_sensitive(sensitive),
57
m_visible(visible),
58
m_type(type),
59
m_state(state),
60
m_subProps(subProps) {}
61
62
~Property () {}
63
64
public
:
65
virtual
bool
serialize (QDBusArgument &argument);
66
virtual
bool
deserialize (
const
QDBusArgument &argument);
67
68
public
:
69
void
setLabel (
const
TextPointer & lable);
70
void
setVisible (
bool
visible);
71
void
setSubProps (
const
PropListPointer & props);
72
bool
update (
const
PropertyPointer prop);
73
74
private
:
75
76
QString m_key;
77
QString m_icon;
78
TextPointer m_label;
79
TextPointer m_tooltip;
80
bool
m_sensitive;
81
bool
m_visible;
82
uint m_type;
83
uint m_state;
84
PropListPointer m_subProps;
85
86
IBUS_SERIALIZABLE
87
};
88
89
};
90
#endif
IBus::Pointer
Definition
qibuspointer.h:11
IBus::PropList
Definition
qibusproplist.h:16
IBus::Property
Definition
qibusproperty.h:37
IBus
Definition
qibusattribute.cpp:3
Generated by
1.17.0