diff options
author | Jonathan Bauer | 2011-06-16 16:36:14 +0200 |
---|---|---|
committer | Jonathan Bauer | 2011-06-16 16:36:14 +0200 |
commit | 0b99cfa6550c1828294aaca9b64eb7517f1e729f (patch) | |
tree | 75452cd1d3c7b696db9dc7c9ced3019c053ed642 /src/fbsplash.cpp | |
parent | initial import (diff) | |
download | fbsplash-0b99cfa6550c1828294aaca9b64eb7517f1e729f.tar.gz fbsplash-0b99cfa6550c1828294aaca9b64eb7517f1e729f.tar.xz fbsplash-0b99cfa6550c1828294aaca9b64eb7517f1e729f.zip |
CMakeLists, main class and build/run scripts
Diffstat (limited to 'src/fbsplash.cpp')
-rw-r--r-- | src/fbsplash.cpp | 28 |
1 files changed, 28 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 |