From f150f1ba057ae595bc22bab2f0b0828591437f0a Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 27 Dec 2010 11:06:31 +0200 Subject: [PATCH] GUI: Add GUI for showing 'portability' warnings. Add menuitem, icon and toolbar button for portability warnings. Ticket #2359 (Gui: Show portability warnings). --- gui/common.h | 1 + gui/gui.qrc | 1 + gui/images/applications-system.png | Bin 0 -> 1488 bytes gui/main.ui | 17 +++++++++++++++++ gui/mainwindow.cpp | 10 ++++++++++ gui/mainwindow.h | 6 ++++++ gui/resultstree.cpp | 2 ++ 7 files changed, 37 insertions(+) create mode 100644 gui/images/applications-system.png diff --git a/gui/common.h b/gui/common.h index 841cab510..483eac7e0 100644 --- a/gui/common.h +++ b/gui/common.h @@ -64,6 +64,7 @@ ShowTypes; #define SETTINGS_SHOW_WARNINGS "Show warnings" #define SETTINGS_SHOW_PERFORMANCE "Show performance" #define SETTINGS_SHOW_INFORMATION "Show information" +#define SETTINGS_SHOW_PORTABILITY "Show portability" // Other settings #define SETTINGS_CHECK_PATH "Check path" diff --git a/gui/gui.qrc b/gui/gui.qrc index bf3519a22..8852d3c10 100644 --- a/gui/gui.qrc +++ b/gui/gui.qrc @@ -24,5 +24,6 @@ images/go-next.png images/go-previous.png images/applications-development.png + images/applications-system.png diff --git a/gui/images/applications-system.png b/gui/images/applications-system.png new file mode 100644 index 0000000000000000000000000000000000000000..4decc893f846ade39d9ff0592c6d206bc333a177 GIT binary patch literal 1488 zcmV;>1uy!EP)3;q{a$<5OZ>6KCN?#=B*DR6Ck-K((4=XV6g5OmrNm8(h^2n0 z=~MbvSxuhkQ&p*IB`dTpi_%tYAfYeC3KeZ?3alM4226tkn1%JO*SlWt_r1IK_945* zPOGZtX>?}J@BDSnoEgFYVLM;`Xn{}rQt))5*G_X9*mhbHSj-5qRx z>CtBL#S(f!XMC>I@|p8TfmhbX$aT=yj(ih6e{NH=>s)9!d|-V_lN-?_Mnzu*hK9of z!YKUZLBH7zoUDri5UbFGV*^bx`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ui/main.ui +++ b/gui/main.ui @@ -99,6 +99,7 @@ + @@ -182,6 +183,7 @@ + @@ -488,6 +490,21 @@ Show information messages + + + true + + + + :/images/applications-system.png:/images/applications-system.png + + + Portability + + + Show portability warnings + + diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index fcbe7edcb..3e946ad9c 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -64,6 +64,7 @@ MainWindow::MainWindow() : connect(mUI.mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool))); connect(mUI.mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool))); connect(mUI.mActionShowWarnings, SIGNAL(toggled(bool)), this, SLOT(ShowWarnings(bool))); + connect(mUI.mActionShowPortability, SIGNAL(toggled(bool)), this, SLOT(ShowPortability(bool))); connect(mUI.mActionShowPerformance, SIGNAL(toggled(bool)), this, SLOT(ShowPerformance(bool))); connect(mUI.mActionShowInformation, SIGNAL(toggled(bool)), this, SLOT(ShowInformation(bool))); connect(mUI.mActionCheckAll, SIGNAL(triggered()), this, SLOT(CheckAll())); @@ -175,6 +176,7 @@ void MainWindow::LoadSettings() mUI.mActionShowStyle->setChecked(mSettings->value(SETTINGS_SHOW_STYLE, true).toBool()); mUI.mActionShowErrors->setChecked(mSettings->value(SETTINGS_SHOW_ERRORS, true).toBool()); mUI.mActionShowWarnings->setChecked(mSettings->value(SETTINGS_SHOW_WARNINGS, true).toBool()); + mUI.mActionShowPortability->setChecked(mSettings->value(SETTINGS_SHOW_PORTABILITY, true).toBool()); mUI.mActionShowPerformance->setChecked(mSettings->value(SETTINGS_SHOW_PERFORMANCE, true).toBool()); mUI.mActionShowInformation->setChecked(mSettings->value(SETTINGS_SHOW_INFORMATION, true).toBool()); @@ -202,6 +204,7 @@ void MainWindow::SaveSettings() mSettings->setValue(SETTINGS_SHOW_STYLE, mUI.mActionShowStyle->isChecked()); mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked()); mSettings->setValue(SETTINGS_SHOW_WARNINGS, mUI.mActionShowWarnings->isChecked()); + mSettings->setValue(SETTINGS_SHOW_PORTABILITY, mUI.mActionShowPortability->isChecked()); mSettings->setValue(SETTINGS_SHOW_PERFORMANCE, mUI.mActionShowPerformance->isChecked()); mSettings->setValue(SETTINGS_SHOW_INFORMATION, mUI.mActionShowInformation->isChecked()); mSettings->setValue(SETTINGS_TOOLBARS_MAIN_SHOW, mUI.mToolBarMain->isVisible()); @@ -504,6 +507,11 @@ void MainWindow::ShowWarnings(bool checked) mUI.mResults->ShowResults(SHOW_WARNINGS, checked); } +void MainWindow::ShowPortability(bool checked) +{ + mUI.mResults->ShowResults(SHOW_PORTABILITY, checked); +} + void MainWindow::ShowPerformance(bool checked) { mUI.mResults->ShowResults(SHOW_PERFORMANCE, checked); @@ -568,6 +576,8 @@ void MainWindow::ToggleAllChecked(bool checked) ShowErrors(checked); mUI.mActionShowWarnings->setChecked(checked); ShowWarnings(checked); + mUI.mActionShowPortability->setChecked(checked); + ShowPortability(checked); mUI.mActionShowPerformance->setChecked(checked); ShowPerformance(checked); mUI.mActionShowInformation->setChecked(checked); diff --git a/gui/mainwindow.h b/gui/mainwindow.h index c0668a6d5..c84cda2b6 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -98,6 +98,12 @@ public slots: */ void ShowWarnings(bool checked); + /** + * @brief Show errors with type "portability" + * @param checked Should errors be shown (true) or hidden (false) + */ + void ShowPortability(bool checked); + /** * @brief Show errors with type "performance" * @param checked Should errors be shown (true) or hidden (false) diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 11e9415ca..78b0bb4c2 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -739,6 +739,8 @@ QString ResultsTree::SeverityToIcon(const QString &severity) const return ":images/applications-development.png"; if (severity == "warning") return ":images/dialog-warning.png"; + if (severity == "portability") + return ":images/applications-system.png"; if (severity == "performance") return ":images/utilities-system-monitor.png"; if (severity == "information")