summaryrefslogtreecommitdiffstats
path: root/src/kvilib/tal/kvi_tal_wizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/tal/kvi_tal_wizard.cpp')
-rw-r--r--src/kvilib/tal/kvi_tal_wizard.cpp192
1 files changed, 96 insertions, 96 deletions
diff --git a/src/kvilib/tal/kvi_tal_wizard.cpp b/src/kvilib/tal/kvi_tal_wizard.cpp
index 6f5f39da..53b7c03f 100644
--- a/src/kvilib/tal/kvi_tal_wizard.cpp
+++ b/src/kvilib/tal/kvi_tal_wizard.cpp
@@ -29,21 +29,21 @@
#include "kvi_locale.h"
#ifdef COMPILE_USE_QT4
- #include <QShowEvent>
- #include <QLabel>
- #include <QPushButton>
- #include <QGridLayout>
- #include <QFrame>
- #include <QStackedWidget>
- #include <QPalette>
+ #include <TQShowEvent>
+ #include <TQLabel>
+ #include <TQPushButton>
+ #include <TQGridLayout>
+ #include <TQFrame>
+ #include <TQStackedWidget>
+ #include <TQPalette>
#else
- #include <qlabel.h>
- #include <qpushbutton.h>
- #include <qlayout.h>
- #include <qevent.h>
- #include <qframe.h>
- #include <qwidgetstack.h>
- #include <qpalette.h>
+ #include <tqlabel.h>
+ #include <tqpushbutton.h>
+ #include <tqlayout.h>
+ #include <tqevent.h>
+ #include <tqframe.h>
+ #include <tqwidgetstack.h>
+ #include <tqpalette.h>
#endif
@@ -59,8 +59,8 @@ public:
EnableFinish = 16
};
public:
- QWidget * pWidget;
- QString szTitle;
+ TQWidget * pWidget;
+ TQString szTitle;
bool bEnabled;
int iEnableFlags;
int iVisibleIndex;
@@ -72,23 +72,23 @@ public:
KviPointerList<KviTalWizardPageData> * pPageList;
int iEnabledPageCount;
KviTalWizardPageData * pCurrentPage;
- QGridLayout * pLayout;
- QLabel * pTitleLabel;
- QLabel * pStepsLabel;
- QPushButton * pBackButton;
- QPushButton * pCancelButton;
- QPushButton * pHelpButton;
- QPushButton * pNextButton;
- QWidget * pNextSpacer;
- QPushButton * pFinishButton;
- QWidget * pFinishSpacer;
+ TQGridLayout * pLayout;
+ TQLabel * pTitleLabel;
+ TQLabel * pStepsLabel;
+ TQPushButton * pBackButton;
+ TQPushButton * pCancelButton;
+ TQPushButton * pHelpButton;
+ TQPushButton * pNextButton;
+ TQWidget * pNextSpacer;
+ TQPushButton * pFinishButton;
+ TQWidget * pFinishSpacer;
#ifdef COMPILE_USE_QT4
- QStackedWidget * pWidgetStack;
+ TQStackedWidget * pWidgetStack;
#else
- QWidgetStack * pWidgetStack;
+ TQWidgetStack * pWidgetStack;
#endif
public:
- KviTalWizardPageData * findPage(QWidget * pWidget)
+ KviTalWizardPageData * findPage(TQWidget * pWidget)
{
for(KviTalWizardPageData * pData = pPageList->first();pData;pData = pPageList->next())
{
@@ -120,7 +120,7 @@ public:
return NULL;
}
- KviTalWizardPageData * findNextEnabledPage(QWidget * pReference)
+ KviTalWizardPageData * findNextEnabledPage(TQWidget * pReference)
{
if(!pReference)
return findFirstEnabledPage();
@@ -135,7 +135,7 @@ public:
return NULL;
}
- KviTalWizardPageData * findPrevEnabledPage(QWidget * pReference)
+ KviTalWizardPageData * findPrevEnabledPage(TQWidget * pReference)
{
if(!pReference)
return findLastEnabledPage();
@@ -166,33 +166,33 @@ public:
};
-KviTalWizard::KviTalWizard(QWidget * pParent)
-: QDialog(pParent)
+KviTalWizard::KviTalWizard(TQWidget * pParent)
+: TQDialog(pParent)
{
m_p = new KviTalWizardPrivate;
m_p->pPageList = new KviPointerList<KviTalWizardPageData>;
m_p->pPageList->setAutoDelete(true);
m_p->pCurrentPage = NULL;
m_p->iEnabledPageCount = 0;
- m_p->pLayout = new QGridLayout(this);
+ m_p->pLayout = new TQGridLayout(this);
- m_p->pTitleLabel = new QLabel(this);
+ m_p->pTitleLabel = new TQLabel(this);
#ifdef COMPILE_USE_QT4
m_p->pLayout->addWidget(m_p->pTitleLabel,0,0,1,3);
#else
m_p->pLayout->addMultiCellWidget(m_p->pTitleLabel,0,0,0,3);
#endif
- m_p->pStepsLabel = new QLabel(this);
+ m_p->pStepsLabel = new TQLabel(this);
m_p->pStepsLabel->setMinimumWidth(80);
- m_p->pStepsLabel->setAlignment(Qt::AlignRight);
+ m_p->pStepsLabel->tqsetAlignment(TQt::AlignRight);
#ifdef COMPILE_USE_QT4
m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3);
#else
m_p->pLayout->addMultiCellWidget(m_p->pStepsLabel,0,0,4,6);
#endif
- QFrame * f1 = new QFrame(this);
- f1->setFrameStyle(QFrame::Sunken | QFrame::HLine);
+ TQFrame * f1 = new TQFrame(this);
+ f1->setFrameStyle(TQFrame::Sunken | TQFrame::HLine);
#ifdef COMPILE_USE_QT4
m_p->pLayout->addWidget(f1,1,0,1,7);
#else
@@ -200,15 +200,15 @@ KviTalWizard::KviTalWizard(QWidget * pParent)
#endif
#ifdef COMPILE_USE_QT4
- m_p->pWidgetStack = new QStackedWidget(this);
+ m_p->pWidgetStack = new TQStackedWidget(this);
m_p->pLayout->addWidget(m_p->pWidgetStack,2,0,1,7);
#else
- m_p->pWidgetStack = new QWidgetStack(this);
+ m_p->pWidgetStack = new TQWidgetStack(this);
m_p->pLayout->addMultiCellWidget(m_p->pWidgetStack,2,2,0,6);
#endif
- QFrame * f2 = new QFrame(this);
- f2->setFrameStyle(QFrame::Sunken | QFrame::HLine);
+ TQFrame * f2 = new TQFrame(this);
+ f2->setFrameStyle(TQFrame::Sunken | TQFrame::HLine);
#ifdef COMPILE_USE_QT4
m_p->pLayout->addWidget(f2,3,0,1,7);
#else
@@ -226,66 +226,66 @@ KviTalWizard::KviTalWizard(QWidget * pParent)
pButtonBox->setSpacing(0);
- m_p->pCancelButton = new QPushButton(__tr("Cancel"),pButtonBox);
+ m_p->pCancelButton = new TQPushButton(__tr("Cancel"),pButtonBox);
m_p->pCancelButton->setMinimumWidth(80);
- QObject::connect(
+ TQObject::connect(
m_p->pCancelButton,
- SIGNAL(clicked()),
+ TQT_SIGNAL(clicked()),
this,
- SLOT(cancelButtonClicked())
+ TQT_SLOT(cancelButtonClicked())
);
- QWidget * pSpacer = new QWidget(pButtonBox);
+ TQWidget * pSpacer = new TQWidget(pButtonBox);
pSpacer->setFixedWidth(4);
- m_p->pHelpButton = new QPushButton(__tr("Help"),pButtonBox);
+ m_p->pHelpButton = new TQPushButton(__tr("Help"),pButtonBox);
m_p->pHelpButton->setMinimumWidth(80);
- QObject::connect(
+ TQObject::connect(
m_p->pHelpButton,
- SIGNAL(clicked()),
+ TQT_SIGNAL(clicked()),
this,
- SLOT(helpButtonClicked())
+ TQT_SLOT(helpButtonClicked())
);
- QWidget * pLargeSpacer = new QWidget(pButtonBox);
+ TQWidget * pLargeSpacer = new TQWidget(pButtonBox);
pLargeSpacer->setMinimumWidth(50);
pButtonBox->setStretchFactor(pLargeSpacer,100);
- QString szText = "< ";
+ TQString szText = "< ";
szText += __tr("Back");
- m_p->pBackButton = new QPushButton(szText,pButtonBox);
+ m_p->pBackButton = new TQPushButton(szText,pButtonBox);
m_p->pBackButton->setMinimumWidth(80);
- QObject::connect(
+ TQObject::connect(
m_p->pBackButton,
- SIGNAL(clicked()),
+ TQT_SIGNAL(clicked()),
this,
- SLOT(backButtonClicked())
+ TQT_SLOT(backButtonClicked())
);
- m_p->pNextSpacer = new QWidget(pButtonBox);
+ m_p->pNextSpacer = new TQWidget(pButtonBox);
m_p->pNextSpacer->setFixedWidth(4);
szText = __tr("Next");
szText += " >";
- m_p->pNextButton = new QPushButton(szText,pButtonBox);
+ m_p->pNextButton = new TQPushButton(szText,pButtonBox);
m_p->pNextButton->setMinimumWidth(80);
- QObject::connect(
+ TQObject::connect(
m_p->pNextButton,
- SIGNAL(clicked()),
+ TQT_SIGNAL(clicked()),
this,
- SLOT(nextButtonClicked())
+ TQT_SLOT(nextButtonClicked())
);
- m_p->pFinishSpacer = new QWidget(pButtonBox);
+ m_p->pFinishSpacer = new TQWidget(pButtonBox);
m_p->pFinishSpacer->setFixedWidth(4);
- m_p->pFinishButton = new QPushButton(__tr("Finish"),pButtonBox);
+ m_p->pFinishButton = new TQPushButton(__tr("Finish"),pButtonBox);
m_p->pFinishButton->setMinimumWidth(80);
- QObject::connect(
+ TQObject::connect(
m_p->pFinishButton,
- SIGNAL(clicked()),
+ TQT_SIGNAL(clicked()),
this,
- SLOT(finishButtonClicked())
+ TQT_SLOT(finishButtonClicked())
);
m_p->pLayout->setMargin(8);
@@ -300,7 +300,7 @@ KviTalWizard::~KviTalWizard()
delete m_p;
}
-void KviTalWizard::insertPage(QWidget * pWidget,const QString &szTitle,int iIndex)
+void KviTalWizard::insertPage(TQWidget * pWidget,const TQString &szTitle,int iIndex)
{
KviTalWizardPageData * pPageData = m_p->findPage(pWidget);
if(!pPageData)
@@ -327,12 +327,12 @@ void KviTalWizard::insertPage(QWidget * pWidget,const QString &szTitle,int iInde
}
-void KviTalWizard::addPage(QWidget * pWidget,const QString &szTitle)
+void KviTalWizard::addPage(TQWidget * pWidget,const TQString &szTitle)
{
insertPage(pWidget,szTitle,-1);
}
-bool KviTalWizard::setPageEnabled(QWidget * pWidget,bool bEnabled)
+bool KviTalWizard::setPageEnabled(TQWidget * pWidget,bool bEnabled)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -343,7 +343,7 @@ bool KviTalWizard::setPageEnabled(QWidget * pWidget,bool bEnabled)
return true;
}
-bool KviTalWizard::setPageTitle(QWidget * pWidget,const QString &szTitle)
+bool KviTalWizard::setPageTitle(TQWidget * pWidget,const TQString &szTitle)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -352,7 +352,7 @@ bool KviTalWizard::setPageTitle(QWidget * pWidget,const QString &szTitle)
return true;
}
-bool KviTalWizard::setCurrentPage(QWidget * pWidget)
+bool KviTalWizard::setCurrentPage(TQWidget * pWidget)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -361,7 +361,7 @@ bool KviTalWizard::setCurrentPage(QWidget * pWidget)
return true;
}
-QWidget * KviTalWizard::currentPage()
+TQWidget * KviTalWizard::currentPage()
{
if(!m_p->pCurrentPage)
return NULL;
@@ -378,8 +378,8 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData)
bool bHelpEnabled = false;
bool bFinishEnabled = false;
- QString szTitle;
- QString szSteps;
+ TQString szTitle;
+ TQString szSteps;
if(pData)
{
@@ -396,15 +396,15 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData)
szTitle = "<b>";
szTitle += pData->szTitle;
szTitle += "</b>";
- QPalette pal = m_p->pStepsLabel->palette();
+ TQPalette pal = m_p->pStepsLabel->palette();
#ifdef COMPILE_USE_QT4
- QColor clrWin = pal.color(QPalette::Normal,QPalette::Window);
- QColor clrTxt = pal.color(QPalette::Normal,QPalette::WindowText);
+ TQColor clrWin = pal.color(TQPalette::Normal,TQPalette::Window);
+ TQColor clrTxt = pal.color(TQPalette::Normal,TQPalette::WindowText);
#else
- QColor clrWin = pal.color(QPalette::Normal,QColorGroup::Foreground);
- QColor clrTxt = pal.color(QPalette::Normal,QColorGroup::Background);
+ TQColor clrWin = pal.color(TQPalette::Normal,TQColorGroup::Foreground);
+ TQColor clrTxt = pal.color(TQPalette::Normal,TQColorGroup::Background);
#endif
- QColor clrMid = qRgb(
+ TQColor clrMid = tqRgb(
(clrWin.red() + clrTxt.red()) / 2,
(clrWin.green() + clrTxt.green()) / 2,
(clrWin.blue() + clrTxt.blue()) / 2
@@ -413,7 +413,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData)
szSteps = "<nobr><font color=\"";
szSteps += clrMid.name();
szSteps += "\"><b>[";
- szSteps += QString("Step %1 of %2").arg(pData->iVisibleIndex).arg(m_p->iEnabledPageCount);
+ szSteps += TQString("Step %1 of %2").tqarg(pData->iVisibleIndex).tqarg(m_p->iEnabledPageCount);
szSteps += "]</b></font></nobr>";
}
@@ -447,7 +447,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData)
}
}
-void KviTalWizard::showEvent(QShowEvent * e)
+void KviTalWizard::showEvent(TQShowEvent * e)
{
if(!(m_p->pCurrentPage))
{
@@ -456,10 +456,10 @@ void KviTalWizard::showEvent(QShowEvent * e)
if(pData)
setCurrentPage(pData->pWidget);
}
- QDialog::showEvent(e);
+ TQDialog::showEvent(e);
}
-void KviTalWizard::closeEvent(QCloseEvent * e)
+void KviTalWizard::closeEvent(TQCloseEvent * e)
{
e->ignore();
cancelButtonClicked();
@@ -492,7 +492,7 @@ void KviTalWizard::finishButtonClicked()
accept();
}
-void KviTalWizard::setHelpEnabled(QWidget * pWidget,bool bEnabled)
+void KviTalWizard::setHelpEnabled(TQWidget * pWidget,bool bEnabled)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -505,7 +505,7 @@ void KviTalWizard::setHelpEnabled(QWidget * pWidget,bool bEnabled)
setCurrentPage(pData);
}
-void KviTalWizard::setCancelEnabled(QWidget * pWidget,bool bEnabled)
+void KviTalWizard::setCancelEnabled(TQWidget * pWidget,bool bEnabled)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -518,7 +518,7 @@ void KviTalWizard::setCancelEnabled(QWidget * pWidget,bool bEnabled)
setCurrentPage(pData);
}
-void KviTalWizard::setFinishEnabled(QWidget * pWidget,bool bEnabled)
+void KviTalWizard::setFinishEnabled(TQWidget * pWidget,bool bEnabled)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -531,7 +531,7 @@ void KviTalWizard::setFinishEnabled(QWidget * pWidget,bool bEnabled)
setCurrentPage(pData);
}
-void KviTalWizard::setNextEnabled(QWidget * pWidget,bool bEnabled)
+void KviTalWizard::setNextEnabled(TQWidget * pWidget,bool bEnabled)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -544,7 +544,7 @@ void KviTalWizard::setNextEnabled(QWidget * pWidget,bool bEnabled)
setCurrentPage(pData);
}
-void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled)
+void KviTalWizard::setBackEnabled(TQWidget * pWidget,bool bEnabled)
{
KviTalWizardPageData * pData = m_p->findPage(pWidget);
if(!pData)
@@ -557,27 +557,27 @@ void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled)
setCurrentPage(pData);
}
-QPushButton * KviTalWizard::cancelButton()
+TQPushButton * KviTalWizard::cancelButton()
{
return m_p->pCancelButton;
}
-QPushButton * KviTalWizard::helpButton()
+TQPushButton * KviTalWizard::helpButton()
{
return m_p->pHelpButton;
}
-QPushButton * KviTalWizard::finishButton()
+TQPushButton * KviTalWizard::finishButton()
{
return m_p->pFinishButton;
}
-QPushButton * KviTalWizard::nextButton()
+TQPushButton * KviTalWizard::nextButton()
{
return m_p->pNextButton;
}
-QPushButton * KviTalWizard::backButton()
+TQPushButton * KviTalWizard::backButton()
{
return m_p->pBackButton;
}