summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2011-06-16 16:47:10 +0200
committerJonathan Bauer2011-06-16 16:47:10 +0200
commit3a8aee3ab0a4752eee488bd2a123b9bece757ab3 (patch)
tree17007f4f3dff4d22ba493eb94dbddf9350579e60
parenttest (diff)
downloadfbsplash-3a8aee3ab0a4752eee488bd2a123b9bece757ab3.tar.gz
fbsplash-3a8aee3ab0a4752eee488bd2a123b9bece757ab3.tar.xz
fbsplash-3a8aee3ab0a4752eee488bd2a123b9bece757ab3.zip
black background...
-rw-r--r--src/fbsplash.cpp21
-rw-r--r--src/fbsplash.h36
-rw-r--r--src/main.cpp6
3 files changed, 32 insertions, 31 deletions
diff --git a/src/fbsplash.cpp b/src/fbsplash.cpp
index c2f52bb..7df12ab 100644
--- a/src/fbsplash.cpp
+++ b/src/fbsplash.cpp
@@ -1,28 +1,29 @@
#include "fbsplash.h"
-fbsplash::fbsplash(){
-
- qDebug() << "*fbsplash init*";
-
+fbsplash::fbsplash() :
+ QMainWindow() {
+
+ qDebug() << "fbsplash init";
+
createQuitAction();
setupTheme();
-
+
setAttribute(Qt::WA_QuitOnClose, true);
setWindowFlags(Qt::FramelessWindowHint);
showFullScreen();
}
//-----------------------------------------------------------------------------
-void fbsplash::setupTheme(){
+void fbsplash::setupTheme() {
// TODO configurable per cmdline
// for now, black as base background color
QPalette pal;
- pal.setColor(QPalette::Base, Qt::black);
- this->setPalette(pal);
+ pal.setColor(QPalette::Window, Qt::black);
+ setPalette(pal);
}
//-----------------------------------------------------------------------------
-void fbsplash::createQuitAction(){
+void fbsplash::createQuitAction() {
_quit = new QAction(tr("&quit"), this);
_quit->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_X));
this->addAction(_quit);
connect(_quit, SIGNAL(triggered()), this, SLOT(close()));
-} \ No newline at end of file
+}
diff --git a/src/fbsplash.h b/src/fbsplash.h
index f081906..c0a1990 100644
--- a/src/fbsplash.h
+++ b/src/fbsplash.h
@@ -1,34 +1,34 @@
- /*
- * Copyright (c) 2010,2011 - OpenSLX Project
- *
- * This program/file is free software distributed under the GPL version 2.
- * See http://openslx.org/COPYING
- *
- * If you have any feedback please consult http://openslx.org/feedback and
- * send your feedback to feedback@openslx.org
- *
- * General information about OpenSLX can be found under http://openslx.org
- *
- */
+/*
+ * Copyright (c) 2010,2011 - OpenSLX Project
+ *
+ * This program/file is free software distributed under the GPL version 2.
+ * See http://openslx.org/COPYING
+ *
+ * If you have any feedback please consult http://openslx.org/feedback and
+ * send your feedback to feedback@openslx.org
+ *
+ * General information about OpenSLX can be found under http://openslx.org
+ *
+ */
#ifndef FBSPLASH_H
#define FBSPLASH_H
#include <QtGui>
-class fbsplash: public QMainWindow{
- Q_OBJECT
-
+class fbsplash: public QMainWindow {
+Q_OBJECT
+
public:
fbsplash();
-
+
private:
void setupTheme();
// ** TESTING STUFF **
void createQuitAction();
QAction* _quit;
// ** TESTING STUFF **
-
+
};
-#endif // FBSPLASH_H \ No newline at end of file
+#endif // FBSPLASH_H
diff --git a/src/main.cpp b/src/main.cpp
index 16c2daf..32d2688 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2,12 +2,12 @@
#include "fbsplash.h"
int main(int argc, char *argv[]) {
-
+
QApplication app(argc, argv, QApplication::GuiServer);
app.setOrganizationName("OpenSLX");
app.setApplicationName("fbsplash");
-
+
fbsplash bs;
bs.show();
app.exec();
-} \ No newline at end of file
+}