aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-terminal/TermWindow.h
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-04-25 13:08:12 -0400
committerKen Moore <moorekou@gmail.com>2016-04-25 13:08:12 -0400
commited5ecf7ea7a482b4649e66ecb35fbc60af680684 (patch)
treeacc0fa17d228259e847f55c678db9fb0a9b50f0c /src-qt5/desktop-utils/lumina-terminal/TermWindow.h
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-ed5ecf7ea7a482b4649e66ecb35fbc60af680684.tar.gz
lumina-ed5ecf7ea7a482b4649e66ecb35fbc60af680684.tar.bz2
lumina-ed5ecf7ea7a482b4649e66ecb35fbc60af680684.zip
Rearrange the Lumina source tree quite a bit:
Now the utilites are arranged by category (core, core-utils, desktop-utils), so all the -utils may be excluded by a package system (or turned into separate packages) as needed.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-terminal/TermWindow.h')
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/TermWindow.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.h b/src-qt5/desktop-utils/lumina-terminal/TermWindow.h
new file mode 100644
index 00000000..d68c5457
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.h
@@ -0,0 +1,70 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2015, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#ifndef _LUMINA_DESKTOP_UTILITIES_TERMINAL_MAIN_WINDOW_H
+#define _LUMINA_DESKTOP_UTILITIES_TERMINAL_MAIN_WINDOW_H
+
+#include <QWidget>
+#include <QPropertyAnimation>
+#include <QTabWidget>
+#include <QDir>
+#include <QShortcut>
+#include <QMouseEvent>
+#include <QSettings>
+
+class TermWindow : public QWidget{
+ Q_OBJECT
+public:
+ TermWindow(QSettings *set);
+ ~TermWindow();
+
+ void cleanup(); //called right before the window is closed
+ void OpenDirs(QStringList);
+
+ void setCurrentScreen(int num = 0);
+ void setTopOfScreen(bool ontop);
+
+public slots:
+ void ShowWindow();
+ void HideWindow();
+ void CloseWindow();
+ void ReShowWindow();
+
+private:
+ QTabWidget *tabWidget;
+ QSettings *settings;
+ QShortcut *hideS, *closeS, *newTabS, *closeTabS, *prevTabS, *nextTabS;
+ int screennum;
+ bool onTop, CLOSING;
+ QPropertyAnimation *ANIM;
+ int animRunning; //internal flag for what animation is currently running
+
+ //Calculate the window geometry necessary based on screen/location
+ void CalculateGeom();
+ QString GenerateTabID();
+
+private slots:
+ //Tab Interactions
+ void New_Tab();
+ void Close_Tab(int tab = -1);
+ void Close_Tab(QString ID); //alternate form of the close routine - based on tab ID
+ void Next_Tab();
+ void Prev_Tab();
+ void focusOnWidget();
+ //Animation finishing
+ void AnimFinished();
+
+protected:
+ void mouseMoveEvent(QMouseEvent*);
+
+signals:
+ void TerminalHidden();
+ void TerminalVisible();
+ void TerminalClosed();
+ void TerminalFinished();
+};
+
+#endif
bgstack15