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.cc84
1 files changed, 42 insertions, 42 deletions
diff --git a/karbon/tools/vtexttool.cc b/karbon/tools/vtexttool.cc
index 29293e8b..a3500160 100644
--- a/karbon/tools/vtexttool.cc
+++ b/karbon/tools/vtexttool.cc
@@ -23,7 +23,7 @@
#include <tqcombobox.h>
#include <tqcursor.h>
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlineedit.h>
#include <tqpainter.h>
#include <tqpixmap.h>
@@ -173,7 +173,7 @@ ShadowPreview::paintEvent( TQPaintEvent* )
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();
@@ -183,13 +183,13 @@ ShadowPreview::paintEvent( TQPaintEvent* )
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 );
@@ -205,22 +205,22 @@ ShadowWidget::ShadowWidget( TQWidget* parent, const char* name, int angle, int d
: TQGroupBox( parent, name )
{
setTitle( i18n( "Shadow" ) );
- setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
-
- TQGridLayout* layout = new TQGridLayout( 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 TQLabel( i18n( "Angle:" ), this ), 1, 1 );
- layout->addWidget( m_angle = new KIntNumInput( this ), 1, 2 );
- layout->addWidget( new TQLabel( i18n( "Distance:" ), this ), 2, 1 );
- layout->addWidget( m_distance = new KIntNumInput( this ), 2, 2 );
- layout->addWidget( m_useShadow = new TQCheckBox( i18n( "Shadow" ), this ), 3, 1 );
- layout->addWidget( m_translucent = new TQCheckBox( 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 );
@@ -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,13 +301,13 @@ 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 );
@@ -317,7 +317,7 @@ ShadowWidget::updatePreview()
VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, TQWidget *parent )
: KDialogBase( parent, "", true, i18n( "Text" ), Ok | Cancel ), m_tool( tool )
{
- //setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
+ //tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
//setFrameStyle( Box | Sunken );
TQWidget *base = new TQWidget( this );
TQVBoxLayout* mainLayout = new TQVBoxLayout( base );
@@ -387,13 +387,13 @@ VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, TQWidget *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 );
@@ -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();
}
@@ -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;
@@ -803,7 +803,7 @@ VTextTool::textChanged()
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(),
@@ -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() );
@@ -962,7 +962,7 @@ VTextTool::VTextCmd::VTextCmd( VDocument* doc, const TQString& 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 );