diff options
Diffstat (limited to 'kivio/plugins/kiviotexttool/stenciltexteditor.cpp')
-rw-r--r-- | kivio/plugins/kiviotexttool/stenciltexteditor.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kivio/plugins/kiviotexttool/stenciltexteditor.cpp b/kivio/plugins/kiviotexttool/stenciltexteditor.cpp index 9cf3a7e5..a68b9548 100644 --- a/kivio/plugins/kiviotexttool/stenciltexteditor.cpp +++ b/kivio/plugins/kiviotexttool/stenciltexteditor.cpp @@ -18,10 +18,10 @@ */ #include "stenciltexteditor.h" -#include <qtoolbutton.h> -#include <qfont.h> -#include <qcolor.h> -#include <qpopupmenu.h> +#include <tqtoolbutton.h> +#include <tqfont.h> +#include <tqcolor.h> +#include <tqpopupmenu.h> #include <kiconloader.h> #include <ktextedit.h> @@ -35,8 +35,8 @@ namespace Kivio { -StencilTextEditor::StencilTextEditor(const QString& caption, QWidget *parent, const char *name) - : KDialogBase(parent, name, true, caption, KDialogBase::Ok|KDialogBase::Cancel) +StencilTextEditor::StencilTextEditor(const TQString& caption, TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, caption, KDialogBase::Ok|KDialogBase::Cancel) { m_hAlign = -1; m_vAlign = -1; @@ -47,30 +47,30 @@ StencilTextEditor::StencilTextEditor(const QString& caption, QWidget *parent, co m_mainWidget->m_italicsButton->setIconSet(SmallIconSet("text_italic", 16)); m_mainWidget->m_underLineButton->setIconSet(SmallIconSet("text_under", 16)); - QPopupMenu* menu = new QPopupMenu(m_mainWidget->m_hAlignButton, "hAlignMenu"); + TQPopupMenu* menu = new TQPopupMenu(m_mainWidget->m_hAlignButton, "hAlignMenu"); menu->setCheckable(true); - menu->insertItem(SmallIconSet("text_left", 16), i18n("Align Left"), Qt::AlignLeft); - menu->insertItem(SmallIconSet("text_center", 16), i18n("Align Center"), Qt::AlignHCenter); - menu->insertItem(SmallIconSet("text_right", 16), i18n("Align Right"), Qt::AlignRight); + menu->insertItem(SmallIconSet("text_left", 16), i18n("Align Left"), TQt::AlignLeft); + menu->insertItem(SmallIconSet("text_center", 16), i18n("Align Center"), TQt::AlignHCenter); + menu->insertItem(SmallIconSet("text_right", 16), i18n("Align Right"), TQt::AlignRight); m_mainWidget->m_hAlignButton->setPopup(menu); - connect(menu, SIGNAL(activated(int)), this, SLOT(setHorizontalAlign(int))); - connect(m_mainWidget->m_hAlignButton, SIGNAL(clicked()), this, SLOT(showHAlignPopup())); + connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setHorizontalAlign(int))); + connect(m_mainWidget->m_hAlignButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showHAlignPopup())); - menu = new QPopupMenu(m_mainWidget->m_vAlignButton, "hAlignMenu"); + menu = new TQPopupMenu(m_mainWidget->m_vAlignButton, "hAlignMenu"); menu->setCheckable(true); - menu->insertItem(SmallIconSet("align_top", 16), i18n("Align Top"), Qt::AlignTop); - menu->insertItem(SmallIconSet("align_vcenter", 16), i18n("Align Vertical Center"), Qt::AlignVCenter); - menu->insertItem(SmallIconSet("align_bottom", 16), i18n("Align Bottom"), Qt::AlignBottom); + menu->insertItem(SmallIconSet("align_top", 16), i18n("Align Top"), TQt::AlignTop); + menu->insertItem(SmallIconSet("align_vcenter", 16), i18n("AlignQt::Vertical Center"), TQt::AlignVCenter); + menu->insertItem(SmallIconSet("align_bottom", 16), i18n("Align Bottom"), TQt::AlignBottom); m_mainWidget->m_vAlignButton->setPopup(menu); - connect(menu, SIGNAL(activated(int)), this, SLOT(setVerticalAlign(int))); - connect(m_mainWidget->m_vAlignButton, SIGNAL(clicked()), this, SLOT(showVAlignPopup())); + connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setVerticalAlign(int))); + connect(m_mainWidget->m_vAlignButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showVAlignPopup())); - connect(m_mainWidget->m_fontCombo, SIGNAL(activated(int)), this, SLOT(updateFormating())); - connect(m_mainWidget->m_fontSizeCombo, SIGNAL(activated(int)), this, SLOT(updateFormating())); - connect(m_mainWidget->m_boldButton, SIGNAL(clicked()), this, SLOT(updateFormating())); - connect(m_mainWidget->m_italicsButton, SIGNAL(clicked()), this, SLOT(updateFormating())); - connect(m_mainWidget->m_underLineButton, SIGNAL(clicked()), this, SLOT(updateFormating())); - connect(m_mainWidget->m_textColorButton, SIGNAL(clicked()), this, SLOT(updateFormating())); + connect(m_mainWidget->m_fontCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateFormating())); + connect(m_mainWidget->m_fontSizeCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateFormating())); + connect(m_mainWidget->m_boldButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateFormating())); + connect(m_mainWidget->m_italicsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateFormating())); + connect(m_mainWidget->m_underLineButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateFormating())); + connect(m_mainWidget->m_textColorButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateFormating())); m_mainWidget->m_textArea->setFocus(); } @@ -79,23 +79,23 @@ StencilTextEditor::~StencilTextEditor() { } -void StencilTextEditor::setFont(const QFont& font) +void StencilTextEditor::setFont(const TQFont& font) { m_mainWidget->m_textArea->setFont(font); m_mainWidget->m_fontCombo->setCurrentFont(font.family()); - m_mainWidget->m_fontSizeCombo->setCurrentText(QString::number(font.pointSize())); + m_mainWidget->m_fontSizeCombo->setCurrentText(TQString::number(font.pointSize())); m_mainWidget->m_boldButton->setOn(font.bold()); m_mainWidget->m_italicsButton->setOn(font.italic()); m_mainWidget->m_underLineButton->setOn(font.underline()); } -void StencilTextEditor::setFontColor(const QColor& color) +void StencilTextEditor::setFontColor(const TQColor& color) { m_mainWidget->m_textArea->setPaletteForegroundColor(color); m_mainWidget->m_textColorButton->setColor(color); } -void StencilTextEditor::setBackgroundColor(const QColor& color) +void StencilTextEditor::setBackgroundColor(const TQColor& color) { m_mainWidget->m_textArea->setPaletteBackgroundColor(color); } @@ -108,7 +108,7 @@ void StencilTextEditor::setHorizontalAlign(int flag) m_mainWidget->m_hAlignButton->popup()->setItemChecked(flag, true); m_mainWidget->m_hAlignButton->setIconSet(*(m_mainWidget->m_hAlignButton->popup()->iconSet(flag))); - m_mainWidget->m_textArea->setAlignment(flag|verticalAlignment()); + m_mainWidget->m_textArea->tqsetAlignment(flag|verticalAlignment()); m_hAlign = flag; } @@ -120,13 +120,13 @@ void StencilTextEditor::setVerticalAlign(int flag) m_mainWidget->m_vAlignButton->popup()->setItemChecked(flag, true); m_mainWidget->m_vAlignButton->setIconSet(*(m_mainWidget->m_vAlignButton->popup()->iconSet(flag))); - m_mainWidget->m_textArea->setAlignment(flag|horizontalAlignment()); + m_mainWidget->m_textArea->tqsetAlignment(flag|horizontalAlignment()); m_vAlign = flag; } -QFont StencilTextEditor::font() const +TQFont StencilTextEditor::font() const { - QFont font; + TQFont font; font.setFamily(m_mainWidget->m_fontCombo->currentFont()); font.setPointSize(m_mainWidget->m_fontSizeCombo->currentText().toInt()); font.setBold(m_mainWidget->m_boldButton->isOn()); @@ -136,27 +136,27 @@ QFont StencilTextEditor::font() const return font; } -QColor StencilTextEditor::fontColor() const +TQColor StencilTextEditor::fontColor() const { return m_mainWidget->m_textColorButton->color(); } -Qt::AlignmentFlags StencilTextEditor::horizontalAlignment() const +TQt::AlignmentFlags StencilTextEditor::horizontalAlignment() const { - return static_cast<Qt::AlignmentFlags>(m_hAlign); + return static_cast<TQt::AlignmentFlags>(m_hAlign); } -Qt::AlignmentFlags StencilTextEditor::verticalAlignment() const +TQt::AlignmentFlags StencilTextEditor::verticalAlignment() const { - return static_cast<Qt::AlignmentFlags>(m_vAlign); + return static_cast<TQt::AlignmentFlags>(m_vAlign); } -void StencilTextEditor::setText(const QString& text) +void StencilTextEditor::setText(const TQString& text) { m_mainWidget->m_textArea->setText(text); } -QString StencilTextEditor::text() const +TQString StencilTextEditor::text() const { return m_mainWidget->m_textArea->text(); } @@ -169,7 +169,7 @@ void StencilTextEditor::updateFormating() m_mainWidget->m_textArea->selectAll(true); - m_mainWidget->m_textArea->setAlignment(horizontalAlignment()|verticalAlignment()); + m_mainWidget->m_textArea->tqsetAlignment(horizontalAlignment()|verticalAlignment()); m_mainWidget->m_textArea->selectAll(false); m_mainWidget->m_textArea->setFocus(); |