GUI: Add icons for warning/performance categories and add them to toolbar.

This commit is contained in:
Kimmo Varis 2010-10-18 21:35:35 +03:00
parent aefa7d3370
commit 23eb8c41eb
6 changed files with 18 additions and 4 deletions

View File

@ -15,7 +15,9 @@
<file>images/showerrors.png</file>
<file>images/showstylewarnings.png</file>
<file>images/openproject.png</file>
<file>images/showwarnings.png</file>
<file>images/showperformance.png</file>
<file>images/utilities-system-monitor.png</file>
<file alias="COPYING">../COPYING</file>
<file alias="AUTHORS">../AUTHORS</file>
<file>images/go-home.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

BIN
gui/images/showwarnings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

View File

@ -177,7 +177,9 @@
<bool>false</bool>
</attribute>
<addaction name="mActionShowErrors"/>
<addaction name="mActionShowWarnings"/>
<addaction name="mActionShowStyle"/>
<addaction name="mActionShowPerformance"/>
</widget>
<action name="mActionLicense">
<property name="text">
@ -427,6 +429,10 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="gui.qrc">
<normaloff>:/images/showwarnings.png</normaloff>:/images/showwarnings.png</iconset>
</property>
<property name="text">
<string>Warnings</string>
</property>
@ -441,6 +447,10 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="gui.qrc">
<normaloff>:/images/showperformance.png</normaloff>:/images/showperformance.png</iconset>
</property>
<property name="text">
<string>Performance warnings</string>
</property>

View File

@ -626,12 +626,14 @@ void ResultsTree::CopyPath(QStandardItem *target, bool fullPath)
QString ResultsTree::SeverityToIcon(const QString &severity) const
{
if (severity == "possible error")
return ":images/dialog-warning.png";
if (severity == "error")
return ":images/dialog-error.png";
if (severity == "style" || severity == "possible style")
if (severity == "style")
return ":images/dialog-information.png";
if (severity == "warning")
return ":images/dialog-warning.png";
if (severity == "performance")
return ":images/utilities-system-monitor.png";
return "";
}