source: lumina/lumina-desktop/SystemWindow.h @ 4565b4c

enter/10releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1releng/10.1.2
Last change on this file since 4565b4c was 4565b4c, checked in by Ken Moore <ken@…>, 15 months ago

Make sure to close all windows before logging out of lumina.

  • Property mode set to 100644
File size: 920 bytes
Line 
1#ifndef _LUMINA_DESKTOP_SYSTEM_WINDOW_H
2#define _LUMINA_DESKTOP_SYSTEM_WINDOW_H
3
4#include <QDialog>
5#include <QCoreApplication>
6#include <QDesktopWidget>
7#include <QList>
8
9#include "ui_SystemWindow.h"
10#include "Globals.h"
11
12#include <LuminaXDG.h>
13#include <LuminaX11.h>
14
15
16
17namespace Ui{
18        class SystemWindow;
19};
20
21class SystemWindow : public QDialog{
22        Q_OBJECT
23public:
24        SystemWindow();
25        ~SystemWindow();
26
27private:
28        Ui::SystemWindow *ui;
29
30        void closeAllWindows(){
31          QList<WId> WL = LX11::WindowList();
32          for(int i=0; i<WL.length(); i++){
33            LX11::CloseWindow(WL[i]);
34          }
35        }
36       
37private slots:
38        void sysLogout(){
39          closeAllWindows();
40          QCoreApplication::exit(0);
41        }
42       
43        void sysRestart(){
44          closeAllWindows();
45          SYSTEM::restart();
46          QCoreApplication::exit(0);           
47        }
48       
49        void sysShutdown(){
50          closeAllWindows();
51          SYSTEM::shutdown();
52          QCoreApplication::exit(0);
53        }
54       
55        void sysCancel(){
56          this->close();
57        }
58};
59
60#endif
Note: See TracBrowser for help on using the repository browser.