Applets
systemtraywidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SYSTEMTRAYWIDGET_H
00024 #define SYSTEMTRAYWIDGET_H
00025
00026
00027 #include <QGridLayout>
00028 #include <QWidget>
00029
00030
00031 #include <X11/Xdefs.h>
00032
00033 class SystemTrayWidget: public QWidget
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 SystemTrayWidget(QWidget *parent);
00039
00040 void init();
00041
00042 void setOrientation(Qt::Orientation);
00043 void setMaximumSize(QSize s);
00044
00045 protected:
00046 bool x11Event(XEvent *event);
00047
00048 Q_SIGNALS:
00049 void sizeShouldChange();
00050
00051 private slots:
00052 void relayoutContainers(QObject *removeContainer = 0);
00053
00054 private:
00055 void addWidgetToLayout(QWidget *widget);
00056 void doSizeChange();
00057
00058 QGridLayout *m_mainLayout;
00059 Qt::Orientation m_orientation;
00060 int m_maxCount;
00061 int m_nextRow;
00062 int m_nextColumn;
00063
00064
00065 Atom m_selectionAtom;
00066 Atom m_opcodeAtom;
00067 };
00068
00069 #endif // SYSTEMTRAYWIDGET_H