aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.h
diff options
context:
space:
mode:
authorKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
committerKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
commit71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 (patch)
treeab29e864d1ae59d10cc6875af9541e3ad306b2fb /lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.h
parentInitial commit (diff)
downloadlumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.gz
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.bz2
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.zip
Initial import of the lumina code from pcbsd git repo
Diffstat (limited to 'lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.h')
-rw-r--r--lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.h b/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.h
new file mode 100644
index 00000000..bd23d8e9
--- /dev/null
+++ b/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.h
@@ -0,0 +1,67 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2014, Susanne Jaeckel
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#ifndef _LUMINA_DESKTOP_SWITCHER_H
+#define _LUMINA_DESKTOP_SWITCHER_H
+
+#include <QTimer>
+#include <QWidget>
+#include <QString>
+//#include <QX11Info>
+#include <QMenu>
+#include <QToolButton>
+
+#include <LuminaUtils.h>
+#include <LuminaXDG.h>
+#include <LuminaX11.h>
+
+//#include "../LTBWidget.h"
+#include "../LPPlugin.h"
+
+//#include <X11/Xlib.h>
+//#include <X11/Xutil.h>
+//#include <X11/Xatom.h>
+
+class LDesktopSwitcher : public LPPlugin{
+ Q_OBJECT
+public:
+ LDesktopSwitcher(QWidget *parent = 0, QString id = "desktopswitcher", bool horizontal=true);
+ ~LDesktopSwitcher();
+
+private:
+ QTimer *timer;
+ QToolButton *label;
+ QMenu *menu;
+ int iconOld;
+
+ //void setNumberOfDesktops(int);
+ //void setCurrentDesktop(int);
+ //int getNumberOfDesktops();
+ //int getCurrentDesktop();
+
+
+ QAction* newAction(int, QString);
+
+private slots:
+ void createMenu();
+ void menuActionTriggered(QAction*);
+
+public slots:
+ void OrientationChange(){
+ QSize sz;
+ if(this->layout()->direction()==QBoxLayout::LeftToRight){
+ this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
+ sz = QSize(this->height(), this->height());
+ }else{
+ this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
+ sz = QSize(this->width(), this->width());
+ }
+ label->setIconSize(sz);
+ this->layout()->update();
+ }
+};
+
+#endif
bgstack15