summaryrefslogtreecommitdiffstats
path: root/src/newui/buttonbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newui/buttonbar.cpp')
-rw-r--r--src/newui/buttonbar.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/newui/buttonbar.cpp b/src/newui/buttonbar.cpp
index 52a20bf5..b2a3b47c 100644
--- a/src/newui/buttonbar.cpp
+++ b/src/newui/buttonbar.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include "buttonbar.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -33,13 +33,13 @@ namespace Ideal {
//ButtonLayout class
ButtonLayout::ButtonLayout(ButtonBar *parent, Direction d, int margin, int spacing, const char *name)
- :QBoxLayout(parent, d, margin, spacing, name), m_buttonBar(parent)
+ :TQBoxLayout(parent, d, margin, spacing, name), m_buttonBar(parent)
{
}
-QSize ButtonLayout::minimumSize() const
+TQSize ButtonLayout::minimumSize() const
{
- QSize size = QBoxLayout::minimumSize();
+ TQSize size = TQBoxLayout::minimumSize();
if (!m_buttonBar->autoResize())
return size;
@@ -48,13 +48,13 @@ QSize ButtonLayout::minimumSize() const
{
case Ideal::Left:
case Ideal::Right:
- return QSize(size.width(),0);
+ return TQSize(size.width(),0);
break;
case Ideal::Top:
case Ideal::Bottom:
- return QSize(0,size.height());
+ return TQSize(0,size.height());
}
- return QBoxLayout::minimumSize();
+ return TQBoxLayout::minimumSize();
}
@@ -62,22 +62,22 @@ QSize ButtonLayout::minimumSize() const
//ButtonBar class
-ButtonBar::ButtonBar(Place place, ButtonMode mode, QWidget *parent, const char *name)
- :QWidget(parent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true)
+ButtonBar::ButtonBar(Place place, ButtonMode mode, TQWidget *parent, const char *name)
+ :TQWidget(parent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true)
{
switch (m_place)
{
case Ideal::Left:
case Ideal::Right:
- l = new ButtonLayout(this, QBoxLayout::TopToBottom, 0, 0);
+ l = new ButtonLayout(this, TQBoxLayout::TopToBottom, 0, 0);
break;
case Ideal::Top:
case Ideal::Bottom:
- l = new ButtonLayout(this, QBoxLayout::LeftToRight, 0, 0);
+ l = new ButtonLayout(this, TQBoxLayout::LeftToRight, 0, 0);
break;
}
- l->setResizeMode(QLayout::Minimum);
+ l->setResizeMode(TQLayout::Minimum);
setMode(mode);
l->insertStretch(-1);
@@ -147,7 +147,7 @@ void ButtonBar::setButtonsPlace(Ideal::Place place)
(*it)->setPlace(place);
}
-void ButtonBar::resizeEvent(QResizeEvent *ev)
+void ButtonBar::resizeEvent(TQResizeEvent *ev)
{
int preferredDimension = 0;
int actualDimension = 0;
@@ -156,13 +156,13 @@ void ButtonBar::resizeEvent(QResizeEvent *ev)
{
case Ideal::Left:
case Ideal::Right:
- preferredDimension = l->QBoxLayout::minimumSize().height();
+ preferredDimension = l->TQBoxLayout::minimumSize().height();
actualDimension = size().height();
oldDimension = ev->oldSize().height();
break;
case Ideal::Top:
case Ideal::Bottom:
- preferredDimension = l->QBoxLayout::minimumSize().width();
+ preferredDimension = l->TQBoxLayout::minimumSize().width();
actualDimension = size().width();
oldDimension = ev->oldSize().width();
break;
@@ -175,7 +175,7 @@ void ButtonBar::resizeEvent(QResizeEvent *ev)
else if (m_shrinked && actualDimension > oldDimension)
deshrink(preferredDimension, actualDimension);
- QWidget::resizeEvent(ev);
+ TQWidget::resizeEvent(ev);
}
void ButtonBar::shrink(int preferredDimension, int actualDimension)
@@ -186,7 +186,7 @@ void ButtonBar::shrink(int preferredDimension, int actualDimension)
m_shrinked = true;
uint textLength = 0;
- QValueList<uint> texts;
+ TQValueList<uint> texts;
uint maxLength = 0;
for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
{
@@ -203,7 +203,7 @@ void ButtonBar::shrink(int preferredDimension, int actualDimension)
do {
newMaxLength -= 1;
newTextLength = 0;
- for (QValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it)
+ for (TQValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it)
{
if (*it > newMaxLength)
*it = newMaxLength;
@@ -227,7 +227,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension)
m_shrinked = true;
uint textLength = 0;
- QValueList<uint> texts;
+ TQValueList<uint> texts;
uint maxLength = 0;
for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it)
{
@@ -247,7 +247,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension)
do {
newTextLength = 0;
int i = 0;
- for (QValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it, i++)
+ for (TQValueList<uint>::iterator it = texts.begin(); it != texts.end(); ++it, i++)
{
if (m_buttons[i]->text().contains("..."))
(*it)++;