aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <Torsten.Rahn@basyskom.de>2010-09-07 11:47:59 +0200
committerTorsten Rahn <Torsten.Rahn@basyskom.de>2010-09-09 15:31:51 +0200
commit108ea7fe2ea84ab9e7925c120e7302ce0866b488 (patch)
tree5e21c8763114e1c48d4cd87ece36e3cbc58f9d62
parentbe3db0d1531b2cbcd58da892041693f3534d7be6 (diff)
Changes: More complete feedback support
RevBy: Berthold Krevert
-rwxr-xr-xplainqt/style/qtmaemo6style.cpp49
1 files changed, 46 insertions, 3 deletions
diff --git a/plainqt/style/qtmaemo6style.cpp b/plainqt/style/qtmaemo6style.cpp
index 9b08acef..c6449ba1 100755
--- a/plainqt/style/qtmaemo6style.cpp
+++ b/plainqt/style/qtmaemo6style.cpp
@@ -22,7 +22,12 @@
#include "qtmaemo6style_p.h"
#include <QAbstractButton>
+#include <QCheckBox>
+#include <QLabel>
+#include <QListWidget>
+#include <QTextEdit>
#include <QPainter>
+#include <QProgressBar>
#include <QStyleOptionButton>
#include <QApplication>
#include <QDialogButtonBox>
@@ -2449,16 +2454,54 @@ const MFeedback * QtMaemo6Style::feedback(const QString& feedbackName, const QWi
QString meegoClassString;
+ // classes that are lower in the inheritance chain need to
+ // be placed first to allow for the string to be overwritten.
if(qobject_cast<const QWidget*>(widget))
meegoClassString = "MWidgetStyle";
- if(qobject_cast<const QPushButton*>(widget))
- meegoClassString = "MButtonIconStyle";
+ // We don't map the QAbstract* widget classes since inherited
+ // classes are often enough semantically quite different.
+
+ if(qobject_cast<const QCheckBox*>(widget))
+ meegoClassString = "MCheckboxStyle";
if(qobject_cast<const QComboBox*>(widget))
meegoClassString = "MComboBoxStyle";
- if ( meegoClassString.isEmpty() )
+ if(qobject_cast<const QDialog*>(widget))
+ meegoClassString = "MDialogStyle";
+
+ if(qobject_cast<const QLabel*>(widget))
+ meegoClassString = "MLabelStyle";
+
+ if(qobject_cast<const QListWidget*>(widget))
+ meegoClassString = "MListStyle";
+
+ if(qobject_cast<const QMenu*>(widget))
+ meegoClassString = "MApplicationMenuStyle";
+
+ if(qobject_cast<const QMessageBox*>(widget))
+ meegoClassString = "MMessageBoxStyle";
+
+ if(qobject_cast<const QProgressBar*>(widget))
+ meegoClassString = "MProgressIndicatorStyle";
+
+ if(qobject_cast<const QPushButton*>(widget))
+ meegoClassString = "MButtonStyle";
+
+ if(qobject_cast<const QScrollArea*>(widget))
+ meegoClassString = "MPannableWidgetStyle";
+
+ if(qobject_cast<const QSlider*>(widget))
+ meegoClassString = "MSliderStyle";
+
+ if(qobject_cast<const QTextEdit*>(widget))
+ meegoClassString = "MTextEditStyle";
+
+ if(qobject_cast<const QToolBar*>(widget))
+ meegoClassString = "MToolbarStyle";
+
+ if ( meegoClassString.isEmpty() )
return 0;
QStyleOption opt;