Added creation of inactive and rotated icons from standard hildon methods. Added...
[mdictionary] / trunk / src / base / gui / SearchBarWidget.cpp
index 3c66688..94b0045 100644 (file)
@@ -80,6 +80,13 @@ SearchBarWidget::~SearchBarWidget() {
 QIcon SearchBarWidget::generateIcon(QIcon oryginal, qreal rotation) {
     QPixmap p = oryginal.pixmap(64);
 
+    if(rotation != 0) {
+        QMatrix m;
+        m.rotate(rotation);
+
+        p = p.transformed(m);
+    }
+
     QIcon newIcon;
     newIcon.addPixmap(p);
 
@@ -126,20 +133,8 @@ void SearchBarWidget::initializeUI() {
 
     historyShowToolButton = new QToolButton();
     historyShowToolButton->setIcon(
-            generateIcon(QIcon::fromTheme("general_back")));
-
-
-    QPixmap p = historyShowToolButton->icon().pixmap(256);
-    qDebug()<<p.size();
-    QMatrix m;
-    m.rotate(90);
-
-    QPixmap p2 = p.transformed(m);
-    qDebug()<<p2.size();
-
+            generateIcon(QIcon::fromTheme("general_back"), 90));
 
-    QIcon temp(p2);
-    historyShowToolButton->setIcon(temp);
 
 
     searchingProgressBar = new QProgressBar();
@@ -203,6 +198,7 @@ void SearchBarWidget::setBusy() {
     searchPushButton->setText(tr("Stop"));
     setEnabled(false);
     _isSearching = true;
+    emit busy();
 }
 
 void SearchBarWidget::setIdle() {
@@ -211,6 +207,7 @@ void SearchBarWidget::setIdle() {
     searchPushButton->setText(tr("Search"));
     setEnabled(true);
     _isSearching = false;
+    emit idle();
 }
 
 void SearchBarWidget::historyNextToolButtonClicked() {