summaryrefslogtreecommitdiffstats
path: root/style/qtcurve.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:34:00 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:34:00 -0600
commitb98d1ff3de3e501c2a08b61433937cc7bfcc97dc (patch)
treeac02eae99f531d7f097dbde97b453ada0d3c7cda /style/qtcurve.cpp
parentdd3d53e70948ffd0e3e2745edfd345bbeb838a32 (diff)
downloadtde-style-qtcurve-b98d1ff3de3e501c2a08b61433937cc7bfcc97dc.tar.gz
tde-style-qtcurve-b98d1ff3de3e501c2a08b61433937cc7bfcc97dc.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'style/qtcurve.cpp')
-rw-r--r--style/qtcurve.cpp336
1 files changed, 168 insertions, 168 deletions
diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp
index 84853da..8c302db 100644
--- a/style/qtcurve.cpp
+++ b/style/qtcurve.cpp
@@ -53,7 +53,7 @@ KHTML
Srollbars:
For some reason Scrollbars in KHTML seem to lose the bottom/left pixels. As if KHTML expects
-the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the tqpixelMetric
+the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the pixelMetric
function will return 1 scrollbar with 1 greater than standard for form widgets, or where widget==0L
In the CC_ScrollBar draw code, the rects used for each component are shrunk by 1, in the appropriate
@@ -69,7 +69,7 @@ dimension, so as to draw the scrollbar at the correct size.
#include <tqmenubar.h>
#include <tqapplication.h>
#include <tqpainter.h>
-#include <tqpalette.h>
+#include <palette.h>
#include <tqframe.h>
#include <tqpushbutton.h>
#include <tqdrawutil.h>
@@ -91,7 +91,7 @@ dimension, so as to draw the scrollbar at the correct size.
#include <tqheader.h>
#include <tqwidgetstack.h>
#include <tqsplitter.h>
-#include <tqtextedit.h>
+#include <textedit.h>
#include <tqlabel.h>
#include <tqlistbox.h>
#include <tqhbox.h>
@@ -511,7 +511,7 @@ static bool readKdeGlobals()
return false;
- TQColor highlight(TQApplication::tqpalette().active().highlight());
+ TQColor highlight(TQApplication::palette().active().highlight());
bool inactiveEnabled(false),
changeSelectionColor(false),
useTQt3(useTQt3Settings());
@@ -867,9 +867,9 @@ TQtCurveStyle::TQtCurveStyle()
itsPixmapCache.setAutoDelete(true);
- shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
- shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols);
- shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols);
+ shadeColors(TQApplication::palette().active().highlight(), itsHighlightCols);
+ shadeColors(TQApplication::palette().active().background(), itsBackgroundCols);
+ shadeColors(TQApplication::palette().active().button(), itsButtonCols);
setDecorationColors(true);
@@ -1073,7 +1073,7 @@ TQtCurveStyle::TQtCurveStyle()
}
}
- setMenuColors(TQApplication::tqpalette().active());
+ setMenuColors(TQApplication::palette().active());
if(USE_LIGHTER_POPUP_MENU)
itsLighterPopupMenuBgndCol=shade(itsBackgroundCols[ORIGINAL_SHADE],
@@ -1088,12 +1088,12 @@ TQtCurveStyle::TQtCurveStyle()
switch(opts.shadeCheckRadio)
{
default:
- itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText()
- : TQApplication::tqpalette().active().text();
+ itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText()
+ : TQApplication::palette().active().text();
break;
case SHADE_BLEND_SELECTED:
case SHADE_SELECTED:
- itsCheckRadioCol=TQApplication::tqpalette().active().highlight();
+ itsCheckRadioCol=TQApplication::palette().active().highlight();
break;
case SHADE_CUSTOM:
itsCheckRadioCol=opts.customCheckRadioColor;
@@ -1203,7 +1203,7 @@ void TQtCurveStyle::polish(TQApplication *app)
else if ("mactor"==appName)
{
if(!itsMactorPal)
- itsMactorPal=new TQPalette(TQApplication::tqpalette());
+ itsMactorPal=new TQPalette(TQApplication::palette());
itsThemedApp=APP_MACTOR;
}
else
@@ -1218,7 +1218,7 @@ void TQtCurveStyle::polish(TQApplication *app)
// works around this...
if(opts.useHighlightForMenu)
{
- TQMetaObject *meta=(TQMetaObject *)tqmetaObject();
+ TQMetaObject *meta=(TQMetaObject *)metaObject();
#ifdef USE_QT4
#warning Qt4 does not allow the metaobject classname to be set (skipping)
@@ -1291,18 +1291,18 @@ void TQtCurveStyle::polish(TQPalette &pal)
if(kdeSettings.inactiveHighlight)
{
pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight,
- tint(TQApplication::tqpalette().active().background(),
- TQApplication::tqpalette().active().highlight(), 0.4));
+ tint(TQApplication::palette().active().background(),
+ TQApplication::palette().active().highlight(), 0.4));
// KDE4 does not set text colour :-(
//pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, pal.color(TQPalette::Active, TQColorGroup::Foreground));
}
bool newMenu(newContrast ||
- itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().highlight()),
+ itsHighlightCols[ORIGINAL_SHADE]!=TQApplication::palette().active().highlight()),
newGray(newContrast ||
- itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().background()),
+ itsBackgroundCols[ORIGINAL_SHADE]!=TQApplication::palette().active().background()),
newButton(newContrast ||
- itsButtonCols[ORIGINAL_SHADE]!=TQApplication::tqpalette().active().button()),
+ itsButtonCols[ORIGINAL_SHADE]!=TQApplication::palette().active().button()),
newSlider(itsSliderCols && SHADE_BLEND_SELECTED==opts.shadeSliders &&
(newContrast || newButton || newMenu)),
newDefBtn(itsDefBtnCols && /*( (IND_COLORED==opts.defBtnIndicator &&*/
@@ -1327,17 +1327,17 @@ void TQtCurveStyle::polish(TQPalette &pal)
itsSortedLvColors!=itsProgressCols && itsCheckRadioSelCols!=itsProgressCols && (newContrast || newButton));
if(newGray)
- shadeColors(TQApplication::tqpalette().active().background(), itsBackgroundCols);
+ shadeColors(TQApplication::palette().active().background(), itsBackgroundCols);
if(newButton)
- shadeColors(TQApplication::tqpalette().active().button(), itsButtonCols);
+ shadeColors(TQApplication::palette().active().button(), itsButtonCols);
if(newMenu)
- shadeColors(TQApplication::tqpalette().active().highlight(), itsHighlightCols);
+ shadeColors(TQApplication::palette().active().highlight(), itsHighlightCols);
setDecorationColors();
- setMenuColors(TQApplication::tqpalette().active());
+ setMenuColors(TQApplication::palette().active());
if(newSlider)
shadeColors(midColor(itsHighlightCols[ORIGINAL_SHADE], itsButtonCols[ORIGINAL_SHADE]), itsSliderCols);
@@ -1385,12 +1385,12 @@ void TQtCurveStyle::polish(TQPalette &pal)
switch(opts.shadeCheckRadio)
{
default:
- itsCheckRadioCol=opts.crButton ? TQApplication::tqpalette().active().buttonText()
- : TQApplication::tqpalette().active().text();
+ itsCheckRadioCol=opts.crButton ? TQApplication::palette().active().buttonText()
+ : TQApplication::palette().active().text();
break;
case SHADE_SELECTED:
case SHADE_BLEND_SELECTED:
- itsCheckRadioCol=TQApplication::tqpalette().active().highlight();
+ itsCheckRadioCol=TQApplication::palette().active().highlight();
break;
case SHADE_CUSTOM:
itsCheckRadioCol=opts.customCheckRadioColor;
@@ -1466,7 +1466,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
if(widget->parentWidget() && ::tqqt_cast<TQScrollView *>(widget) && ::tqqt_cast<TQComboBox *>(widget->parentWidget()))
{
- TQPalette pal(widget->tqpalette());
+ TQPalette pal(widget->palette());
#if 0
TQPalette orig(pal);
#endif
@@ -1477,7 +1477,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
act.setColor(TQColorGroup::Base, USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]);
act.setColor(TQColorGroup::Background, opts.gtkComboMenus
? USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : itsBackgroundCols[ORIGINAL_SHADE]
- : TQApplication::tqpalette().active().base());
+ : TQApplication::palette().active().base());
#endif
act.setColor(TQColorGroup::Foreground, itsBackgroundCols[STD_BORDER]);
@@ -1486,12 +1486,12 @@ void TQtCurveStyle::polish(TQWidget *widget)
#if 0
//((TQScrollView *)widget)->setMargin(1);
- const TQObjectList *tqchildren(widget->tqchildren());
+ const TQObjectList *children(widget->children());
- if(tqchildren)
+ if(children)
{
- TQObjectList::Iterator it(tqchildren->begin()),
- end(tqchildren->end());
+ TQObjectList::Iterator it(children->begin()),
+ end(children->end());
for(; it!=end; ++it)
if(::tqqt_cast<TQWidget *>(*it))
@@ -1606,7 +1606,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
emitMenuSize(widget, widget->rect().height());
if(SHADE_WINDOW_BORDER==opts.shadeMenubars)
{
- TQPalette pal(widget->tqpalette());
+ TQPalette pal(widget->palette());
TQColorGroup act(pal.active());
TQColorGroup inact(pal.inactive());
@@ -1620,12 +1620,12 @@ void TQtCurveStyle::polish(TQWidget *widget)
else if(opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
(SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
{
- TQPalette pal(widget->tqpalette());
+ TQPalette pal(widget->palette());
TQColorGroup act(pal.active());
act.setColor(TQColorGroup::Foreground, opts.customMenuTextColor
? opts.customMenuNormTextColor
- : TQApplication::tqpalette().active().highlightedText());
+ : TQApplication::palette().active().highlightedText());
if(!opts.shadeMenubarOnlyWhenActive)
{
@@ -1724,10 +1724,10 @@ void TQtCurveStyle::polish(TQWidget *widget)
}
else if(::tqqt_cast<TQProgressBar *>(widget))
{
- if(widget->tqpalette().inactive().highlightedText()!=widget->tqpalette().active().highlightedText())
+ if(widget->palette().inactive().highlightedText()!=widget->palette().active().highlightedText())
{
- TQPalette pal(widget->tqpalette());
- pal.setInactive(widget->tqpalette().active());
+ TQPalette pal(widget->palette());
+ pal.setInactive(widget->palette().active());
widget->setPalette(pal);
}
@@ -1750,7 +1750,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
// Thanks Comix! (because this was ugly from day one!)
// NOTE: Check if we can set it earlier (before painting), cause
// on slow machines we can see the repainting of the bar (from white to background...)
- TQPalette pal(TQApplication::tqpalette());
+ TQPalette pal(TQApplication::palette());
pal.setColor(TQColorGroup::Midlight, pal.active().background());
TQApplication::setPalette(pal);
@@ -1811,7 +1811,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
::tqqt_cast<TQTabWidget *>(widget->parentWidget()) &&
0==qstrcmp(widget->name(), "tab pages"))
{
- TQPalette pal(widget->tqpalette());
+ TQPalette pal(widget->palette());
pal.setColor(TQColorGroup::Background, shade(pal.active().background(), TO_FACTOR(opts.tabBgnd)));
widget->setBackgroundMode(PaletteBackground);
@@ -1889,7 +1889,7 @@ void TQtCurveStyle::unPolish(TQWidget *widget)
widget->removeEventFilter(this);
if(SHADE_WINDOW_BORDER==opts.shadeMenubars || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars ||
SHADE_SELECTED==opts.shadeMenubars || (SHADE_CUSTOM==opts.shadeMenubars &&TOO_DARK(itsMenubarCols[ORIGINAL_SHADE])))
- widget->setPalette(TQApplication::tqpalette());
+ widget->setPalette(TQApplication::palette());
}
else if (widget->inherits("KToolBarSeparator"))
{
@@ -2005,7 +2005,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
*parent(TQT_TQWIDGET(object->parent()));
if(IS_FLAT(opts.toolbarAppearance))
- TQPainter(widget).fillRect(widget->rect(), parent->tqcolorGroup().background());
+ TQPainter(widget).fillRect(widget->rect(), parent->colorGroup().background());
else
{
int y_offset(widget->y());
@@ -2034,7 +2034,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
else
bgndRect.addCoords(-1, 0, 1, 0);
- drawMenuOrToolBarBackground(&p, bgndRect, parent->tqcolorGroup(), false, horiz);
+ drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), false, horiz);
}
if(!::tqqt_cast<TQLineEdit*>(object) && !::tqqt_cast<TQTextEdit*>(object) &&
@@ -2045,7 +2045,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
else if (NO_FRAME(opts.groupBox) && TQEvent::Move==event->type() && isCheckBoxOfGroupBox(object))
{
TQCheckBox *cb=static_cast<TQCheckBox *>(TQT_TQWIDGET(object));
- TQRect r(cb->tqgeometry());
+ TQRect r(cb->geometry());
cb->removeEventFilter(this);
if(TQApplication::reverseLayout())
@@ -2062,7 +2062,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
{
TQWidget *widget=(TQWidget*)object;
TQPainter painter(widget);
- TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->tqpalette().active().background());
+ TQColor col(USE_LIGHTER_POPUP_MENU ? itsLighterPopupMenuBgndCol : widget->palette().active().background());
if(APPEARANCE_STRIPED==opts.menuBgndAppearance)
painter.drawTiledPixmap(widget->rect(), *createStripePixmap(col, false));
@@ -2080,10 +2080,10 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
TQPainter painter(frame);
if (TQFrame::VLine==frame->frameShape())
tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(),
- frame->tqcolorGroup(), Style_Horizontal);
+ frame->colorGroup(), Style_Horizontal);
else if (TQFrame::HLine==frame->frameShape())
tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(),
- frame->tqcolorGroup());
+ frame->colorGroup());
else
return false;
return true; // been drawn!
@@ -2098,12 +2098,12 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
TQRect r(widget->rect());
int tbHeight(tb ? tb->height()-1 : 28);
- if(tb && (TQTabBar::RoundedBelow == tb->tqshape() ||
- TQTabBar::TriangularBelow == tb->tqshape()))
+ if(tb && (TQTabBar::RoundedBelow == tb->shape() ||
+ TQTabBar::TriangularBelow == tb->shape()))
r.addCoords(0, 0, 0, -tbHeight);
else
r.addCoords(0, tbHeight, 0, 0);
- tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->tqcolorGroup(),
+ tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->colorGroup(),
Style_Horizontal|Style_Enabled);
return true;
}
@@ -2143,7 +2143,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
r.setY(r.y()-y_offset);
r.setHeight(parent->rect().height());
- drawMenuOrToolBarBackground(&p, r, parent->tqcolorGroup());
+ drawMenuOrToolBarBackground(&p, r, parent->colorGroup());
return true;
}
}
@@ -2158,11 +2158,11 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
if (::tqqt_cast<TQSpinWidget*>(widget->parentWidget()))
{
- widget->parentWidget()->tqrepaint(false);
+ widget->parentWidget()->repaint(false);
return false;
}
- widget->tqrepaint(false);
+ widget->repaint(false);
}
return false;
}
@@ -2174,23 +2174,23 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
if( (useWindowCols || opts.customMenuTextColor || SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
SHADE_CUSTOM==opts.shadeMenubars) && TQEvent::Paint==event->type())
{
- const TQColor &col(((TQWidget *)object)->tqpalette().active().color(TQColorGroup::Foreground));
+ const TQColor &col(((TQWidget *)object)->palette().active().color(TQColorGroup::Foreground));
// If we're relouring the menubar text, check to see if menubar palette has changed, if so set back to
// our values. This fixes opera - which seems to change the widgets palette after it is polished.
if((opts.customMenuTextColor && col!=opts.customMenuNormTextColor) ||
( (SHADE_BLEND_SELECTED==opts.shadeMenubars || SHADE_SELECTED==opts.shadeMenubars ||
(SHADE_CUSTOM==opts.shadeMenubars && TOO_DARK(itsMenubarCols[ORIGINAL_SHADE]))) &&
- col!=TQApplication::tqpalette().active().highlightedText()))
+ col!=TQApplication::palette().active().highlightedText()))
{
- TQPalette pal(((TQWidget *)object)->tqpalette());
+ TQPalette pal(((TQWidget *)object)->palette());
TQColorGroup act(pal.active());
act.setColor(TQColorGroup::Foreground, useWindowCols
? itsActiveMdiTextColor
: opts.customMenuTextColor
? opts.customMenuNormTextColor
- : TQApplication::tqpalette().active().highlightedText());
+ : TQApplication::palette().active().highlightedText());
if(!opts.shadeMenubarOnlyWhenActive || useWindowCols)
{
@@ -2209,11 +2209,11 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
{
case TQEvent::WindowActivate:
itsActive=true;
- ((TQWidget *)object)->tqrepaint(false);
+ ((TQWidget *)object)->repaint(false);
return false;
case TQEvent::WindowDeactivate:
itsActive=false;
- ((TQWidget *)object)->tqrepaint(false);
+ ((TQWidget *)object)->repaint(false);
return false;
default:
break;
@@ -2362,14 +2362,14 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
case TQEvent::FocusIn:
case TQEvent::FocusOut:
if(opts.highlightScrollViews && object->isWidgetType() && ::tqqt_cast<TQScrollView*>(object))
- ((TQWidget *)object)->tqrepaint(false);
+ ((TQWidget *)object)->repaint(false);
break;
case TQEvent::Hide:
case TQEvent::Show:
if(::tqqt_cast<TQListBox *>(object) &&
(((TQListBox *)object)->parentWidget() &&
::tqqt_cast<TQComboBox *>(((TQListBox *)object)->parentWidget())))
- ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->tqrepaint(false);
+ ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->repaint(false);
// else if(::tqqt_cast<TQFrame *>(object) &&
// (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() ||
// TQFrame::WinPanel==((TQFrame *)object)->frameShape()))
@@ -2385,12 +2385,12 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
if(::tqqt_cast<TQTabBar*>(object) && TQT_TQWIDGET(object)->isEnabled())
{
itsHoverTab=0L;
- itsHoverWidget->tqrepaint(false);
+ itsHoverWidget->repaint(false);
}
else if(!itsHoverWidget->hasMouseTracking() ||
(itsFormMode=isFormWidget(itsHoverWidget)))
{
- itsHoverWidget->tqrepaint(false);
+ itsHoverWidget->repaint(false);
itsFormMode=false;
}
}
@@ -2405,7 +2405,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
if(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget))
{
resetHover();
- ((TQWidget *)object)->tqrepaint(false);
+ ((TQWidget *)object)->repaint(false);
}
break;
case TQEvent::MouseMove: // Only occurs for widgets with mouse tracking enabled
@@ -2415,7 +2415,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
if(me && itsHoverWidget && object->isWidgetType())
{
if(!me->pos().isNull() && itsIsSpecialHover && redrawHoverWidget(me->pos()))
- itsHoverWidget->tqrepaint(false);
+ itsHoverWidget->repaint(false);
itsOldPos=me->pos();
}
break;
@@ -3422,7 +3422,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
TQListView *lv(item->listView());
p->setPen(TQPen(flags&Style_Enabled ? cg.text()
- : lv->tqpalette().color(TQPalette::Disabled,
+ : lv->palette().color(TQPalette::Disabled,
TQColorGroup::Text)));
if (flags&Style_Selected)
{
@@ -3941,7 +3941,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
if(itsActive && opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars)
{
- TQWidget *top=w->tqtopLevelWidget();
+ TQWidget *top=w->topLevelWidget();
if(top && !top->isActiveWindow())
itsActive=false;
@@ -4457,7 +4457,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const
}
}
-void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQWidget *widget,
+void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWidget *widget,
const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &data) const
{
@@ -4515,7 +4515,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
}
TQRect tr(r);
- bool top(TQTabBar::TriangularAbove==tb->tqshape() || TQTabBar::RoundedAbove==tb->tqshape());
+ bool top(TQTabBar::TriangularAbove==tb->shape() || TQTabBar::RoundedAbove==tb->shape());
if(active && opts.tabBgnd)
{
@@ -4711,20 +4711,20 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
const TQTabBar *tb((const TQTabBar *) widget);
TQTab *t(data.tab());
TQRect tr(r);
- int shift(tqpixelMetric(PM_TabBarTabShiftVertical, tb));
+ int shift(pixelMetric(PM_TabBarTabShiftVertical, tb));
if (t->identifier() == tb->currentTab())
{
- if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape())
+ if(TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape())
tr.addCoords(0, -shift, 0, -shift);
}
else
- if(TQTabBar::RoundedBelow==tb->tqshape() || TQTabBar::TriangularBelow==tb->tqshape())
+ if(TQTabBar::RoundedBelow==tb->shape() || TQTabBar::TriangularBelow==tb->shape())
tr.addCoords(0, shift, 0, shift);
if(APP_MACTOR==itsThemedApp)
{
- tqdrawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data);
+ drawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data);
if(t->iconSet())
{
@@ -4741,8 +4741,8 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
if(!(flags&Style_Selected))
{
- xoff = tqpixelMetric(PM_TabBarTabShiftHorizontal, widget);
- yoff = tqpixelMetric(PM_TabBarTabShiftVertical, widget);
+ xoff = pixelMetric(PM_TabBarTabShiftHorizontal, widget);
+ yoff = pixelMetric(PM_TabBarTabShiftVertical, widget);
}
p->drawPixmap(t->rect().left()+8+xoff, t->rect().center().y()-pixh/2 + yoff,
pixmap);
@@ -4755,7 +4755,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
{
TQRect fr(r);
- if(TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape())
+ if(TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape())
fr.addCoords(0, 1, 0, -1);
else
fr.addCoords(0, 0, 0, -1);
@@ -4778,16 +4778,16 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
// Shift button contents if pushed.
if (active)
{
- x += tqpixelMetric(PM_ButtonShiftHorizontal, widget);
- y += tqpixelMetric(PM_ButtonShiftVertical, widget);
+ x += pixelMetric(PM_ButtonShiftHorizontal, widget);
+ y += pixelMetric(PM_ButtonShiftVertical, widget);
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if (button->isMenuButton())
{
- int dx(tqpixelMetric(PM_MenuButtonIndicator, widget)),
- margin(tqpixelMetric(PM_ButtonMargin, widget));
+ int dx(pixelMetric(PM_MenuButtonIndicator, widget)),
+ margin(pixelMetric(PM_ButtonMargin, widget));
if(button->iconSet() && !button->iconSet()->isNull() &&
(dx+button->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off
@@ -4796,7 +4796,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
//the widget
else
{
- ::drawArrow(p, tqvisualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r),
+ ::drawArrow(p, visualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r),
MO_ARROW(cg.buttonText()), PE_ArrowDown, opts);
w-=(dx+arrowOffset);
}
@@ -4839,7 +4839,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
}
if (cornArrow) //Draw over the icon
- ::drawArrow(p, tqvisualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r),
+ ::drawArrow(p, visualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r),
MO_ARROW(cg.buttonText()), PE_ArrowDown, opts);
if(xo && iw)
@@ -4862,18 +4862,18 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
(button->parentWidget() && button->inherits("Ideal::Button") &&
button->parentWidget()->inherits("Ideal::ButtonBar"))));
const TQColor &textCol(sidebar && (button->isOn() || flags&Style_On)
- ? TQApplication::tqpalette().active().highlightedText()
- : button->tqcolorGroup().buttonText());
+ ? TQApplication::palette().active().highlightedText()
+ : button->colorGroup().buttonText());
for(i=0; i<j; i++)
- drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(),
+ drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
button->isEnabled(),
button->pixmap(), button->text(), -1, &textCol);
// Draw a focus rect if the button has focus
if (flags&Style_HasFocus && FOCUS_GLOW!=opts.focus &&
!(flags&Style_MouseOver && FOCUS_FULL==opts.focus && MO_NONE!=opts.coloredMouseOver))
- tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_PushButtonFocusRect,
+ tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_PushButtonFocusRect,
widget), widget), cg, flags);
break;
}
@@ -4939,10 +4939,10 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
if(reverse)
{
- cr=tqvisualRect(cr, r);
- sr=tqvisualRect(sr, r);
- tr=tqvisualRect(tr, r);
- ir=tqvisualRect(ir, r);
+ cr=visualRect(cr, r);
+ sr=visualRect(sr, r);
+ tr=visualRect(tr, r);
+ ir=visualRect(ir, r);
}
if(mi->iconSet() && opts.menuIcons)
@@ -4951,7 +4951,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
TQIconSet::Mode mode=flags & Style_Active
? (mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled)
: (mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled);
- cr=tqvisualRect(TQRect(x, y, maxpmw, h), r);
+ cr=visualRect(TQRect(x, y, maxpmw, h), r);
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
@@ -5078,7 +5078,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
drawMenuOrToolBarBackground(p, r, cg, false, Qt::Horizontal==wind->orientation());
}
else
- BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
break;
case CE_ProgressBarGroove:
{
@@ -5301,31 +5301,31 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
{
#if 0x039999 >= 0x030200
TQRect cr(checkbox->rect());
- TQRegion r(TQRect(cr.x(), cr.y(), tqvisualRect(subRect(SR_CheckBoxFocusRect, widget),
+ TQRegion r(TQRect(cr.x(), cr.y(), visualRect(subRect(SR_CheckBoxFocusRect, widget),
widget).width()+
- tqpixelMetric(PM_IndicatorWidth)+4,
+ pixelMetric(PM_IndicatorWidth)+4,
cr.height()));
#else
TQRegion r(checkbox->rect());
#endif
- r-=tqvisualRect(subRect(SR_CheckBoxIndicator, widget), widget);
+ r-=visualRect(subRect(SR_CheckBoxIndicator, widget), widget);
p->setClipRegion(r);
drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, checkbox->rect(), true,
false, opts.selectionAppearance, WIDGET_SELECTION);
p->setClipping(false);
}
- int tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft);
+ int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft);
- drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg,
+ drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
flags & Style_Enabled, checkbox->pixmap(), checkbox->text());
if(checkbox->hasFocus() && FOCUS_GLOW!=opts.focus)
- tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_CheckBoxFocusRect, widget),
+ tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_CheckBoxFocusRect, widget),
widget), cg, flags);
}
else
- BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
break;
case CE_RadioButton:
itsFormMode=isFormWidget(widget);
@@ -5346,37 +5346,37 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ
#if 0x039999 >= 0x030200
TQRect rb(radiobutton->rect());
TQRegion r(TQRect(rb.x(), rb.y(),
- tqvisualRect(subRect(SR_RadioButtonFocusRect, widget),
+ visualRect(subRect(SR_RadioButtonFocusRect, widget),
widget).width()+
- tqpixelMetric(PM_ExclusiveIndicatorWidth)+4,
+ pixelMetric(PM_ExclusiveIndicatorWidth)+4,
rb.height()));
#else
TQRegion r(radiobutton->rect());
#endif
- r-=tqvisualRect(subRect(SR_RadioButtonIndicator, widget), widget);
+ r-=visualRect(subRect(SR_RadioButtonIndicator, widget), widget);
p->setClipRegion(r);
drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, radiobutton->rect(), true,
false, opts.selectionAppearance, WIDGET_SELECTION);
p->setClipping(false);
}
- int tqalignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft);
+ int alignment(TQApplication::reverseLayout() ? AlignRight : AlignLeft);
- drawItem(p, r, tqalignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled,
+ drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled,
radiobutton->pixmap(), radiobutton->text());
if(radiobutton->hasFocus() && FOCUS_GLOW!=opts.focus)
- tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_RadioButtonFocusRect,
+ tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_RadioButtonFocusRect,
widget), widget), cg, flags);
break;
}
// Fall through intentional!
default:
- BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data);
+ BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data);
}
}
-void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget,
+void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget,
const TQRect &r, const TQStyleOption &data) const
{
switch(control)
@@ -5398,11 +5398,11 @@ void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, cons
break;
}
default:
- BASE_STYLE::tqdrawControlMask(control, p, widget, r, data);
+ BASE_STYLE::drawControlMask(control, p, widget, r, data);
}
}
-void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget,
+void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget,
const TQRect &r, const TQStyleOption &data) const
{
switch (control)
@@ -5410,10 +5410,10 @@ void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter *
case CC_SpinWidget:
case CC_ComboBox:
case CC_ToolButton:
- tqdrawControlMask(CE_PushButton, p, widget, r, data);
+ drawControlMask(CE_PushButton, p, widget, r, data);
break;
default:
- BASE_STYLE::tqdrawComplexControlMask(control, p, widget, r, data);
+ BASE_STYLE::drawComplexControlMask(control, p, widget, r, data);
}
}
@@ -5430,7 +5430,7 @@ TQRect TQtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const
rect=wrect;
else
{
- int dbw1(tqpixelMetric(PM_ButtonDefaultIndicator, widget)),
+ int dbw1(pixelMetric(PM_ButtonDefaultIndicator, widget)),
dbw2(dbw1*2),
border(3),
border2=(border*2);
@@ -5474,7 +5474,7 @@ class TQTitleBar : public TQWidget
TQWidget *window() const;
};
-void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget,
+void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget,
const TQRect &r, const TQColorGroup &cg, SFlags flags,
SCFlags controls, SCFlags active,
const TQStyleOption &data) const
@@ -5623,13 +5623,13 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
itsFormMode = isFormWidget(widget);
const TQComboBox *combobox((const TQComboBox *)widget);
- TQRect frame(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQRect frame(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame,
data), widget)),
- arrow(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ arrow(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow,
data), widget)),
- field(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ field(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField,
data), widget));
const TQColor *use(buttonColors(cg));
@@ -5745,7 +5745,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
fr=frame;
else if(opts.comboSplitter)
{
- fr=TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, widget), widget);
+ fr=TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, widget), widget);
if(reverse)
fr.addCoords(3, 0, 0, 0);
else
@@ -5900,7 +5900,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
pe=PE_SpinWidgetPlus;
if(!spinwidget->isUpEnabled())
upflags&=~Style_Enabled;
- tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg,
+ tqdrawPrimitive(pe, p, up, !(upflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
upflags |((active==SC_SpinWidgetUp)
? Style_On | Style_Sunken : Style_Raised));
}
@@ -5916,7 +5916,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
pe=PE_SpinWidgetMinus;
if(!spinwidget->isDownEnabled())
downflags&=~Style_Enabled;
- tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->tqpalette().disabled() : cg,
+ tqdrawPrimitive(pe, p, down, !(downflags&Style_Enabled) && spinwidget ? spinwidget->palette().disabled() : cg,
downflags |((active==SC_SpinWidgetDown)
? Style_On | Style_Sunken : Style_Raised));
}
@@ -6100,7 +6100,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
{
bool enable=!atMin;
- tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->tqpalette().disabled() : cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, !enable && sb ? sb->palette().disabled() : cg,
sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB==itsHover
@@ -6112,7 +6112,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
{
if(IS_FLAT(opts.sbarBgndAppearance))
p->fillRect(subline2, cg.background());
- tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->tqpalette().disabled() : cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, !enable && sb ? sb->palette().disabled() : cg,
sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_SUB2==itsHover
@@ -6132,7 +6132,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
else
addline.addCoords(0, 0, 0, -1);
- tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->tqpalette().disabled() : cg,
+ tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, !enable && sb ? sb->palette().disabled() : cg,
sflags |
//(enable ? Style_Enabled : Style_Default) |
(enable && hw && HOVER_SB_ADD==itsHover
@@ -6290,7 +6290,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
if((controls & SC_SliderHandle)&& handle.isValid())
drawSliderHandle(paint, handle, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L, tb);
if(controls & SC_SliderTickmarks)
- TQCommonStyle::tqdrawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks,
+ TQCommonStyle::drawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks,
active, data);
if(flags&Style_HasFocus && FOCUS_GLOW!=opts.focus)
@@ -6308,10 +6308,10 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
const int buttonMargin(3);
const TQTitleBar *tb((const TQTitleBar *)widget);
bool isActive((tb->isActive() && widget->isActiveWindow()) ||
- (!tb->window() && widget->tqtopLevelWidget()->isActiveWindow()));
+ (!tb->window() && widget->topLevelWidget()->isActiveWindow()));
TQColorGroup cgroup(isActive
- ? widget->tqpalette().active()
- : widget->tqpalette().inactive());
+ ? widget->palette().active()
+ : widget->palette().inactive());
const TQColor *cols(getMdiColors(cg, isActive));
TQColor textCol(isActive ? itsActiveMdiTextColor : itsMdiTextColor),
shdCol(shadowColor(textCol)),
@@ -6319,27 +6319,27 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
if (controls&SC_TitleBarLabel)
{
- int tqalignment=AlignVCenter|SingleLine;
+ int alignment=AlignVCenter|SingleLine;
bool full=false;
switch(opts.titlebarAlignment)
{
default:
case ALIGN_LEFT:
- tqalignment|=TQt::AlignLeft;
+ alignment|=TQt::AlignLeft;
break;
case ALIGN_CENTER:
- tqalignment|=TQt::AlignHCenter;
+ alignment|=TQt::AlignHCenter;
break;
case ALIGN_FULL_CENTER:
- tqalignment|=TQt::AlignHCenter;
+ alignment|=TQt::AlignHCenter;
full=true;
break;
case ALIGN_RIGHT:
- tqalignment|=TQt::AlignRight;
+ alignment|=TQt::AlignRight;
}
- TQRect ir(tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)),
+ TQRect ir(visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)),
textRect(full ? tb->rect().x() : ir.x(), ir.y(), full ? tb->rect().width() : ir.width(), ir.height());
EAppearance app=isActive ? opts.titlebarAppearance : opts.inactiveTitlebarAppearance;
@@ -6354,13 +6354,13 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
int textWidth=fm.boundingRect(titleString).width();
if(ir.left()>((textRect.width()-textWidth)>>1))
{
- tqalignment=TQt::AlignVCenter|TQt::AlignLeft;
+ alignment=TQt::AlignVCenter|TQt::AlignLeft;
textRect=ir;
full=false;
}
else if(ir.right()<((textRect.width()+textWidth)>>1))
{
- tqalignment=TQt::AlignVCenter|TQt::AlignRight;
+ alignment=TQt::AlignVCenter|TQt::AlignRight;
textRect=ir;
full=false;
}
@@ -6369,9 +6369,9 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
}
p->setPen(shadowCol);
- p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), tqalignment, titleString);
+ p->drawText(textRect.x()+1, textRect.y()+1, textRect.width(), textRect.height(), alignment, titleString);
p->setPen(textCol);
- p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), tqalignment, titleString);
+ p->drawText(textRect.x(), textRect.y(), textRect.width(), textRect.height(), alignment, titleString);
if(full)
p->setClipping(false);
@@ -6383,9 +6383,9 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
if (controls&SC_TitleBarCloseButton)
{
- ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget);
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget);
down = active & SC_TitleBarCloseButton;
- tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarCloseButton);
}
@@ -6393,49 +6393,49 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c
{
if (controls &SC_TitleBarMaxButton)
{
- ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget);
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget);
down = active & SC_TitleBarMaxButton;
- tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarMaxButton);
}
if (controls&SC_TitleBarNormalButton || controls&SC_TitleBarMinButton)
{
- ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget);
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget);
TQStyle::SubControl ctrl = (controls & SC_TitleBarNormalButton ?
SC_TitleBarNormalButton :
SC_TitleBarMinButton);
down = active & ctrl;
- tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, ctrl);
}
if (controls&SC_TitleBarShadeButton)
{
- ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget);
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget);
down = active & SC_TitleBarShadeButton;
- tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarShadeButton);
}
if (controls&SC_TitleBarUnshadeButton)
{
- ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget);
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget);
down = active & SC_TitleBarUnshadeButton;
- tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarUnshadeButton);
}
}
if (controls&SC_TitleBarSysMenu && tb->icon())
{
- ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget);
+ ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget);
down = active & SC_TitleBarSysMenu;
- tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised);
- drawItem(p, ir, AlignCenter, tb->tqcolorGroup(), true, tb->icon(), TQString());
+ tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised);
+ drawItem(p, ir, AlignCenter, tb->colorGroup(), true, tb->icon(), TQString());
}
break;
}
default:
- BASE_STYLE::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data);
+ BASE_STYLE::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data);
}
}
@@ -6451,7 +6451,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ
if(!widget)
return TQRect();
- int fw(tqpixelMetric(PM_SpinBoxFrameWidth, 0));
+ int fw(pixelMetric(PM_SpinBoxFrameWidth, 0));
TQSize bs;
bs.setHeight(widget->height()>>1);
@@ -6510,7 +6510,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ
const TQScrollBar *sb((const TQScrollBar*)widget);
bool horizontal(sb->orientation() == Qt::Horizontal);
int sliderstart(sb->sliderStart()),
- sbextent(tqpixelMetric(PM_ScrollBarExtent, widget)),
+ sbextent(pixelMetric(PM_ScrollBarExtent, widget)),
maxlen((horizontal ? sb->width() : sb->height())
- (noButtons ? 0 : (sbextent * (threeButtonScrollBar ? 3 : 2)))),
sliderlen;
@@ -6521,7 +6521,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ
uint range = sb->maxValue() - sb->minValue();
sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep());
- int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -6723,7 +6723,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ
else
r.setRect(r.left()+windowMargin+pos, r.top()+windowMargin,
controlSize, controlSize);
- return tqvisualRect(tb->direction, tb->rect, r);
+ return visualRect(tb->direction, tb->rect, r);
}
}
#endif
@@ -6734,7 +6734,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ
return BASE_STYLE::querySubControlMetrics(control, widget, sc, data);
}
-int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const
+int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const
{
switch(metric)
{
@@ -6750,10 +6750,10 @@ int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) con
const TQTabBar *tb=widget ? ::tqqt_cast<const TQTabBar *>(widget) : 0;
return tb
- ? TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape()
+ ? TQTabBar::RoundedAbove==tb->shape() || TQTabBar::TriangularAbove==tb->shape()
? 1
: -1
- : BASE_STYLE::tqpixelMetric(metric, widget);
+ : BASE_STYLE::pixelMetric(metric, widget);
}
case PM_TabBarTabShiftHorizontal:
return 0;
@@ -6820,7 +6820,7 @@ int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) con
case PM_TabBarTabVSpace:
return opts.highlightTab ? 11 : 9;
default:
- return BASE_STYLE::tqpixelMetric(metric, widget);
+ return BASE_STYLE::pixelMetric(metric, widget);
}
}
@@ -6846,8 +6846,8 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *
if (button && !button->text().isEmpty())
{
- int margin(2*tqpixelMetric(PM_ButtonMargin, widget)),
- mbi(button->isMenuButton() ? tqpixelMetric(PM_MenuButtonIndicator, widget) : 0),
+ int margin(2*pixelMetric(PM_ButtonMargin, widget)),
+ mbi(button->isMenuButton() ? pixelMetric(PM_MenuButtonIndicator, widget) : 0),
w(contentsSize.width() + margin + mbi + 16);
// if(button->text()=="...")
@@ -6887,8 +6887,8 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *
if (mi->custom())
{
- w = mi->custom()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().height();
if (!mi->custom()->fullSpan() && h < constMinH)
h = constMinH;
@@ -6947,7 +6947,7 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *
return BASE_STYLE::tqsizeFromContents(contents, widget, contentsSize, data);
}
-int TQtCurveStyle::tqstyleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option,
+int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option,
TQStyleHintReturn *returnData) const
{
switch(stylehint)
@@ -6990,7 +6990,7 @@ int TQtCurveStyle::tqstyleHint(StyleHint stylehint, const TQWidget *widget, cons
case SH_TabBar_Alignment:
return AlignLeft;
default:
- return BASE_STYLE::tqstyleHint(stylehint, widget, option, returnData);
+ return BASE_STYLE::styleHint(stylehint, widget, option, returnData);
}
}
@@ -7017,7 +7017,7 @@ void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQC
rb.rect(&left, &top, &width, &height);
//rb.coords(&left, &top, &right, &bottom);
f.setBold(true);
- p->setPen(box->tqcolorGroup().foreground());
+ p->setPen(box->colorGroup().foreground());
p->setFont(f);
p->drawText(TQRect(left, top, width, th), (TQApplication::reverseLayout()
? AlignRight
@@ -8150,8 +8150,8 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
if(rb)
{
TQRect rect(0, 0,
- tqvisualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+
- tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height());
+ visualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+
+ pixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height());
itsHover=rect.contains(pos) ? HOVER_RADIO : HOVER_NONE;
return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) ||
@@ -8164,8 +8164,8 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
if(cb)
{
TQRect rect(0, 0,
- tqvisualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+
- tqpixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height());
+ visualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+
+ pixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height());
itsHover=rect.contains(pos) ? HOVER_CHECK : HOVER_NONE;
return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) || (HOVER_NONE==itsHover && rect.contains(itsOldPos));