summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/ui/kiviotextformatdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kivio/kiviopart/ui/kiviotextformatdlg.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kivio/kiviopart/ui/kiviotextformatdlg.cpp')
-rw-r--r--kivio/kiviopart/ui/kiviotextformatdlg.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kivio/kiviopart/ui/kiviotextformatdlg.cpp b/kivio/kiviopart/ui/kiviotextformatdlg.cpp
index 7d02f643..43f783e1 100644
--- a/kivio/kiviopart/ui/kiviotextformatdlg.cpp
+++ b/kivio/kiviopart/ui/kiviotextformatdlg.cpp
@@ -19,10 +19,10 @@
#include "kiviotextformatdlg.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kfontdialog.h>
#include <kcolorbutton.h>
@@ -31,22 +31,22 @@
#include "kivio_view.h"
#include "kivio_doc.h"
-KivioTextFormatDlg::KivioTextFormatDlg(KivioView* parent, const char* name)
- : KDialogBase(Tabbed, i18n("Text Format"), Ok|Cancel|Default, Ok, parent, name)
+KivioTextFormatDlg::KivioTextFormatDlg(KivioView* tqparent, const char* name)
+ : KDialogBase(Tabbed, i18n("Text Format"), Ok|Cancel|Default, Ok, tqparent, name)
{
- m_valign = Qt::AlignVCenter;
- m_halign = Qt::AlignHCenter;
+ m_valign = TQt::AlignVCenter;
+ m_halign = TQt::AlignHCenter;
initFontTab();
initPositionTab();
}
void KivioTextFormatDlg::initFontTab()
{
- QFrame* tab = addPage(i18n("Font"));
+ TQFrame* tab = addPage(i18n("Font"));
m_fontChooser = new KFontChooser(tab);
- QLabel* textColorLbl = new QLabel(i18n("Text color:"), tab);
+ TQLabel* textColorLbl = new TQLabel(i18n("Text color:"), tab);
m_textCBtn = new KColorButton(tab);
- QGridLayout* gl = new QGridLayout(tab);
+ TQGridLayout* gl = new TQGridLayout(tab);
gl->setSpacing(KDialog::spacingHint());
gl->addMultiCellWidget(m_fontChooser, 0, 0, 0, 1);
gl->addWidget(textColorLbl, 1, 0);
@@ -55,21 +55,21 @@ void KivioTextFormatDlg::initFontTab()
void KivioTextFormatDlg::initPositionTab()
{
- QFrame* tab = addPage(i18n("Position"));
- m_valignBGrp = new QButtonGroup(1, Qt::Horizontal, i18n("Vertical"), tab);
- (void) new QRadioButton(i18n("&Top"), m_valignBGrp);
- (void) new QRadioButton(i18n("&Center"), m_valignBGrp);
- (void) new QRadioButton(i18n("&Bottom"), m_valignBGrp);
+ TQFrame* tab = addPage(i18n("Position"));
+ m_valignBGrp = new TQButtonGroup(1, Qt::Horizontal, i18n("Vertical"), tab);
+ (void) new TQRadioButton(i18n("&Top"), m_valignBGrp);
+ (void) new TQRadioButton(i18n("&Center"), m_valignBGrp);
+ (void) new TQRadioButton(i18n("&Bottom"), m_valignBGrp);
m_valignBGrp->setButton(1);
- m_halignBGrp = new QButtonGroup(1, Qt::Vertical, i18n("Horizontal"), tab);
- (void) new QRadioButton(i18n("&Left"), m_halignBGrp);
- (void) new QRadioButton(i18n("C&enter"), m_halignBGrp);
- (void) new QRadioButton(i18n("&Right"), m_halignBGrp);
+ m_halignBGrp = new TQButtonGroup(1, Qt::Vertical, i18n("Horizontal"), tab);
+ (void) new TQRadioButton(i18n("&Left"), m_halignBGrp);
+ (void) new TQRadioButton(i18n("C&enter"), m_halignBGrp);
+ (void) new TQRadioButton(i18n("&Right"), m_halignBGrp);
m_halignBGrp->setButton(1);
- m_preview = new QLabel(i18n("Preview"), tab);
- m_preview->setFrameStyle(QFrame::Box | QFrame::Sunken);
- m_preview->setAlignment(m_valign | m_halign);
- QGridLayout* gl = new QGridLayout(tab);
+ m_preview = new TQLabel(i18n("Preview"), tab);
+ m_preview->setFrameStyle(TQFrame::Box | TQFrame::Sunken);
+ m_preview->tqsetAlignment(m_valign | m_halign);
+ TQGridLayout* gl = new TQGridLayout(tab);
gl->setSpacing(KDialog::spacingHint());
gl->setRowStretch(0, 10);
gl->setColStretch(1, 10);
@@ -77,42 +77,42 @@ void KivioTextFormatDlg::initPositionTab()
gl->addWidget(m_preview, 0, 1);
gl->addWidget(m_halignBGrp, 1, 1);
- connect(m_valignBGrp, SIGNAL(clicked(int)), SLOT(updateVAlign(int)));
- connect(m_halignBGrp, SIGNAL(clicked(int)), SLOT(updateHAlign(int)));
+ connect(m_valignBGrp, TQT_SIGNAL(clicked(int)), TQT_SLOT(updateVAlign(int)));
+ connect(m_halignBGrp, TQT_SIGNAL(clicked(int)), TQT_SLOT(updateHAlign(int)));
}
void KivioTextFormatDlg::updateVAlign(int i)
{
switch(i) {
case 0:
- m_valign = Qt::AlignTop;
+ m_valign = TQt::AlignTop;
break;
case 1:
- m_valign = Qt::AlignVCenter;
+ m_valign = TQt::AlignVCenter;
break;
case 2:
- m_valign = Qt::AlignBottom;
+ m_valign = TQt::AlignBottom;
break;
}
- m_preview->setAlignment(m_valign | m_halign);
+ m_preview->tqsetAlignment(m_valign | m_halign);
}
void KivioTextFormatDlg::updateHAlign(int i)
{
switch(i) {
case 0:
- m_halign = Qt::AlignLeft;
+ m_halign = TQt::AlignLeft;
break;
case 1:
- m_halign = Qt::AlignHCenter;
+ m_halign = TQt::AlignHCenter;
break;
case 2:
- m_halign = Qt::AlignRight;
+ m_halign = TQt::AlignRight;
break;
}
- m_preview->setAlignment(m_valign | m_halign);
+ m_preview->tqsetAlignment(m_valign | m_halign);
}
int KivioTextFormatDlg::valign()
@@ -125,12 +125,12 @@ int KivioTextFormatDlg::halign()
return m_halign;
}
-QFont KivioTextFormatDlg::font()
+TQFont KivioTextFormatDlg::font()
{
return m_fontChooser->font();
}
-QColor KivioTextFormatDlg::textColor()
+TQColor KivioTextFormatDlg::textColor()
{
return m_textCBtn->color();
}
@@ -138,55 +138,55 @@ QColor KivioTextFormatDlg::textColor()
void KivioTextFormatDlg::setVAlign(int i)
{
switch(i) {
- case Qt::AlignTop:
+ case TQt::AlignTop:
m_valignBGrp->setButton(0);
break;
- case Qt::AlignVCenter:
+ case TQt::AlignVCenter:
m_valignBGrp->setButton(1);
break;
- case Qt::AlignBottom:
+ case TQt::AlignBottom:
m_valignBGrp->setButton(2);
break;
}
- m_valign = static_cast<Qt::AlignmentFlags>(i);
- m_preview->setAlignment(m_valign | m_halign);
+ m_valign = static_cast<TQt::AlignmentFlags>(i);
+ m_preview->tqsetAlignment(m_valign | m_halign);
}
void KivioTextFormatDlg::setHAlign(int i)
{
switch(i) {
- case Qt::AlignLeft:
+ case TQt::AlignLeft:
m_halignBGrp->setButton(0);
break;
- case Qt::AlignHCenter:
+ case TQt::AlignHCenter:
m_halignBGrp->setButton(1);
break;
- case Qt::AlignRight:
+ case TQt::AlignRight:
m_halignBGrp->setButton(2);
break;
}
- m_halign = static_cast<Qt::AlignmentFlags>(i);
- m_preview->setAlignment(m_valign | m_halign);
+ m_halign = static_cast<TQt::AlignmentFlags>(i);
+ m_preview->tqsetAlignment(m_valign | m_halign);
}
-void KivioTextFormatDlg::setFont(QFont f)
+void KivioTextFormatDlg::setFont(TQFont f)
{
m_fontChooser->setFont(f);
}
-void KivioTextFormatDlg::setTextColor(QColor c)
+void KivioTextFormatDlg::setTextColor(TQColor c)
{
m_textCBtn->setColor(c);
}
void KivioTextFormatDlg::slotDefault()
{
- setFont((static_cast<KivioView*>(parent()))->doc()->defaultFont());
- setTextColor(QColor(0, 0, 0));
- setHAlign(Qt::AlignHCenter);
- setVAlign(Qt::AlignVCenter);
+ setFont((static_cast<KivioView*>(TQT_TQWIDGET(tqparent())))->doc()->defaultFont());
+ setTextColor(TQColor(0, 0, 0));
+ setHAlign(TQt::AlignHCenter);
+ setVAlign(TQt::AlignVCenter);
}
#include "kiviotextformatdlg.moc"