Rename obsolete tq methods to standard names

pull/1/head
Timothy Pearson 13 years ago
parent 6b41ad2b1c
commit 68de9c7a21

@ -4,7 +4,7 @@
// //
// Copyright (c) Martin R. Jones 1996 // Copyright (c) Martin R. Jones 1996
// //
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
// clock function and color cycling added 2000/01/09 by Alexander Neundorf <alexander.neundorf@rz.tu-ilmenau.de> // clock function and color cycling added 2000/01/09 by Alexander Neundorf <alexander.neundorf@rz.tu-ilmenau.de>
// 2001/03/04 Converted to use libkscreensaver by Martin R. Jones // 2001/03/04 Converted to use libkscreensaver by Martin R. Jones
// 2002/04/07 Added random vertical position of text, // 2002/04/07 Added random vertical position of text,
@ -75,7 +75,7 @@ KBannerSetup::KBannerSetup( TQWidget *parent, const char *name )
tl1->addLayout(tl11); tl1->addLayout(tl11);
TQGroupBox *group = new TQGroupBox( 0,Qt::Vertical, i18n("Font"), main ); TQGroupBox *group = new TQGroupBox( 0,Qt::Vertical, i18n("Font"), main );
TQGridLayout *gl = new TQGridLayout(group->tqlayout(), 6, 2, spacingHint() ); TQGridLayout *gl = new TQGridLayout(group->layout(), 6, 2, spacingHint() );
label = new TQLabel( i18n("Family:"), group ); label = new TQLabel( i18n("Family:"), group );
gl->addWidget(label, 1, 0); gl->addWidget(label, 1, 0);

@ -155,7 +155,7 @@
</spacer> </spacer>
<widget class="TQLayoutWidget" row="1" column="1"> <widget class="TQLayoutWidget" row="1" column="1">
<property name="name"> <property name="name">
<cstring>tqlayout118</cstring> <cstring>layout118</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">

@ -85,7 +85,7 @@ KClockSetup::KClockSetup(TQWidget *parent, const char *name)
TQGroupBox *colgroup = new TQGroupBox(i18n("Colors"), main); TQGroupBox *colgroup = new TQGroupBox(i18n("Colors"), main);
colgroup->setColumnLayout( 0,Qt::Horizontal ); colgroup->setColumnLayout( 0,Qt::Horizontal );
TQGridLayout *grid = new TQGridLayout( colgroup->tqlayout(), TQGridLayout *grid = new TQGridLayout( colgroup->layout(),
5, 2, spacingHint() ); 5, 2, spacingHint() );
TQLabel *label = new TQLabel(i18n("&Hour-hand:"), colgroup); TQLabel *label = new TQLabel(i18n("&Hour-hand:"), colgroup);

@ -21,7 +21,7 @@
* implied warranty. * implied warranty.
* *
*/ */
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>

@ -5,7 +5,7 @@
// based on kpolygon from Martin R. Jones 1996 // based on kpolygon from Martin R. Jones 1996
// mailto:dirk.staneker@student.uni-tuebingen.de // mailto:dirk.staneker@student.uni-tuebingen.de
// //
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
// 2001/03/04 Converted to libkscreensaver by Martin R. Jones // 2001/03/04 Converted to libkscreensaver by Martin R. Jones
#include <config.h> #include <config.h>

@ -50,7 +50,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout18</cstring> <cstring>layout18</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -58,7 +58,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout16</cstring> <cstring>layout16</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -66,7 +66,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout15</cstring> <cstring>layout15</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -116,7 +116,7 @@ m&lt;sub&gt;1&lt;/sub&gt;+m&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout14</cstring> <cstring>layout14</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -160,7 +160,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout13</cstring> <cstring>layout13</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -203,7 +203,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout13_2</cstring> <cstring>layout13_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -246,7 +246,7 @@ l&lt;sub&gt;1&lt;/sub&gt;+l&lt;sub&gt;2&lt;/sub&gt;
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout18</cstring> <cstring>layout18</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -293,7 +293,7 @@ Change [s]</string>
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout15</cstring> <cstring>layout15</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -385,7 +385,7 @@ Change [s]</string>
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout19</cstring> <cstring>layout19</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">

