ibus-qt 1.3.4
Loading...
Searching...
No Matches
qibustext.h
1#ifndef __Q_IBUS_TEXT_H_
2#define __Q_IBUS_TEXT_H_
3
4#include "qibusserializable.h"
5#include "qibusattribute.h"
6#include "qibusattrlist.h"
7
8namespace IBus {
9
10class Text;
11typedef Pointer<Text> TextPointer;
12
13class Text : public Serializable
14{
15 Q_OBJECT;
16
17protected:
18
19public:
20 Text () {}
21 Text (const QString &text) : m_text (text), m_attrs(0) {}
22 Text (const QChar &ch) : m_text (ch), m_attrs(0) {}
23
24public:
25 virtual bool serialize (QDBusArgument &argument);
26 virtual bool deserialize (const QDBusArgument &argument);
27
28 const QString &text (void) const { return m_text; }
29 const AttrListPointer &attrs (void) const { return m_attrs; }
30 const uint getLength (void) const { return m_text.length(); }
31 void appendAttribute (uint type, uint value, uint startIndex, int endIndex);
32
33private:
34 QString m_text;
35 AttrListPointer m_attrs;
36
37 IBUS_SERIALIZABLE
38};
39
40};
41
42#endif
Definition qibusserializable.h:41
Definition qibustext.h:14
Definition qibusattribute.cpp:3