Replaced various '#define' with actual strings - part 4

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/15/head
Michele Calgaro 6 months ago
parent e2b48e1ca3
commit 08147c8aed
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -126,7 +126,7 @@ void TQtCTDEStyle::polish( TQStyleControlElementData ceData, ControlElementFlags
if ( d->useFilledFrameWorkaround ) if ( d->useFilledFrameWorkaround )
{ {
if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape(); TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
@ -143,7 +143,7 @@ void TQtCTDEStyle::unPolish( TQStyleControlElementData ceData, ControlElementFla
if ( d->useFilledFrameWorkaround ) if ( d->useFilledFrameWorkaround )
{ {
if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape(); TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
@ -1696,14 +1696,14 @@ bool TQtCTDEStyle::objectEventHandler( TQStyleControlElementData ceData, Control
// -- Karol. // -- Karol.
TQFrame *frame = 0; TQFrame *frame = 0;
if ( event->type() == TQEvent::Paint if ( event->type() == TQEvent::Paint
&& (frame = ::tqqt_cast<TQFrame*>(object)) ) && (frame = ::tqt_cast<TQFrame*>(object)) )
{ {
if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel) if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel)
return false; return false;
bool horizontal = true; bool horizontal = true;
TQPaintEvent* pe = (TQPaintEvent*)event; TQPaintEvent* pe = (TQPaintEvent*)event;
TQToolBar *toolbar = ::tqqt_cast< TQToolBar *>( frame ); TQToolBar *toolbar = ::tqt_cast< TQToolBar *>( frame );
TQRect r = pe->rect(); TQRect r = pe->rect();
if (toolbar && toolbar->orientation() == TQt::Vertical) if (toolbar && toolbar->orientation() == TQt::Vertical)

@ -195,8 +195,8 @@ static void adjustToolbarButtons(const TQWidget *widget, const TQToolBar *toolba
if (TQt::Horizontal==toolbar->orientation()) if (TQt::Horizontal==toolbar->orientation())
{ {
bool haveLeft=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.x()-d, geo.y())), bool haveLeft=::tqt_cast<TQToolButton*>(toolbar->childAt(geo.x()-d, geo.y())),
haveRight=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.right()+d, geo.y())); haveRight=::tqt_cast<TQToolButton*>(toolbar->childAt(geo.right()+d, geo.y()));
if(haveLeft && haveRight) if(haveLeft && haveRight)
leftAdjust=-constAdjust, rightAdjust=constAdjust, round=ROUNDED_NONE; leftAdjust=-constAdjust, rightAdjust=constAdjust, round=ROUNDED_NONE;
@ -207,8 +207,8 @@ static void adjustToolbarButtons(const TQWidget *widget, const TQToolBar *toolba
} }
else else
{ {
bool haveTop=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.x(), geo.y()-d)), bool haveTop=::tqt_cast<TQToolButton*>(toolbar->childAt(geo.x(), geo.y()-d)),
haveBot=::tqqt_cast<TQToolButton*>(toolbar->childAt(geo.x(), geo.bottom()+d)); haveBot=::tqt_cast<TQToolButton*>(toolbar->childAt(geo.x(), geo.bottom()+d));
if(haveTop && haveBot) if(haveTop && haveBot)
topAdjust=-constAdjust, bottomAdjust=constAdjust, round=ROUNDED_NONE; topAdjust=-constAdjust, bottomAdjust=constAdjust, round=ROUNDED_NONE;
@ -268,13 +268,13 @@ static void adjust(TQRect &r, int dx1, int dy1, int dx2, int dy2)
inline bool isSpecialHover(TQWidget *w) inline bool isSpecialHover(TQWidget *w)
{ {
return w && ( return w && (
::tqqt_cast<TQRadioButton *>(w) || ::tqt_cast<TQRadioButton *>(w) ||
::tqqt_cast<TQCheckBox *>(w) || ::tqt_cast<TQCheckBox *>(w) ||
::tqqt_cast<TQScrollBar *>(w) || ::tqt_cast<TQScrollBar *>(w) ||
::tqqt_cast<TQHeader *>(w) || ::tqt_cast<TQHeader *>(w) ||
::tqqt_cast<TQSpinWidget *>(w) || ::tqt_cast<TQSpinWidget *>(w) ||
::tqqt_cast<TQComboBox *>(w) || ::tqt_cast<TQComboBox *>(w) ||
::tqqt_cast<TQTabBar *>(w) ::tqt_cast<TQTabBar *>(w)
); );
} }
@ -504,7 +504,7 @@ static bool inStackWidget(const TQWidget *w)
{ {
while(w) while(w)
{ {
if(::tqqt_cast<const TQTabWidget *>(w)) if(::tqt_cast<const TQTabWidget *>(w))
return true; return true;
w=w->parentWidget(); w=w->parentWidget();
} }
@ -518,7 +518,7 @@ static bool isOnToolbar(const TQWidget *widget, TQPainter *p)
while(wid) while(wid)
{ {
if(::tqqt_cast<const TQToolBar *>(wid)) if(::tqt_cast<const TQToolBar *>(wid))
return true; return true;
wid=wid->parentWidget(); wid=wid->parentWidget();
} }
@ -794,7 +794,7 @@ static void parseWindowLine(const TQString &line, TQValueList<int> &data)
static bool isCheckBoxOfGroupBox(const TQObject *w) static bool isCheckBoxOfGroupBox(const TQObject *w)
{ {
return w && w->parent() && return w && w->parent() &&
::tqqt_cast<TQCheckBox *>(w) && ::tqqt_cast<TQGroupBox *>(w->parent()) && ::tqt_cast<TQCheckBox *>(w) && ::tqt_cast<TQGroupBox *>(w->parent()) &&
!qstrcmp(w->name(), "qt_groupbox_checkbox"); !qstrcmp(w->name(), "qt_groupbox_checkbox");
} }
@ -1565,13 +1565,13 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
if(isWindowDragWidget(TQT_TQOBJECT(widget))) if(isWindowDragWidget(TQT_TQOBJECT(widget)))
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
if(::tqqt_cast<TQDialog *>(widget) || ::tqqt_cast<TQMainWindow *>(widget)) if(::tqt_cast<TQDialog *>(widget) || ::tqt_cast<TQMainWindow *>(widget))
{ {
setBgndProp(widget, opts.bgndAppearance); setBgndProp(widget, opts.bgndAppearance);
installObjectEventHandler(ceData, elementFlags, ptr, this); // To trap palette change installObjectEventHandler(ceData, elementFlags, ptr, this); // To trap palette change
} }
if(widget->parentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->parentWidget())) if(widget->parentWidget() && ::tqt_cast<TQScrollView *>(widget) && ::tqt_cast<TQComboBox *>(widget->parentWidget()))
{ {
TQPalette pal(ceData.palette); TQPalette pal(ceData.palette);
#if 0 #if 0
@ -1601,7 +1601,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
end(children->end()); end(children->end());
for(; it!=end; ++it) for(; it!=end; ++it)
if(::tqqt_cast<TQWidget *>(*it)) if(::tqt_cast<TQWidget *>(*it))
((TQWidget *)(*it))->setPalette(orig); ((TQWidget *)(*it))->setPalette(orig);
} }
#endif #endif
@ -1611,35 +1611,35 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
widget->setPalette(*itsMactorPal); widget->setPalette(*itsMactorPal);
// Get rid of Kontact's frame... // Get rid of Kontact's frame...
if(APP_KONTACT==itsThemedApp && ::tqqt_cast<TQHBox *>(widget) && widget->parentWidget() && if(APP_KONTACT==itsThemedApp && ::tqt_cast<TQHBox *>(widget) && widget->parentWidget() &&
0==qstrcmp(widget->parentWidget()->className(), "Kontact::MainWindow")) 0==qstrcmp(widget->parentWidget()->className(), "Kontact::MainWindow"))
((TQHBox *)widget)->setLineWidth(0); ((TQHBox *)widget)->setLineWidth(0);
if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<const TQPopupMenu *>(widget)) if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqt_cast<const TQPopupMenu *>(widget))
{ {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
#if 0 #if 0
if(opts.menubarHiding && ::tqqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar()) if(opts.menubarHiding && ::tqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar())
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
#endif #endif
if ((opts.square&SQUARE_SCROLLVIEW) && widget && if ((opts.square&SQUARE_SCROLLVIEW) && widget &&
(::tqqt_cast<const TQScrollView *>(widget) || (::tqt_cast<const TQScrollView *>(widget) ||
(widget->parentWidget() && ::tqqt_cast<const TQFrame *>(widget) && (widget->parentWidget() && ::tqt_cast<const TQFrame *>(widget) &&
widget->parentWidget()->inherits("KateView"))) && widget->parentWidget()->inherits("KateView"))) &&
((TQFrame *)widget)->lineWidth()>1) ((TQFrame *)widget)->lineWidth()>1)
((TQFrame *)widget)->setLineWidth(opts.gtkScrollViews ? 1 : 2); ((TQFrame *)widget)->setLineWidth(opts.gtkScrollViews ? 1 : 2);
else if(!opts.popupBorder && widget && else if(!opts.popupBorder && widget &&
(::tqqt_cast<const TQPopupMenu *>(widget) || (::tqt_cast<const TQPopupMenu *>(widget) ||
(widget->parentWidget() && ::tqqt_cast<const TQListBox *>(widget) && (widget->parentWidget() && ::tqt_cast<const TQListBox *>(widget) &&
::tqqt_cast<const TQComboBox *>(widget->parentWidget())))) ::tqt_cast<const TQComboBox *>(widget->parentWidget()))))
((TQFrame *)widget)->setLineWidth(0); ((TQFrame *)widget)->setLineWidth(0);
else if (!DRAW_MENU_BORDER && !opts.borderMenuitems && widget && ::tqqt_cast<const TQPopupMenu *>(widget)) else if (!DRAW_MENU_BORDER && !opts.borderMenuitems && widget && ::tqt_cast<const TQPopupMenu *>(widget))
((TQFrame *)widget)->setLineWidth(1); ((TQFrame *)widget)->setLineWidth(1);
if (::tqqt_cast<TQRadioButton *>(widget) || ::tqqt_cast<TQCheckBox *>(widget)) if (::tqt_cast<TQRadioButton *>(widget) || ::tqt_cast<TQCheckBox *>(widget))
{ {
bool framelessGroupBoxCheckBox=(NO_FRAME(opts.groupBox) && isCheckBoxOfGroupBox(TQT_TQOBJECT(widget))); bool framelessGroupBoxCheckBox=(NO_FRAME(opts.groupBox) && isCheckBoxOfGroupBox(TQT_TQOBJECT(widget)));
@ -1657,8 +1657,8 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
} }
else if (::tqqt_cast<TQHeader *>(widget) || ::tqqt_cast<TQTabBar *>(widget) || ::tqqt_cast<TQSpinWidget *>(widget)/* || else if (::tqt_cast<TQHeader *>(widget) || ::tqt_cast<TQTabBar *>(widget) || ::tqt_cast<TQSpinWidget *>(widget)/* ||
::tqqt_cast<TQDateTimeEditBase*>(widget)*/) ::tqt_cast<TQDateTimeEditBase*>(widget)*/)
{ {
if(enableFilter) if(enableFilter)
{ {
@ -1666,7 +1666,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
} }
else if (::tqqt_cast<TQToolButton *>(widget)) else if (::tqt_cast<TQToolButton *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
@ -1675,7 +1675,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
} }
else if (::tqqt_cast<TQButton *>(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) else if (::tqt_cast<TQButton *>(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget"))
{ {
/*if(onToolBar(widget)) /*if(onToolBar(widget))
widget->setBackgroundMode(NoBackground); widget->setBackgroundMode(NoBackground);
@ -1684,7 +1684,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
if(enableFilter) if(enableFilter)
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQComboBox *>(widget)) else if (::tqt_cast<TQComboBox *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
@ -1703,7 +1703,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
// installObjectEventHandler(ceData, elementFlags, ptr, this); // installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
} }
else if(::tqqt_cast<TQMenuBar *>(widget)) else if(::tqt_cast<TQMenuBar *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
@ -1713,25 +1713,25 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
emitMenuSize(widget, ceData.rect.height()); emitMenuSize(widget, ceData.rect.height());
setMenuTextColors(widget, true); setMenuTextColors(widget, true);
} }
else if(::tqqt_cast<TQToolBar *>(widget)) else if(::tqt_cast<TQToolBar *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
} }
else if(::tqqt_cast<TQPopupMenu *>(widget)) else if(::tqt_cast<TQPopupMenu *>(widget))
{ {
widget->setBackgroundMode(NoBackground); // PaletteBackground); widget->setBackgroundMode(NoBackground); // PaletteBackground);
setMenuTextColors(widget, true); setMenuTextColors(widget, true);
} }
else if (ceData.widgetObjectTypes.contains("TDEToolBarSeparator") || else if (ceData.widgetObjectTypes.contains("TDEToolBarSeparator") ||
(ceData.widgetObjectTypes.contains("TDEListViewSearchLineWidget") && (ceData.widgetObjectTypes.contains("TDEListViewSearchLineWidget") &&
widget->parent() && ::tqqt_cast<TQToolBar *>(widget->parent()))) widget->parent() && ::tqt_cast<TQToolBar *>(widget->parent())))
{ {
widget->setName(kdeToolbarWidget); widget->setName(kdeToolbarWidget);
widget->setBackgroundMode(NoBackground); widget->setBackgroundMode(NoBackground);
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQScrollBar *>(widget)) else if (::tqt_cast<TQScrollBar *>(widget))
{ {
if(enableFilter) if(enableFilter)
{ {
@ -1740,11 +1740,11 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
} }
//widget->setBackgroundMode(NoBackground); //widget->setBackgroundMode(NoBackground);
} }
else if (::tqqt_cast<TQSlider *>(widget)) else if (::tqt_cast<TQSlider *>(widget))
{ {
if(enableFilter) if(enableFilter)
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
if(widget->parent() && ::tqqt_cast<TQToolBar *>(widget->parent())) if(widget->parent() && ::tqt_cast<TQToolBar *>(widget->parent()))
{ {
widget->setName(kdeToolbarWidget); widget->setName(kdeToolbarWidget);
widget->setBackgroundMode(NoBackground); // We paint whole background. widget->setBackgroundMode(NoBackground); // We paint whole background.
@ -1757,14 +1757,14 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
connect(widget, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderThumbMoved(int))); connect(widget, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderThumbMoved(int)));
connect(widget, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderThumbMoved(int))); connect(widget, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderThumbMoved(int)));
} }
else if (::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQTextEdit*>(widget)) else if (::tqt_cast<TQLineEdit*>(widget) || ::tqt_cast<TQTextEdit*>(widget))
{ {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
if(onToolBar(widget)) if(onToolBar(widget))
widget->setName(kdeToolbarWidget); widget->setName(kdeToolbarWidget);
if(widget && widget->parentWidget() && if(widget && widget->parentWidget() &&
ceData.widgetObjectTypes.contains("KLineEdit") && widget->parentWidget()->inherits("TDEIO::DefaultProgress") && ceData.widgetObjectTypes.contains("KLineEdit") && widget->parentWidget()->inherits("TDEIO::DefaultProgress") &&
::tqqt_cast<TQFrame *>(widget)) ::tqt_cast<TQFrame *>(widget))
((TQFrame *)widget)->setLineWidth(0); ((TQFrame *)widget)->setLineWidth(0);
} }
else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle")) else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle"))
@ -1784,14 +1784,14 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
} }
} }
if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame")) if (widget->parentWidget() && ::tqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame"))
{ {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(NoBackground); // We paint whole background. widget->setBackgroundMode(NoBackground); // We paint whole background.
} }
else if (TQt::X11ParentRelative!=widget->backgroundMode() && else if (TQt::X11ParentRelative!=widget->backgroundMode() &&
(::tqqt_cast<TQLabel *>(widget) || ::tqqt_cast<TQHBox *>(widget) || (::tqt_cast<TQLabel *>(widget) || ::tqt_cast<TQHBox *>(widget) ||
::tqqt_cast<TQVBox *>(widget)) && ::tqt_cast<TQVBox *>(widget)) &&
widget->parent() && widget->parent() &&
( 0==qstrcmp(TQT_TQWIDGET(widget->parent())->className(), ( 0==qstrcmp(TQT_TQWIDGET(widget->parent())->className(),
"MainWindow") || onToolBar(widget))) "MainWindow") || onToolBar(widget)))
@ -1800,7 +1800,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(NoBackground); // We paint the whole background. widget->setBackgroundMode(NoBackground); // We paint the whole background.
} }
else if(::tqqt_cast<TQProgressBar *>(widget)) else if(::tqt_cast<TQProgressBar *>(widget))
{ {
if(ceData.palette.inactive().highlightedText()!=ceData.palette.active().highlightedText()) if(ceData.palette.inactive().highlightedText()!=ceData.palette.active().highlightedText())
{ {
@ -1818,7 +1818,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
itsAnimationTimer->start(PROGRESS_ANIMATION, false); itsAnimationTimer->start(PROGRESS_ANIMATION, false);
} }
} }
else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView*>(widget)) else if(opts.highlightScrollViews && ::tqt_cast<TQScrollView*>(widget))
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
else if(!qstrcmp(widget->className(), "KonqFrameStatusBar")) else if(!qstrcmp(widget->className(), "KonqFrameStatusBar"))
{ {
@ -1835,13 +1835,13 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
} }
else if(ceData.widgetObjectTypes.contains("KTabCtl")) else if(ceData.widgetObjectTypes.contains("KTabCtl"))
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
else if(NO_FRAME(opts.groupBox) && ::tqqt_cast<TQGroupBox *>(widget)) else if(NO_FRAME(opts.groupBox) && ::tqt_cast<TQGroupBox *>(widget))
{ {
((TQGroupBox *)widget)->setFlat(false); ((TQGroupBox *)widget)->setFlat(false);
((TQGroupBox *)widget)->setFrameShape(TQFrame::NoFrame); ((TQGroupBox *)widget)->setFrameShape(TQFrame::NoFrame);
} }
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT #ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
else if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(widget)) else if(opts.fixParentlessDialogs && ::tqt_cast<TQDialog *>(widget))
{ {
TQDialog *dlg=(TQDialog *)widget; TQDialog *dlg=(TQDialog *)widget;
@ -1849,7 +1849,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
// the insert picture dialog - but the file dialog is shown *before* the picture dialog! // the insert picture dialog - but the file dialog is shown *before* the picture dialog!
if( (SKIP_TASKBAR && !dlg->parentWidget()) || if( (SKIP_TASKBAR && !dlg->parentWidget()) ||
( (!dlg->parentWidget() || !dlg->parentWidget()->isShown())// && ( (!dlg->parentWidget() || !dlg->parentWidget()->isShown())// &&
/*(dlg->isModal() || ::tqqt_cast<TQProgressDialog *>(widget))*/) ) /*(dlg->isModal() || ::tqt_cast<TQProgressDialog *>(widget))*/) )
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
@ -1874,19 +1874,19 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
if(APP_SYSTEMSETTINGS==itsThemedApp) if(APP_SYSTEMSETTINGS==itsThemedApp)
{ {
if(widget && widget->parentWidget() && widget->parentWidget()->parentWidget() && if(widget && widget->parentWidget() && widget->parentWidget()->parentWidget() &&
::tqqt_cast<TQFrame *>(widget) && TQFrame::NoFrame!=((TQFrame *)widget)->frameShape() && ::tqt_cast<TQFrame *>(widget) && TQFrame::NoFrame!=((TQFrame *)widget)->frameShape() &&
::tqqt_cast<TQFrame *>(widget->parentWidget()) && ::tqt_cast<TQFrame *>(widget->parentWidget()) &&
::tqqt_cast<TQTabWidget *>(widget->parentWidget()->parentWidget())) ::tqt_cast<TQTabWidget *>(widget->parentWidget()->parentWidget()))
((TQFrame *)widget)->setFrameShape(TQFrame::NoFrame); ((TQFrame *)widget)->setFrameShape(TQFrame::NoFrame);
if(widget->parentWidget() && widget->parentWidget()->parentWidget() && if(widget->parentWidget() && widget->parentWidget()->parentWidget() &&
::tqqt_cast<TQScrollView *>(widget->parentWidget()->parentWidget()) && ::tqt_cast<TQScrollView *>(widget->parentWidget()->parentWidget()) &&
ceData.widgetObjectTypes.contains("KCMultiWidget") && widget->parentWidget()->inherits("TQViewportWidget")) ceData.widgetObjectTypes.contains("KCMultiWidget") && widget->parentWidget()->inherits("TQViewportWidget"))
((TQScrollView *)(widget->parentWidget()->parentWidget()))->setLineWidth(0); ((TQScrollView *)(widget->parentWidget()->parentWidget()))->setLineWidth(0);
} }
if(opts.tabBgnd && widget && widget->parentWidget() && ::tqqt_cast<TQWidgetStack *>(widget) && if(opts.tabBgnd && widget && widget->parentWidget() && ::tqt_cast<TQWidgetStack *>(widget) &&
::tqqt_cast<TQTabWidget *>(widget->parentWidget()) && ::tqt_cast<TQTabWidget *>(widget->parentWidget()) &&
0==qstrcmp(ceData.name.ascii(), "tab pages")) 0==qstrcmp(ceData.name.ascii(), "tab pages"))
{ {
TQPalette pal(ceData.palette); TQPalette pal(ceData.palette);
@ -1911,43 +1911,43 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
if(isFormWidget(widget)) if(isFormWidget(widget))
itsKhtmlWidgets.remove(widget); itsKhtmlWidgets.remove(widget);
if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<const TQPopupMenu *>(widget)) if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqt_cast<const TQPopupMenu *>(widget))
{ {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
#if 0 #if 0
if(opts.menubarHiding && ::tqqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar()) if(opts.menubarHiding && ::tqt_cast<TQMainWindow *>(widget) && static_cast<TQMainWindow *>(widget)->menuBar())
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
#endif #endif
if(isWindowDragWidget(TQT_TQOBJECT(widget))) if(isWindowDragWidget(TQT_TQOBJECT(widget)))
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
if (::tqqt_cast<TQRadioButton *>(widget) || ::tqqt_cast<TQCheckBox *>(widget)) if (::tqt_cast<TQRadioButton *>(widget) || ::tqt_cast<TQCheckBox *>(widget))
{ {
widget->setMouseTracking(false); widget->setMouseTracking(false);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQHeader *>(widget) || ::tqqt_cast<TQTabBar *>(widget) || ::tqqt_cast<TQSpinWidget *>(widget) /*|| else if (::tqt_cast<TQHeader *>(widget) || ::tqt_cast<TQTabBar *>(widget) || ::tqt_cast<TQSpinWidget *>(widget) /*||
::tqqt_cast<TQDateTimeEditBase*>(widget)*/) ::tqt_cast<TQDateTimeEditBase*>(widget)*/)
{ {
widget->setMouseTracking(false); widget->setMouseTracking(false);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQButton *>(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) else if (::tqt_cast<TQButton *>(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget"))
{ {
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteButton); widget->setBackgroundMode(PaletteButton);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQToolButton *>(widget)) else if (::tqt_cast<TQToolButton *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteButton); widget->setBackgroundMode(PaletteButton);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQComboBox *>(widget)) else if (::tqt_cast<TQComboBox *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget))
widget->setBackgroundMode(PaletteButton); widget->setBackgroundMode(PaletteButton);
@ -1960,12 +1960,12 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
// removeObjectEventHandler(ceData, elementFlags, ptr, this); // removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
} }
else if (::tqqt_cast<TQToolBar *>(widget) || ::tqqt_cast<TQPopupMenu *>(widget)) else if (::tqt_cast<TQToolBar *>(widget) || ::tqt_cast<TQPopupMenu *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
} }
else if (::tqqt_cast<TQMenuBar *>(widget)) else if (::tqt_cast<TQMenuBar *>(widget))
{ {
if(NoBackground!=widget->backgroundMode()) if(NoBackground!=widget->backgroundMode())
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
@ -1980,35 +1980,35 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQScrollBar *>(widget)) else if (::tqt_cast<TQScrollBar *>(widget))
{ {
widget->setMouseTracking(false); widget->setMouseTracking(false);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(PaletteButton); widget->setBackgroundMode(PaletteButton);
} }
else if (::tqqt_cast<TQSlider *>(widget)) else if (::tqt_cast<TQSlider *>(widget))
{ {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
if(widget->parent() && ::tqqt_cast<TQToolBar *>(widget->parent())) if(widget->parent() && ::tqt_cast<TQToolBar *>(widget->parent()))
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
} }
else if (::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQTextEdit*>(widget)) else if (::tqt_cast<TQLineEdit*>(widget) || ::tqt_cast<TQTextEdit*>(widget))
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle")) else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle"))
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
else if (::tqqt_cast<TQProgressBar*>(widget)) else if (::tqt_cast<TQProgressBar*>(widget))
{ {
itsProgAnimWidgets.remove(widget); itsProgAnimWidgets.remove(widget);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView*>(widget)) else if(opts.highlightScrollViews && ::tqt_cast<TQScrollView*>(widget))
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
else if(0==qstrcmp(ceData.name.ascii(), kdeToolbarWidget)) else if(0==qstrcmp(ceData.name.ascii(), kdeToolbarWidget))
{ {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(PaletteBackground); widget->setBackgroundMode(PaletteBackground);
} }
if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame")) if (widget->parentWidget() && ::tqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame"))
{ {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(PaletteBackground); // We paint whole background. widget->setBackgroundMode(PaletteBackground); // We paint whole background.
@ -2016,7 +2016,7 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
else if(ceData.widgetObjectTypes.contains("KTabCtl")) else if(ceData.widgetObjectTypes.contains("KTabCtl"))
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT #ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
else if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(widget)) else if(opts.fixParentlessDialogs && ::tqt_cast<TQDialog *>(widget))
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
#endif #endif
} }
@ -2069,7 +2069,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
#if 0 #if 0
// Works for qtconfig, but k3b hangs? // Works for qtconfig, but k3b hangs?
if(opts.menubarHiding && TQEvent::KeyRelease==event->type() && ::tqqt_cast<TQMainWindow *>(object)) if(opts.menubarHiding && TQEvent::KeyRelease==event->type() && ::tqt_cast<TQMainWindow *>(object))
{ {
TQMainWindow *window=static_cast<TQMainWindow *>(object); TQMainWindow *window=static_cast<TQMainWindow *>(object);
@ -2108,7 +2108,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
pr(parent->rect()); pr(parent->rect());
bool horiz=pr.width() > pr.height(); bool horiz=pr.width() > pr.height();
TQPainter p(widget); TQPainter p(widget);
TQToolBar *tb(::tqqt_cast<TQToolBar*>(parent)); TQToolBar *tb(::tqt_cast<TQToolBar*>(parent));
// If parent is a TQToolbar use its orientation, else just base on width>height. // If parent is a TQToolbar use its orientation, else just base on width>height.
if (tb) if (tb)
@ -2128,8 +2128,8 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), false, horiz); drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), false, horiz);
} }
if(!::tqqt_cast<TQLineEdit*>(object) && !::tqqt_cast<TQTextEdit*>(object) && if(!::tqt_cast<TQLineEdit*>(object) && !::tqt_cast<TQTextEdit*>(object) &&
!(DO_EFFECT && ::tqqt_cast<TQComboBox*>(object))) !(DO_EFFECT && ::tqt_cast<TQComboBox*>(object)))
{ {
return false; // Now draw the contents return false; // Now draw the contents
} }
@ -2151,7 +2151,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
} }
else if (TQEvent::Paint==event->type()) else if (TQEvent::Paint==event->type())
{ {
if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast<TQPopupMenu *>(object)) if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqt_cast<TQPopupMenu *>(object))
{ {
TQWidget *widget=(TQWidget*)object; TQWidget *widget=(TQWidget*)object;
TQPainter painter(widget); TQPainter painter(widget);
@ -2176,7 +2176,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
} }
else if (object->inherits("TDEToolBarSeparator")) else if (object->inherits("TDEToolBarSeparator"))
{ {
TQFrame *frame(::tqqt_cast<TQFrame *>(object)); TQFrame *frame(::tqt_cast<TQFrame *>(object));
if(frame && TQFrame::NoFrame!=frame->frameShape()) if(frame && TQFrame::NoFrame!=frame->frameShape())
{ {
@ -2198,11 +2198,11 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
return true; // been drawn! return true; // been drawn!
} }
} }
else if(object->inherits("KTabCtl") && ::tqqt_cast<TQWidget*>(object)) else if(object->inherits("KTabCtl") && ::tqt_cast<TQWidget*>(object))
{ {
TQWidget *widget((TQWidget*)object); TQWidget *widget((TQWidget*)object);
TQObject *child(object->child("_tabbar")); TQObject *child(object->child("_tabbar"));
TQTabBar *tb(child ? ::tqqt_cast<TQTabBar *>(child) : 0L); TQTabBar *tb(child ? ::tqt_cast<TQTabBar *>(child) : 0L);
TQPainter painter(widget); TQPainter painter(widget);
TQRect r(ceData.rect); TQRect r(ceData.rect);
int tbHeight(tb ? tb->height()-1 : 28); int tbHeight(tb ? tb->height()-1 : 28);
@ -2223,8 +2223,8 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
} }
// Fix mdi buttons in menubars... // Fix mdi buttons in menubars...
if(::tqqt_cast<TQWidget*>(object) && ((TQWidget *)object)->parentWidget() && if(::tqt_cast<TQWidget*>(object) && ((TQWidget *)object)->parentWidget() &&
::tqqt_cast<TQMenuBar*>(((TQWidget *)object)->parentWidget())) ::tqt_cast<TQMenuBar*>(((TQWidget *)object)->parentWidget()))
{ {
bool drawMenubar=false; bool drawMenubar=false;
@ -2263,13 +2263,13 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
// Taken from plastik... // Taken from plastik...
// focus highlight // focus highlight
if (::tqqt_cast<TQLineEdit*>(object) || ::tqqt_cast<TQTextEdit*>(object)/* || ::tqqt_cast<TQDateTimeEditBase*>(object)*/) if (::tqt_cast<TQLineEdit*>(object) || ::tqt_cast<TQTextEdit*>(object)/* || ::tqt_cast<TQDateTimeEditBase*>(object)*/)
{ {
if(TQEvent::FocusIn==event->type() || TQEvent::FocusOut==event->type() || TQEvent::Enter==event->type() || TQEvent::Leave==event->type()) if(TQEvent::FocusIn==event->type() || TQEvent::FocusOut==event->type() || TQEvent::Enter==event->type() || TQEvent::Leave==event->type())
{ {
TQWidget *widget(TQT_TQWIDGET(object)); TQWidget *widget(TQT_TQWIDGET(object));
if (::tqqt_cast<TQSpinWidget*>(widget->parentWidget())) if (::tqt_cast<TQSpinWidget*>(widget->parentWidget()))
{ {
widget->parentWidget()->repaint(false); widget->parentWidget()->repaint(false);
return false; return false;
@ -2280,7 +2280,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
return false; return false;
} }
if(::tqqt_cast<TQMenuBar *>(object)) if(::tqt_cast<TQMenuBar *>(object))
{ {
bool useWindowCols=SHADE_WINDOW_BORDER==opts.shadeMenubars; bool useWindowCols=SHADE_WINDOW_BORDER==opts.shadeMenubars;
@ -2389,10 +2389,10 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
default: default:
break; break;
} }
if(TQEvent::PaletteChange==event->type() && (::tqqt_cast<TQDialog *>(object) || ::tqqt_cast<TQMainWindow *>(object))) if(TQEvent::PaletteChange==event->type() && (::tqt_cast<TQDialog *>(object) || ::tqt_cast<TQMainWindow *>(object)))
setBgndProp(static_cast<TQWidget *>(object), opts.bgndAppearance); setBgndProp(static_cast<TQWidget *>(object), opts.bgndAppearance);
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT #ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
if(opts.fixParentlessDialogs && ::tqqt_cast<TQDialog *>(object)) if(opts.fixParentlessDialogs && ::tqt_cast<TQDialog *>(object))
{ {
TQDialog *dlg=(TQDialog *)object; TQDialog *dlg=(TQDialog *)object;
@ -2424,7 +2424,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
// child of the insert picture dialog - but the file dialog is shown *before* the // child of the insert picture dialog - but the file dialog is shown *before* the
// picture dialog! // picture dialog!
if((!dlg->parentWidget() || !dlg->parentWidget()->isShown())) // && if((!dlg->parentWidget() || !dlg->parentWidget()->isShown())) // &&
//(dlg->isModal() || ::tqqt_cast<TQProgressDialog *>(object))) //(dlg->isModal() || ::tqt_cast<TQProgressDialog *>(object)))
{ {
TQWidget *activeWindow=tqApp->activeWindow(); TQWidget *activeWindow=tqApp->activeWindow();
@ -2467,7 +2467,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
#endif #endif
// Track show events for progress bars // Track show events for progress bars
if (opts.animatedProgress && ::tqqt_cast<TQProgressBar*>(object)) if (opts.animatedProgress && ::tqt_cast<TQProgressBar*>(object))
{ {
if(TQEvent::Show==event->type() && !itsAnimationTimer->isActive()) if(TQEvent::Show==event->type() && !itsAnimationTimer->isActive())
itsAnimationTimer->start(PROGRESS_ANIMATION, false); itsAnimationTimer->start(PROGRESS_ANIMATION, false);
@ -2478,16 +2478,16 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
{ {
case TQEvent::FocusIn: case TQEvent::FocusIn:
case TQEvent::FocusOut: case TQEvent::FocusOut:
if(opts.highlightScrollViews && object->isWidgetType() && ::tqqt_cast<TQScrollView*>(object)) if(opts.highlightScrollViews && object->isWidgetType() && ::tqt_cast<TQScrollView*>(object))
((TQWidget *)object)->repaint(false); ((TQWidget *)object)->repaint(false);
break; break;
case TQEvent::Hide: case TQEvent::Hide:
case TQEvent::Show: case TQEvent::Show:
if(::tqqt_cast<TQListBox *>(object) && if(::tqt_cast<TQListBox *>(object) &&
(((TQListBox *)object)->parentWidget() && (((TQListBox *)object)->parentWidget() &&
::tqqt_cast<TQComboBox *>(((TQListBox *)object)->parentWidget()))) ::tqt_cast<TQComboBox *>(((TQListBox *)object)->parentWidget())))
((TQComboBox *)(((TQListBox *)object)->parentWidget()))->repaint(false); ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->repaint(false);
// else if(::tqqt_cast<TQFrame *>(object) && // else if(::tqt_cast<TQFrame *>(object) &&
// (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() || // (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() ||
// TQFrame::WinPanel==((TQFrame *)object)->frameShape())) // TQFrame::WinPanel==((TQFrame *)object)->frameShape()))
// ((TQFrame *)object)->setFrameShape(TQFrame::StyledPanel); // ((TQFrame *)object)->setFrameShape(TQFrame::StyledPanel);
@ -2499,7 +2499,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
if(itsHoverWidget && itsHoverWidget->isEnabled()) if(itsHoverWidget && itsHoverWidget->isEnabled())
{ {
if(::tqqt_cast<TQTabBar*>(object) && TQT_TQWIDGET(object)->isEnabled()) if(::tqt_cast<TQTabBar*>(object) && TQT_TQWIDGET(object)->isEnabled())
{ {
itsHoverTab=0L; itsHoverTab=0L;
itsHoverWidget->repaint(false); itsHoverWidget->repaint(false);
@ -2509,7 +2509,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
itsHoverWidget->repaint(false); itsHoverWidget->repaint(false);
itsFormMode=false; itsFormMode=false;
} }
else if(opts.highlightScrollViews && ::tqqt_cast<TQScrollView *>(itsHoverWidget)) else if(opts.highlightScrollViews && ::tqt_cast<TQScrollView *>(itsHoverWidget))
itsHoverWidget->repaint(false); itsHoverWidget->repaint(false);
} }
else else
@ -3297,7 +3297,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl
if (header) if (header)
{ {
if(header->parent() && ::tqqt_cast<const TQTable *>(header->parent())) if(header->parent() && ::tqt_cast<const TQTable *>(header->parent()))
{ {
TQTable *tbl((TQTable *)(header->parent())); TQTable *tbl((TQTable *)(header->parent()));
@ -3333,7 +3333,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl
if(NO_SECT!=itsHoverSect && HOVER_HEADER==itsHover && itsHoverWidget) if(NO_SECT!=itsHoverSect && HOVER_HEADER==itsHover && itsHoverWidget)
{ {
TQHeader *hd(::tqqt_cast<TQHeader *>(itsHoverWidget)); TQHeader *hd(::tqt_cast<TQHeader *>(itsHoverWidget));
if(hd && hd->isClickEnabled(itsHoverSect) && r==hd->sectionRect(itsHoverSect)) if(hd && hd->isClickEnabled(itsHoverSect) && r==hd->sectionRect(itsHoverSect))
flags|=Style_MouseOver; flags|=Style_MouseOver;
@ -3955,10 +3955,10 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl
if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault()) if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault())
{ {
const TQWidget *widget=p && p->device() ? dynamic_cast<const TQWidget *>(p->device()) : 0L; const TQWidget *widget=p && p->device() ? dynamic_cast<const TQWidget *>(p->device()) : 0L;
bool sv(widget && ::tqqt_cast<const TQScrollView *>(widget)), bool sv(widget && ::tqt_cast<const TQScrollView *>(widget)),
square((opts.square&SQUARE_SCROLLVIEW) && square((opts.square&SQUARE_SCROLLVIEW) &&
(sv || (sv ||
(widget && widget->parentWidget() && ::tqqt_cast<const TQFrame *>(widget) && (widget && widget->parentWidget() && ::tqt_cast<const TQFrame *>(widget) &&
widget->parentWidget()->inherits("KateView")))); widget->parentWidget()->inherits("KateView"))));
// if(square) // if(square)
@ -4297,8 +4297,8 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl
TQWidget *widget(dynamic_cast<TQWidget*>(p->device())); TQWidget *widget(dynamic_cast<TQWidget*>(p->device()));
if(widget && (ceData.widgetObjectTypes.count() > 0) && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1], "TQViewportWidget") && if(widget && (ceData.widgetObjectTypes.count() > 0) && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1], "TQViewportWidget") &&
widget->parentWidget() && ::tqqt_cast<TQListBox *>(widget->parentWidget()) && widget->parentWidget() && ::tqt_cast<TQListBox *>(widget->parentWidget()) &&
widget->parentWidget()->parentWidget() && ::tqqt_cast<TQComboBox *>(widget->parentWidget()->parentWidget())) widget->parentWidget()->parentWidget() && ::tqt_cast<TQComboBox *>(widget->parentWidget()->parentWidget()))
{ {
struct QtCurveListBoxItem : public TQListBoxItem struct QtCurveListBoxItem : public TQListBoxItem
{ {
@ -4423,7 +4423,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl
case PE_PanelLineEdit: case PE_PanelLineEdit:
{ {
const TQWidget *widget=p && p->device() ? dynamic_cast<const TQWidget *>(p->device()) : 0L; const TQWidget *widget=p && p->device() ? dynamic_cast<const TQWidget *>(p->device()) : 0L;
bool scrollView=widget && ::tqqt_cast<const TQScrollView *>(widget); bool scrollView=widget && ::tqt_cast<const TQScrollView *>(widget);
// if((opts.square&SQUARE_SCROLLVIEW) && scrollView) // if((opts.square&SQUARE_SCROLLVIEW) && scrollView)
// { // {
@ -4664,7 +4664,7 @@ void QtCurveStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, co
drawSliderGroove(p, r, cg, flags, ceData, elementFlags, widget); drawSliderGroove(p, r, cg, flags, ceData, elementFlags, widget);
break; break;
case KPE_SliderHandle: case KPE_SliderHandle:
drawSliderHandle(p, r, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L); drawSliderHandle(p, r, cg, flags, widget ? ::tqt_cast<TQSlider *>(widget) : 0L);
break; break;
case KPE_ListViewExpander: case KPE_ListViewExpander:
{ {
@ -5755,12 +5755,12 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
} }
const TQToolBar *tb((widget)?(widget->parentWidget() const TQToolBar *tb((widget)?(widget->parentWidget()
? ::tqqt_cast<const TQToolBar *>(widget->parentWidget()) : 0L) : 0L); ? ::tqt_cast<const TQToolBar *>(widget->parentWidget()) : 0L) : 0L);
bool onControlButtons(false), bool onControlButtons(false),
onExtender(!tb && onExtender(!tb &&
(elementFlags & CEF_HasParentWidget) && (elementFlags & CEF_HasParentWidget) &&
ceData.parentWidgetData.widgetObjectTypes.contains( "TQToolBarExtensionWidget") && ceData.parentWidgetData.widgetObjectTypes.contains( "TQToolBarExtensionWidget") &&
::tqqt_cast<TQToolBar *>(widget->parentWidget()->parentWidget())), ::tqt_cast<TQToolBar *>(widget->parentWidget()->parentWidget())),
isDWClose(!tb && !onExtender && isDWClose(!tb && !onExtender &&
(elementFlags & CEF_HasParentWidget) && (elementFlags & CEF_HasParentWidget) &&
ceData.parentWidgetData.widgetObjectTypes.contains( "TQDockWindowHandle")); ceData.parentWidgetData.widgetObjectTypes.contains( "TQDockWindowHandle"));
@ -5806,7 +5806,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
{ {
if(onControlButtons || if(onControlButtons ||
((elementFlags & CEF_HasParentWidget) && toolbutton && toolbutton->parentWidget()->parentWidget() && ((elementFlags & CEF_HasParentWidget) && toolbutton && toolbutton->parentWidget()->parentWidget() &&
::tqqt_cast<const TQMenuBar *>(toolbutton->parentWidget()->parentWidget()))) ::tqt_cast<const TQMenuBar *>(toolbutton->parentWidget()->parentWidget())))
bflags|=NO_ETCH_BUTTON; bflags|=NO_ETCH_BUTTON;
// If we're pressed, on, or raised... // If we're pressed, on, or raised...
@ -5870,7 +5870,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
{ {
TQToolBar *tb(0L); TQToolBar *tb(0L);
if(::tqqt_cast<const TQToolBar *>((widget)?widget->parent():0L)) if(::tqt_cast<const TQToolBar *>((widget)?widget->parent():0L))
tb=(TQToolBar*)widget->parent(); tb=(TQToolBar*)widget->parent();
else if(ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) else if(ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBarExtensionWidget"))
{ {
@ -6482,7 +6482,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
if((controls & SC_SliderGroove)&& groove.isValid()) if((controls & SC_SliderGroove)&& groove.isValid())
drawSliderGroove(paint, groove, cg, flags, ceData, elementFlags, widget); drawSliderGroove(paint, groove, cg, flags, ceData, elementFlags, widget);
if((controls & SC_SliderHandle)&& handle.isValid()) if((controls & SC_SliderHandle)&& handle.isValid())
drawSliderHandle(paint, handle, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L, tb); drawSliderHandle(paint, handle, cg, flags, widget ? ::tqt_cast<TQSlider *>(widget) : 0L, tb);
if(controls & SC_SliderTickmarks) if(controls & SC_SliderTickmarks)
TQCommonStyle::drawComplexControl(control, paint, ceData, elementFlags, r, cg, flags, SC_SliderTickmarks, TQCommonStyle::drawComplexControl(control, paint, ceData, elementFlags, r, cg, flags, SC_SliderTickmarks,
active, data, widget); active, data, widget);
@ -6684,7 +6684,7 @@ TQRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const TQStyl
if(SC_ComboBoxFrame==sc) if(SC_ComboBoxFrame==sc)
{ {
const TQComboBox *cb(::tqqt_cast<const TQComboBox *>(widget)); const TQComboBox *cb(::tqt_cast<const TQComboBox *>(widget));
if(cb && cb->editable()) if(cb && cb->editable())
r=TQRect(r.x()+r.width()-19, r.y(), 19, r.height()); r=TQRect(r.x()+r.width()-19, r.y(), 19, r.height());
@ -6954,17 +6954,17 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const TQStyleControlElementDat
return 0; return 0;
case PM_DefaultFrameWidth: case PM_DefaultFrameWidth:
if(APP_KATE==itsThemedApp && widget && widget->parentWidget() && widget->parentWidget()->parentWidget() && if(APP_KATE==itsThemedApp && widget && widget->parentWidget() && widget->parentWidget()->parentWidget() &&
::tqqt_cast<const TQWidgetStack *>(widget) && ::tqt_cast<const TQWidgetStack *>(widget) &&
::tqqt_cast<const TQTabWidget *>(widget->parentWidget()) && ::tqt_cast<const TQTabWidget *>(widget->parentWidget()) &&
::tqqt_cast<const TQVBox *>(widget->parentWidget()->parentWidget())) ::tqt_cast<const TQVBox *>(widget->parentWidget()->parentWidget()))
return 0; return 0;
if ((opts.square&SQUARE_SCROLLVIEW) && widget && ::tqqt_cast<const TQScrollView *>(widget)) if ((opts.square&SQUARE_SCROLLVIEW) && widget && ::tqt_cast<const TQScrollView *>(widget))
return (opts.gtkScrollViews || opts.thinSbarGroove) && !opts.highlightScrollViews ? 1 : 2; return (opts.gtkScrollViews || opts.thinSbarGroove) && !opts.highlightScrollViews ? 1 : 2;
if(DO_EFFECT && opts.etchEntry && widget && !isFormWidget(widget) && if(DO_EFFECT && opts.etchEntry && widget && !isFormWidget(widget) &&
(::tqqt_cast<const TQLineEdit *>(widget) || ::tqqt_cast<const TQDateTimeEditBase*>(widget) || (::tqt_cast<const TQLineEdit *>(widget) || ::tqt_cast<const TQDateTimeEditBase*>(widget) ||
::tqqt_cast<const TQTextEdit*>(widget) || ::tqqt_cast<const TQScrollView*>(widget))) ::tqt_cast<const TQTextEdit*>(widget) || ::tqt_cast<const TQScrollView*>(widget)))
return 3; return 3;
else else
return 2; return 2;
@ -8426,7 +8426,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
// is not sensitive. But, the widget can ocupy a larger area - and this whole area will // is not sensitive. But, the widget can ocupy a larger area - and this whole area will
// react to mouse over. This needs to be counteracted so that it looks as if only the // react to mouse over. This needs to be counteracted so that it looks as if only the
// sensitive area mouse-overs... // sensitive area mouse-overs...
TQRadioButton *rb(::tqqt_cast<TQRadioButton *>(itsHoverWidget)); TQRadioButton *rb(::tqt_cast<TQRadioButton *>(itsHoverWidget));
if(rb) if(rb)
{ {
@ -8440,7 +8440,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
} }
else else
{ {
TQCheckBox *cb(::tqqt_cast<TQCheckBox *>(itsHoverWidget)); TQCheckBox *cb(::tqt_cast<TQCheckBox *>(itsHoverWidget));
if(cb) if(cb)
{ {
@ -8453,7 +8453,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
} }
else else
{ {
TQScrollBar *sb(::tqqt_cast<TQScrollBar *>(itsHoverWidget)); TQScrollBar *sb(::tqt_cast<TQScrollBar *>(itsHoverWidget));
if(sb) // So, are we over add button, sub button, slider, or none? if(sb) // So, are we over add button, sub button, slider, or none?
{ {
@ -8501,7 +8501,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
else else
{ {
{ {
TQHeader *hd(::tqqt_cast<TQHeader *>(itsHoverWidget)); TQHeader *hd(::tqt_cast<TQHeader *>(itsHoverWidget));
if(hd) if(hd)
{ {
@ -8536,7 +8536,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
} }
else else
{ {
TQSpinWidget *sw(::tqqt_cast<TQSpinWidget *>(itsHoverWidget)); TQSpinWidget *sw(::tqt_cast<TQSpinWidget *>(itsHoverWidget));
if(sw) // So, are we over up or down? if(sw) // So, are we over up or down?
{ {
@ -8560,7 +8560,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
} }
else else
{ {
TQTabBar *tabbar(::tqqt_cast<TQTabBar *>(itsHoverWidget)); TQTabBar *tabbar(::tqt_cast<TQTabBar *>(itsHoverWidget));
if(tabbar) if(tabbar)
{ {
@ -8576,7 +8576,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
} }
else else
{ {
TQComboBox *cb(::tqqt_cast<TQComboBox *>(itsHoverWidget)); TQComboBox *cb(::tqt_cast<TQComboBox *>(itsHoverWidget));
if(cb) if(cb)
{ {
@ -8886,7 +8886,7 @@ bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
{ {
return opts.windowDrag && return opts.windowDrag &&
(//qobject_cast<TQDialog*>(o) || (//qobject_cast<TQDialog*>(o) ||
(::tqqt_cast<TQMenuBar*>(o) && (pos.isNull() || !((TQtcMenuBar *)o)->itemUnderPos(pos))) (::tqt_cast<TQMenuBar*>(o) && (pos.isNull() || !((TQtcMenuBar *)o)->itemUnderPos(pos)))
//|| qobject_cast<TQGroupBox*>(o) //|| qobject_cast<TQGroupBox*>(o)
//|| (o->inherits("TQToolButton") && !TQT_TQWIDGET(o)->isEnabled()) //|| (o->inherits("TQToolButton") && !TQT_TQWIDGET(o)->isEnabled())
// || qobject_cast<TQToolBar*>(o) // || qobject_cast<TQToolBar*>(o)
@ -8908,7 +8908,7 @@ void QtCurveStyle::updateProgressPos()
bool visible(false); bool visible(false);
for (; it!=end; ++it) for (; it!=end; ++it)
{ {
TQProgressBar *pb(::tqqt_cast<TQProgressBar*>(it.key())); TQProgressBar *pb(::tqt_cast<TQProgressBar*>(it.key()));
if (!pb) if (!pb)
continue; continue;
@ -8934,7 +8934,7 @@ void QtCurveStyle::progressBarDestroyed(TQObject *bar)
void QtCurveStyle::sliderThumbMoved(int) void QtCurveStyle::sliderThumbMoved(int)
{ {
TQSlider *slider(::tqqt_cast<TQSlider*>(sender())); TQSlider *slider(::tqt_cast<TQSlider*>(sender()));
if(slider) if(slider)
slider->update(); slider->update();

@ -41,7 +41,7 @@ bool ShortcutHandler::hasSeenAlt(const TQWidget *widget) const
if(widget && !widget->isEnabled()) if(widget && !widget->isEnabled())
return false; return false;
if(::tqqt_cast<const TQPopupMenu *>(widget)) if(::tqt_cast<const TQPopupMenu *>(widget))
return itsOpenMenus.count() && itsOpenMenus.last()==widget; return itsOpenMenus.count() && itsOpenMenus.last()==widget;
else else
return itsOpenMenus.isEmpty() && itsSeenAlt.contains((TQWidget *)(widget->topLevelWidget())); return itsOpenMenus.isEmpty() && itsSeenAlt.contains((TQWidget *)(widget->topLevelWidget()));
@ -94,7 +94,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e)
if (!o->isWidgetType()) if (!o->isWidgetType())
return TQObject::eventFilter(o, e); return TQObject::eventFilter(o, e);
TQWidget *widget = ::tqqt_cast<TQWidget*>(o); TQWidget *widget = ::tqt_cast<TQWidget*>(o);
switch(e->type()) switch(e->type())
{ {
case TQEvent::KeyPress: case TQEvent::KeyPress:
@ -102,7 +102,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e)
{ {
itsAltDown = true; itsAltDown = true;
if(::tqqt_cast<TQPopupMenu *>(widget)) if(::tqt_cast<TQPopupMenu *>(widget))
{ {
setSeenAlt(widget); setSeenAlt(widget);
updateWidget(widget); updateWidget(widget);
@ -145,7 +145,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e)
} }
break; break;
case TQEvent::Show: case TQEvent::Show:
if(::tqqt_cast<TQPopupMenu *>(widget)) if(::tqt_cast<TQPopupMenu *>(widget))
{ {
TQWidget *prev=itsOpenMenus.count() ? itsOpenMenus.last() : 0L; TQWidget *prev=itsOpenMenus.count() ? itsOpenMenus.last() : 0L;
itsOpenMenus.append(widget); itsOpenMenus.append(widget);
@ -155,7 +155,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e)
} }
break; break;
case TQEvent::Hide: case TQEvent::Hide:
if(::tqqt_cast<TQPopupMenu *>(widget)) if(::tqt_cast<TQPopupMenu *>(widget))
{ {
itsSeenAlt.remove(widget); itsSeenAlt.remove(widget);
itsUpdated.remove(widget); itsUpdated.remove(widget);

Loading…
Cancel
Save