@ -4,7 +4,7 @@
// //
// Copyright (c) Martin R. Jones 1996 // Copyright (c) Martin R. Jones 1996
// //
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
// 2001/03/04 Converted to libkscreensaver by Martin R. Jones // 2001/03/04 Converted to libkscreensaver by Martin R. Jones
#include <config.h> #include <config.h>

@ -50,7 +50,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout17</cstring> <cstring>layout17</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -58,7 +58,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout6</cstring> <cstring>layout6</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -85,7 +85,7 @@
</property> </property>
<widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>tqlayout5</cstring> <cstring>layout5</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
@ -168,7 +168,7 @@
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout10</cstring> <cstring>layout10</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
@ -286,7 +286,7 @@
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout9</cstring> <cstring>layout9</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -311,7 +311,7 @@
</spacer> </spacer>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout4</cstring> <cstring>layout4</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">

@ -92,11 +92,11 @@ KXSConfigDialog::KXSConfigDialog(const TQString &filename, const TQString &name)
bool KXSConfigDialog::create() bool KXSConfigDialog::create()
{ {
TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
TQHBoxLayout *tqlayout = new TQHBoxLayout(topLayout, spacingHint()); TQHBoxLayout *layout = new TQHBoxLayout(topLayout, spacingHint());
TQVBox *controlLayout = new TQVBox(plainPage()); TQVBox *controlLayout = new TQVBox(plainPage());
controlLayout->setSpacing(spacingHint()); controlLayout->setSpacing(spacingHint());
tqlayout->addWidget(controlLayout); layout->addWidget(controlLayout);
((TQBoxLayout*)controlLayout->tqlayout())->addStrut(120); ((TQBoxLayout*)controlLayout->layout())->addStrut(120);
KConfig config(mConfigFile); KConfig config(mConfigFile);
@ -177,7 +177,7 @@ bool KXSConfigDialog::create()
// mPreview->setBackgroundMode(TQWidget::NoBackground); // mPreview->setBackgroundMode(TQWidget::NoBackground);
mPreview->setBackgroundColor(TQt::black); mPreview->setBackgroundColor(TQt::black);
tqlayout->add(mPreview); layout->add(mPreview);
show(); show();
// So that hacks can XSelectInput ButtonPressMask // So that hacks can XSelectInput ButtonPressMask

@ -12,7 +12,7 @@
Contact me in case of problems, not the original author! Contact me in case of problems, not the original author!
Last revised: 10-Jul-97 Last revised: 10-Jul-97
*/ */
// tqlayout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org> // layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
#define MAXSPEED 100 #define MAXSPEED 100
#define MINSPEED 0 #define MINSPEED 0

@ -1120,7 +1120,7 @@ void dotNETstyle::drawControl(TQ_ControlElement element,
} }
if (!pb->text().isEmpty()) { if (!pb->text().isEmpty()) {
p->setPen(enabled ? cg.foreground() : pb->tqpalette().disabled().buttonText()); p->setPen(enabled ? cg.foreground() : pb->palette().disabled().buttonText());
p->drawText(ur, text_flags, pb->text()); p->drawText(ur, text_flags, pb->text());
} }
@ -1629,7 +1629,7 @@ void dotNETstyle::drawComplexControl(ComplexControl control,
pe = PE_SpinWidgetUp; pe = PE_SpinWidgetUp;
TQRect re = sw->upRect(); TQRect re = sw->upRect();
TQColorGroup ucg = sw->isUpEnabled() ? cg : sw->tqpalette().disabled(); TQColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled();
p->fillRect(re.x() + 1, re.y() + 1, re.width() - 2, re.height() - 1, flags & Style_Raised ? ucg.background() : ucg.highlight()); p->fillRect(re.x() + 1, re.y() + 1, re.width() - 2, re.height() - 1, flags & Style_Raised ? ucg.background() : ucg.highlight());
if (pseudo3D) { if (pseudo3D) {
const TQCOORD corners[] = { re.x(), re.bottom(), re.x(), re.y() + 1, re.x() + 1, re.y(), re.right() - 1, re.y(), re.right(), re.y() + 1, re.right(), re.bottom() }; const TQCOORD corners[] = { re.x(), re.bottom(), re.x(), re.y() + 1, re.x() + 1, re.y(), re.right() - 1, re.y(), re.right(), re.y() + 1, re.right(), re.bottom() };
@ -1661,7 +1661,7 @@ void dotNETstyle::drawComplexControl(ComplexControl control,
pe = PE_SpinWidgetDown; pe = PE_SpinWidgetDown;
TQRect re = sw->downRect(); TQRect re = sw->downRect();
TQColorGroup dcg = sw->isDownEnabled() ? cg : sw->tqpalette().disabled(); TQColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled();
p->fillRect(re.x() + 1, re.y(), re.width() - 2, re.height() - 1, flags & Style_Raised ? dcg.background() : dcg.highlight()); p->fillRect(re.x() + 1, re.y(), re.width() - 2, re.height() - 1, flags & Style_Raised ? dcg.background() : dcg.highlight());
if (pseudo3D) { if (pseudo3D) {
const TQCOORD corners[] = { const TQCOORD corners[] = {
@ -2011,7 +2011,7 @@ void dotNETstyle::paletteChanged()
void dotNETstyle::updatePalette( TQComboBox *combo ) void dotNETstyle::updatePalette( TQComboBox *combo )
{ {
TQPalette pal = TQApplication::tqpalette(); TQPalette pal = TQApplication::palette();
pal.setColor(TQColorGroup::Dark, pal.setColor(TQColorGroup::Dark,
pal.active().color(TQColorGroup::Base)); pal.active().color(TQColorGroup::Base));
pal.setColor(TQColorGroup::Midlight, pal.setColor(TQColorGroup::Midlight,
@ -2021,7 +2021,7 @@ void dotNETstyle::updatePalette( TQComboBox *combo )
void dotNETstyle::updatePalette( TQToolBar *bar ) void dotNETstyle::updatePalette( TQToolBar *bar )
{ {
TQPalette pal = TQApplication::tqpalette(); TQPalette pal = TQApplication::palette();
pal.setColor(TQColorGroup::Button, pal.setColor(TQColorGroup::Button,
pal.active().color(TQColorGroup::Background)); pal.active().color(TQColorGroup::Background));
bar->setPalette(pal); bar->setPalette(pal);
@ -2029,7 +2029,7 @@ void dotNETstyle::updatePalette( TQToolBar *bar )
void dotNETstyle::updatePalette( TQMenuBar *bar ) void dotNETstyle::updatePalette( TQMenuBar *bar )
{ {
TQPalette pal = TQApplication::tqpalette(); TQPalette pal = TQApplication::palette();
pal.setColor(TQColorGroup::Button, pal.setColor(TQColorGroup::Button,
pal.active().color(TQColorGroup::Background)); pal.active().color(TQColorGroup::Background));
bar->setPalette(pal); bar->setPalette(pal);
@ -2046,7 +2046,7 @@ bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
if (ev->type() == TQEvent::Enter) { if (ev->type() == TQEvent::Enter) {
TQWidget *btn = (TQWidget *)obj; TQWidget *btn = (TQWidget *)obj;
if (btn->isEnabled()) { if (btn->isEnabled()) {
TQPalette pal = btn->tqpalette(); TQPalette pal = btn->palette();
pal.setColor(TQColorGroup::Dark, pal.setColor(TQColorGroup::Dark,
pal.active().color(TQColorGroup::Highlight).dark()); pal.active().color(TQColorGroup::Highlight).dark());
pal.setColor(TQColorGroup::Midlight, pal.setColor(TQColorGroup::Midlight,
@ -2055,7 +2055,7 @@ bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
} else if (ev->type() == TQEvent::Leave) { } else if (ev->type() == TQEvent::Leave) {
TQWidget *btn = (TQWidget *)obj; TQWidget *btn = (TQWidget *)obj;
TQPalette pal = btn->tqpalette(); TQPalette pal = btn->palette();
pal.setColor(TQColorGroup::Dark, pal.setColor(TQColorGroup::Dark,
pal.active().color(TQColorGroup::Base)); pal.active().color(TQColorGroup::Base));
pal.setColor(TQColorGroup::Midlight, pal.setColor(TQColorGroup::Midlight,
@ -2064,7 +2064,7 @@ bool dotNETstyle::eventFilter(TQObject *obj, TQEvent *ev)
} }
} else if (obj->inherits(TQBUTTON_OBJECT_NAME_STRING)) { } else if (obj->inherits(TQBUTTON_OBJECT_NAME_STRING)) {
TQWidget *btn = (TQWidget *)obj; TQWidget *btn = (TQWidget *)obj;
TQPalette pal = btn->tqpalette(); TQPalette pal = btn->palette();
pal.setColor(TQColorGroup::Button, pal.setColor(TQColorGroup::Button,
pal.active().color(TQColorGroup::Background)); pal.active().color(TQColorGroup::Background));
btn->setPalette(pal); btn->setPalette(pal);

@ -727,8 +727,8 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
case PE_Indicator: case PE_Indicator:
drawPhasePanel(painter, x+1, y+1, w-2, h-2, group, true, enabled ? drawPhasePanel(painter, x+1, y+1, w-2, h-2, group, true, enabled ?
&group.tqbrush(TQColorGroup::Base) : &group.brush(TQColorGroup::Base) :
&group.tqbrush(TQColorGroup::Background)); &group.brush(TQColorGroup::Background));
if (on) { if (on) {
painter->setPen(mouseover painter->setPen(mouseover
@ -736,7 +736,7 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
: group.dark()); : group.dark());
painter->drawRect(x+4, y+4, w-8, h-8); painter->drawRect(x+4, y+4, w-8, h-8);
painter->fillRect(x+5, y+5, w-10, h-10, painter->fillRect(x+5, y+5, w-10, h-10,
group.tqbrush(TQColorGroup::Highlight)); group.brush(TQColorGroup::Highlight));
} else if (mouseover) { } else if (mouseover) {
painter->setPen(TQColor(group.highlight().dark(contrast))); painter->setPen(TQColor(group.highlight().dark(contrast)));
painter->drawRect(x+4, y+4, w-8, h-8); painter->drawRect(x+4, y+4, w-8, h-8);
@ -804,7 +804,7 @@ void PhaseStyle::tqdrawPrimitive(TQ_PrimitiveElement element,
case PE_DockWindowResizeHandle: case PE_DockWindowResizeHandle:
drawPhasePanel(painter, x, y, w, h, group, false, drawPhasePanel(painter, x, y, w, h, group, false,
&group.tqbrush(TQColorGroup::Background)); &group.brush(TQColorGroup::Background));
break; break;
case PE_Splitter: case PE_Splitter:
@ -1095,7 +1095,7 @@ void PhaseStyle::drawKStylePrimitive(KStylePrimitive element,
} }
} }
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Mid)); &group.brush(TQColorGroup::Mid));
break; break;
} }
@ -1157,7 +1157,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element,
if ((flags & Style_ButtonDefault) && !depress) { if ((flags & Style_ButtonDefault) && !depress) {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Mid)); &group.brush(TQColorGroup::Mid));
drawPhaseBevel(painter, x+bd, y+bd, w-bd*2, h-bd*2, group, drawPhaseBevel(painter, x+bd, y+bd, w-bd*2, h-bd*2, group,
(widget==hover_) (widget==hover_)
? TQColor(group.button().light(contrast)) ? TQColor(group.button().light(contrast))
@ -1306,7 +1306,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element,
if ((flags & Style_Active) && (flags & Style_HasFocus)) { if ((flags & Style_Active) && (flags & Style_HasFocus)) {
if (flags & Style_Down) { if (flags & Style_Down) {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Background)); &group.brush(TQColorGroup::Background));
} else { } else {
drawPhaseBevel(painter, x, y, w, h, drawPhaseBevel(painter, x, y, w, h,
group, group.background(), group, group.background(),
@ -1504,7 +1504,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element,
case CE_ProgressBarGroove: { case CE_ProgressBarGroove: {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Base)); &group.brush(TQColorGroup::Base));
break; break;
} }
@ -1648,8 +1648,8 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
int slot = TQMAX(h/4, 6) + (h % 2); int slot = TQMAX(h/4, 6) + (h % 2);
drawPhasePanel(painter, x+3, y+(h/2)-(slot/2), w-6, drawPhasePanel(painter, x+3, y+(h/2)-(slot/2), w-6,
slot, group, true, slot, group, true,
sunken ? &group.tqbrush(TQColorGroup::Midlight) sunken ? &group.brush(TQColorGroup::Midlight)
: &group.tqbrush(TQColorGroup::Mid)); : &group.brush(TQColorGroup::Mid));
} }
if (controls & SC_ComboBoxEditField) { // draw edit box if (controls & SC_ComboBoxEditField) { // draw edit box
@ -1905,7 +1905,7 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control,
// now draw active buttons // now draw active buttons
if (down || on) { if (down || on) {
drawPhasePanel(painter, x, y, w, h, group, true, drawPhasePanel(painter, x, y, w, h, group, true,
&group.tqbrush(TQColorGroup::Button)); &group.brush(TQColorGroup::Button));
} else if (raised) { } else if (raised) {
drawPhaseBevel(painter, x, y, w, h, group, group.button(), drawPhaseBevel(painter, x, y, w, h, group, group.button(),
false, !horiz, true); false, !horiz, true);

@ -79,7 +79,7 @@ GlowConfigDialog::GlowConfigDialog( KConfig * conf, TQWidget * parent )
_button_glow_color_group_box = new TQGroupBox( _button_glow_color_group_box = new TQGroupBox(
0, Qt::Horizontal, i18n("Button Glow Colors"), _main_group_box); 0, Qt::Horizontal, i18n("Button Glow Colors"), _main_group_box);
TQHBoxLayout *colorHBoxLayout = TQHBoxLayout *colorHBoxLayout =
new TQHBoxLayout(_button_glow_color_group_box->tqlayout()); new TQHBoxLayout(_button_glow_color_group_box->layout());
// create buttons // create buttons
TQSize buttonSize(BITMAP_SIZE, BITMAP_SIZE); TQSize buttonSize(BITMAP_SIZE, BITMAP_SIZE);

@ -746,7 +746,7 @@ void GlowClient::updateButtonPositions()
m_leftButtonList.clear(); m_leftButtonList.clear();
m_rightButtonList.clear(); m_rightButtonList.clear();
// reset left and right button tqlayout // reset left and right button layout
if(m_leftButtonLayout) if(m_leftButtonLayout)
delete m_leftButtonLayout; delete m_leftButtonLayout;
m_leftButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0); m_leftButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);

@ -892,7 +892,7 @@ void IceWMClient::init()
// No flicker thanks // No flicker thanks
widget()->setBackgroundMode( NoBackground ); widget()->setBackgroundMode( NoBackground );
// Pack the windowWrapper() window within a grid tqlayout // Pack the windowWrapper() window within a grid layout
grid = new TQGridLayout(widget(), 0, 0, 0); grid = new TQGridLayout(widget(), 0, 0, 0);
grid->setResizeMode(TQLayout::FreeResize); grid->setResizeMode(TQLayout::FreeResize);
grid->addRowSpacing(0, borderSizeY); // Top grab bar grid->addRowSpacing(0, borderSizeY); // Top grab bar
@ -956,7 +956,7 @@ void IceWMClient::init()
} }
// Adds the buttons to the hbox tqlayout as per the buttons specified // Adds the buttons to the hbox layout as per the buttons specified
// in the button string 's' // in the button string 's'
void IceWMClient::addClientButtons( const TQString& s ) void IceWMClient::addClientButtons( const TQString& s )
{ {
@ -1057,7 +1057,7 @@ void IceWMClient::addClientButtons( const TQString& s )
} }
// Adds a pixmap to the titlebar tqlayout via the use of a nice TQSpacerItem // Adds a pixmap to the titlebar layout via the use of a nice TQSpacerItem
TQSpacerItem* IceWMClient::addPixmapSpacer( TQPixmap* p[], TQSizePolicy::SizeType s, int hsize ) TQSpacerItem* IceWMClient::addPixmapSpacer( TQPixmap* p[], TQSizePolicy::SizeType s, int hsize )
{ {
TQSpacerItem* sp; TQSpacerItem* sp;
@ -1503,7 +1503,7 @@ void IceWMClient::desktopChange()
} }
// Please don't modify the following unless you want tqlayout problems // Please don't modify the following unless you want layout problems
void IceWMClient::captionChange() void IceWMClient::captionChange()
{ {
TQRect r( 0, borderSizeY, geometry().width(), titleBarHeight); TQRect r( 0, borderSizeY, geometry().width(), titleBarHeight);

@ -19,7 +19,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
#include "kde1client_bitmaps.h" #include "kde1client_bitmaps.h"
// Default button tqlayout // Default button layout
const char default_left[] = "MS"; const char default_left[] = "MS";
const char default_right[] = "H_IAX"; const char default_right[] = "H_IAX";

@ -339,7 +339,7 @@ OpenLook::maximizeChange()
void void
OpenLook::doLayout() OpenLook::doLayout()
{ {
TQVBoxLayout * tqlayout = new TQVBoxLayout(widget(), openLookMargin); TQVBoxLayout * layout = new TQVBoxLayout(widget(), openLookMargin);
titleSpacer_ = titleSpacer_ =
new TQSpacerItem new TQSpacerItem
@ -350,12 +350,12 @@ OpenLook::doLayout()
TQSizePolicy::Fixed TQSizePolicy::Fixed
); );
tqlayout->addItem(titleSpacer_); layout->addItem(titleSpacer_);
tqlayout->addSpacing(2); layout->addSpacing(2);
TQBoxLayout * midLayout = TQBoxLayout * midLayout =
new TQBoxLayout(tqlayout, TQBoxLayout::LeftToRight, 0, 0); new TQBoxLayout(layout, TQBoxLayout::LeftToRight, 0, 0);
if (isPreview()) { if (isPreview()) {
midLayout->addWidget(new TQLabel( midLayout->addWidget(new TQLabel(

@ -282,7 +282,7 @@ void Manager::updateButtonVisibility()
break; break;
} }
tqlayout()->activate(); layout()->activate();
#endif #endif
} }

@ -292,7 +292,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>tqlayout14</cstring> <cstring>layout14</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">

@ -51,7 +51,7 @@ bool smoothblendFactory::menuClose = false;
static const int TOPMARGIN = 4; // do not change static const int TOPMARGIN = 4; // do not change
static const int DECOHEIGHT = 4; // do not change static const int DECOHEIGHT = 4; // do not change
static const int SIDETITLEMARGIN = 2; static const int SIDETITLEMARGIN = 2;
// Default button tqlayout // Default button layout
const char default_left[] = "M"; const char default_left[] = "M";
const char default_right[] = "HIAX"; const char default_right[] = "HIAX";
@ -600,7 +600,7 @@ void smoothblendClient::init() {
} }
void smoothblendClient::_resetLayout() void smoothblendClient::_resetLayout()
{ {
// basic tqlayout: // basic layout:
// _______________________________________________________________ // _______________________________________________________________
// | topSpacer | // | topSpacer |
// |_______________________________________________________________| // |_______________________________________________________________|
@ -697,9 +697,9 @@ void smoothblendClient::_resetLayout()
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// addButtons() // addButtons()
// ------------ // ------------
// Add buttons to title tqlayout // Add buttons to title layout
void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int button_size) { void smoothblendClient::addButtons(TQBoxLayout *layout, const TQString& s, int button_size) {
TQString tip; TQString tip;
if (s.length() > 0) { if (s.length() > 0) {
for (unsigned n=0; n < s.length(); n++) { for (unsigned n=0; n < s.length(); n++) {
@ -710,8 +710,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size); new smoothblendButton(this, "splat.png", i18n("Menu"),ButtonMenu,button_size);
connect(button[ButtonMenu], TQT_SIGNAL(pressed()), this, TQT_SLOT(menuButtonPressed())); connect(button[ButtonMenu], TQT_SIGNAL(pressed()), this, TQT_SLOT(menuButtonPressed()));
connect(button[ButtonMenu], TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased())); connect(button[ButtonMenu], TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased()));
tqlayout->addWidget(button[ButtonMenu]); layout->addWidget(button[ButtonMenu]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -726,8 +726,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "circle.png", tip, ButtonSticky, button_size, true); new smoothblendButton(this, "circle.png", tip, ButtonSticky, button_size, true);
connect(button[ButtonSticky], TQT_SIGNAL(clicked()), connect(button[ButtonSticky], TQT_SIGNAL(clicked()),
this, TQT_SLOT(toggleOnAllDesktops())); this, TQT_SLOT(toggleOnAllDesktops()));
tqlayout->addWidget(button[ButtonSticky]); layout->addWidget(button[ButtonSticky]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -737,8 +737,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "help.png", i18n("Help"), ButtonHelp, button_size); new smoothblendButton(this, "help.png", i18n("Help"), ButtonHelp, button_size);
connect(button[ButtonHelp], TQT_SIGNAL(clicked()), connect(button[ButtonHelp], TQT_SIGNAL(clicked()),
this, TQT_SLOT(showContextHelp())); this, TQT_SLOT(showContextHelp()));
tqlayout->addWidget(button[ButtonHelp]); layout->addWidget(button[ButtonHelp]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -748,8 +748,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size); new smoothblendButton(this, "minimize.png", i18n("Minimize"), ButtonMin, button_size);
connect(button[ButtonMin], TQT_SIGNAL(clicked()), connect(button[ButtonMin], TQT_SIGNAL(clicked()),
this, TQT_SLOT(minimize())); this, TQT_SLOT(minimize()));
tqlayout->addWidget(button[ButtonMin]); layout->addWidget(button[ButtonMin]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -764,8 +764,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "maximize.png", tip, ButtonMax, button_size, true); new smoothblendButton(this, "maximize.png", tip, ButtonMax, button_size, true);
connect(button[ButtonMax], TQT_SIGNAL(clicked()), connect(button[ButtonMax], TQT_SIGNAL(clicked()),
this, TQT_SLOT(maxButtonPressed())); this, TQT_SLOT(maxButtonPressed()));
tqlayout->addWidget(button[ButtonMax]); layout->addWidget(button[ButtonMax]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -775,8 +775,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "close.png", i18n("Close"), ButtonClose, button_size); new smoothblendButton(this, "close.png", i18n("Close"), ButtonClose, button_size);
connect(button[ButtonClose], TQT_SIGNAL(clicked()), connect(button[ButtonClose], TQT_SIGNAL(clicked()),
this, TQT_SLOT(closeWindow())); this, TQT_SLOT(closeWindow()));
tqlayout->addWidget(button[ButtonClose]); layout->addWidget(button[ButtonClose]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -787,8 +787,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
i18n("Keep Above Others"), ButtonAbove, button_size, true); i18n("Keep Above Others"), ButtonAbove, button_size, true);
connect(button[ButtonAbove], TQT_SIGNAL(clicked()), connect(button[ButtonAbove], TQT_SIGNAL(clicked()),
this, TQT_SLOT(aboveButtonPressed())); this, TQT_SLOT(aboveButtonPressed()));
tqlayout->addWidget(button[ButtonAbove]); layout->addWidget(button[ButtonAbove]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -799,8 +799,8 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
i18n("Keep Below Others"), ButtonBelow, button_size, true); i18n("Keep Below Others"), ButtonBelow, button_size, true);
connect(button[ButtonBelow], TQT_SIGNAL(clicked()), connect(button[ButtonBelow], TQT_SIGNAL(clicked()),
this, TQT_SLOT(belowButtonPressed())); this, TQT_SLOT(belowButtonPressed()));
tqlayout->addWidget(button[ButtonBelow]); layout->addWidget(button[ButtonBelow]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
@ -815,13 +815,13 @@ void smoothblendClient::addButtons(TQBoxLayout *tqlayout, const TQString& s, int
new smoothblendButton(this, "shade.png", tip, ButtonShade, button_size, true); new smoothblendButton(this, "shade.png", tip, ButtonShade, button_size, true);
connect(button[ButtonShade], TQT_SIGNAL(clicked()), connect(button[ButtonShade], TQT_SIGNAL(clicked()),
this, TQT_SLOT(shadeButtonPressed())); this, TQT_SLOT(shadeButtonPressed()));
tqlayout->addWidget(button[ButtonShade]); layout->addWidget(button[ButtonShade]);
if (n < s.length()-1) tqlayout->addSpacing(1); if (n < s.length()-1) layout->addSpacing(1);
} }
break; break;
case '_': // Spacer item case '_': // Spacer item
tqlayout->addSpacing(::factory->frameSize()); layout->addSpacing(::factory->frameSize());
} }
} }
} }
@ -937,7 +937,7 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
left = right = bottom = 0; left = right = bottom = 0;
top = ::factory->buttonSize(); top = ::factory->buttonSize();
// update tqlayout etc. // update layout etc.
topSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed); topSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
decoSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed); decoSpacer_->changeSize(1, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding); leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
@ -949,7 +949,7 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
left = right = bottom = ::factory->frameSize(); left = right = bottom = ::factory->frameSize();
top = ::factory->titleSize() + (FRAMESIZE*2); top = ::factory->titleSize() + (FRAMESIZE*2);
// update tqlayout etc. // update layout etc.
topSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed); topSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
decoSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed); decoSpacer_->changeSize(1, FRAMESIZE, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding); leftSpacer_->changeSize(left, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding);
@ -958,7 +958,7 @@ void smoothblendClient::borders(int &left, int &right, int &top, int &bottom) co
rightTitleSpacer_->changeSize(right,s_titleHeight,TQSizePolicy::Fixed, TQSizePolicy::Fixed); rightTitleSpacer_->changeSize(right,s_titleHeight,TQSizePolicy::Fixed, TQSizePolicy::Fixed);
bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed); bottomSpacer_->changeSize(1, bottom, TQSizePolicy::Expanding, TQSizePolicy::Fixed);
} }
widget()->tqlayout()->activate(); widget()->layout()->activate();
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
@ -1183,7 +1183,7 @@ void smoothblendClient::paintEvent(TQPaintEvent*) {
Rltitle.width(), Rltitle.width(),
Rltitle.height()+Rdeco.height(), Rltitle.height()+Rdeco.height(),
active ? *aTitleBarTile:*iTitleBarTile); active ? *aTitleBarTile:*iTitleBarTile);
// left mid tqlayout // left mid layout
painter.fillRect(Rleft,widgetGroup.background()); painter.fillRect(Rleft,widgetGroup.background());
// right of buttons and title // right of buttons and title
@ -1192,7 +1192,7 @@ void smoothblendClient::paintEvent(TQPaintEvent*) {
Rrtitle.width(), Rrtitle.width(),
Rrtitle.height()+Rdeco.height(), Rrtitle.height()+Rdeco.height(),
active ? *aTitleBarTile:*iTitleBarTile); active ? *aTitleBarTile:*iTitleBarTile);
// right mid tqlayout // right mid layout
painter.fillRect(Rright,widgetGroup.background()); painter.fillRect(Rright,widgetGroup.background());
// bottom // bottom

@ -204,7 +204,7 @@ public:
} }
private: private:
void addButtons(TQBoxLayout* tqlayout, const TQString& buttons, int buttonSize = 18); void addButtons(TQBoxLayout* layout, const TQString& buttons, int buttonSize = 18);
bool eventFilter(TQObject *obj, TQEvent *e); bool eventFilter(TQObject *obj, TQEvent *e);
void mouseDoubleClickEvent(TQMouseEvent *e); void mouseDoubleClickEvent(TQMouseEvent *e);
void wheelEvent(TQWheelEvent *e); void wheelEvent(TQWheelEvent *e);

@ -13,7 +13,7 @@
#include <kapplication.h> #include <kapplication.h>
#include <kdebug.h> #include <kdebug.h>
// Default button tqlayout // Default button layout
const char default_left[] = "X"; const char default_left[] = "X";
const char default_right[] = "HSIA"; const char default_right[] = "HSIA";
@ -78,7 +78,7 @@ static void create_pixmaps()
aUpperGradient->resize(32, 18); aUpperGradient->resize(32, 18);
iUpperGradient = new KPixmap; iUpperGradient = new KPixmap;
iUpperGradient->resize(32, 18); iUpperGradient->resize(32, 18);
TQColor bgColor = kapp->tqpalette().active().background(); TQColor bgColor = kapp->palette().active().background();
KPixmapEffect::gradient(*aUpperGradient, KPixmapEffect::gradient(*aUpperGradient,
KDecoration::options()->color(KDecorationOptions::ColorFrame, true).light(130), KDecoration::options()->color(KDecorationOptions::ColorFrame, true).light(130),
bgColor, bgColor,

Loading…
Cancel
Save