Changeset View
Changeset View
Standalone View
Standalone View
dataengines/kimpanel/kimpanelagent.h
Show All 20 Lines | |||||
21 | #define KIMPANEL_AGENT_H | 21 | #define KIMPANEL_AGENT_H | ||
22 | 22 | | |||
23 | #include "kimpanelagenttype.h" | 23 | #include "kimpanelagenttype.h" | ||
24 | 24 | | |||
25 | // Qt | 25 | // Qt | ||
26 | #include <QObject> | 26 | #include <QObject> | ||
27 | #include <QStringList> | 27 | #include <QStringList> | ||
28 | #include <QDBusContext> | 28 | #include <QDBusContext> | ||
29 | #include <QDBusInterface> | ||||
29 | 30 | | |||
30 | class QDBusServiceWatcher; | 31 | class QDBusServiceWatcher; | ||
31 | class Impanel2Adaptor; | 32 | class Impanel2Adaptor; | ||
32 | class ImpanelAdaptor; | 33 | class ImpanelAdaptor; | ||
34 | class LayoutListModels; | ||||
33 | 35 | | |||
34 | class PanelAgent: public QObject, protected QDBusContext | 36 | class PanelAgent: public QObject, protected QDBusContext | ||
35 | { | 37 | { | ||
36 | Q_OBJECT | 38 | Q_OBJECT | ||
37 | 39 | | |||
38 | public: | 40 | public: | ||
39 | PanelAgent(QObject *parent); | 41 | PanelAgent(QObject *parent); | ||
40 | ~PanelAgent() override; | 42 | ~PanelAgent() override; | ||
41 | 43 | | |||
42 | void configure(); | 44 | void configure(); | ||
43 | void created(); | 45 | void created(); | ||
44 | void exit(); | 46 | void exit(); | ||
45 | void reloadConfig(); | 47 | void reloadConfig(); | ||
46 | void selectCandidate(int idx); | 48 | void selectCandidate(int idx); | ||
47 | void lookupTablePageUp(); | 49 | void lookupTablePageUp(); | ||
48 | void lookupTablePageDown(); | 50 | void lookupTablePageDown(); | ||
49 | void movePreeditCaret(int pos); | 51 | void movePreeditCaret(int pos); | ||
50 | void triggerProperty(const QString& key); | 52 | void triggerProperty(const QString& key); | ||
53 | LayoutListModels *models() const; | ||||
51 | 54 | | |||
52 | public: // PROPERTIES | | |||
53 | public Q_SLOTS: // METHODS | 55 | public Q_SLOTS: // METHODS | ||
54 | void UpdateLookupTable(const QStringList &labels, | 56 | void UpdateLookupTable(const QStringList &labels, | ||
55 | const QStringList &candis, | 57 | const QStringList &candis, | ||
56 | const QStringList &attrlists, | 58 | const QStringList &attrlists, | ||
57 | bool has_prev, bool has_next); | 59 | bool has_prev, bool has_next); | ||
58 | void UpdatePreeditText(const QString &text, const QString &attr); | 60 | void UpdatePreeditText(const QString &text, const QString &attr); | ||
59 | void UpdateAux(const QString &text, const QString &attr); | 61 | void UpdateAux(const QString &text, const QString &attr); | ||
60 | void UpdateScreen(int screen_id); | 62 | void UpdateScreen(int screen_id); | ||
61 | void UpdateProperty(const QString &prop); | 63 | void UpdateProperty(const QString &prop); | ||
62 | void RegisterProperties(const QStringList &props); | 64 | void RegisterProperties(const QStringList &props); | ||
63 | void ExecDialog(const QString &prop); | 65 | void ExecDialog(const QString &prop); | ||
64 | void ExecMenu(const QStringList &entries); | 66 | void ExecMenu(const QStringList &entries); | ||
65 | void SetSpotRect(int x, int y, int w, int h); | 67 | void SetSpotRect(int x, int y, int w, int h); | ||
66 | void SetLookupTable(const QStringList &labels, | 68 | void SetLookupTable(const QStringList &labels, | ||
67 | const QStringList &candis, | 69 | const QStringList &candis, | ||
68 | const QStringList &attrlists, | 70 | const QStringList &attrlists, | ||
69 | bool hasPrev, bool hasNext, int cursor, int layout); | 71 | bool hasPrev, bool hasNext, int cursor, int layout); | ||
70 | void serviceUnregistered(const QString& service); | 72 | void serviceUnregistered(const QString& service); | ||
73 | void updateShowStatus(); | ||||
74 | void updateConfig(); | ||||
75 | void updateCurrentLayoutIndex(); | ||||
71 | 76 | | |||
72 | Q_SIGNALS: | 77 | Q_SIGNALS: | ||
73 | // signals that from kimpanel | 78 | // signals that from kimpanel | ||
74 | void Configure(); | 79 | void Configure(); | ||
75 | void MovePreeditCaret(int position); | 80 | void MovePreeditCaret(int position); | ||
76 | void SelectCandidate(int index); | 81 | void SelectCandidate(int index); | ||
77 | void LookupTablePageUp(); | 82 | void LookupTablePageUp(); | ||
78 | void LookupTablePageDown(); | 83 | void LookupTablePageDown(); | ||
Show All 20 Lines | |||||
99 | 104 | | |||
100 | void execDialog(const KimpanelProperty &prop); | 105 | void execDialog(const KimpanelProperty &prop); | ||
101 | void execMenu(const QList<KimpanelProperty> &prop_list); | 106 | void execMenu(const QList<KimpanelProperty> &prop_list); | ||
102 | 107 | | |||
103 | void showPreedit(bool to_show); | 108 | void showPreedit(bool to_show); | ||
104 | void showAux(bool to_show); | 109 | void showAux(bool to_show); | ||
105 | void showLookupTable(bool to_show); | 110 | void showLookupTable(bool to_show); | ||
106 | void updateLookupTableCursor(int pos); | 111 | void updateLookupTableCursor(int pos); | ||
112 | void showPlasmoid(bool to_show); | ||||
113 | void currentLayoutChanged(QString const& label, QString const& iconName); | ||||
107 | 114 | | |||
108 | private: | 115 | private: | ||
109 | bool m_show_aux; | 116 | bool m_show_aux; | ||
110 | bool m_show_preedit; | 117 | bool m_show_preedit; | ||
111 | bool m_show_lookup_table; | 118 | bool m_show_lookup_table; | ||
119 | bool m_show_layout_indicator; | ||||
120 | bool m_show_single; | ||||
112 | int m_spot_x; | 121 | int m_spot_x; | ||
113 | int m_spot_y; | 122 | int m_spot_y; | ||
114 | QString m_currentService; | 123 | QString m_currentService; | ||
115 | QStringList cached_props; | 124 | QStringList cached_props; | ||
116 | ImpanelAdaptor* adaptor; | 125 | ImpanelAdaptor* adaptor; | ||
117 | Impanel2Adaptor* adaptor2; | 126 | Impanel2Adaptor* adaptor2; | ||
118 | QDBusServiceWatcher* watcher; | 127 | QDBusServiceWatcher* watcher; | ||
128 | QDBusInterface* m_kdedIface; | ||||
129 | LayoutListModels* m_models; | ||||
119 | }; | 130 | }; | ||
120 | 131 | | |||
121 | #endif // KIMPANEL_AGENT_H | 132 | #endif // KIMPANEL_AGENT_H | ||
122 | 133 | |