summaryrefslogtreecommitdiffstats
path: root/src/fbgui/agui.h
blob: 0639981084bd9b97cdfb8b9630efc3a9a8254e96 (plain) (blame)
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
/*
 * agui.h
 *
 *  Created on: Jan 31, 2012
 *      Author: joe
 */

#ifndef AGUI_H_
#define AGUI_H_

#include <QtGui>
#include <QtWebKit>

extern QString logFilePath;
extern int debugMode;

class agui: public QMainWindow
{
	Q_OBJECT

public:
	agui();
	virtual ~agui();

protected:
	  // QWebView for displaying internet content
	  QWebView* _webView;
	  //-------------------
	  //   layout setup:
	  //-------------------
	  // Sets the layout depending on the debug mode:
	  //   no debug or debugMode = 0 -> only browser shown.
	  //   debugMode = 1             -> split main window in browser and debug console.
	  void setupLayout();
	  // Create all actions for the GUI. (Currently only quit.)
	  void createActions();

	  //------------------
	  //   action list:
	  //------------------
	  // closes the main window provoking the application to quit.
	  QAction* _quit;

private:
  void magicKey(const char*);

protected slots:
  // shut off the system
  void shutdownSystem();
  // reboot the system
  void rebootSystem();
};

#endif /* AGUI_H_ */