aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/SystemWindow.h
blob: 3be8642e897343909a43171b9120f3cf371b7bde (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
#ifndef _LUMINA_DESKTOP_SYSTEM_WINDOW_H
#define _LUMINA_DESKTOP_SYSTEM_WINDOW_H

#include <QDialog>
#include <QCoreApplication>
#include <QDesktopWidget>
#include <QList>
#include <QProcess>

#include "ui_SystemWindow.h"
#include "Globals.h"

#include <LuminaXDG.h>
#include <LuminaX11.h>
#include <LuminaOS.h>



namespace Ui{
	class SystemWindow;
};

class SystemWindow : public QDialog{
	Q_OBJECT
public:
	SystemWindow();
	~SystemWindow();

private:
	Ui::SystemWindow *ui;

	void closeAllWindows();
	
private slots:
	void sysLogout(){
	  closeAllWindows();
	  QCoreApplication::exit(0);
	}
	
	void sysRestart(){
	  closeAllWindows();
	  LOS::systemRestart();
	  QCoreApplication::exit(0);		
	}
	
	void sysShutdown(){
	  closeAllWindows();
	  LOS::systemShutdown();
	  QCoreApplication::exit(0);
	}
	
	void sysCancel(){
	  this->close();
	}
	
	void sysLock(){
	  qDebug() << "Locking the desktop...";
	  QProcess::startDetached("xscreensaver-command -lock");
	  this->close();
	}
};

#endif
bgstack15