diff options
author | Arno <arno@disconnect.de> | 2018-11-24 08:18:12 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-11-24 08:18:12 +0100 |
commit | f9704767ed8bc325f9224c69b2dd18f564ee5cc0 (patch) | |
tree | c54f213d9962a596ed09dca824a86b03e9867bbc /movieinfopage.cpp | |
parent | 838f8d1760b8c7f72680ab0c57fd813c29940b86 (diff) | |
download | SheMov-f9704767ed8bc325f9224c69b2dd18f564ee5cc0.tar.gz SheMov-f9704767ed8bc325f9224c69b2dd18f564ee5cc0.tar.bz2 SheMov-f9704767ed8bc325f9224c69b2dd18f564ee5cc0.zip |
Improve MovieInfoPage
Replace QPushButtons with a QToolbar and appropriate unicode symbols.
While at at, return from Helper::fuzzyCheck when the search string is
empty. Prevents false positives.
Diffstat (limited to 'movieinfopage.cpp')
-rw-r--r-- | movieinfopage.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/movieinfopage.cpp b/movieinfopage.cpp index 425a252..6726587 100644 --- a/movieinfopage.cpp +++ b/movieinfopage.cpp @@ -23,6 +23,8 @@ #include <QSpinBox> #include <QFileDialog> #include <QMessageBox> +#include <QToolBar> +#include <QApplication> #include "movieinfopage.h" #include "wizardtreemodel.h" @@ -80,12 +82,14 @@ void MovieInfoPage::setupGui(){ mSubtitle = new QLineEdit; movieTitleLayout->addWidget(new QLabel(tr("Movie subtitle")), 1, 0); movieTitleLayout->addWidget(mSubtitle, 1, 1, 1, 1); - QPushButton *lowerCaseB = new QPushButton(QIcon(":/steel_collar.png"), tr("Lower case")); - connect(lowerCaseB, &QPushButton::clicked, this, &MovieInfoPage::toLower); - movieTitleLayout->addWidget(lowerCaseB, 1, 2, 1, 1); - QPushButton *checkB = new QPushButton(QIcon(":/spreadingpants.png"), tr("Fuzzy check...")); - connect(checkB, &QPushButton::clicked, this, &MovieInfoPage::fuzzyCheck); - movieTitleLayout->addWidget(checkB, 1, 3, 1, 1); + QToolBar *checkTB = new QToolBar; + QAction *lowerCaseA = new QAction(Helper::icon(Qt::transparent, qApp->palette().color(QPalette::Text), QChar(0x2b07), true, false), tr("Lower Case"), this); + connect(lowerCaseA, &QAction::triggered, this, &MovieInfoPage::toLower); + checkTB->addAction(lowerCaseA); + QAction *fuzzyCheckA = new QAction(Helper::icon(Qt::transparent, qApp->palette().color(QPalette::Text), QChar(0x2975), true, false), tr("Fuzzy Check"), this); + connect(fuzzyCheckA, &QAction::triggered, this, &MovieInfoPage::fuzzyCheck); + checkTB->addAction(fuzzyCheckA); + movieTitleLayout->addWidget(checkTB, 1, 2, 1, 1); mSeriesCompleter = new QCompleter(this); mSeriesCompleterModel = new QStringListModel(this); mSeriesCompleter->setModel(mSeriesCompleterModel); |