diff options
author | Simon Rettberg | 2015-10-08 19:33:33 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-10-08 19:33:33 +0200 |
commit | a163f2b5431ab8b274e7ac2e4b7dbf2299675905 (patch) | |
tree | 1a9e935ddf5c201cc268a89b647821b6c2c2d50d /src/maingui/main.cpp | |
parent | move msgBox closer to center :) TOFIX (diff) | |
download | printergui-a163f2b5431ab8b274e7ac2e4b7dbf2299675905.tar.gz printergui-a163f2b5431ab8b274e7ac2e4b7dbf2299675905.tar.xz printergui-a163f2b5431ab8b274e7ac2e4b7dbf2299675905.zip |
Add fullscreen bg to printergui; preserve job name
Diffstat (limited to 'src/maingui/main.cpp')
-rw-r--r-- | src/maingui/main.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/maingui/main.cpp b/src/maingui/main.cpp index c22ad7b..25f81a0 100644 --- a/src/maingui/main.cpp +++ b/src/maingui/main.cpp @@ -2,9 +2,12 @@ #include <QMessageBox> #include <fstream> #include "printergui.h" +#include "backdrop.h" #include <fcntl.h> #include <sys/stat.h> +static Backdrop* showGrayBackground(); + int main(int argc, char *argv[]) { // First check parameter count @@ -26,9 +29,22 @@ int main(int argc, char *argv[]) } close(fh); - PrinterGui *w = new PrinterGui(argv); + Backdrop* bgWin = showGrayBackground(); + + PrinterGui *w = new PrinterGui(argv, bgWin); + bgWin->setMainWindow(w); w->show(); } return a.exec(); } + +static Backdrop* showGrayBackground() +{ + Backdrop *bg = new Backdrop; + bg->show(); + bg->raise(); + bg->activateWindow(); + bg->move(0, 0); + return bg; +} |