From 274e54474010876cb7753924c4116360aa73b906 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 11 Feb 2017 06:43:49 +0100 Subject: Create GUI for search widget Does nothing yet, just the GUI, connections and actions... --- shemovcleaner.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'shemovcleaner.cpp') diff --git a/shemovcleaner.cpp b/shemovcleaner.cpp index 1e886a1..1b2e5cf 100644 --- a/shemovcleaner.cpp +++ b/shemovcleaner.cpp @@ -20,6 +20,7 @@ #include "torrentwidget.h" #include "filewidget.h" #include "actorwidget.h" +#include "searchwidget.h" #include "torrentdisplay.h" #include "configurationwidget.h" #include "globals.h" @@ -47,10 +48,13 @@ ShemovCleaner::ShemovCleaner(QWidget *parent, Qt::WindowFlags f) : QMainWindow(p qApp->processEvents(); mActorTab->gatherData(); mActorTab->readSettings(); + qApp->processEvents(); + mSearchTab = new SearchWidget; mTab->addTab(mTorrentTab, tr("&Torrents")); mTab->addTab(mFileTab, tr("Fi&les")); mTab->addTab(mActorTab, tr("&Actors")); + mTab->addTab(mSearchTab, tr("Searc&h")); setCentralWidget(mTab); connect(mTorrentTab, SIGNAL(statusMessage(QString)), this, SLOT(statusBarMessage(QString))); @@ -74,6 +78,7 @@ ShemovCleaner::ShemovCleaner(QWidget *parent, Qt::WindowFlags f) : QMainWindow(p mTorrentTab->menuBar()->addMenu(helpMenu); mFileTab->menuBar()->addMenu(helpMenu); mActorTab->menuBar()->addMenu(helpMenu); + mSearchTab->menuBar()->addMenu(helpMenu); QSettings s; restoreGeometry(s.value("geometry").toByteArray()); @@ -149,6 +154,8 @@ void ShemovCleaner::tabChanged(int idx){ mActorTab->actorView()->setFocus(); updateFreeSpace(mFileTab->currentDir()); winTitle = tr("%1 Actors").arg(qApp->applicationName()); + }else if(idx == Search){ + winTitle = QString(tr("%1 Search for %2")).arg(qApp->applicationName()).arg(mSearchTab->currentSearch()); } setWindowTitle(winTitle); } -- cgit v1.2.3-70-g09d2