summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index fff5685..96265d2 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -17,9 +17,6 @@ bool debug = false;
//-------------------------------------------------------------------------------------------
fbgui::fbgui()
{
- /* TEST CODE */
- _logView = new logViewer(this);
-
/* initialize "browser" */
checkHost();
_webView = new QWebView(this);
@@ -40,27 +37,32 @@ fbgui::fbgui()
jsi, SLOT(updateProgressBar(int, double, QString)));
QObject::connect(dm, SIGNAL(downloadQueueEmpty()), jsi, SLOT(callbackOnDlQueueFinished()));
- /* TEST */
- _splitter = new QSplitter(Qt::Vertical, this);
- _splitter->addWidget(_webView);
- _splitter->addWidget(_logView);
- createActions();
- /* TEST */
setWindowTitle("fbgui");
setAttribute(Qt::WA_QuitOnClose, true);
setWindowFlags(Qt::FramelessWindowHint);
- setCentralWidget(_splitter);
+
+ /* TEST */
+ if (debug){
+ _logView = new logViewer(this);
+ _splitter = new QSplitter(Qt::Vertical, this);
+ _splitter->addWidget(_webView);
+ _splitter->addWidget(_logView);
+ /* CTRL + D toggles debug window */
+ _toggleDebug = new QAction(tr("&toggleDebug"), this);
+ _toggleDebug->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
+ this->addAction(_toggleDebug);
+ connect(_toggleDebug, SIGNAL(triggered()), this, SLOT(toggleDebug()));
+ //createToggleDebugAction();
+ setCentralWidget(_splitter);
+ }
+ else
+ setCentralWidget(_webView);
+ /* TEST */
+
showFullScreen();
}
//-------------------------------------------------------------------------------------------
-void fbgui::createActions(){
- /* CTRL + D: toggle debug window */
- _toggleDebug = new QAction(tr("&toggleDebug"), this);
- _toggleDebug->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
- this->addAction(_toggleDebug);
- connect(_toggleDebug, SIGNAL(triggered()), this, SLOT(toggleDebug()));
-}
//-------------------------------------------------------------------------------------------
void fbgui::toggleDebug(){
if (_logView->isVisibleTo(_splitter))