aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils/lumina-config/mainWindow.h
blob: c441de6143e7fed274b8c1a5747f383cc5932240 (plain)
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
//===========================================
//  Lumina Desktop Source Code
//  Copyright (c) 2016, Ken Moore
//  Available under the 3-clause BSD license
//  See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_CONFIG_MAIN_WINDOW_H
#define _LUMINA_CONFIG_MAIN_WINDOW_H
#include "globals.h"
//#include "pages/getPage.h"

#include <QResizeEvent>
#include <QMoveEvent>

namespace Ui{
	class mainWindow;
};

class mainWindow : public QMainWindow{
	Q_OBJECT
public:
	mainWindow();
	~mainWindow();

public slots:
	void slotSingleInstance(QStringList args);
	void setupIcons();
	void loadMonitors();

private:
	Ui::mainWindow *ui;
	QShortcut *backShortcut, *quitShortcut;
	QString cpage; //current page
	QTimer *geomTimer;

	void changePage(QString id);

private slots:
	void saveWinGeometry();

	//Page signals
	void pageCanSave(bool);
	void pageSetTitle(QString);
	bool page_change(QString);
	//Toolbar actions
	void on_actionSave_triggered();
	void on_actionBack_triggered();
        void changeMonitor(QAction*);
	void quitShortcut_Triggered();

protected:
	void resizeEvent(QResizeEvent *ev){
	  if(geomTimer->isActive()){ geomTimer->stop(); }
	  geomTimer->start();
	  QMainWindow::resizeEvent(ev);
	}
	void moveEvent(QMoveEvent *ev){
	  if(geomTimer->isActive()){ geomTimer->stop(); }
	  geomTimer->start();
	  QMainWindow::moveEvent(ev);
	}
};
#endif
bgstack15