summaryrefslogtreecommitdiffstats
path: root/karbon/tools/vtexttool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'karbon/tools/vtexttool.cc')
-rw-r--r--karbon/tools/vtexttool.cc258
1 files changed, 129 insertions, 129 deletions
diff --git a/karbon/tools/vtexttool.cc b/karbon/tools/vtexttool.cc
index 1d59ebda..259f7c62 100644
--- a/karbon/tools/vtexttool.cc
+++ b/karbon/tools/vtexttool.cc
@@ -19,16 +19,16 @@
#include <math.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <kfontcombo.h>
@@ -68,13 +68,13 @@ traceShape( VKoPainter* p, int x, int y, int w, int h )
p->lineTo( KoPoint( x , y ) );
}
-ShadowPreview::ShadowPreview( ShadowWidget* parent )
- : QWidget( parent ), m_parent( parent )
+ShadowPreview::ShadowPreview( ShadowWidget* tqparent )
+ : TQWidget( tqparent ), m_parent( tqparent )
{
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMinimumSize( 60, 60 );
- connect( this, SIGNAL( changed( int, int, bool ) ), m_parent, SLOT( setShadowValues( int, int, bool ) ) );
+ connect( this, TQT_SIGNAL( changed( int, int, bool ) ), m_parent, TQT_SLOT( setShadowValues( int, int, bool ) ) );
}
ShadowPreview::~ShadowPreview()
@@ -82,7 +82,7 @@ ShadowPreview::~ShadowPreview()
}
void
-ShadowPreview::mouseReleaseEvent( QMouseEvent* e )
+ShadowPreview::mouseReleaseEvent( TQMouseEvent* e )
{
int dx = e->x() - width() / 2;
int dy = e->y() - height() / 2;
@@ -104,14 +104,14 @@ ShadowPreview::mouseReleaseEvent( QMouseEvent* e )
}
void
-ShadowPreview::paintEvent( QPaintEvent* )
+ShadowPreview::paintEvent( TQPaintEvent* )
{
int w = width() - 4;
int h = height() - 4;
int d = m_parent->shadowDistance();
int a = 360 - m_parent->shadowAngle();
- QPixmap pm( w, h );
+ TQPixmap pm( w, h );
VKoPainter p( &pm, w, h );
VColor color( VColor::rgb );
@@ -173,7 +173,7 @@ ShadowPreview::paintEvent( QPaintEvent* )
p.lineTo( KoPoint( w, h ) );
p.lineTo( KoPoint( w, 0 ) );
p.lineTo( KoPoint( 0, 0 ) );
- VColor c( colorGroup().background() );
+ VColor c( tqcolorGroup().background() );
c.setOpacity( .8 );
p.setBrush( VFill( c ) );
p.fillPath();
@@ -181,56 +181,56 @@ ShadowPreview::paintEvent( QPaintEvent* )
p.end();
- QPainter painter( this );
+ TQPainter painter( this );
painter.drawPixmap( 2, 2, pm );
- painter.setPen( colorGroup().light() );
+ painter.setPen( tqcolorGroup().light() );
painter.moveTo( 1, height() - 1 );
painter.lineTo( 1, 1 );
painter.lineTo( width() - 1, 1 );
painter.lineTo( width() - 1, height() - 1 );
painter.lineTo( 1, height() - 1 );
- painter.setPen( colorGroup().dark() );
+ painter.setPen( tqcolorGroup().dark() );
painter.moveTo( 0, height() - 1 );
painter.lineTo( 0, 0 );
painter.lineTo( width() - 1, 0 );
painter.moveTo( width() - 2, 2 );
painter.lineTo( width() - 2, height() - 2 );
painter.lineTo( 2, height() - 2 );
- painter.setPen( Qt::black );
+ painter.setPen( TQt::black );
painter.drawLine( width() / 2 - 2, height() / 2, width() / 2 + 2, height() / 2 );
painter.drawLine( width() / 2, height() / 2 - 2, width() / 2, height() / 2 + 2 );
}
-ShadowWidget::ShadowWidget( QWidget* parent, const char* name, int angle, int distance, bool translucent )
- : QGroupBox( parent, name )
+ShadowWidget::ShadowWidget( TQWidget* tqparent, const char* name, int angle, int distance, bool translucent )
+ : TQGroupBox( tqparent, name )
{
setTitle( i18n( "Shadow" ) );
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
-
- QGridLayout* layout = new QGridLayout( this );
- layout->addRowSpacing( 0, 12 );
- layout->setMargin( 3 );
- layout->setSpacing( 2 );
- layout->setColStretch( 0, 1 );
- layout->setColStretch( 1, 0 );
- layout->setColStretch( 2, 2 );
- layout->addMultiCellWidget( m_preview = new ShadowPreview( this ), 1, 3, 0, 0 );
- layout->addWidget( new QLabel( i18n( "Angle:" ), this ), 1, 1 );
- layout->addWidget( m_angle = new KIntNumInput( this ), 1, 2 );
- layout->addWidget( new QLabel( i18n( "Distance:" ), this ), 2, 1 );
- layout->addWidget( m_distance = new KIntNumInput( this ), 2, 2 );
- layout->addWidget( m_useShadow = new QCheckBox( i18n( "Shadow" ), this ), 3, 1 );
- layout->addWidget( m_translucent = new QCheckBox( i18n( "Draw translucent shadow" ), this ), 3, 2 );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
+
+ TQGridLayout* tqlayout = new TQGridLayout( this );
+ tqlayout->addRowSpacing( 0, 12 );
+ tqlayout->setMargin( 3 );
+ tqlayout->setSpacing( 2 );
+ tqlayout->setColStretch( 0, 1 );
+ tqlayout->setColStretch( 1, 0 );
+ tqlayout->setColStretch( 2, 2 );
+ tqlayout->addMultiCellWidget( m_preview = new ShadowPreview( this ), 1, 3, 0, 0 );
+ tqlayout->addWidget( new TQLabel( i18n( "Angle:" ), this ), 1, 1 );
+ tqlayout->addWidget( m_angle = new KIntNumInput( this ), 1, 2 );
+ tqlayout->addWidget( new TQLabel( i18n( "Distance:" ), this ), 2, 1 );
+ tqlayout->addWidget( m_distance = new KIntNumInput( this ), 2, 2 );
+ tqlayout->addWidget( m_useShadow = new TQCheckBox( i18n( "Shadow" ), this ), 3, 1 );
+ tqlayout->addWidget( m_translucent = new TQCheckBox( i18n( "Draw translucent shadow" ), this ), 3, 2 );
m_distance->setRange( 1, 37, 1, true );
m_angle->setRange( 0, 360, 10, true );
m_angle->setValue( angle );
m_distance->setValue( distance );
m_translucent->setChecked( translucent );
- connect( m_angle, SIGNAL( valueChanged( int ) ), this, SLOT( updatePreview( int ) ) );
- connect( m_distance, SIGNAL( valueChanged( int ) ), this, SLOT( updatePreview( int ) ) );
- connect( m_useShadow, SIGNAL( clicked() ), this, SLOT( updatePreview() ) );
- connect( m_translucent, SIGNAL( clicked() ), this, SLOT( updatePreview() ) );
+ connect( m_angle, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( updatePreview( int ) ) );
+ connect( m_distance, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( updatePreview( int ) ) );
+ connect( m_useShadow, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updatePreview() ) );
+ connect( m_translucent, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updatePreview() ) );
updatePreview();
}
@@ -255,7 +255,7 @@ void
ShadowWidget::setShadowAngle( int angle )
{
m_angle->setValue( angle );
- m_preview->repaint();
+ m_preview->tqrepaint();
}
int
@@ -268,7 +268,7 @@ void
ShadowWidget::setShadowDistance( int distance )
{
m_distance->setValue( distance );
- m_preview->repaint();
+ m_preview->tqrepaint();
}
int
@@ -281,7 +281,7 @@ void
ShadowWidget::setTranslucent( bool translucent )
{
m_translucent->setChecked( translucent );
- m_preview->repaint();
+ m_preview->tqrepaint();
}
bool ShadowWidget::isTranslucent()
@@ -301,78 +301,78 @@ ShadowWidget::setShadowValues( int angle, int distance, bool translucent )
void
ShadowWidget::updatePreview( int )
{
- m_preview->repaint();
+ m_preview->tqrepaint();
}
void
ShadowWidget::updatePreview()
{
- m_preview->repaint();
+ m_preview->tqrepaint();
bool ok = m_useShadow->isChecked();
m_angle->setEnabled( ok );
m_distance->setEnabled( ok );
m_translucent->setEnabled( ok );
}
-VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, QWidget *parent )
- : KDialogBase( parent, "", true, i18n( "Text" ), Ok | Cancel ), m_tool( tool )
+VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, TQWidget *tqparent )
+ : KDialogBase( tqparent, "", true, i18n( "Text" ), Ok | Cancel ), m_tool( tool )
{
- //setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ //tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
//setFrameStyle( Box | Sunken );
- QWidget *base = new QWidget( this );
- QVBoxLayout* mainLayout = new QVBoxLayout( base );
+ TQWidget *base = new TQWidget( this );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( base );
mainLayout->setMargin( 3 );
- mainLayout->add( m_tabWidget = new QTabWidget( base ) );
+ mainLayout->add( m_tabWidget = new TQTabWidget( base ) );
- m_tabWidget->setFont( QFont( KGlobalSettings::generalFont().family() , 8 ) );
+ m_tabWidget->setFont( TQFont( KGlobalSettings::generalFont().family() , 8 ) );
- QWidget* textWidget = new QWidget( m_tabWidget );
+ TQWidget* textWidget = new TQWidget( m_tabWidget );
- QGridLayout* textLayout = new QGridLayout( textWidget );
+ TQGridLayout* textLayout = new TQGridLayout( textWidget );
- QStringList list;
+ TQStringList list;
KFontChooser::getFontList( list, KFontChooser::SmoothScalableFonts );
textLayout->setMargin( 3 );
textLayout->setSpacing( 2 );
textLayout->addMultiCellWidget( m_fontCombo = new KFontCombo( list, textWidget ), 0, 0, 0, 2 );
textLayout->addWidget( m_fontSize = new KIntNumInput( textWidget ), 1, 0 );
- textLayout->addWidget( m_boldCheck = new QCheckBox( i18n( "Bold" ), textWidget ), 1, 1 );
- textLayout->addWidget( m_italicCheck = new QCheckBox( i18n( "Italic" ), textWidget ), 1, 2 );
- textLayout->addMultiCellWidget( m_textEditor = new QLineEdit( textWidget ), 2, 2, 0, 2 );
+ textLayout->addWidget( m_boldCheck = new TQCheckBox( i18n( "Bold" ), textWidget ), 1, 1 );
+ textLayout->addWidget( m_italicCheck = new TQCheckBox( i18n( "Italic" ), textWidget ), 1, 2 );
+ textLayout->addMultiCellWidget( m_textEditor = new TQLineEdit( textWidget ), 2, 2, 0, 2 );
m_tabWidget->addTab( textWidget, i18n( "Text" ) );
- QWidget* posWidget = new QWidget( m_tabWidget );
+ TQWidget* posWidget = new TQWidget( m_tabWidget );
- QGridLayout* posLayout = new QGridLayout( posWidget );
+ TQGridLayout* posLayout = new TQGridLayout( posWidget );
textLayout->setMargin( 3 );
posLayout->setSpacing( 2 );
- posLayout->addWidget( new QLabel( i18n( "Alignment:" ), posWidget ), 0, 0 );
- posLayout->addWidget( m_textAlignment = new QComboBox( posWidget ), 0, 1 );
- posLayout->addWidget( new QLabel( i18n( "Position:" ), posWidget ), 1, 0 );
- posLayout->addWidget( m_textPosition = new QComboBox( posWidget ), 1, 1 );
- posLayout->addWidget( new QLabel( i18n( "Offset:" ), posWidget ), 2, 0 );
+ posLayout->addWidget( new TQLabel( i18n( "Alignment:" ), posWidget ), 0, 0 );
+ posLayout->addWidget( m_textAlignment = new TQComboBox( posWidget ), 0, 1 );
+ posLayout->addWidget( new TQLabel( i18n( "Position:" ), posWidget ), 1, 0 );
+ posLayout->addWidget( m_textPosition = new TQComboBox( posWidget ), 1, 1 );
+ posLayout->addWidget( new TQLabel( i18n( "Offset:" ), posWidget ), 2, 0 );
posLayout->addWidget( m_textOffset = new KDoubleNumInput( posWidget ), 2, 1 );
posLayout->setColStretch( 0, 0 );
posLayout->setColStretch( 1, 1 );
m_tabWidget->addTab( posWidget, i18n( "Position" ) );
- QWidget* fxWidget = new QWidget( m_tabWidget );
+ TQWidget* fxWidget = new TQWidget( m_tabWidget );
- QVBoxLayout* fxLayout = new QVBoxLayout( fxWidget );
+ TQVBoxLayout* fxLayout = new TQVBoxLayout( fxWidget );
fxLayout->setMargin( 3 );
fxLayout->setSpacing( 2 );
fxLayout->add( m_shadow = new ShadowWidget( fxWidget, 0L, 315, 4, true ) );
- QHBoxLayout* fxLayout2 = new QHBoxLayout( fxLayout );
+ TQHBoxLayout* fxLayout2 = new TQHBoxLayout( fxLayout );
fxLayout2->setSpacing( 2 );
- fxLayout2->addWidget( m_editBasePath = new QPushButton( i18n( "Edit Base Path" ), fxWidget ) );
- fxLayout2->addWidget( m_convertToShapes = new QPushButton( i18n( "Convert to Shapes" ), fxWidget ) );
+ fxLayout2->addWidget( m_editBasePath = new TQPushButton( i18n( "Edit Base Path" ), fxWidget ) );
+ fxLayout2->addWidget( m_convertToShapes = new TQPushButton( i18n( "Convert to Shapes" ), fxWidget ) );
m_tabWidget->addTab( fxWidget, i18n( "Effects" ) );
@@ -387,28 +387,28 @@ VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, QWidget *parent )
m_convertToShapes->setEnabled( true );
- m_textAlignment->insertItem( i18n( "Horizontal alignment", "Left") );
- m_textAlignment->insertItem( i18n( "Horizontal alignment", "Center") );
- m_textAlignment->insertItem( i18n( "Horizontal alignment", "Right") );
+ m_textAlignment->insertItem( i18n( "Horizontal tqalignment", "Left") );
+ m_textAlignment->insertItem( i18n( "Horizontal tqalignment", "Center") );
+ m_textAlignment->insertItem( i18n( "Horizontal tqalignment", "Right") );
- m_textPosition->insertItem( i18n( "Vertical alignment", "Above") );
- m_textPosition->insertItem( i18n( "Vertical alignment", "On") );
- m_textPosition->insertItem( i18n( "Vertical alignment", "Under") );
+ m_textPosition->insertItem( i18n( "Vertical tqalignment", "Above") );
+ m_textPosition->insertItem( i18n( "Vertical tqalignment", "On") );
+ m_textPosition->insertItem( i18n( "Vertical tqalignment", "Under") );
m_textOffset->setRange( 0.0, 100.0, 1.0, true );
- connect( m_fontCombo, SIGNAL( activated( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_boldCheck, SIGNAL( stateChanged( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_italicCheck, SIGNAL( stateChanged( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_fontSize, SIGNAL( valueChanged( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_textPosition, SIGNAL( activated( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_textAlignment, SIGNAL( activated( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_textOffset, SIGNAL( valueChanged( double ) ), this, SLOT( valueChanged( double ) ) );
- connect( m_textEditor, SIGNAL( returnPressed() ), this, SLOT( accept() ) );
- connect( m_textEditor, SIGNAL( textChanged( const QString& ) ), this, SLOT( textChanged( const QString& ) ) );
- connect( m_editBasePath, SIGNAL( clicked() ), this, SLOT( editBasePath() ) );
- connect( m_convertToShapes, SIGNAL( clicked() ), this, SLOT( convertToShapes() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( cancel() ) );
+ connect( m_fontCombo, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_boldCheck, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_italicCheck, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_fontSize, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_textPosition, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_textAlignment, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_textOffset, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( valueChanged( double ) ) );
+ connect( m_textEditor, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( accept() ) );
+ connect( m_textEditor, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( textChanged( const TQString& ) ) );
+ connect( m_editBasePath, TQT_SIGNAL( clicked() ), this, TQT_SLOT( editBasePath() ) );
+ connect( m_convertToShapes, TQT_SIGNAL( clicked() ), this, TQT_SLOT( convertToShapes() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( cancel() ) );
setMainWidget( base );
setFixedSize( baseSize() );
@@ -424,7 +424,7 @@ VTextOptionsWidget::valueChanged( int )
m_fontCombo->setBold( m_boldCheck->isChecked() );
m_fontCombo->setItalic( m_italicCheck->isChecked() );
- m_textEditor->setFont( QFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
+ m_textEditor->setFont( TQFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
if( m_tool && isVisible() )
m_tool->textChanged();
@@ -453,7 +453,7 @@ VTextOptionsWidget::cancel()
}
void
-VTextOptionsWidget::textChanged( const QString& )
+VTextOptionsWidget::textChanged( const TQString& )
{
if( m_tool && isVisible() )
m_tool->textChanged();
@@ -474,7 +474,7 @@ VTextOptionsWidget::convertToShapes()
}
void
-VTextOptionsWidget::setFont( const QFont& font )
+VTextOptionsWidget::setFont( const TQFont& font )
{
m_fontCombo->setCurrentText( font.family() );
@@ -487,21 +487,21 @@ VTextOptionsWidget::setFont( const QFont& font )
m_fontCombo->setBold( m_boldCheck->isChecked() );
m_fontCombo->setItalic( m_italicCheck->isChecked() );
- m_textEditor->setFont( QFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
+ m_textEditor->setFont( TQFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
}
-QFont VTextOptionsWidget::font()
+TQFont VTextOptionsWidget::font()
{
- return QFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() );
+ return TQFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() );
}
void
-VTextOptionsWidget::setText( const QString& text )
+VTextOptionsWidget::setText( const TQString& text )
{
m_textEditor->setText( text );
}
-QString VTextOptionsWidget::text()
+TQString VTextOptionsWidget::text()
{
return m_textEditor->text();
}
@@ -518,12 +518,12 @@ VText::Position VTextOptionsWidget::position()
}
void
-VTextOptionsWidget::setAlignment( VText::Alignment alignment )
+VTextOptionsWidget::tqsetAlignment( VText::Alignment tqalignment )
{
- m_textAlignment->setCurrentItem( alignment );
+ m_textAlignment->setCurrentItem( tqalignment );
}
-VText::Alignment VTextOptionsWidget::alignment()
+VText::Alignment VTextOptionsWidget::tqalignment()
{
return ( VText::Alignment ) m_textAlignment->currentItem();
}
@@ -590,7 +590,7 @@ VTextTool::VTextTool( KarbonView *view )
m_text = 0L;
m_editedText = 0L;
registerTool( this );
- m_cursor = new QCursor( VCursor::createCursor( VCursor::CrossHair ) );
+ m_cursor = new TQCursor( VCursor::createCursor( VCursor::CrossHair ) );
}
VTextTool::~VTextTool()
@@ -600,9 +600,9 @@ VTextTool::~VTextTool()
delete m_cursor;
}
-QString VTextTool::contextHelp()
+TQString VTextTool::contextHelp()
{
- QString s = i18n( "<qt><b>Text Tool</b><br>" );
+ TQString s = i18n( "<qt><b>Text Tool</b><br>" );
s += i18n("<i>Click</i> on document to place horizontal text.<br>" );
s += i18n("<i>Click and drag</i> in document to place directional text.<br>" );
s += i18n("<i>Click</i> on a selected path object to place text along its outline.<br>" );
@@ -643,10 +643,10 @@ VTextTool::drawPathCreation()
painter->setZoomFactor( view()->zoom() );
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
painter->newPath();
- painter->setPen( Qt::DotLine );
- painter->setBrush( Qt::NoBrush );
+ painter->setPen( TQt::DotLine );
+ painter->setBrush( TQt::NoBrush );
painter->moveTo( first() );
painter->lineTo( m_last );
@@ -657,7 +657,7 @@ void
VTextTool::drawEditedText()
{
if( m_editedText )
- view()->repaintAll( m_editedText->boundingBox() );
+ view()->tqrepaintAll( m_editedText->boundingBox() );
}
void
@@ -678,7 +678,7 @@ VTextTool::mouseButtonRelease()
VObject* selObj = selection->objects().getFirst();
// initialize dialog with single selected object
- if( selection->objects().count() == 1 && selObj->boundingBox().contains( last() ) )
+ if( selection->objects().count() == 1 && selObj->boundingBox().tqcontains( last() ) )
m_optionsWidget->initialize( *selObj );
else
{
@@ -691,7 +691,7 @@ VTextTool::mouseButtonRelease()
return;
}
- if( dynamic_cast<VText*>( selObj ) && selObj->boundingBox().contains( last() ) )
+ if( dynamic_cast<VText*>( selObj ) && selObj->boundingBox().tqcontains( last() ) )
m_optionsWidget->setCaption( i18n( "Change Text") );
else
m_optionsWidget->setCaption( i18n( "Insert Text") );
@@ -768,7 +768,7 @@ VTextTool::createText( VSubpath &path )
m_text = 0L;
delete m_editedText;
- m_editedText = new VText( m_optionsWidget->font(), path, m_optionsWidget->position(), m_optionsWidget->alignment(), m_optionsWidget->text() );
+ m_editedText = new VText( m_optionsWidget->font(), path, m_optionsWidget->position(), m_optionsWidget->tqalignment(), m_optionsWidget->text() );
if( ! m_editedText )
return false;
@@ -795,15 +795,15 @@ VTextTool::textChanged()
{
// hide the original text if we are changing it
m_text->setState( VObject::hidden );
- view()->repaintAll( m_text->boundingBox() );
+ view()->tqrepaintAll( m_text->boundingBox() );
}
else
- view()->repaintAll( m_editedText->boundingBox() );
+ view()->tqrepaintAll( m_editedText->boundingBox() );
m_editedText->setText( m_optionsWidget->text() );
m_editedText->setFont( m_optionsWidget->font() );
m_editedText->setPosition( m_optionsWidget->position() );
- m_editedText->setAlignment( m_optionsWidget->alignment() );
+ m_editedText->tqsetAlignment( m_optionsWidget->tqalignment() );
m_editedText->setOffset( 0.01 * m_optionsWidget->offset() );
#ifdef HAVE_KARBONTEXT
m_editedText->traceText();
@@ -829,7 +829,7 @@ VTextTool::accept()
m_editedText->font(),
m_editedText->basePath(),
m_editedText->position(),
- m_editedText->alignment(),
+ m_editedText->tqalignment(),
m_editedText->offset(),
m_editedText->text(),
m_optionsWidget->useShadow(),
@@ -853,7 +853,7 @@ VTextTool::accept()
}
view()->part()->addCommand( cmd, true );
- view()->part()->repaintAllViews();
+ view()->part()->tqrepaintAllViews();
m_creating = false;
}
@@ -864,7 +864,7 @@ VTextTool::cancel()
{
// show original text if we canceled changing it
m_text->setState( VObject::selected );
- view()->repaintAll( m_text->boundingBox() );
+ view()->tqrepaintAll( m_text->boundingBox() );
}
else
drawPathCreation();
@@ -881,7 +881,7 @@ VTextTool::editBasePath()
view()->part()->document().selection()->clear();
view()->part()->document().selection()->append( &m_editedText->basePath() );
- view()->part()->repaintAllViews();
+ view()->part()->tqrepaintAllViews();
}
void
@@ -932,7 +932,7 @@ VTextTool::visitVText( VText& text )
m_optionsWidget->setFont( text.font() );
m_optionsWidget->setText( text.text() );
m_optionsWidget->setPosition( text.position() );
- m_optionsWidget->setAlignment( text.alignment() );
+ m_optionsWidget->tqsetAlignment( text.tqalignment() );
m_optionsWidget->setOffset( text.offset() * 100.0 );
m_optionsWidget->setUseShadow( text.useShadow() );
m_optionsWidget->setShadow( text.shadowAngle(), text.shadowDistance(), text.translucentShadow() );
@@ -941,7 +941,7 @@ VTextTool::visitVText( VText& text )
m_editedText->setState( VObject::edit );
}
-VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text )
+VTextTool::VTextCmd::VTextCmd( VDocument* doc, const TQString& name, VText* text )
: VCommand( doc, name, "14_text" ), m_text( text )
{
m_textModifications = 0L;
@@ -949,8 +949,8 @@ VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text
m_executed = false;
}
-VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text,
- const QFont &newFont, const VSubpath& newBasePath, VText::Position newPosition, VText::Alignment newAlignment, double newOffset, const QString& newText,
+VTextTool::VTextCmd::VTextCmd( VDocument* doc, const TQString& name, VText* text,
+ const TQFont &newFont, const VSubpath& newBasePath, VText::Position newPosition, VText::Alignment newAlignment, double newOffset, const TQString& newText,
bool newUseShadow, int newShadowAngle, int newShadowDistance, bool newTranslucentShadow )
: VCommand( doc, name, "14_text" ), m_text( text )
{
@@ -962,7 +962,7 @@ VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text,
m_textModifications->newPosition = newPosition;
m_textModifications->oldPosition = text->position();
m_textModifications->newAlignment = newAlignment;
- m_textModifications->oldAlignment = text->alignment();
+ m_textModifications->oldAlignment = text->tqalignment();
m_textModifications->newOffset = newOffset;
m_textModifications->oldOffset = text->offset();
m_textModifications->newText = newText;
@@ -1007,7 +1007,7 @@ VTextTool::VTextCmd::execute()
m_text->setFont( m_textModifications->newFont );
m_text->setBasePath( m_textModifications->newBasePath );
m_text->setPosition( m_textModifications->newPosition );
- m_text->setAlignment( m_textModifications->newAlignment );
+ m_text->tqsetAlignment( m_textModifications->newAlignment );
m_text->setOffset( m_textModifications->newOffset );
m_text->setText( m_textModifications->newText );
m_text->setUseShadow( m_textModifications->newUseShadow );
@@ -1041,7 +1041,7 @@ VTextTool::VTextCmd::unexecute()
m_text->setFont( m_textModifications->oldFont );
m_text->setBasePath( m_textModifications->oldBasePath );
m_text->setPosition( m_textModifications->oldPosition );
- m_text->setAlignment( m_textModifications->oldAlignment );
+ m_text->tqsetAlignment( m_textModifications->oldAlignment );
m_text->setOffset( m_textModifications->oldOffset );
m_text->setText( m_textModifications->oldText );
m_text->setUseShadow( m_textModifications->oldUseShadow );
@@ -1059,7 +1059,7 @@ VTextTool::VTextCmd::unexecute()
setSuccess( false );
}
-VTextTool::VTextToCompositeCmd::VTextToCompositeCmd( VDocument* doc, const QString& name, VText* text )
+VTextTool::VTextToCompositeCmd::VTextToCompositeCmd( VDocument* doc, const TQString& name, VText* text )
: VCommand( doc, name, "14_text" ), m_text( text ), m_group( 0L ), m_executed( false )
{
}
@@ -1148,7 +1148,7 @@ VTextTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Text Tool" ), "14_text", Qt::SHIFT+Qt::Key_T, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Text Tool" ), "14_text", TQt::SHIFT+TQt::Key_T, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Text Tool" ) );
m_action->setExclusiveGroup( "misc" );
//m_ownAction = true;