summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/richtexteditor.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/widgets/richtexteditor.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/widgets/richtexteditor.cpp')
-rw-r--r--kommander/widgets/richtexteditor.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp
index eea0b0d6..9e54f07c 100644
--- a/kommander/widgets/richtexteditor.cpp
+++ b/kommander/widgets/richtexteditor.cpp
@@ -17,18 +17,18 @@
#include <klocale.h>
/* QT INCLUDES */
-#include <qlayout.h>
-#include <qevent.h>
-#include <qtextedit.h>
-#include <qframe.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qpixmap.h>
-#include <qhbuttongroup.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqtextedit.h>
+#include <tqframe.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqpixmap.h>
+#include <tqhbuttongroup.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -42,38 +42,38 @@
#include "pixmaps/textleft.xpm"
#include "pixmaps/textright.xpm"
-RichTextEditor::RichTextEditor(QWidget *a_parent, const char *a_name)
- : QWidget(a_parent, a_name), KommanderWidget((QObject *)this)
+RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name)
+ : TQWidget(a_parent, a_name), KommanderWidget((TQObject *)this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
// setup toolbar
- m_toolbar = new QFrame(this, "buttonBar");
+ m_toolbar = new TQFrame(this, "buttonBar");
m_toolbar->setMinimumSize(0, 32);
- m_toolbar->setFrameShape(QFrame::NoFrame);
- m_toolbar->setFrameShadow(QFrame::Plain);
+ m_toolbar->setFrameShape(TQFrame::NoFrame);
+ m_toolbar->setFrameShadow(TQFrame::Plain);
//setup textedit
- m_textedit = new QTextEdit(this, "editor");
+ m_textedit = new TQTextEdit(this, "editor");
m_textedit->setTextFormat(RichText);
// layout the widgets
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
layout->addWidget(m_toolbar);
layout->addWidget(m_textedit);
layout->setSpacing(1);
// setup buttons
- QHBoxLayout *tbLayout = new QHBoxLayout(m_toolbar);
+ TQHBoxLayout *tbLayout = new TQHBoxLayout(m_toolbar);
//bold italic underline left right center link
- m_formatGroup = new QHButtonGroup(m_toolbar, "formatGroup");
+ m_formatGroup = new TQHButtonGroup(m_toolbar, "formatGroup");
//m_formatGroup->setFlat(true);
- m_alignGroup = new QHButtonGroup(m_toolbar, "alignGroup");
+ m_alignGroup = new TQHButtonGroup(m_toolbar, "alignGroup");
//m_alignGroup->setFlat(true);
m_alignGroup->setExclusive(true);
tbLayout->insertStretch(0);
@@ -81,40 +81,40 @@ RichTextEditor::RichTextEditor(QWidget *a_parent, const char *a_name)
tbLayout->addWidget(m_alignGroup);
tbLayout->insertStretch(3);
- m_buttonTextBold = new QToolButton(m_formatGroup, "textBold");
- m_buttonTextBold->setPixmap(QPixmap((const char **)bold_xpm));
+ m_buttonTextBold = new TQToolButton(m_formatGroup, "textBold");
+ m_buttonTextBold->setPixmap(TQPixmap((const char **)bold_xpm));
m_buttonTextBold->setToggleButton(true);
- connect(m_buttonTextBold, SIGNAL(toggled(bool)), this, SLOT(textBold(bool)));
- m_buttonTextItalic = new QToolButton(m_formatGroup, "textItalic");
- m_buttonTextItalic->setPixmap(QPixmap((const char **)italic_xpm));
+ connect(m_buttonTextBold, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textBold(bool)));
+ m_buttonTextItalic = new TQToolButton(m_formatGroup, "textItalic");
+ m_buttonTextItalic->setPixmap(TQPixmap((const char **)italic_xpm));
m_buttonTextItalic->setToggleButton(true);
- connect(m_buttonTextItalic, SIGNAL(toggled(bool)), this, SLOT(textItalic(bool)));
- m_buttonTextUnder = new QToolButton(m_formatGroup, "textUnder");
- m_buttonTextUnder->setPixmap(QPixmap((const char **)under_xpm));
+ connect(m_buttonTextItalic, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textItalic(bool)));
+ m_buttonTextUnder = new TQToolButton(m_formatGroup, "textUnder");
+ m_buttonTextUnder->setPixmap(TQPixmap((const char **)under_xpm));
m_buttonTextUnder->setToggleButton(true);
- connect(m_buttonTextUnder, SIGNAL(toggled(bool)), this, SLOT(textUnder(bool)));
+ connect(m_buttonTextUnder, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textUnder(bool)));
- m_buttonTextLeft = new QToolButton(m_alignGroup, "textLeft");
- m_buttonTextLeft->setPixmap(QPixmap((const char **)left_xpm));
+ m_buttonTextLeft = new TQToolButton(m_alignGroup, "textLeft");
+ m_buttonTextLeft->setPixmap(TQPixmap((const char **)left_xpm));
m_buttonTextLeft->setToggleButton(true);
- m_buttonTextCenter = new QToolButton(m_alignGroup, "textCenter");
- m_buttonTextCenter->setPixmap(QPixmap((const char **)center_xpm));
+ m_buttonTextCenter = new TQToolButton(m_alignGroup, "textCenter");
+ m_buttonTextCenter->setPixmap(TQPixmap((const char **)center_xpm));
m_buttonTextCenter->setToggleButton(true);
- m_buttonTextRight = new QToolButton(m_alignGroup, "textRight");
- m_buttonTextRight->setPixmap(QPixmap((const char **)right_xpm));
+ m_buttonTextRight = new TQToolButton(m_alignGroup, "textRight");
+ m_buttonTextRight->setPixmap(TQPixmap((const char **)right_xpm));
m_buttonTextRight->setToggleButton(true);
- connect(m_alignGroup, SIGNAL(clicked(int)), this, SLOT(textAlign(int)));
- connect(m_textedit, SIGNAL(currentFontChanged(const QFont &)), this, SLOT(fontChanged(const QFont &)));
- connect(m_textedit, SIGNAL(currentAlignmentChanged(int)), this, SLOT(alignmentChanged(int)));
+ 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, SIGNAL(textChanged()), this, SLOT(setTextChanged()));
+ connect(m_textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(setTextChanged()));
}
-QString RichTextEditor::currentState() const
+TQString RichTextEditor::currentState() const
{
- return QString("default");
+ return TQString("default");
}
RichTextEditor::~RichTextEditor()
@@ -126,33 +126,33 @@ bool RichTextEditor::isKommanderWidget() const
return true;
}
-QStringList RichTextEditor::associatedText() const
+TQStringList RichTextEditor::associatedText() const
{
return KommanderWidget::associatedText();
}
-void RichTextEditor::setAssociatedText(const QStringList& a_at)
+void RichTextEditor::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void RichTextEditor::setPopulationText(const QString& a_text)
+void RichTextEditor::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText( a_text );
}
-QString RichTextEditor::populationText() const
+TQString RichTextEditor::populationText() const
{
return KommanderWidget::populationText();
}
void RichTextEditor::populate()
{
- QString txt = KommanderWidget::evalAssociatedText( populationText() );
+ TQString txt = KommanderWidget::evalAssociatedText( populationText() );
setWidgetText( txt );
}
-void RichTextEditor::setWidgetText(const QString &a_text)
+void RichTextEditor::setWidgetText(const TQString &a_text)
{
m_textedit->setText(a_text);
emit widgetTextChanged(a_text);
@@ -180,7 +180,7 @@ void RichTextEditor::textItalic(bool a_isOn)
void RichTextEditor::textAlign(int a_id)
{
- QToolButton *b = (QToolButton *)m_alignGroup->find(a_id);
+ TQToolButton *b = (TQToolButton *)m_alignGroup->find(a_id);
if(b == m_buttonTextLeft)
m_textedit->setAlignment(Qt::AlignLeft);
else if(b == m_buttonTextCenter)
@@ -189,7 +189,7 @@ void RichTextEditor::textAlign(int a_id)
m_textedit->setAlignment(Qt::AlignRight);
}
-void RichTextEditor::fontChanged(const QFont &a_font)
+void RichTextEditor::fontChanged(const TQFont &a_font)
{
m_buttonTextBold->setOn(a_font.bold());
m_buttonTextItalic->setOn(a_font.italic());
@@ -206,16 +206,16 @@ void RichTextEditor::alignmentChanged(int a_alignment)
m_buttonTextRight->setOn(true);
}
-void RichTextEditor::showEvent( QShowEvent *e )
+void RichTextEditor::showEvent( TQShowEvent *e )
{
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
emit widgetOpened();
}
-void RichTextEditor::contextMenuEvent( QContextMenuEvent * e )
+void RichTextEditor::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -224,7 +224,7 @@ bool RichTextEditor::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::selection || f == DCOP::setEditable;
}
-QString RichTextEditor::handleDCOP(int function, const QStringList& args)
+TQString RichTextEditor::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -243,7 +243,7 @@ QString RichTextEditor::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "richtexteditor.moc"