diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/widgets/richtexteditor.cpp | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/widgets/richtexteditor.cpp')
-rw-r--r-- | kommander/widgets/richtexteditor.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp index 9e54f07c..e5de817b 100644 --- a/kommander/widgets/richtexteditor.cpp +++ b/kommander/widgets/richtexteditor.cpp @@ -43,7 +43,7 @@ #include "pixmaps/textright.xpm" RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) - : TQWidget(a_parent, a_name), KommanderWidget((TQObject *)this) + : TQWidget(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; @@ -61,11 +61,11 @@ RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) m_textedit = new TQTextEdit(this, "editor"); m_textedit->setTextFormat(RichText); - // layout the widgets - TQVBoxLayout *layout = new TQVBoxLayout(this); - layout->addWidget(m_toolbar); - layout->addWidget(m_textedit); - layout->setSpacing(1); + // tqlayout the widgets + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); + tqlayout->addWidget(m_toolbar); + tqlayout->addWidget(m_textedit); + tqlayout->setSpacing(1); // setup buttons TQHBoxLayout *tbLayout = new TQHBoxLayout(m_toolbar); @@ -106,7 +106,7 @@ RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) connect(m_alignGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(textAlign(int))); connect(m_textedit, TQT_SIGNAL(currentFontChanged(const TQFont &)), this, TQT_SLOT(fontChanged(const TQFont &))); - connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(alignmentChanged(int))); + connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(tqalignmentChanged(int))); connect(m_textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(setTextChanged())); @@ -180,13 +180,13 @@ void RichTextEditor::textItalic(bool a_isOn) void RichTextEditor::textAlign(int a_id) { - TQToolButton *b = (TQToolButton *)m_alignGroup->find(a_id); + TQToolButton *b = (TQToolButton *)m_alignGroup->tqfind(a_id); if(b == m_buttonTextLeft) - m_textedit->setAlignment(Qt::AlignLeft); + m_textedit->tqsetAlignment(TQt::AlignLeft); else if(b == m_buttonTextCenter) - m_textedit->setAlignment(Qt::AlignCenter); + m_textedit->tqsetAlignment(TQt::AlignCenter); else if(b == m_buttonTextRight) - m_textedit->setAlignment(Qt::AlignRight); + m_textedit->tqsetAlignment(TQt::AlignRight); } void RichTextEditor::fontChanged(const TQFont &a_font) @@ -196,13 +196,13 @@ void RichTextEditor::fontChanged(const TQFont &a_font) m_buttonTextUnder->setOn(a_font.underline()); } -void RichTextEditor::alignmentChanged(int a_alignment) +void RichTextEditor::tqalignmentChanged(int a_tqalignment) { - if((a_alignment == AlignAuto) || (a_alignment & AlignLeft)) + if((a_tqalignment == AlignAuto) || (a_tqalignment & AlignLeft)) m_buttonTextLeft->setOn(true); - else if(a_alignment & AlignHCenter) + else if(a_tqalignment & AlignHCenter) m_buttonTextCenter->setOn(true); - else if(a_alignment & AlignRight) + else if(a_tqalignment & AlignRight) m_buttonTextRight->setOn(true); } |