summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/richtextdialog.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 /kexi/formeditor/richtextdialog.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 'kexi/formeditor/richtextdialog.cpp')
-rw-r--r--kexi/formeditor/richtextdialog.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kexi/formeditor/richtextdialog.cpp b/kexi/formeditor/richtextdialog.cpp
index f4596ed5..74a31ab0 100644
--- a/kexi/formeditor/richtextdialog.cpp
+++ b/kexi/formeditor/richtextdialog.cpp
@@ -16,7 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <ktoolbar.h>
#include <kfontcombo.h>
@@ -33,11 +33,11 @@ namespace KFormDesigner {
//////////////// A simple dialog to edit rich text ////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
-RichTextDialog::RichTextDialog(QWidget *parent, const QString &text)
-: KDialogBase(parent, "richtext_dialog", true, i18n("Edit Rich Text"), Ok|Cancel, Ok, false)
+RichTextDialog::RichTextDialog(TQWidget *tqparent, const TQString &text)
+: KDialogBase(tqparent, "richtext_dialog", true, i18n("Edit Rich Text"), Ok|Cancel, Ok, false)
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *l = new QVBoxLayout(frame);
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *l = new TQVBoxLayout(frame);
l->setAutoAdd(true);
m_toolbar = new KToolBar(frame);
@@ -46,13 +46,13 @@ RichTextDialog::RichTextDialog(QWidget *parent, const QString &text)
m_fcombo = new KFontCombo(m_toolbar);
m_toolbar->insertWidget(TBFont, 40, m_fcombo);
- connect(m_fcombo, SIGNAL(textChanged(const QString&)), this, SLOT(changeFont(const QString &)));
+ connect(m_fcombo, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changeFont(const TQString &)));
m_toolbar->insertSeparator();
m_colCombo = new KColorCombo(m_toolbar);
m_toolbar->insertWidget(TBColor, 30, m_colCombo);
- connect(m_colCombo, SIGNAL(activated(const QColor&)), this, SLOT(changeColor(const QColor&)));
+ connect(m_colCombo, TQT_SIGNAL(activated(const TQColor&)), this, TQT_SLOT(changeColor(const TQColor&)));
m_toolbar->insertButton("text_bold", TBBold, true, i18n("Bold"));
m_toolbar->insertButton("text_italic", TBItalic, true, i18n("Italic"));
@@ -82,36 +82,36 @@ RichTextDialog::RichTextDialog(QWidget *parent, const QString &text)
m_toolbar->setToggle(TBJustify, true);
group->addButton(TBJustify);
- connect(m_toolbar, SIGNAL(toggled(int)), this, SLOT(buttonToggled(int)));
+ connect(m_toolbar, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(buttonToggled(int)));
- m_edit = new KTextEdit(text, QString::null, frame, "richtext_edit");
+ m_edit = new KTextEdit(text, TQString(), frame, "richtext_edit");
m_edit->setTextFormat(RichText);
m_edit->setFocus();
- connect(m_edit, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(cursorPositionChanged(int, int)));
- connect(m_edit, SIGNAL(clicked(int, int)), this, SLOT(cursorPositionChanged(int, int)));
- connect(m_edit, SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)), this, SLOT(slotVerticalAlignmentChanged(VerticalAlignment)));
+ connect(m_edit, TQT_SIGNAL(cursorPositionChanged(int, int)), this, TQT_SLOT(cursorPositionChanged(int, int)));
+ connect(m_edit, TQT_SIGNAL(clicked(int, int)), this, TQT_SLOT(cursorPositionChanged(int, int)));
+ connect(m_edit, TQT_SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)), this, TQT_SLOT(slotVerticalAlignmentChanged(VerticalAlignment)));
- m_edit->moveCursor(QTextEdit::MoveEnd, false);
+ m_edit->moveCursor(TQTextEdit::MoveEnd, false);
cursorPositionChanged(0, 0);
m_edit->show();
frame->show();
}
-QString
+TQString
RichTextDialog::text()
{
return m_edit->text();
}
void
-RichTextDialog::changeFont(const QString &font)
+RichTextDialog::changeFont(const TQString &font)
{
m_edit->setFamily(font);
}
void
-RichTextDialog::changeColor(const QColor &color)
+RichTextDialog::changeColor(const TQColor &color)
{
m_edit->setColor(color);
}
@@ -130,14 +130,14 @@ RichTextDialog::buttonToggled(int id)
{
if(isOn && m_toolbar->isButtonOn(TBSub))
m_toolbar->setButton(TBSub, false);
- m_edit->setVerticalAlignment(isOn ? QTextEdit::AlignSuperScript : QTextEdit::AlignNormal);
+ m_edit->setVerticalAlignment(isOn ? TQTextEdit::AlignSuperScript : TQTextEdit::AlignNormal);
break;
}
case TBSub:
{
if(isOn && m_toolbar->isButtonOn(TBSuper))
m_toolbar->setButton(TBSuper, false);
- m_edit->setVerticalAlignment(isOn ? QTextEdit::AlignSubScript : QTextEdit::AlignNormal);
+ m_edit->setVerticalAlignment(isOn ? TQTextEdit::AlignSubScript : TQTextEdit::AlignNormal);
break;
}
case TBLeft: case TBCenter:
@@ -146,10 +146,10 @@ RichTextDialog::buttonToggled(int id)
if(!isOn) break;
switch(id)
{
- case TBLeft: m_edit->setAlignment(Qt::AlignLeft); break;
- case TBCenter: m_edit->setAlignment(Qt::AlignCenter); break;
- case TBRight: m_edit->setAlignment(Qt::AlignRight); break;
- case TBJustify: m_edit->setAlignment(Qt::AlignJustify); break;
+ case TBLeft: m_edit->tqsetAlignment(TQt::AlignLeft); break;
+ case TBCenter: m_edit->tqsetAlignment(TQt::AlignCenter); break;
+ case TBRight: m_edit->tqsetAlignment(TQt::AlignRight); break;
+ case TBJustify: m_edit->tqsetAlignment(TQt::AlignJustify); break;
default: break;
}
}
@@ -168,12 +168,12 @@ RichTextDialog::cursorPositionChanged(int, int)
m_toolbar->setButton(TBUnder, m_edit->underline());
int id = 0;
- switch(m_edit->alignment())
+ switch(m_edit->tqalignment())
{
- case Qt::AlignLeft: id = TBLeft; break;
- case Qt::AlignCenter: id = TBCenter; break;
- case Qt::AlignRight: id = TBRight; break;
- case Qt::AlignJustify: id = TBJustify; break;
+ case TQt::AlignLeft: id = TBLeft; break;
+ case TQt::AlignCenter: id = TBCenter; break;
+ case TQt::AlignRight: id = TBRight; break;
+ case TQt::AlignJustify: id = TBJustify; break;
default: id = TBLeft; break;
}
m_toolbar->setButton(id, true);
@@ -184,13 +184,13 @@ RichTextDialog::slotVerticalAlignmentChanged(VerticalAlignment align)
{
switch(align)
{
- case QTextEdit::AlignSuperScript:
+ case TQTextEdit::AlignSuperScript:
{
m_toolbar->setButton(TBSuper, true);
m_toolbar->setButton(TBSub, false);
break;
}
- case QTextEdit::AlignSubScript:
+ case TQTextEdit::AlignSubScript:
{
m_toolbar->setButton(TBSub, true);
m_toolbar->setButton(TBSuper, false);