summaryrefslogtreecommitdiffstats
path: root/kivio/plugins/kiviotexttool
diff options
context:
space:
mode:
Diffstat (limited to 'kivio/plugins/kiviotexttool')
-rw-r--r--kivio/plugins/kiviotexttool/kivio_stenciltexteditorui.ui18
-rw-r--r--kivio/plugins/kiviotexttool/plugin.cpp10
-rw-r--r--kivio/plugins/kiviotexttool/plugin.h11
-rw-r--r--kivio/plugins/kiviotexttool/stenciltexteditor.cpp80
-rw-r--r--kivio/plugins/kiviotexttool/stenciltexteditor.h25
-rw-r--r--kivio/plugins/kiviotexttool/tool_text.cpp120
-rw-r--r--kivio/plugins/kiviotexttool/tool_text.h29
7 files changed, 148 insertions, 145 deletions
diff --git a/kivio/plugins/kiviotexttool/kivio_stenciltexteditorui.ui b/kivio/plugins/kiviotexttool/kivio_stenciltexteditorui.ui
index 8a6f9ce6..1042746f 100644
--- a/kivio/plugins/kiviotexttool/kivio_stenciltexteditorui.ui
+++ b/kivio/plugins/kiviotexttool/kivio_stenciltexteditorui.ui
@@ -8,7 +8,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</comment>
<author>Copyright (C) 2005 Peter Simonsson</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>Kivio::StencilTextEditorUI</cstring>
</property>
@@ -30,7 +30,7 @@ You should have received a copy of the GNU General Public License along with thi
<property name="margin">
<number>0</number>
</property>
- <widget class="QToolButton" row="0" column="2">
+ <widget class="TQToolButton" row="0" column="2">
<property name="name">
<cstring>m_boldButton</cstring>
</property>
@@ -147,7 +147,7 @@ You should have received a copy of the GNU General Public License along with thi
<cstring>m_fontCombo</cstring>
</property>
</widget>
- <widget class="QToolButton" row="0" column="3">
+ <widget class="TQToolButton" row="0" column="3">
<property name="name">
<cstring>m_italicsButton</cstring>
</property>
@@ -161,7 +161,7 @@ You should have received a copy of the GNU General Public License along with thi
<string>Italics</string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="4">
+ <widget class="TQToolButton" row="0" column="4">
<property name="name">
<cstring>m_underLineButton</cstring>
</property>
@@ -185,7 +185,7 @@ You should have received a copy of the GNU General Public License along with thi
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>110</width>
<height>20</height>
@@ -200,7 +200,7 @@ You should have received a copy of the GNU General Public License along with thi
<string></string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="5">
+ <widget class="TQToolButton" row="0" column="5">
<property name="name">
<cstring>m_hAlignButton</cstring>
</property>
@@ -214,7 +214,7 @@ You should have received a copy of the GNU General Public License along with thi
<string>Horizontal Alignment</string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="6">
+ <widget class="TQToolButton" row="0" column="6">
<property name="name">
<cstring>m_vAlignButton</cstring>
</property>
@@ -243,8 +243,8 @@ You should have received a copy of the GNU General Public License along with thi
<tabstop>m_fontSizeCombo</tabstop>
<tabstop>m_textColorButton</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kivio/plugins/kiviotexttool/plugin.cpp b/kivio/plugins/kiviotexttool/plugin.cpp
index 456805a4..cd9a43ec 100644
--- a/kivio/plugins/kiviotexttool/plugin.cpp
+++ b/kivio/plugins/kiviotexttool/plugin.cpp
@@ -31,8 +31,8 @@ K_EXPORT_COMPONENT_FACTORY( libkiviotexttool, TextToolFactory )
KInstance* TextToolFactory::s_global = 0;
-TextToolFactory::TextToolFactory( QObject* parent, const char* name )
-: KLibFactory( parent, name )
+TextToolFactory::TextToolFactory( TQObject* tqparent, const char* name )
+: KLibFactory( tqparent, name )
{
s_global = new KInstance("kivio");
}
@@ -42,12 +42,12 @@ TextToolFactory::~TextToolFactory()
delete s_global;
}
-QObject* TextToolFactory::createObject( QObject* parent, const char*, const char*, const QStringList& )
+TQObject* TextToolFactory::createObject( TQObject* tqparent, const char*, const char*, const TQStringList& )
{
- if ( !parent->inherits("KivioView") )
+ if ( !tqparent->inherits("KivioView") )
return 0;
- QObject *obj = new TextTool( (KivioView*)parent );
+ TQObject *obj = new TextTool( (KivioView*)tqparent );
return obj;
}
diff --git a/kivio/plugins/kiviotexttool/plugin.h b/kivio/plugins/kiviotexttool/plugin.h
index 18d4f41f..1e30ddb0 100644
--- a/kivio/plugins/kiviotexttool/plugin.h
+++ b/kivio/plugins/kiviotexttool/plugin.h
@@ -19,8 +19,8 @@
#ifndef TEXT_PLUGIN_H
#define TEXT_PLUGIN_H
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
#include <klibloader.h>
@@ -28,12 +28,13 @@ class KInstance;
class TextToolFactory : public KLibFactory
{ Q_OBJECT
+ TQ_OBJECT
public:
- TextToolFactory( QObject* parent = 0, const char* name = 0 );
+ TextToolFactory( TQObject* tqparent = 0, const char* name = 0 );
~TextToolFactory();
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* classname = "QObject", const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* tqparent = 0, const char* name = 0,
+ const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() );
static KInstance* global();
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();
diff --git a/kivio/plugins/kiviotexttool/stenciltexteditor.h b/kivio/plugins/kiviotexttool/stenciltexteditor.h
index 0c2a3b1a..d57cb9dd 100644
--- a/kivio/plugins/kiviotexttool/stenciltexteditor.h
+++ b/kivio/plugins/kiviotexttool/stenciltexteditor.h
@@ -21,8 +21,8 @@
#include <kdialogbase.h>
-class QFont;
-class QColor;
+class TQFont;
+class TQColor;
namespace Kivio {
@@ -34,21 +34,22 @@ class StencilTextEditorUI;
class StencilTextEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- StencilTextEditor(const QString& caption, QWidget *parent = 0, const char *name = 0);
+ StencilTextEditor(const TQString& caption, TQWidget *tqparent = 0, const char *name = 0);
~StencilTextEditor();
- void setFont(const QFont& font);
- void setFontColor(const QColor& color);
- void setBackgroundColor(const QColor& color);
+ void setFont(const TQFont& font);
+ void setFontColor(const TQColor& color);
+ void setBackgroundColor(const TQColor& color);
- QFont font() const;
- QColor fontColor() const;
- Qt::AlignmentFlags horizontalAlignment() const;
- Qt::AlignmentFlags verticalAlignment() const;
+ TQFont font() const;
+ TQColor fontColor() const;
+ TQt::AlignmentFlags horizontalAlignment() const;
+ TQt::AlignmentFlags verticalAlignment() const;
- void setText(const QString& text);
- QString text() const;
+ void setText(const TQString& text);
+ TQString text() const;
public slots:
void setHorizontalAlign(int flag);
diff --git a/kivio/plugins/kiviotexttool/tool_text.cpp b/kivio/plugins/kiviotexttool/tool_text.cpp
index 8b7e52e7..645a79a4 100644
--- a/kivio/plugins/kiviotexttool/tool_text.cpp
+++ b/kivio/plugins/kiviotexttool/tool_text.cpp
@@ -19,7 +19,7 @@
*/
#include "tool_text.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -46,17 +46,17 @@
#include "stenciltexteditor.h"
-TextTool::TextTool( KivioView* parent ) : Kivio::MouseTool(parent, "Text Mouse Tool")
+TextTool::TextTool( KivioView* tqparent ) : Kivio::MouseTool(tqparent, "Text Mouse Tool")
{
m_textAction = new Kivio::MouseToolAction( i18n("Text Tool"), "text", Key_F2, actionCollection(), "text" );
- connect(m_textAction, SIGNAL(toggled(bool)), this, SLOT(setActivated(bool)));
- connect(m_textAction, SIGNAL(doubleClicked()), this, SLOT(makePermanent()));
+ connect(m_textAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setActivated(bool)));
+ connect(m_textAction, TQT_SIGNAL(doubleClicked()), this, TQT_SLOT(makePermanent()));
m_permanent = false;
m_mode = stmNone;
- QPixmap pix = BarIcon("kivio_text_cursor",KivioFactory::global());
- m_pTextCursor = new QCursor(pix,2,2);
+ TQPixmap pix = BarIcon("kivio_text_cursor",KivioFactory::global());
+ m_pTextCursor = new TQCursor(pix,2,2);
}
TextTool::~TextTool()
@@ -71,22 +71,22 @@ TextTool::~TextTool()
* @param e The event to be identified and processed
*
*/
-bool TextTool::processEvent(QEvent* e)
+bool TextTool::processEvent(TQEvent* e)
{
switch (e->type())
{
- case QEvent::MouseButtonPress:
- mousePress( (QMouseEvent*)e );
+ case TQEvent::MouseButtonPress:
+ mousePress( (TQMouseEvent*)e );
return true;
break;
- case QEvent::MouseButtonRelease:
- mouseRelease( (QMouseEvent*)e );
+ case TQEvent::MouseButtonRelease:
+ mouseRelease( (TQMouseEvent*)e );
return true;
break;
- case QEvent::MouseMove:
- mouseMove( (QMouseEvent*)e );
+ case TQEvent::MouseMove:
+ mouseMove( (TQMouseEvent*)e );
return true;
break;
@@ -110,11 +110,11 @@ void TextTool::setActivated(bool a)
}
}
-void TextTool::text(QRect r)
+void TextTool::text(TQRect r)
{
// Calculate the start and end clicks in terms of page coordinates
- KoPoint startPoint = view()->canvasWidget()->mapFromScreen( QPoint( r.x(), r.y() ) );
- KoPoint releasePoint = view()->canvasWidget()->mapFromScreen( QPoint( r.x() + r.width(), r.y() + r.height() ) );
+ KoPoint startPoint = view()->canvasWidget()->mapFromScreen( TQPoint( r.x(), r.y() ) );
+ KoPoint releasePoint = view()->canvasWidget()->mapFromScreen( TQPoint( r.x() + r.width(), r.y() + r.height() ) );
// Calculate the x,y position of the textion box
float x = startPoint.x() < releasePoint.x() ? startPoint.x() : releasePoint.x();
@@ -162,9 +162,9 @@ void TextTool::text(QRect r)
}
}
-void TextTool::mousePress( QMouseEvent *e )
+void TextTool::mousePress( TQMouseEvent *e )
{
- if(e->button() == LeftButton) {
+ if(e->button() == Qt::LeftButton) {
KoPoint pagePoint = view()->canvasWidget()->mapFromScreen(e->pos());
int colType;
KivioPage *page = view()->activePage();
@@ -182,16 +182,16 @@ void TextTool::mousePress( QMouseEvent *e )
/**
* Tests if we should start rubber banding (always returns true).
*/
-bool TextTool::startRubberBanding( QMouseEvent *e )
+bool TextTool::startRubberBanding( TQMouseEvent *e )
{
view()->canvasWidget()->startRectDraw( e->pos(), KivioCanvas::Rubber );
- view()->canvasWidget()->repaint();
+ view()->canvasWidget()->tqrepaint();
m_startPoint = e->pos();
return true;
}
-void TextTool::mouseMove( QMouseEvent * e )
+void TextTool::mouseMove( TQMouseEvent * e )
{
switch( m_mode )
{
@@ -204,12 +204,12 @@ void TextTool::mouseMove( QMouseEvent * e )
}
}
-void TextTool::continueRubberBanding( QMouseEvent *e )
+void TextTool::continueRubberBanding( TQMouseEvent *e )
{
view()->canvasWidget()->continueRectDraw( e->pos(), KivioCanvas::Rubber );
}
-void TextTool::mouseRelease( QMouseEvent *e )
+void TextTool::mouseRelease( TQMouseEvent *e )
{
m_releasePoint = e->pos();
@@ -222,14 +222,14 @@ void TextTool::mouseRelease( QMouseEvent *e )
m_mode = stmNone;
- view()->canvasWidget()->repaint();
+ view()->canvasWidget()->tqrepaint();
}
-void TextTool::endRubberBanding(QMouseEvent */*e*/)
+void TextTool::endRubberBanding(TQMouseEvent */*e*/)
{
// End the rubber-band drawing
view()->canvasWidget()->endRectDraw();
- QRect rect;
+ TQRect rect;
if( m_startPoint != m_releasePoint ) {
rect = view()->canvasWidget()->rect();
@@ -246,7 +246,7 @@ void TextTool::endRubberBanding(QMouseEvent */*e*/)
}
}
-void TextTool::applyToolAction(QPtrList<KivioStencil>* stencils)
+void TextTool::applyToolAction(TQPtrList<KivioStencil>* stencils)
{
if(stencils->isEmpty()) {
return;
@@ -273,21 +273,21 @@ void TextTool::applyToolAction(QPtrList<KivioStencil>* stencils)
editor.setFontColor(stencil->textColor());
editor.setBackgroundColor(stencil->bgColor());
editor.setText(stencil->text());
- editor.setHorizontalAlign(static_cast<Qt::AlignmentFlags>(stencil->hTextAlign()));
- editor.setVerticalAlign(static_cast<Qt::AlignmentFlags>(stencil->vTextAlign()));
+ editor.setHorizontalAlign(static_cast<TQt::AlignmentFlags>(stencil->hTextAlign()));
+ editor.setVerticalAlign(static_cast<TQt::AlignmentFlags>(stencil->vTextAlign()));
- if(editor.exec() == QDialog::Accepted) {
+ if(editor.exec() == TQDialog::Accepted) {
KMacroCommand* macroCmd = new KMacroCommand(i18n("Change Stencil Text and Formatting"));
bool changed = false;
- QString text = editor.text();
- QFont font = editor.font();
- QColor textColor = editor.fontColor();
- int halignment = editor.horizontalAlignment();
- int valignment = editor.verticalAlignment();
+ TQString text = editor.text();
+ TQFont font = editor.font();
+ TQColor textColor = editor.fontColor();
+ int htqalignment = editor.horizontalAlignment();
+ int vtqalignment = editor.verticalAlignment();
bool changeFont = (stencil->textFont() != font);
bool changeTextColor = (stencil->textColor() != textColor);
- bool changeHAlignment = (stencil->hTextAlign() != halignment);
- bool changeVAlignment = (stencil->vTextAlign() != valignment);
+ bool changeHAlignment = (stencil->hTextAlign() != htqalignment);
+ bool changeVAlignment = (stencil->vTextAlign() != vtqalignment);
while( stencil )
@@ -317,18 +317,18 @@ void TextTool::applyToolAction(QPtrList<KivioStencil>* stencils)
changed = true;
}
- if(changeHAlignment && (stencil->hTextAlign() != halignment)) {
+ if(changeHAlignment && (stencil->hTextAlign() != htqalignment)) {
KivioChangeStencilHAlignmentCommand* cmd = new KivioChangeStencilHAlignmentCommand(
- i18n("Change Stencil Horizontal Alignment"), view()->activePage(), stencil, stencil->hTextAlign(), halignment);
- stencil->setHTextAlign(halignment);
+ i18n("Change StencilQt::Horizontal Alignment"), view()->activePage(), stencil, stencil->hTextAlign(), htqalignment);
+ stencil->setHTextAlign(htqalignment);
macroCmd->addCommand(cmd);
changed = true;
}
- if(changeVAlignment && (stencil->vTextAlign() != valignment)) {
+ if(changeVAlignment && (stencil->vTextAlign() != vtqalignment)) {
KivioChangeStencilVAlignmentCommand* cmd = new KivioChangeStencilVAlignmentCommand(
- i18n("Change Stencil Vertical Alignment"), view()->activePage(), stencil, stencil->vTextAlign(), valignment);
- stencil->setVTextAlign(valignment);
+ i18n("Change StencilQt::Vertical Alignment"), view()->activePage(), stencil, stencil->vTextAlign(), vtqalignment);
+ stencil->setVTextAlign(vtqalignment);
macroCmd->addCommand(cmd);
changed = true;
}
@@ -351,7 +351,7 @@ void TextTool::applyToolAction(KivioStencil* stencil, const KoPoint& pos)
return;
}
- QString name = stencil->getTextBoxName(pos);
+ TQString name = stencil->getTextBoxName(pos);
if(name.isEmpty()) {
return;
@@ -362,13 +362,13 @@ void TextTool::applyToolAction(KivioStencil* stencil, const KoPoint& pos)
editor.setFontColor(stencil->textColor(name));
editor.setBackgroundColor(stencil->bgColor());
editor.setText(stencil->text(name));
- editor.setHorizontalAlign(static_cast<Qt::AlignmentFlags>(stencil->hTextAlign(name)));
- editor.setVerticalAlign(static_cast<Qt::AlignmentFlags>(stencil->vTextAlign(name)));
+ editor.setHorizontalAlign(static_cast<TQt::AlignmentFlags>(stencil->hTextAlign(name)));
+ editor.setVerticalAlign(static_cast<TQt::AlignmentFlags>(stencil->vTextAlign(name)));
- if(editor.exec() == QDialog::Accepted) {
+ if(editor.exec() == TQDialog::Accepted) {
KMacroCommand* macroCmd = new KMacroCommand(i18n("Change Stencil Text and Formatting"));
bool changed = false;
- QString text = editor.text();
+ TQString text = editor.text();
if(stencil->text(name) != text)
{
@@ -379,7 +379,7 @@ void TextTool::applyToolAction(KivioStencil* stencil, const KoPoint& pos)
changed = true;
}
- QFont font = editor.font();
+ TQFont font = editor.font();
if(stencil->textFont(name) != font) {
KivioChangeStencilFontCommand* cmd = new KivioChangeStencilFontCommand(i18n("Change Stencil Font"),
@@ -389,7 +389,7 @@ void TextTool::applyToolAction(KivioStencil* stencil, const KoPoint& pos)
changed = true;
}
- QColor textColor = editor.fontColor();
+ TQColor textColor = editor.fontColor();
if(stencil->textColor(name) != textColor) {
KivioChangeStencilColorCommand* cmd = new KivioChangeStencilColorCommand(i18n("Change Stencil Text Color"),
@@ -400,24 +400,24 @@ void TextTool::applyToolAction(KivioStencil* stencil, const KoPoint& pos)
changed = true;
}
- int halignment = editor.horizontalAlignment();
+ int htqalignment = editor.horizontalAlignment();
- if(stencil->hTextAlign(name) != halignment) {
+ if(stencil->hTextAlign(name) != htqalignment) {
KivioChangeStencilHAlignmentCommand* cmd = new KivioChangeStencilHAlignmentCommand(
- i18n("Change Stencil Horizontal Alignment"), view()->activePage(), stencil,
- stencil->hTextAlign(name), halignment, name);
- stencil->setHTextAlign(name, halignment);
+ i18n("Change StencilQt::Horizontal Alignment"), view()->activePage(), stencil,
+ stencil->hTextAlign(name), htqalignment, name);
+ stencil->setHTextAlign(name, htqalignment);
macroCmd->addCommand(cmd);
changed = true;
}
- int valignment = editor.verticalAlignment();
+ int vtqalignment = editor.verticalAlignment();
- if(stencil->vTextAlign(name) != valignment) {
+ if(stencil->vTextAlign(name) != vtqalignment) {
KivioChangeStencilVAlignmentCommand* cmd = new KivioChangeStencilVAlignmentCommand(
- i18n("Change Stencil Vertical Alignment"), view()->activePage(), stencil,
- stencil->vTextAlign(name), valignment, name);
- stencil->setVTextAlign(name, valignment);
+ i18n("Change StencilQt::Vertical Alignment"), view()->activePage(), stencil,
+ stencil->vTextAlign(name), vtqalignment, name);
+ stencil->setVTextAlign(name, vtqalignment);
macroCmd->addCommand(cmd);
changed = true;
}
diff --git a/kivio/plugins/kiviotexttool/tool_text.h b/kivio/plugins/kiviotexttool/tool_text.h
index f5b0bb7b..1bc43bb9 100644
--- a/kivio/plugins/kiviotexttool/tool_text.h
+++ b/kivio/plugins/kiviotexttool/tool_text.h
@@ -22,8 +22,8 @@
#include "kivio_mousetool.h"
#include <koffice_export.h>
-class QMouseEvent;
-class QCursor;
+class TQMouseEvent;
+class TQCursor;
namespace Kivio {
class MouseToolAction;
@@ -36,17 +36,18 @@ class KoPoint;
class KIVIO_EXPORT TextTool : public Kivio::MouseTool
{
Q_OBJECT
+ TQ_OBJECT
public:
- TextTool( KivioView* parent );
+ TextTool( KivioView* tqparent );
~TextTool();
- virtual bool processEvent(QEvent* e);
+ virtual bool processEvent(TQEvent* e);
- void text(QRect);
+ void text(TQRect);
public slots:
virtual void setActivated(bool a);
- virtual void applyToolAction(QPtrList<KivioStencil>* stencils);
+ virtual void applyToolAction(TQPtrList<KivioStencil>* stencils);
virtual void applyToolAction(KivioStencil* stencil, const KoPoint& pos);
protected slots:
@@ -56,17 +57,17 @@ class KIVIO_EXPORT TextTool : public Kivio::MouseTool
void operationDone();
protected:
- void mousePress(QMouseEvent *);
- void mouseMove(QMouseEvent *);
- void mouseRelease(QMouseEvent *);
+ void mousePress(TQMouseEvent *);
+ void mouseMove(TQMouseEvent *);
+ void mouseRelease(TQMouseEvent *);
- bool startRubberBanding(QMouseEvent*);
- void continueRubberBanding(QMouseEvent *);
- void endRubberBanding(QMouseEvent *);
+ bool startRubberBanding(TQMouseEvent*);
+ void continueRubberBanding(TQMouseEvent *);
+ void endRubberBanding(TQMouseEvent *);
- QPoint m_startPoint, m_releasePoint;
+ TQPoint m_startPoint, m_releasePoint;
// Text Tool Mode
enum
@@ -78,7 +79,7 @@ class KIVIO_EXPORT TextTool : public Kivio::MouseTool
private:
// Flag to indicate that we are drawing a rubber band
int m_mode;
- QCursor* m_pTextCursor;
+ TQCursor* m_pTextCursor;
Kivio::MouseToolAction* m_textAction;
bool m_permanent;
};