summaryrefslogtreecommitdiffstats
path: root/src/kernel/qstyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-10-16 10:35:46 -0500
committerTimothy Pearson <[email protected]>2012-10-16 10:35:46 -0500
commitff2caed1b8e1bea513172d48d07b13f53b73a9de (patch)
treece2d03f47c1844d80276933b3b86dadd69b033df /src/kernel/qstyle.cpp
parent5feb80c8b48a0593d5c08903729ff40ec55dc4f3 (diff)
downloadtqt3-ff2caed1b8e1bea513172d48d07b13f53b73a9de.tar.gz
tqt3-ff2caed1b8e1bea513172d48d07b13f53b73a9de.zip
Automated update from Qt3
Diffstat (limited to 'src/kernel/qstyle.cpp')
-rw-r--r--src/kernel/qstyle.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp
index 7aa144091..ef31c25ca 100644
--- a/src/kernel/qstyle.cpp
+++ b/src/kernel/qstyle.cpp
@@ -48,6 +48,7 @@
#include "ntqlayout.h"
#include "ntqlistview.h"
#include "ntqpopupmenu.h"
+#include "ntqpushbutton.h"
#include "ntqobjectlist.h"
#include "ntqwidgetlist.h"
@@ -2165,7 +2166,16 @@ bool TQStyle::eventFilter(TQObject *o, TQEvent *e) {
TQStyle* handler = m_objectEventSourceToHandlerMap[o];
TQStyleControlElementData ceData = m_objectEventSourceDataToHandlerMap[o];
ControlElementFlags elementFlags = m_objectEventSourceFlagsToHandlerMap[o];
- bool ret = handler->objectEventHandler(ceData, elementFlags, o, e);
+ bool ret;
+ TQWidget* w = dynamic_cast<TQWidget*>(o);
+ if ((w) && (e->type() == TQEvent::Paint)) {
+ TQPainter p(w);
+ ceData.activePainter = &p;
+ ret = handler->objectEventHandler(ceData, elementFlags, o, e);
+ }
+ else {
+ ret = handler->objectEventHandler(ceData, elementFlags, o, e);
+ }
if (ret) {
return ret;
}
@@ -2291,6 +2301,21 @@ bool TQStyle::widgetActionRequest( TQStyleControlElementData ceData, ControlElem
}
delete list;
}
+ else if (request == WAR_SetDefault) {
+ TQPushButton *button = dynamic_cast<TQPushButton*>(widget);
+ if (button) {
+ button->setDefault(TRUE);
+ }
+ }
+ else if (request == WAR_UnSetDefault) {
+ TQPushButton *button = dynamic_cast<TQPushButton*>(widget);
+ if (button) {
+ button->setDefault(FALSE);
+ }
+ }
+ else if (request == WAR_SendPaintEvent) {
+ static_cast<TQObject*>(widget)->event(requestData.paintEvent);
+ }
return true;
}
}
@@ -2395,6 +2420,10 @@ TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQRect param) {
rect = param;
}
+TQStyleWidgetActionRequestData::TQStyleWidgetActionRequestData(TQPaintEvent* param) {
+ paintEvent = param;
+}
+
TQStyleWidgetActionRequestData::~TQStyleWidgetActionRequestData() {
//
}
@@ -2575,4 +2604,8 @@ TQPixmap TQStyle::stylePixmap(StylePixmap sp, const TQWidget *w, const TQStyleOp
\obsolete
*/
+TQStyleControlElementData::TQStyleControlElementData() {
+ activePainter = 0;
+}
+
#endif // QT_NO_STYLE