|
|
|
@ -944,25 +944,25 @@ void StyleCheckStyle::polish(const TQStyleControlElementData &ceData, ControlEle
|
|
|
|
|
topLevelAccelManageTimer->start(200, true);
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
|
if (ceData.widgetObjectTypes.contains("TQWidget")) {
|
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
|
|
|
|
|
|
// Put in order of highest occurance to maximise hit rate
|
|
|
|
|
if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) {
|
|
|
|
|
if (widget->inherits("TQPushButton")) {
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (widget->inherits(TQLABEL_OBJECT_NAME_STRING))
|
|
|
|
|
if (widget->inherits("TQLabel"))
|
|
|
|
|
{
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (widget->inherits(TQGROUPBOX_OBJECT_NAME_STRING))
|
|
|
|
|
if (widget->inherits("TQGroupBox"))
|
|
|
|
|
{
|
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (widget->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) || widget->inherits(TQDIALOG_OBJECT_NAME_STRING) )
|
|
|
|
|
if (widget->inherits("TQMainWindow") || widget->inherits("TQDialog") )
|
|
|
|
|
{
|
|
|
|
|
watcher->addWatched(widget);
|
|
|
|
|
}
|
|
|
|
@ -974,19 +974,19 @@ void StyleCheckStyle::polish(const TQStyleControlElementData &ceData, ControlEle
|
|
|
|
|
|
|
|
|
|
void StyleCheckStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
|
|
|
|
|
{
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
|
|
|
|
|
if (ceData.widgetObjectTypes.contains("TQWidget")) {
|
|
|
|
|
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
|
|
|
|
|
|
|
|
|
|
if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) {
|
|
|
|
|
if (widget->inherits("TQPushButton")) {
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (widget->inherits(TQLABEL_OBJECT_NAME_STRING))
|
|
|
|
|
if (widget->inherits("TQLabel"))
|
|
|
|
|
{
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (widget->inherits(TQGROUPBOX_OBJECT_NAME_STRING))
|
|
|
|
|
if (widget->inherits("TQGroupBox"))
|
|
|
|
|
{
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
}
|
|
|
|
@ -2348,7 +2348,7 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
|
|
|
|
|
}
|
|
|
|
|
else if (widget->parent())
|
|
|
|
|
{
|
|
|
|
|
if (widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING))
|
|
|
|
|
if (widget->parent()->inherits("TQToolBar"))
|
|
|
|
|
{
|
|
|
|
|
TQToolBar* parent = (TQToolBar*)widget->parent();
|
|
|
|
|
TQRect pr = parent->rect();
|
|
|
|
@ -2616,7 +2616,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat
|
|
|
|
|
if (TDEStyle::objectEventHandler( ceData, elementFlags, source, event ))
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
|
|
|
|
|
if (ceData.widgetObjectTypes.contains("TQObject")) {
|
|
|
|
|
TQObject* object = reinterpret_cast<TQObject*>(source);
|
|
|
|
|
|
|
|
|
|
// Handle push button hover effects.
|
|
|
|
@ -2635,7 +2635,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( event->type() == TQEvent::Paint && object->inherits(TQLABEL_OBJECT_NAME_STRING) )
|
|
|
|
|
if ( event->type() == TQEvent::Paint && object->inherits("TQLabel") )
|
|
|
|
|
{
|
|
|
|
|
TQLabel* lb = static_cast<TQLabel*>(TQT_TQWIDGET(object));
|
|
|
|
|
if (lb->pixmap() || lb->picture() || lb->movie() || (lb->textFormat() == TQt::RichText) ||
|
|
|
|
@ -2699,7 +2699,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( event->type() == TQEvent::Paint && object->inherits(TQGROUPBOX_OBJECT_NAME_STRING) )
|
|
|
|
|
if ( event->type() == TQEvent::Paint && object->inherits("TQGroupBox") )
|
|
|
|
|
{
|
|
|
|
|
TQPaintEvent * pevent = TQT_TQPAINTEVENT(event);
|
|
|
|
|
TQGroupBox* gb = static_cast<TQGroupBox*>(TQT_TQWIDGET(object));
|
|
|
|
@ -2713,7 +2713,7 @@ bool StyleCheckStyle::objectEventHandler( const TQStyleControlElementData &ceDat
|
|
|
|
|
// I suggested that it could eat me. GCC won.
|
|
|
|
|
while ( (parent = parent->parent()) )
|
|
|
|
|
{
|
|
|
|
|
if (parent->inherits(TQGROUPBOX_OBJECT_NAME_STRING))
|
|
|
|
|
if (parent->inherits("TQGroupBox"))
|
|
|
|
|
{
|
|
|
|
|
nestedGroupBox = true;
|
|
|
|
|
break;
|
|
|
|
|