diff options
-rw-r--r-- | shemovcleaner.cpp | 18 | ||||
-rw-r--r-- | shemovcleaner.h | 1 | ||||
-rw-r--r-- | torrentwidget.h | 1 |
3 files changed, 18 insertions, 2 deletions
diff --git a/shemovcleaner.cpp b/shemovcleaner.cpp index 2274262..4bdc524 100644 --- a/shemovcleaner.cpp +++ b/shemovcleaner.cpp @@ -4,7 +4,6 @@ #include <QAction> #include <QToolBar> #include <QMenu> -#include <QMenuBar> #include <QApplication> #include <QSettings> #include <QSqlDatabase> @@ -47,6 +46,19 @@ ShemovCleaner::ShemovCleaner(QWidget *parent, Qt::WindowFlags f) : QMainWindow(p connect(mFileTab, SIGNAL(durationChanged(QString)), this, SLOT(setDuration(QString))); connect(mTab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int))); + QMenu *helpMenu = new QMenu(tr("&Help")); + QAction *aboutThisA = new QAction(tr("About ShemovCleaner..."), this); + connect(aboutThisA, SIGNAL(triggered()), this, SLOT(aboutThisProgram())); + helpMenu->addAction(aboutThisA); + helpMenu->addSeparator(); + QAction *aboutQtA = new QAction(tr("About Qt..."), this); + connect(aboutQtA, SIGNAL(triggered()), qApp, SLOT(aboutQt())); + helpMenu->addAction(aboutQtA); + + mTorrentTab->menuBar()->addMenu(helpMenu); + mFileTab->menuBar()->addMenu(helpMenu); + + QSettings s; restoreGeometry(s.value("geometry").toByteArray()); mTorrentTab->torrentFileView()->setFocus(); @@ -146,6 +158,10 @@ void ShemovCleaner::openDatabase(){ } } +void ShemovCleaner::aboutThisProgram(){ + QMessageBox::about(this, tr("About ShemovCleaner"), tr("A little helper program for the big sister SheMov")); +} + QAction *ShemovCleaner::createSeparator(){ QAction *retval = new QAction(this); retval->setSeparator(true); diff --git a/shemovcleaner.h b/shemovcleaner.h index c4abf84..875b05d 100644 --- a/shemovcleaner.h +++ b/shemovcleaner.h @@ -21,6 +21,7 @@ class ShemovCleaner : public QMainWindow { void setDuration(const QString &msg); void configure(); void tabChanged(int idx); + void aboutThisProgram(); protected: virtual void closeEvent(QCloseEvent *e); diff --git a/torrentwidget.h b/torrentwidget.h index aa3d977..00b4c35 100644 --- a/torrentwidget.h +++ b/torrentwidget.h @@ -25,7 +25,6 @@ class TorrentWidget : public QWidget { enum Columns { IconColumn = 0, NameColumn = 1, CreatedColumn = 2 }; enum Present { NotPresent = 0, Present = 1 }; TorrentWidget(QWidget *parent = 0); - QToolBar *toolBar() { return mToolBar; } QMenuBar *menuBar() { return mMenuBar; } TorrentDisplay *torrentDisplay() { return mTorrentDisplay; } QTreeView *torrentFileView() { return mFileView; } |