summaryrefslogtreecommitdiffstats
path: root/src/common/gui/container.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/gui/container.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/gui/container.cpp')
-rw-r--r--src/common/gui/container.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/common/gui/container.cpp b/src/common/gui/container.cpp
index 881e265..960acca 100644
--- a/src/common/gui/container.cpp
+++ b/src/common/gui/container.cpp
@@ -11,21 +11,21 @@
#include "misc_gui.h"
//----------------------------------------------------------------------------
-Container::Container(QWidget *parent, Type type)
- : QFrame(parent), _type(type)
+Container::Container(TQWidget *tqparent, Type type)
+ : TQFrame(tqparent), _type(type)
{
initLayout();
}
-Container::Container(QWidgetStack *stack, uint index, Type type)
- : QFrame(stack), _type(type)
+Container::Container(TQWidgetStack *stack, uint index, Type type)
+ : TQFrame(stack), _type(type)
{
initLayout();
stack->addWidget(this, index);
}
-Container::Container(QTabWidget *tabw, const QString &title, Type type)
- : QFrame(tabw), _type(type)
+Container::Container(TQTabWidget *tabw, const TQString &title, Type type)
+ : TQFrame(tabw), _type(type)
{
initLayout();
tabw->addTab(this, title);
@@ -36,43 +36,43 @@ void Container::setFrame(Type type)
_type = type;
switch (type) {
case Flat:
- setMargin(parent() && parent()->inherits("QTabWidget") ? 10 : 0);
- setFrameStyle(QFrame::NoFrame);
+ setMargin(tqparent() && tqparent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ? 10 : 0);
+ setFrameStyle(TQFrame::NoFrame);
break;
case Sunken:
setMargin(10);
- setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
break;
}
}
void Container::initLayout()
{
- _topLayout = new QGridLayout(this, 1, 1, 0, 10);
- _gridLayout = new QGridLayout(1, 1, 10);
+ _topLayout = new TQGridLayout(this, 1, 1, 0, 10);
+ _gridLayout = new TQGridLayout(1, 1, 10);
_topLayout->addLayout(_gridLayout, 0, 0);
_topLayout->setRowStretch(1, 1);
setFrame(_type);
}
-void Container::addWidget(QWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int alignment)
+void Container::addWidget(TQWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment)
{
Q_ASSERT( startRow<=endRow );
Q_ASSERT( startCol<=endCol );
w->show();
- _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, alignment);
+ _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, tqalignment);
}
-void Container::addLayout(QLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int alignment)
+void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment)
{
Q_ASSERT( startRow<=endRow );
Q_ASSERT( startCol<=endCol );
- _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, alignment);
+ _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, tqalignment);
}
//----------------------------------------------------------------------------
-ButtonContainer::ButtonContainer(const QString &title, QWidget *parent)
- : Container(parent, Sunken)
+ButtonContainer::ButtonContainer(const TQString &title, TQWidget *tqparent)
+ : Container(tqparent, Sunken)
{
_button = new PopupButton(title, this);
addWidget(_button, 0,0, 0,1);