summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Bauer2011-06-16 16:36:14 +0200
committerJonathan Bauer2011-06-16 16:36:14 +0200
commit0b99cfa6550c1828294aaca9b64eb7517f1e729f (patch)
tree75452cd1d3c7b696db9dc7c9ced3019c053ed642 /src
parentinitial import (diff)
downloadfbsplash-0b99cfa6550c1828294aaca9b64eb7517f1e729f.tar.gz
fbsplash-0b99cfa6550c1828294aaca9b64eb7517f1e729f.tar.xz
fbsplash-0b99cfa6550c1828294aaca9b64eb7517f1e729f.zip
CMakeLists, main class and build/run scripts
Diffstat (limited to 'src')
-rw-r--r--src/fbsplash.cpp28
-rw-r--r--src/fbsplash.h34
-rw-r--r--src/main.cpp13
3 files changed, 75 insertions, 0 deletions
diff --git a/src/fbsplash.cpp b/src/fbsplash.cpp
new file mode 100644
index 0000000..c2f52bb
--- /dev/null
+++ b/src/fbsplash.cpp
@@ -0,0 +1,28 @@
+#include "fbsplash.h"
+
+fbsplash::fbsplash(){
+
+ qDebug() << "*fbsplash init*";
+
+ createQuitAction();
+ setupTheme();
+
+ setAttribute(Qt::WA_QuitOnClose, true);
+ setWindowFlags(Qt::FramelessWindowHint);
+ showFullScreen();
+}
+//-----------------------------------------------------------------------------
+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);
+}
+//-----------------------------------------------------------------------------
+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
new file mode 100644
index 0000000..f081906
--- /dev/null
+++ b/src/fbsplash.h
@@ -0,0 +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
+ *
+ */
+
+#ifndef FBSPLASH_H
+#define FBSPLASH_H
+
+#include <QtGui>
+
+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
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..16c2daf
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,13 @@
+#include <QApplication>
+#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