|
|
@ -1562,7 +1562,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
|
|
|
|
if(enableFilter && isSpecialHover(widget))
|
|
|
|
if(enableFilter && isSpecialHover(widget))
|
|
|
|
connect(widget, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(hoverWidgetDestroyed(TQObject *)));
|
|
|
|
connect(widget, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(hoverWidgetDestroyed(TQObject *)));
|
|
|
|
|
|
|
|
|
|
|
|
if(isWindowDragWidget(TQT_TQOBJECT(widget)))
|
|
|
|
if(isWindowDragWidget(widget))
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
installObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
|
|
|
|
|
|
|
if(::tqt_cast<TQDialog *>(widget) || ::tqt_cast<TQMainWindow *>(widget))
|
|
|
|
if(::tqt_cast<TQDialog *>(widget) || ::tqt_cast<TQMainWindow *>(widget))
|
|
|
@ -1641,7 +1641,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
|
|
|
|
|
|
|
|
|
|
|
|
if (::tqt_cast<TQRadioButton *>(widget) || ::tqt_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(widget));
|
|
|
|
|
|
|
|
|
|
|
|
if(framelessGroupBoxCheckBox || enableFilter)
|
|
|
|
if(framelessGroupBoxCheckBox || enableFilter)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1775,7 +1775,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
|
|
|
|
else if (0==qstrcmp(ceData.name.ascii(), kdeToolbarWidget))
|
|
|
|
else if (0==qstrcmp(ceData.name.ascii(), kdeToolbarWidget))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(!widget->parent() ||
|
|
|
|
if(!widget->parent() ||
|
|
|
|
0!=qstrcmp(TQT_TQWIDGET(widget->parent())->className(),
|
|
|
|
0!=qstrcmp(static_cast<TQWidget*>(widget->parent())->className(),
|
|
|
|
"TDEListViewSearchLineWidget") ||
|
|
|
|
"TDEListViewSearchLineWidget") ||
|
|
|
|
onToolBar(widget))
|
|
|
|
onToolBar(widget))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1793,7 +1793,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
|
|
|
|
(::tqt_cast<TQLabel *>(widget) || ::tqt_cast<TQHBox *>(widget) ||
|
|
|
|
(::tqt_cast<TQLabel *>(widget) || ::tqt_cast<TQHBox *>(widget) ||
|
|
|
|
::tqt_cast<TQVBox *>(widget)) &&
|
|
|
|
::tqt_cast<TQVBox *>(widget)) &&
|
|
|
|
widget->parent() &&
|
|
|
|
widget->parent() &&
|
|
|
|
( 0==qstrcmp(TQT_TQWIDGET(widget->parent())->className(),
|
|
|
|
( 0==qstrcmp(static_cast<TQWidget*>(widget->parent())->className(),
|
|
|
|
"MainWindow") || onToolBar(widget)))
|
|
|
|
"MainWindow") || onToolBar(widget)))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
widget->setName(kdeToolbarWidget);
|
|
|
|
widget->setName(kdeToolbarWidget);
|
|
|
@ -1921,7 +1921,7 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if(isWindowDragWidget(TQT_TQOBJECT(widget)))
|
|
|
|
if(isWindowDragWidget(widget))
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, ptr, this);
|
|
|
|
|
|
|
|
|
|
|
|
if (::tqt_cast<TQRadioButton *>(widget) || ::tqt_cast<TQCheckBox *>(widget))
|
|
|
|
if (::tqt_cast<TQRadioButton *>(widget) || ::tqt_cast<TQCheckBox *>(widget))
|
|
|
@ -2089,8 +2089,8 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
// "tde toolbar widget" name.
|
|
|
|
// "tde toolbar widget" name.
|
|
|
|
if(TQEvent::Paint==event->type())
|
|
|
|
if(TQEvent::Paint==event->type())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQWidget *widget(TQT_TQWIDGET(object)),
|
|
|
|
TQWidget *widget(static_cast<TQWidget*>(object)),
|
|
|
|
*parent(TQT_TQWIDGET(object->parent()));
|
|
|
|
*parent(static_cast<TQWidget*>(object->parent()));
|
|
|
|
|
|
|
|
|
|
|
|
if(IS_FLAT(opts.toolbarAppearance))
|
|
|
|
if(IS_FLAT(opts.toolbarAppearance))
|
|
|
|
TQPainter(widget).fillRect(ceData.rect, parent->colorGroup().background());
|
|
|
|
TQPainter(widget).fillRect(ceData.rect, parent->colorGroup().background());
|
|
|
@ -2101,7 +2101,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
while(parent && parent->parent() && 0==qstrcmp(parent->name(), kdeToolbarWidget))
|
|
|
|
while(parent && parent->parent() && 0==qstrcmp(parent->name(), kdeToolbarWidget))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
y_offset += parent->y();
|
|
|
|
y_offset += parent->y();
|
|
|
|
parent = TQT_TQWIDGET(parent->parent());
|
|
|
|
parent = static_cast<TQWidget*>(parent->parent());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQRect r(ceData.rect),
|
|
|
|
TQRect r(ceData.rect),
|
|
|
@ -2137,7 +2137,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (NO_FRAME(opts.groupBox) && TQEvent::Move==event->type() && isCheckBoxOfGroupBox(object))
|
|
|
|
else if (NO_FRAME(opts.groupBox) && TQEvent::Move==event->type() && isCheckBoxOfGroupBox(object))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQCheckBox *cb=static_cast<TQCheckBox *>(TQT_TQWIDGET(object));
|
|
|
|
TQCheckBox *cb=static_cast<TQCheckBox *>(object);
|
|
|
|
TQRect r(cb->geometry());
|
|
|
|
TQRect r(cb->geometry());
|
|
|
|
|
|
|
|
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, source, this);
|
|
|
|
removeObjectEventHandler(ceData, elementFlags, source, this);
|
|
|
@ -2247,8 +2247,8 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
if(drawMenubar)
|
|
|
|
if(drawMenubar)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
TQWidget *widget(TQT_TQWIDGET(object)),
|
|
|
|
TQWidget *widget(static_cast<TQWidget*>(object)),
|
|
|
|
*parent(TQT_TQWIDGET(object->parent()));
|
|
|
|
*parent(static_cast<TQWidget*>(object->parent()));
|
|
|
|
TQRect r(ceData.rect);
|
|
|
|
TQRect r(ceData.rect);
|
|
|
|
TQPainter p(widget);
|
|
|
|
TQPainter p(widget);
|
|
|
|
int y_offset(ceData.rect.y()+parent->y());
|
|
|
|
int y_offset(ceData.rect.y()+parent->y());
|
|
|
@ -2267,7 +2267,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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(static_cast<TQWidget*>(object));
|
|
|
|
|
|
|
|
|
|
|
|
if (::tqt_cast<TQSpinWidget*>(widget->parentWidget()))
|
|
|
|
if (::tqt_cast<TQSpinWidget*>(widget->parentWidget()))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2370,7 +2370,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
|
|
|
|
|
|
|
|
if(/*TQt::NoModifier==mev->modifiers() && */ TQt::LeftButton==mev->button())
|
|
|
|
if(/*TQt::NoModifier==mev->modifiers() && */ TQt::LeftButton==mev->button())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQWidget *wid = TQT_TQWIDGET(object);
|
|
|
|
TQWidget *wid = static_cast<TQWidget*>(object);
|
|
|
|
itsDragWidget=wid;
|
|
|
|
itsDragWidget=wid;
|
|
|
|
itsDragWidgetHadMouseTracking=itsDragWidget->hasMouseTracking();
|
|
|
|
itsDragWidgetHadMouseTracking=itsDragWidget->hasMouseTracking();
|
|
|
|
itsDragWidget->setMouseTracking(true);
|
|
|
|
itsDragWidget->setMouseTracking(true);
|
|
|
@ -2499,7 +2499,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData,
|
|
|
|
|
|
|
|
|
|
|
|
if(itsHoverWidget && itsHoverWidget->isEnabled())
|
|
|
|
if(itsHoverWidget && itsHoverWidget->isEnabled())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(::tqt_cast<TQTabBar*>(object) && TQT_TQWIDGET(object)->isEnabled())
|
|
|
|
if(::tqt_cast<TQTabBar*>(object) && static_cast<TQWidget*>(object)->isEnabled())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
itsHoverTab=0L;
|
|
|
|
itsHoverTab=0L;
|
|
|
|
itsHoverWidget->repaint(false);
|
|
|
|
itsHoverWidget->repaint(false);
|
|
|
@ -8888,7 +8888,7 @@ bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
|
|
|
|
(//qobject_cast<TQDialog*>(o) ||
|
|
|
|
(//qobject_cast<TQDialog*>(o) ||
|
|
|
|
(::tqt_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") && !static_cast<TQWidget*>(o)->isEnabled())
|
|
|
|
// || qobject_cast<TQToolBar*>(o)
|
|
|
|
// || qobject_cast<TQToolBar*>(o)
|
|
|
|
//|| qobject_cast<TQDockWidget*>(o)
|
|
|
|
//|| qobject_cast<TQDockWidget*>(o)
|
|
|
|
|
|
|
|
|
|
|
@ -8929,7 +8929,7 @@ void QtCurveStyle::updateProgressPos()
|
|
|
|
|
|
|
|
|
|
|
|
void QtCurveStyle::progressBarDestroyed(TQObject *bar)
|
|
|
|
void QtCurveStyle::progressBarDestroyed(TQObject *bar)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
itsProgAnimWidgets.remove(TQT_TQWIDGET(bar));
|
|
|
|
itsProgAnimWidgets.remove(static_cast<TQWidget*>(bar));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void QtCurveStyle::sliderThumbMoved(int)
|
|
|
|
void QtCurveStyle::sliderThumbMoved(int)
|
|
|
|