-
Notifications
You must be signed in to change notification settings - Fork 0
/
qappindicator.h
67 lines (52 loc) · 1.54 KB
/
qappindicator.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
#ifndef QAPPINDICATOR_H
#define QAPPINDICATOR_H
#include <QObject>
#undef signals
extern "C"
{
#include <gtk/gtk.h>
#include <libappindicator/app-indicator.h>
}
#define signals public
class QAppIndicator: public QObject
{
Q_OBJECT
public:
QAppIndicator(QString id, QString iconName, AppIndicatorCategory category);
QAppIndicator(QString id, QString iconName, AppIndicatorCategory category, QString iconThemePath);
QString id();
AppIndicatorCategory category();
void setStatus(AppIndicatorStatus status);
AppIndicatorStatus status();
/**
* @brief setMenu set menu and show all menu items
* @param menu
*/
void setMenu(GtkMenu *menu);
GtkMenu* menu();
void setAttentionIcon(QString iconName);
void setAttentionIconFull(QString iconName, QString iconDesc);
QString attentionIcon();
QString attentionIconDesc();
void setIcon(QString iconName);
void setIconFull(QString iconName, QString iconDesc);
void setIconThemePath(QString iconThemePath);
QString icon();
QString iconDesc();
QString iconThemePath();
void setLabel(QString label, QString guide);
QString label();
QString labelGuide();
void setTitle(QString title);
QString title();
void setOrderingIndex(quint32 orderingIndex);
quint32 orderingIndex();
void setSecondaryActivateTarget(GtkWidget *menuitem);
GtkWidget *secondaryActivateTarget();
void buildMenuFromDesktop(QString desktopFile, QString desktopProfile);
private:
void init(QString id, QString iconName, AppIndicatorCategory category, QString iconThemePath);
private:
AppIndicator *self_;
};
#endif // QAPPINDICATOR_H