summaryrefslogtreecommitdiffstats
path: root/starter/starter.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-21 20:35:05 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-21 20:35:05 +0100
commit066aaaeb73a8bb908b1c0d8c45f110b2f799f7ce (patch)
tree4cb26eb8ace976f7d0c8607dc2d3de2b5107670c /starter/starter.h
downloadtde-style-baghira-066aaaeb73a8bb908b1c0d8c45f110b2f799f7ce.tar.gz
tde-style-baghira-066aaaeb73a8bb908b1c0d8c45f110b2f799f7ce.zip
Initial import of baghira 0.8
Diffstat (limited to 'starter/starter.h')
-rw-r--r--starter/starter.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/starter/starter.h b/starter/starter.h
new file mode 100644
index 0000000..39c72b9
--- /dev/null
+++ b/starter/starter.h
@@ -0,0 +1,72 @@
+
+#ifndef STARTER_H
+#define STARTER_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <kpanelapplet.h>
+#include <qmap.h>
+#include <qstring.h>
+#include <qpixmap.h>
+// #include <qpainter.h>
+#include <kconfig.h>
+#include <kshortcut.h>
+#include "starteriface.h"
+#include "mykey.h"
+
+class DCOPClient;
+class QLabel;
+class KPopupMenu;
+class StartMenu;
+class StarterConfig;
+
+class starter : public KPanelApplet, virtual public StarterIface
+{
+ Q_OBJECT
+
+public:
+ starter(const QString& configFile, Type t = Normal, int actions = 0,
+ QWidget *parent = 0, const char *name = 0);
+ ~starter();
+
+ virtual int widthForHeight(int height) const;
+ virtual int heightForWidth(int width) const;
+ virtual void preferences();
+ void popupMenu();
+ void showMenu();
+protected:
+ virtual void resizeEvent ( QResizeEvent * );
+
+private:
+ enum State {Default, Hover, Down};
+ State state;
+ int _iconSize;
+ bool eventFilter( QObject *o, QEvent *e );
+ bool popupBlocked;
+// bool isDialog_;
+ QLabel *mainView;
+// QPainter m_painter;
+ DCOPClient *client;
+ KPopupMenu *configPopup;
+ StartMenu *startMenu;
+ QPixmap pixmap;
+ QPixmap hoverPixmap;
+ QPixmap downPixmap;
+ StarterConfig *configDialog;
+ typedef QMap<MyKey,QString> ShortcutList;
+ ShortcutList shortcutList;
+private slots:
+ void addShortcut(const KShortcut&);
+ void updateShortcutButton(const QString&);
+ void configureMenu();
+ void reloadImages();
+ void updateSettings();
+// void blockMenu();
+ void unblockPopupDelayed();
+ void unblockPopup();
+ void activateShortcutButton(int);
+};
+
+#endif