summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-04-08 12:12:29 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2010-04-08 12:12:29 +0200
commit824db44ed4bb59751f43dc2798b016bfc4e2adf0 (patch)
treebf10149fdde98b953313b8e8d34dc14d4a4d6f78
parentbbb73a3912296d6f535a301c54cdc384715a145c (diff)
Add icons to signal strength quick access button.
Done-with: Niels Weber
-rw-r--r--library/components/component.qrc7
-rw-r--r--library/components/images/networkstatus.pngbin450 -> 0 bytes
-rw-r--r--library/components/images/networkstatus0.pngbin0 -> 361 bytes
-rw-r--r--library/components/images/networkstatus1.pngbin0 -> 357 bytes
-rw-r--r--library/components/images/networkstatus2.pngbin0 -> 350 bytes
-rw-r--r--library/components/images/networkstatus3.pngbin0 -> 344 bytes
-rw-r--r--library/components/images/networkstatus4.pngbin0 -> 333 bytes
-rw-r--r--library/components/images/networkstatus5.pngbin0 -> 323 bytes
-rw-r--r--library/components/signalstrengthbutton.cpp12
9 files changed, 15 insertions, 4 deletions
diff --git a/library/components/component.qrc b/library/components/component.qrc
index 02b417d..26b2a8a 100644
--- a/library/components/component.qrc
+++ b/library/components/component.qrc
@@ -11,6 +11,11 @@
<file>images/wall_charge.png</file>
<file>images/wall.png</file>
<file>images/network.png</file>
- <file>images/networkstatus.png</file>
+ <file>images/networkstatus0.png</file>
+ <file>images/networkstatus1.png</file>
+ <file>images/networkstatus2.png</file>
+ <file>images/networkstatus3.png</file>
+ <file>images/networkstatus4.png</file>
+ <file>images/networkstatus5.png</file>
</qresource>
</RCC>
diff --git a/library/components/images/networkstatus.png b/library/components/images/networkstatus.png
deleted file mode 100644
index 9173c65..0000000
--- a/library/components/images/networkstatus.png
+++ /dev/null
Binary files differ
diff --git a/library/components/images/networkstatus0.png b/library/components/images/networkstatus0.png
new file mode 100644
index 0000000..c60ef43
--- /dev/null
+++ b/library/components/images/networkstatus0.png
Binary files differ
diff --git a/library/components/images/networkstatus1.png b/library/components/images/networkstatus1.png
new file mode 100644
index 0000000..0917dba
--- /dev/null
+++ b/library/components/images/networkstatus1.png
Binary files differ
diff --git a/library/components/images/networkstatus2.png b/library/components/images/networkstatus2.png
new file mode 100644
index 0000000..7dc90ac
--- /dev/null
+++ b/library/components/images/networkstatus2.png
Binary files differ
diff --git a/library/components/images/networkstatus3.png b/library/components/images/networkstatus3.png
new file mode 100644
index 0000000..15b5ed8
--- /dev/null
+++ b/library/components/images/networkstatus3.png
Binary files differ
diff --git a/library/components/images/networkstatus4.png b/library/components/images/networkstatus4.png
new file mode 100644
index 0000000..4690d09
--- /dev/null
+++ b/library/components/images/networkstatus4.png
Binary files differ
diff --git a/library/components/images/networkstatus5.png b/library/components/images/networkstatus5.png
new file mode 100644
index 0000000..a855a85
--- /dev/null
+++ b/library/components/images/networkstatus5.png
Binary files differ
diff --git a/library/components/signalstrengthbutton.cpp b/library/components/signalstrengthbutton.cpp
index 1b6a8d2..2154c9c 100644
--- a/library/components/signalstrengthbutton.cpp
+++ b/library/components/signalstrengthbutton.cpp
@@ -76,8 +76,14 @@ void SignalStrengthButton::emitSignalStrengthChanged()
emit signalStrengthChanged(strength);
}
-void SignalStrengthButton::setDisplayedSignalStrength(SignalStrength)
+void SignalStrengthButton::setDisplayedSignalStrength(SignalStrength strength)
{
- // ### TODO: Icons!
- setIcon(QIcon(":/components/images/networkstatus.png"));
+ if (strength == NoSignal)
+ setIcon(QIcon(":/components/images/networkstatus0.png"));
+ else if (strength == SignalVeryLow)
+ setIcon(QIcon(":/components/images/networkstatus1.png"));
+ else if (strength == SignalLow)
+ setIcon(QIcon(":/components/images/networkstatus3.png"));
+ else
+ setIcon(QIcon(":/components/images/networkstatus5.png"));
}