GUI: Add GUI for showing 'portability' warnings.
Add menuitem, icon and toolbar button for portability warnings. Ticket #2359 (Gui: Show portability warnings).
This commit is contained in:
parent
3853f93b34
commit
f150f1ba05
|
@ -64,6 +64,7 @@ ShowTypes;
|
||||||
#define SETTINGS_SHOW_WARNINGS "Show warnings"
|
#define SETTINGS_SHOW_WARNINGS "Show warnings"
|
||||||
#define SETTINGS_SHOW_PERFORMANCE "Show performance"
|
#define SETTINGS_SHOW_PERFORMANCE "Show performance"
|
||||||
#define SETTINGS_SHOW_INFORMATION "Show information"
|
#define SETTINGS_SHOW_INFORMATION "Show information"
|
||||||
|
#define SETTINGS_SHOW_PORTABILITY "Show portability"
|
||||||
|
|
||||||
// Other settings
|
// Other settings
|
||||||
#define SETTINGS_CHECK_PATH "Check path"
|
#define SETTINGS_CHECK_PATH "Check path"
|
||||||
|
|
|
@ -24,5 +24,6 @@
|
||||||
<file>images/go-next.png</file>
|
<file>images/go-next.png</file>
|
||||||
<file>images/go-previous.png</file>
|
<file>images/go-previous.png</file>
|
||||||
<file>images/applications-development.png</file>
|
<file>images/applications-development.png</file>
|
||||||
|
<file>images/applications-system.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
17
gui/main.ui
17
gui/main.ui
|
@ -99,6 +99,7 @@
|
||||||
<addaction name="mActionShowErrors"/>
|
<addaction name="mActionShowErrors"/>
|
||||||
<addaction name="mActionShowWarnings"/>
|
<addaction name="mActionShowWarnings"/>
|
||||||
<addaction name="mActionShowStyle"/>
|
<addaction name="mActionShowStyle"/>
|
||||||
|
<addaction name="mActionShowPortability"/>
|
||||||
<addaction name="mActionShowPerformance"/>
|
<addaction name="mActionShowPerformance"/>
|
||||||
<addaction name="mActionShowInformation"/>
|
<addaction name="mActionShowInformation"/>
|
||||||
<addaction name="mActionCheckAll"/>
|
<addaction name="mActionCheckAll"/>
|
||||||
|
@ -182,6 +183,7 @@
|
||||||
<addaction name="mActionShowErrors"/>
|
<addaction name="mActionShowErrors"/>
|
||||||
<addaction name="mActionShowWarnings"/>
|
<addaction name="mActionShowWarnings"/>
|
||||||
<addaction name="mActionShowStyle"/>
|
<addaction name="mActionShowStyle"/>
|
||||||
|
<addaction name="mActionShowPortability"/>
|
||||||
<addaction name="mActionShowPerformance"/>
|
<addaction name="mActionShowPerformance"/>
|
||||||
<addaction name="mActionShowInformation"/>
|
<addaction name="mActionShowInformation"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -488,6 +490,21 @@
|
||||||
<string>Show information messages</string>
|
<string>Show information messages</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="mActionShowPortability">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="gui.qrc">
|
||||||
|
<normaloff>:/images/applications-system.png</normaloff>:/images/applications-system.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Portability</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show portability warnings</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -64,6 +64,7 @@ MainWindow::MainWindow() :
|
||||||
connect(mUI.mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool)));
|
connect(mUI.mActionShowStyle, SIGNAL(toggled(bool)), this, SLOT(ShowStyle(bool)));
|
||||||
connect(mUI.mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool)));
|
connect(mUI.mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool)));
|
||||||
connect(mUI.mActionShowWarnings, SIGNAL(toggled(bool)), this, SLOT(ShowWarnings(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.mActionShowPerformance, SIGNAL(toggled(bool)), this, SLOT(ShowPerformance(bool)));
|
||||||
connect(mUI.mActionShowInformation, SIGNAL(toggled(bool)), this, SLOT(ShowInformation(bool)));
|
connect(mUI.mActionShowInformation, SIGNAL(toggled(bool)), this, SLOT(ShowInformation(bool)));
|
||||||
connect(mUI.mActionCheckAll, SIGNAL(triggered()), this, SLOT(CheckAll()));
|
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.mActionShowStyle->setChecked(mSettings->value(SETTINGS_SHOW_STYLE, true).toBool());
|
||||||
mUI.mActionShowErrors->setChecked(mSettings->value(SETTINGS_SHOW_ERRORS, true).toBool());
|
mUI.mActionShowErrors->setChecked(mSettings->value(SETTINGS_SHOW_ERRORS, true).toBool());
|
||||||
mUI.mActionShowWarnings->setChecked(mSettings->value(SETTINGS_SHOW_WARNINGS, 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.mActionShowPerformance->setChecked(mSettings->value(SETTINGS_SHOW_PERFORMANCE, true).toBool());
|
||||||
mUI.mActionShowInformation->setChecked(mSettings->value(SETTINGS_SHOW_INFORMATION, 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_STYLE, mUI.mActionShowStyle->isChecked());
|
||||||
mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked());
|
mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked());
|
||||||
mSettings->setValue(SETTINGS_SHOW_WARNINGS, mUI.mActionShowWarnings->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_PERFORMANCE, mUI.mActionShowPerformance->isChecked());
|
||||||
mSettings->setValue(SETTINGS_SHOW_INFORMATION, mUI.mActionShowInformation->isChecked());
|
mSettings->setValue(SETTINGS_SHOW_INFORMATION, mUI.mActionShowInformation->isChecked());
|
||||||
mSettings->setValue(SETTINGS_TOOLBARS_MAIN_SHOW, mUI.mToolBarMain->isVisible());
|
mSettings->setValue(SETTINGS_TOOLBARS_MAIN_SHOW, mUI.mToolBarMain->isVisible());
|
||||||
|
@ -504,6 +507,11 @@ void MainWindow::ShowWarnings(bool checked)
|
||||||
mUI.mResults->ShowResults(SHOW_WARNINGS, checked);
|
mUI.mResults->ShowResults(SHOW_WARNINGS, checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::ShowPortability(bool checked)
|
||||||
|
{
|
||||||
|
mUI.mResults->ShowResults(SHOW_PORTABILITY, checked);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::ShowPerformance(bool checked)
|
void MainWindow::ShowPerformance(bool checked)
|
||||||
{
|
{
|
||||||
mUI.mResults->ShowResults(SHOW_PERFORMANCE, checked);
|
mUI.mResults->ShowResults(SHOW_PERFORMANCE, checked);
|
||||||
|
@ -568,6 +576,8 @@ void MainWindow::ToggleAllChecked(bool checked)
|
||||||
ShowErrors(checked);
|
ShowErrors(checked);
|
||||||
mUI.mActionShowWarnings->setChecked(checked);
|
mUI.mActionShowWarnings->setChecked(checked);
|
||||||
ShowWarnings(checked);
|
ShowWarnings(checked);
|
||||||
|
mUI.mActionShowPortability->setChecked(checked);
|
||||||
|
ShowPortability(checked);
|
||||||
mUI.mActionShowPerformance->setChecked(checked);
|
mUI.mActionShowPerformance->setChecked(checked);
|
||||||
ShowPerformance(checked);
|
ShowPerformance(checked);
|
||||||
mUI.mActionShowInformation->setChecked(checked);
|
mUI.mActionShowInformation->setChecked(checked);
|
||||||
|
|
|
@ -98,6 +98,12 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void ShowWarnings(bool checked);
|
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"
|
* @brief Show errors with type "performance"
|
||||||
* @param checked Should errors be shown (true) or hidden (false)
|
* @param checked Should errors be shown (true) or hidden (false)
|
||||||
|
|
|
@ -739,6 +739,8 @@ QString ResultsTree::SeverityToIcon(const QString &severity) const
|
||||||
return ":images/applications-development.png";
|
return ":images/applications-development.png";
|
||||||
if (severity == "warning")
|
if (severity == "warning")
|
||||||
return ":images/dialog-warning.png";
|
return ":images/dialog-warning.png";
|
||||||
|
if (severity == "portability")
|
||||||
|
return ":images/applications-system.png";
|
||||||
if (severity == "performance")
|
if (severity == "performance")
|
||||||
return ":images/utilities-system-monitor.png";
|
return ":images/utilities-system-monitor.png";
|
||||||
if (severity == "information")
|
if (severity == "information")
|
||||||
|
|
Loading…
Reference in New Issue