summaryrefslogtreecommitdiffstats
path: root/tdestyles
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-12-21 11:50:23 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-12-21 12:48:57 +0900
commitd5688771d8a6837975be512ee37f61bad7dbd345 (patch)
treeb8ef261c559484b01e3a035333561e5226042b4e /tdestyles
parent44e712a770ad0ab59d33790a80b5f6235cff6921 (diff)
downloadtdelibs-d5688771d8a6837975be512ee37f61bad7dbd345.tar.gz
tdelibs-d5688771d8a6837975be512ee37f61bad7dbd345.zip
Replace various '#define' strings - part 6
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdestyles')
-rw-r--r--tdestyles/asteroid/asteroid.cpp2
-rw-r--r--tdestyles/highcolor/highcolor.cpp8
-rw-r--r--tdestyles/keramik/keramik.cpp26
-rw-r--r--tdestyles/klegacy/klegacystyle.cpp2
-rw-r--r--tdestyles/kthemestyle/kthemestyle.cpp4
-rw-r--r--tdestyles/plastik/plastik.cpp8
6 files changed, 25 insertions, 25 deletions
diff --git a/tdestyles/asteroid/asteroid.cpp b/tdestyles/asteroid/asteroid.cpp
index 45739cff9..ab6123fb4 100644
--- a/tdestyles/asteroid/asteroid.cpp
+++ b/tdestyles/asteroid/asteroid.cpp
@@ -107,7 +107,7 @@ void AsteroidStyle::polish(const TQStyleControlElementData &ceData, ControlEleme
wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to?
bool isProtectedObject = false;
- TQObject *curparent = TQT_TQOBJECT(w);
+ TQObject *curparent = w;
while (curparent) {
if (curparent->inherits("KonqFileTip") || curparent->inherits("AppletItem")
|| curparent->inherits("KJanusWidget")
diff --git a/tdestyles/highcolor/highcolor.cpp b/tdestyles/highcolor/highcolor.cpp
index e2b2ccdaa..5f82d8f0a 100644
--- a/tdestyles/highcolor/highcolor.cpp
+++ b/tdestyles/highcolor/highcolor.cpp
@@ -2032,14 +2032,14 @@ bool HighColorStyle::objectEventHandler( const TQStyleControlElementData &ceData
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
- TQWidget *widget = TQT_TQWIDGET(object);
- TQWidget *parent = TQT_TQWIDGET(object->parent());
+ TQWidget *widget = static_cast<TQWidget*>(object);
+ TQWidget *parent = static_cast<TQWidget*>(object->parent());
int x_offset = ceData.rect.x(), y_offset = ceData.rect.y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
x_offset += parent->x();
y_offset += parent->y();
- parent = TQT_TQWIDGET(parent->parent());
+ parent = static_cast<TQWidget*>(parent->parent());
}
TQRect r = ceData.rect;
@@ -2067,7 +2067,7 @@ bool HighColorStyle::objectEventHandler( const TQStyleControlElementData &ceData
if ( event->type() == TQEvent::Paint ) {
- TQWidget *widget = TQT_TQWIDGET(object);
+ TQWidget *widget = static_cast<TQWidget*>(object);
TQRect wr = ceData.rect, tr = ceData.parentWidgetData.rect;
TQPainter p( widget );
renderGradient(&p, wr, toolbar->colorGroup().button(),
diff --git a/tdestyles/keramik/keramik.cpp b/tdestyles/keramik/keramik.cpp
index 23642ac99..1955554ba 100644
--- a/tdestyles/keramik/keramik.cpp
+++ b/tdestyles/keramik/keramik.cpp
@@ -423,7 +423,7 @@ void KeramikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
void KeramikStyle::progressBarDestroyed(TQObject* obj)
{
- progAnimWidgets.remove(static_cast<TQProgressBar*>(TQT_TQWIDGET(obj)));
+ progAnimWidgets.remove(static_cast<TQProgressBar*>(obj));
}
@@ -487,13 +487,13 @@ static void renderToolbarWidgetBackground(TQPainter* painter, const TQStyleContr
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
- TQWidget *parent = (widget)?TQT_TQWIDGET(widget->parentWidget()):(TQWidget*)NULL;
+ TQWidget *parent = (widget)?widget->parentWidget():NULL;
int x_offset = ceData.rect.x(), y_offset = ceData.rect.y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
x_offset += parent->x();
y_offset += parent->y();
- parent = TQT_TQWIDGET(parent->parent());
+ parent = static_cast<TQWidget*>(parent->parent());
}
TQRect pr = ceData.parentWidgetData.rect;
@@ -969,7 +969,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
if (kickerMode)
{
if (p->device() && p->device()->devType() == TQInternal::Widget &&
- TQCString(TQT_TQWIDGET(p->device())->className()) == "FittsLawFrame" )
+ TQCString(static_cast<TQWidget*>(p->device())->className()) == "FittsLawFrame" )
{
int x2 = x + r.width() - 1;
int y2 = y + r.height() - 1;
@@ -1284,7 +1284,7 @@ void KeramikStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQToolBar* parent = 0;
if (widget && widget->parent() && widget->parent()->inherits("TQToolBar"))
- parent = static_cast<TQToolBar*>(TQT_TQWIDGET(widget->parent()));
+ parent = static_cast<TQToolBar*>(widget->parent());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal));
if (flags & Style_Horizontal) {
@@ -2312,8 +2312,8 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
{
// This assumes floating toolbars can't have extenders,
//(so if we're on an extender, we're not floating)
- TQWidget* parent = static_cast<TQWidget*> (TQT_TQWIDGET(widget->parent()));
- TQToolBar* toolbar = static_cast<TQToolBar*>(TQT_TQWIDGET(parent->parent()));
+ TQWidget* parent = static_cast<TQWidget*> (static_cast<TQWidget*>(widget->parent()));
+ TQToolBar* toolbar = static_cast<TQToolBar*>(parent->parent());
TQRect tr = ceData.parentWidgetData.rect;
bool horiz = ceData.toolBarData.orientation == TQt::Horizontal;
@@ -2809,7 +2809,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
recursion = true;
object->event( static_cast<TQPaintEvent*>( event ) );
- TQWidget* widget = TQT_TQWIDGET( object );
+ TQWidget* widget = static_cast<TQWidget*>( object );
TQPainter p( widget );
Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, ceData.rect,
widget->palette().color( TQPalette::Active, TQColorGroup::Button ),
@@ -2826,7 +2826,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
//Combo dropdowns are shaped
case TQEvent::Resize:
{
- TQListBox* listbox = static_cast<TQListBox*>(TQT_TQWIDGET(object));
+ TQListBox* listbox = static_cast<TQListBox*>(object);
TQResizeEvent* resize = static_cast<TQResizeEvent*>(event);
if (resize->size().height() < 6)
return false;
@@ -2892,7 +2892,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
firstComboPopupRelease = false;
TQMouseEvent* mev = static_cast<TQMouseEvent*>(event);
- TQListBox* box = static_cast<TQListBox*>(TQT_TQWIDGET(object));
+ TQListBox* box = static_cast<TQListBox*>(object);
TQWidget* parent = box->parentWidget();
if (!parent)
@@ -2919,7 +2919,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
{
// Draw a gradient background for custom widgets in the toolbar
// that have specified a "tde toolbar widget" name.
- renderToolbarWidgetBackground(0, ceData, elementFlags, TQT_TQWIDGET(object));
+ renderToolbarWidgetBackground(0, ceData, elementFlags, static_cast<TQWidget*>(object));
return false; // Now draw the contents
}
@@ -2931,8 +2931,8 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
{
// We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget.
- TQToolBar* toolbar = static_cast<TQToolBar*>(TQT_TQWIDGET(object->parent()));
- TQWidget* widget = TQT_TQWIDGET(object);
+ TQToolBar* toolbar = static_cast<TQToolBar*>(object->parent());
+ TQWidget* widget = static_cast<TQWidget*>(object);
TQRect wr = widget->rect (), tr = toolbar->rect();
TQPainter p( widget );
diff --git a/tdestyles/klegacy/klegacystyle.cpp b/tdestyles/klegacy/klegacystyle.cpp
index 823e737ea..1dcfadf56 100644
--- a/tdestyles/klegacy/klegacystyle.cpp
+++ b/tdestyles/klegacy/klegacystyle.cpp
@@ -2214,7 +2214,7 @@ void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) {
key.data.shadow = KLegacy::In;
} else {
key.data.state = ((btn->isEnabled()) ?
- ((static_cast<TQWidget *>( btn ) == priv->lastWidget) ? KLegacy::Prelight : KLegacy::Normal) :
+ ((btn == priv->lastWidget) ? KLegacy::Prelight : KLegacy::Normal) :
KLegacy::Insensitive);
key.data.shadow = ((btn->isOn() || btn->isDown()) ?
KLegacy::In : KLegacy::Out);
diff --git a/tdestyles/kthemestyle/kthemestyle.cpp b/tdestyles/kthemestyle/kthemestyle.cpp
index ba59f5b7f..0316ded89 100644
--- a/tdestyles/kthemestyle/kthemestyle.cpp
+++ b/tdestyles/kthemestyle/kthemestyle.cpp
@@ -486,7 +486,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
if(event->type() == TQEvent::Move || event->type() == TQEvent::Resize ||
event->type() == TQEvent::Show)
{
- TQWidget *w = TQT_TQWIDGET(object);
+ TQWidget *w = static_cast<TQWidget*>(object);
TQPoint pos(0, 0);
pos = w->mapTo(w->topLevelWidget(), pos);
TQPixmap pix(uncached( Background )->size());
@@ -508,7 +508,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
}
if (!qstrcmp(object->name(), "tde toolbar widget") && object->inherits("TQLabel"))
{
- TQWidget* lb = TQT_TQWIDGET(object);
+ TQWidget* lb = static_cast<TQWidget*>(object);
if (lb->backgroundMode() == TQt::PaletteButton)
lb->setBackgroundMode(TQt::PaletteBackground);
removeObjectEventHandler(ceData, elementFlags, source, this);
diff --git a/tdestyles/plastik/plastik.cpp b/tdestyles/plastik/plastik.cpp
index 2cca2613f..29e724418 100644
--- a/tdestyles/plastik/plastik.cpp
+++ b/tdestyles/plastik/plastik.cpp
@@ -316,12 +316,12 @@ void PlastikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
void PlastikStyle::tdehtmlWidgetDestroyed(TQObject* obj)
{
- tdehtmlWidgets.remove(TQT_TQWIDGET(obj));
+ tdehtmlWidgets.remove(static_cast<TQWidget*>(obj));
}
void PlastikStyle::progressBarDestroyed(TQObject* obj)
{
- progAnimWidgets.remove(TQT_TQWIDGET(obj));
+ progAnimWidgets.remove(static_cast<TQWidget*>(obj));
}
void PlastikStyle::renderContour(TQPainter *p,
@@ -894,7 +894,7 @@ void PlastikStyle::renderPanel(TQPainter *p,
if (kickerMode &&
p->device() && p->device()->devType() == TQInternal::Widget &&
- TQCString(TQT_TQWIDGET(p->device())->className()) == "FittsLawFrame") {
+ TQCString(static_cast<TQWidget*>(p->device())->className()) == "FittsLawFrame") {
// Stolen wholesale from Keramik. I don't like it, but oh well.
if (sunken) {
const TQCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
@@ -3512,7 +3512,7 @@ bool PlastikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
}
if ( !qstrcmp(obj->name(), "tde toolbar widget") )
{
- TQWidget* lb = TQT_TQWIDGET(obj);
+ TQWidget* lb = static_cast<TQWidget*>(obj);
if (lb->backgroundMode() == TQt::PaletteButton)
lb->setBackgroundMode(TQt::PaletteBackground);
removeObjectEventHandler(ceData, elementFlags, source, this);