GUI: Add "Information" errors items to menu and toolbar.
This commit is contained in:
parent
84180e4fcd
commit
a73970483d
17
gui/main.ui
17
gui/main.ui
|
@ -100,6 +100,7 @@
|
|||
<addaction name="mActionShowWarnings"/>
|
||||
<addaction name="mActionShowStyle"/>
|
||||
<addaction name="mActionShowPerformance"/>
|
||||
<addaction name="mActionShowInformation"/>
|
||||
<addaction name="mActionCheckAll"/>
|
||||
<addaction name="mActionUncheckAll"/>
|
||||
<addaction name="separator"/>
|
||||
|
@ -182,6 +183,7 @@
|
|||
<addaction name="mActionShowWarnings"/>
|
||||
<addaction name="mActionShowStyle"/>
|
||||
<addaction name="mActionShowPerformance"/>
|
||||
<addaction name="mActionShowInformation"/>
|
||||
</widget>
|
||||
<action name="mActionLicense">
|
||||
<property name="text">
|
||||
|
@ -471,6 +473,21 @@
|
|||
<string>Show &hidden</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="mActionShowInformation">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="gui.qrc">
|
||||
<normaloff>:/images/dialog-information.png</normaloff>:/images/dialog-information.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Information</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show information messages</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
|
|
@ -65,6 +65,7 @@ MainWindow::MainWindow() :
|
|||
connect(mUI.mActionShowErrors, SIGNAL(toggled(bool)), this, SLOT(ShowErrors(bool)));
|
||||
connect(mUI.mActionShowWarnings, SIGNAL(toggled(bool)), this, SLOT(ShowWarnings(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()));
|
||||
connect(mUI.mActionUncheckAll, SIGNAL(triggered()), this, SLOT(UncheckAll()));
|
||||
connect(mUI.mActionCollapseAll, SIGNAL(triggered()), mUI.mResults, SLOT(CollapseAllResults()));
|
||||
|
@ -175,6 +176,7 @@ void MainWindow::LoadSettings()
|
|||
mUI.mActionShowErrors->setChecked(mSettings->value(SETTINGS_SHOW_ERRORS, true).toBool());
|
||||
mUI.mActionShowWarnings->setChecked(mSettings->value(SETTINGS_SHOW_WARNINGS, true).toBool());
|
||||
mUI.mActionShowPerformance->setChecked(mSettings->value(SETTINGS_SHOW_PERFORMANCE, true).toBool());
|
||||
mUI.mActionShowInformation->setChecked(mSettings->value(SETTINGS_SHOW_INFORMATION, true).toBool());
|
||||
|
||||
mUI.mResults->ShowResults(SHOW_ERRORS, mUI.mActionShowErrors->isChecked());
|
||||
mUI.mResults->ShowResults(SHOW_STYLE, mUI.mActionShowStyle->isChecked());
|
||||
|
@ -201,7 +203,7 @@ void MainWindow::SaveSettings()
|
|||
mSettings->setValue(SETTINGS_SHOW_ERRORS, mUI.mActionShowErrors->isChecked());
|
||||
mSettings->setValue(SETTINGS_SHOW_WARNINGS, mUI.mActionShowWarnings->isChecked());
|
||||
mSettings->setValue(SETTINGS_SHOW_PERFORMANCE, mUI.mActionShowPerformance->isChecked());
|
||||
mSettings->setValue(SETTINGS_SHOW_INFORMATION, true);
|
||||
mSettings->setValue(SETTINGS_SHOW_INFORMATION, mUI.mActionShowInformation->isChecked());
|
||||
mSettings->setValue(SETTINGS_TOOLBARS_MAIN_SHOW, mUI.mToolBarMain->isVisible());
|
||||
mSettings->setValue(SETTINGS_TOOLBARS_VIEW_SHOW, mUI.mToolBarView->isVisible());
|
||||
|
||||
|
@ -506,6 +508,11 @@ void MainWindow::ShowPerformance(bool checked)
|
|||
mUI.mResults->ShowResults(SHOW_PERFORMANCE, checked);
|
||||
}
|
||||
|
||||
void MainWindow::ShowInformation(bool checked)
|
||||
{
|
||||
mUI.mResults->ShowResults(SHOW_INFORMATION, checked);
|
||||
}
|
||||
|
||||
void MainWindow::CheckAll()
|
||||
{
|
||||
ToggleAllChecked(true);
|
||||
|
@ -562,6 +569,8 @@ void MainWindow::ToggleAllChecked(bool checked)
|
|||
ShowWarnings(checked);
|
||||
mUI.mActionShowPerformance->setChecked(checked);
|
||||
ShowPerformance(checked);
|
||||
mUI.mActionShowInformation->setChecked(checked);
|
||||
ShowInformation(checked);
|
||||
}
|
||||
|
||||
void MainWindow::About()
|
||||
|
|
|
@ -104,6 +104,12 @@ public slots:
|
|||
*/
|
||||
void ShowPerformance(bool checked);
|
||||
|
||||
/**
|
||||
* @brief Show errors with type "information"
|
||||
* @param checked Should errors be shown (true) or hidden (false)
|
||||
*/
|
||||
void ShowInformation(bool checked);
|
||||
|
||||
/**
|
||||
* @brief Slot to check all "Show errors" menu items
|
||||
*/
|
||||
|
|
|
@ -741,6 +741,8 @@ QString ResultsTree::SeverityToIcon(const QString &severity) const
|
|||
return ":images/dialog-warning.png";
|
||||
if (severity == "performance")
|
||||
return ":images/utilities-system-monitor.png";
|
||||
if (severity == "information")
|
||||
return ":images/dialog-information.png";
|
||||
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue