summaryrefslogtreecommitdiffstats
path: root/karbon/widgets
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /karbon/widgets
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'karbon/widgets')
-rw-r--r--karbon/widgets/vcanvas.cc6
-rw-r--r--karbon/widgets/vcolorslider.cc12
-rw-r--r--karbon/widgets/vgradienttabwidget.cc10
-rw-r--r--karbon/widgets/vgradientwidget.cc10
-rw-r--r--karbon/widgets/vreference.cc8
-rw-r--r--karbon/widgets/vruler.cc12
-rw-r--r--karbon/widgets/vsmallpreview.cc16
-rw-r--r--karbon/widgets/vstrokefillpreview.cc2
-rw-r--r--karbon/widgets/vstrokefillpreview.h4
-rw-r--r--karbon/widgets/vtranslate.cc40
10 files changed, 60 insertions, 60 deletions
diff --git a/karbon/widgets/vcanvas.cc b/karbon/widgets/vcanvas.cc
index d96018b9..9fa5dcd6 100644
--- a/karbon/widgets/vcanvas.cc
+++ b/karbon/widgets/vcanvas.cc
@@ -152,7 +152,7 @@ VCanvas::eventFilter( TQObject* object, TQEvent* event )
}
-// This causes a tqrepaint normally, so just overwriting it omits the repainting
+// This causes a repaint normally, so just overwriting it omits the repainting
void
VCanvas::focusInEvent( TQFocusEvent * )
{
@@ -228,7 +228,7 @@ VCanvas::viewportPaintEvent( TQPaintEvent *e )
setYMirroring( p );
// TRICK : slightly adjust the matrix so libart AA looks better
- TQWMatrix mat = p->tqworldMatrix();
+ TQWMatrix mat = p->worldMatrix();
p->setWorldMatrix( mat.translate( -.5, -.5 ) );
// set up clippath
@@ -305,7 +305,7 @@ VCanvas::drawDocument( TQPainter* /*painter*/, const KoRect&, bool drawVObjects
p->setZoomFactor( m_view->zoom() );
setYMirroring( p );
// TRICK : slightly adjust the matrix so libart AA looks better
- TQWMatrix mat = p->tqworldMatrix();
+ TQWMatrix mat = p->worldMatrix();
p->setWorldMatrix( mat.translate( -.5, -.5 ) );
m_part->document().drawPage( p, m_part->pageLayout(), m_view->showPageMargins() );
diff --git a/karbon/widgets/vcolorslider.cc b/karbon/widgets/vcolorslider.cc
index 3e2af4f0..6c32465e 100644
--- a/karbon/widgets/vcolorslider.cc
+++ b/karbon/widgets/vcolorslider.cc
@@ -20,7 +20,7 @@
/* vcolorslider.cc */
-#include <tqlayout.h>
+#include <layout.h>
#include <tqlabel.h>
#include <knuminput.h>
#include <kselect.h>
@@ -53,15 +53,15 @@ VColorSlider::~VColorSlider()
void VColorSlider::init()
{
m_isDragging = false;
- TQHBoxLayout *tqlayout = new TQHBoxLayout( this, 3 );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 3 );
m_label = new TQLabel( this );
m_gradientSelect = new KGradientSelector( Qt::Horizontal, this );
m_spinBox = new KIntSpinBox( this );
- tqlayout->addWidget( m_label );
- tqlayout->addWidget( m_gradientSelect, 2 );
- tqlayout->addWidget( m_spinBox );
+ layout->addWidget( m_label );
+ layout->addWidget( m_gradientSelect, 2 );
+ layout->addWidget( m_spinBox );
setValue( 0 );
setMinValue( 0 );
@@ -72,7 +72,7 @@ void VColorSlider::init()
m_gradientSelect->installEventFilter( this );
- tqlayout->activate();
+ layout->activate();
}
void VColorSlider::setLabel( const TQString& label )
diff --git a/karbon/widgets/vgradienttabwidget.cc b/karbon/widgets/vgradienttabwidget.cc
index f65cfd74..0dd365f1 100644
--- a/karbon/widgets/vgradienttabwidget.cc
+++ b/karbon/widgets/vgradienttabwidget.cc
@@ -19,7 +19,7 @@
#include <tqlabel.h>
#include <tqpainter.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqgroupbox.h>
#include <tqpushbutton.h>
#include <tqfileinfo.h>
@@ -93,9 +93,9 @@ void VGradientListItem::paint( TQPainter* painter )
painter->drawPixmap( 0, 0, m_pixmap );
painter->restore();
if ( isSelected() )
- painter->setPen( listBox()->tqcolorGroup().highlightedText() );
+ painter->setPen( listBox()->colorGroup().highlightedText() );
else
- painter->setPen( listBox()->tqcolorGroup().base() );
+ painter->setPen( listBox()->colorGroup().base() );
painter->drawRect( r );
painter->flush();
} // VGradientListItem::paint
@@ -151,13 +151,13 @@ void VGradientPreview::paintEvent( TQPaintEvent* )
TQPainter p( &pixmap );
- p.setPen( tqcolorGroup().light() );
+ p.setPen( colorGroup().light() );
p.moveTo( 1, height() - 1 );
p.lineTo( 1, 1 );
p.lineTo( width() - 1, 1 );
p.lineTo( width() - 1, height() - 1 );
p.lineTo( 1, height() - 1 );
- p.setPen( tqcolorGroup().dark() );
+ p.setPen( colorGroup().dark() );
p.moveTo( 0, height() - 1 );
p.lineTo( 0, 0 );
p.lineTo( width() - 1, 0 );
diff --git a/karbon/widgets/vgradientwidget.cc b/karbon/widgets/vgradientwidget.cc
index f1c55ea1..7e9ecd75 100644
--- a/karbon/widgets/vgradientwidget.cc
+++ b/karbon/widgets/vgradientwidget.cc
@@ -117,7 +117,7 @@ void VGradientWidget::paintEvent( TQPaintEvent* )
TQPainter p( &pixmap );
- p.setPen( tqcolorGroup().light() );
+ p.setPen( colorGroup().light() );
// light frame around widget
p.moveTo( 1, height() - 1 );
p.lineTo( 1, 1 );
@@ -129,7 +129,7 @@ void VGradientWidget::paintEvent( TQPaintEvent* )
p.moveTo( 1, 3 + gh );
p.lineTo( width() - 1, 3 + gh );
- p.setPen( tqcolorGroup().dark() );
+ p.setPen( colorGroup().dark() );
// left-top frame around widget
p.moveTo( 0, height() - 1 );
p.lineTo( 0, 0 );
@@ -151,7 +151,7 @@ void VGradientWidget::paintEvent( TQPaintEvent* )
m_pntArea.setRect( 2, height() - ph - 2, w, ph );
// clear point area
- p.fillRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height(), tqcolorGroup().background() );
+ p.fillRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height(), colorGroup().background() );
p.setClipRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height() );
p.translate( m_pntArea.x(), m_pntArea.y() );
@@ -244,7 +244,7 @@ void VGradientWidget::mouseDoubleClickEvent( TQMouseEvent* e )
if( currentPoint % 2 == 1 )
{
// ramp point hit -> change color
- VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( currentPoint / 2 )->color, this->tqtopLevelWidget() );
+ VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( currentPoint / 2 )->color, this->topLevelWidget() );
if( d->exec() == TQDialog::Accepted )
{
m_gradient->m_colorStops.at( currentPoint / 2 )->color = d->Color();
@@ -256,7 +256,7 @@ void VGradientWidget::mouseDoubleClickEvent( TQMouseEvent* e )
else if( currentPoint == 0 )
{
// now point hit -> create new color stop
- VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( 0 )->color, this->tqtopLevelWidget() );
+ VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( 0 )->color, this->topLevelWidget() );
if( d->exec() == TQDialog::Accepted )
{
m_gradient->addStop( d->Color(), (float)( e->x() - 2 ) / ( m_pntArea.width() ), 0.5 );
diff --git a/karbon/widgets/vreference.cc b/karbon/widgets/vreference.cc
index f400fc13..0040c3ef 100644
--- a/karbon/widgets/vreference.cc
+++ b/karbon/widgets/vreference.cc
@@ -21,14 +21,14 @@
/* vreference.cc */
#include <tqbuttongroup.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqradiobutton.h>
#include "vreference.h"
VReference::VReference( TQWidget *parent, const char *name ) : TQFrame ( parent, name )
{
- TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
mButtonGroup = new TQButtonGroup (3,Qt::Vertical, this );
TQRadioButton* radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, TopLeft );
@@ -54,8 +54,8 @@ VReference::VReference( TQWidget *parent, const char *name ) : TQFrame ( parent,
this, TQT_SLOT( setReferencePoint( int ) ) );
mButtonGroup->setButton( Center );
- tqlayout->addWidget( mButtonGroup );
- tqlayout->activate();
+ layout->addWidget( mButtonGroup );
+ layout->activate();
setReferencePoint( Center );
}
diff --git a/karbon/widgets/vruler.cc b/karbon/widgets/vruler.cc
index de03eb23..28b7db9f 100644
--- a/karbon/widgets/vruler.cc
+++ b/karbon/widgets/vruler.cc
@@ -114,7 +114,7 @@ void VRuler::setUnit(KoUnit::Unit u)
m_unit = u;
drawRuler();
updatePointer(m_currentPosition, m_currentPosition);
- tqrepaint();
+ repaint();
}
void VRuler::setZoom(double zoom)
@@ -123,7 +123,7 @@ void VRuler::setZoom(double zoom)
recalculateSize();
drawRuler();
updatePointer(m_currentPosition, m_currentPosition);
- tqrepaint();
+ repaint();
}
void VRuler::updatePointer(TQ_INT32 x, TQ_INT32 y)
@@ -131,7 +131,7 @@ void VRuler::updatePointer(TQ_INT32 x, TQ_INT32 y)
if (m_pixmapBuffer) {
if (m_orientation == Qt::Horizontal) {
if (m_currentPosition != -1)
- tqrepaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT);
+ repaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT);
if (x != -1) {
bitBlt(this, x, 1, &m_pixmapMarker, 0, 0, MARKER_WIDTH, MARKER_HEIGHT);
@@ -139,7 +139,7 @@ void VRuler::updatePointer(TQ_INT32 x, TQ_INT32 y)
}
} else {
if (m_currentPosition != -1)
- tqrepaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH);
+ repaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH);
if (y != -1) {
bitBlt(this, 1, y, &m_pixmapMarker, 0, 0, MARKER_HEIGHT, MARKER_WIDTH);
@@ -158,7 +158,7 @@ void VRuler::updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos)
//kdDebug() << "--###-- VRuler::updateVisibleArea(" << xpos << ", " << ypos << ")" << endl;
drawRuler();
- tqrepaint();
+ repaint();
updatePointer(m_currentPosition, m_currentPosition);
//kdDebug() << "--###-- VRuler::updatePointer(" << m_currentPosition << ", " << m_currentPosition << ")" << endl;
}
@@ -188,7 +188,7 @@ void VRuler::drawRuler()
p.begin(m_pixmapBuffer);
p.setPen(TQColor(0x70, 0x70, 0x70));
- p.setBackgroundColor(tqcolorGroup().background());
+ p.setBackgroundColor(colorGroup().background());
p.eraseRect(0, 0, m_pixmapBuffer -> width(), m_pixmapBuffer -> height());
switch (m_unit) {
diff --git a/karbon/widgets/vsmallpreview.cc b/karbon/widgets/vsmallpreview.cc
index 6e35d921..1cd6af0e 100644
--- a/karbon/widgets/vsmallpreview.cc
+++ b/karbon/widgets/vsmallpreview.cc
@@ -22,7 +22,7 @@
#include <tqcolor.h>
#include <tqframe.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpixmap.h>
#include <klocale.h>
@@ -42,21 +42,21 @@
VSmallPreview::VSmallPreview( TQWidget* parent, const char* name )
: TQWidget( parent, name )
{
- /* Create widget tqlayout */
- TQHBoxLayout *tqlayout = new TQHBoxLayout( this, 4 );
+ /* Create widget layout */
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 4 );
m_strokeLabel = new TQLabel( i18n( "Stroke: None" ), this );
- tqlayout->addWidget( m_strokeLabel );
+ layout->addWidget( m_strokeLabel );
m_strokeFrame = new TQFrame( this );
m_strokeFrame->setFixedWidth ( FRAMEWIDTH );
m_strokeFrame->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
- tqlayout->addWidget( m_strokeFrame );
+ layout->addWidget( m_strokeFrame );
m_fillLabel = new TQLabel( i18n( "Fill: None" ), this );
- tqlayout->addWidget( m_fillLabel );
+ layout->addWidget( m_fillLabel );
m_fillFrame = new TQFrame( this );
m_fillFrame->setFixedWidth ( FRAMEWIDTH );
m_fillFrame->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
- tqlayout->addWidget( m_fillFrame );
- tqlayout->activate();
+ layout->addWidget( m_fillFrame );
+ layout->activate();
m_fill = VFill();
m_stroke = VStroke();
diff --git a/karbon/widgets/vstrokefillpreview.cc b/karbon/widgets/vstrokefillpreview.cc
index 473ce4db..f69d5d85 100644
--- a/karbon/widgets/vstrokefillpreview.cc
+++ b/karbon/widgets/vstrokefillpreview.cc
@@ -195,7 +195,7 @@ VStrokeFillPreview::update( const VStroke &s, const VFill &f )
m_painter->end();
- tqrepaint();
+ repaint();
}
void
diff --git a/karbon/widgets/vstrokefillpreview.h b/karbon/widgets/vstrokefillpreview.h
index 1790c9c9..53234b09 100644
--- a/karbon/widgets/vstrokefillpreview.h
+++ b/karbon/widgets/vstrokefillpreview.h
@@ -37,9 +37,9 @@ public:
VStrokeFillPreview( KarbonPart *part, TQWidget* parent = 0L, const char* name = 0L );
~VStrokeFillPreview();
- virtual TQSize tqsizeHint() const
+ virtual TQSize sizeHint() const
{ return TQSize( 50, 50 ); }
- virtual TQSize tqminimumSizeHint() const
+ virtual TQSize minimumSizeHint() const
{ return TQSize( 20, 20 ); }
virtual TQSizePolicy sizePolicy() const
{ return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); }
diff --git a/karbon/widgets/vtranslate.cc b/karbon/widgets/vtranslate.cc
index e13da689..faa4d837 100644
--- a/karbon/widgets/vtranslate.cc
+++ b/karbon/widgets/vtranslate.cc
@@ -20,7 +20,7 @@
#include <tqcheckbox.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqstring.h>
#include <klocale.h>
#include <knuminput.h>
@@ -34,38 +34,38 @@ VTranslate::VTranslate( TQWidget* parent, const char* name )
{
setCaption( i18n( "Translate" ) );
- TQVBoxLayout *maintqlayout = new TQVBoxLayout(this, 7);
- maintqlayout->addSpacing(5);
+ TQVBoxLayout *mainlayout = new TQVBoxLayout(this, 7);
+ mainlayout->addSpacing(5);
- TQGridLayout *inputtqlayout = new TQGridLayout(this, 5, 3);
- maintqlayout->addLayout(inputtqlayout);
+ TQGridLayout *inputlayout = new TQGridLayout(this, 5, 3);
+ mainlayout->addLayout(inputlayout);
m_labelX = new TQLabel(i18n("X:"), this);
- inputtqlayout->addWidget(m_labelX, 0, 0);
+ inputlayout->addWidget(m_labelX, 0, 0);
labely = new TQLabel(i18n("Y:"), this);
- inputtqlayout->addWidget(labely, 1, 0);
- inputtqlayout->addColSpacing(1, 1);
- inputtqlayout->addColSpacing(3, 5);
+ inputlayout->addWidget(labely, 1, 0);
+ inputlayout->addColSpacing(1, 1);
+ inputlayout->addColSpacing(3, 5);
m_inputX = new KDoubleNumInput( this );
m_inputX->setRange(-10000.00, 10000.00, 1.00, false); //range is just for example - for now :-)
- inputtqlayout->addWidget(m_inputX, 0, 2);
+ inputlayout->addWidget(m_inputX, 0, 2);
m_inputY = new KDoubleNumInput( this );
m_inputY->setRange(-10000.00, 10000.00, 1.00, false);
- inputtqlayout->addWidget(m_inputY, 1, 2);
+ inputlayout->addWidget(m_inputY, 1, 2);
m_labelUnit1 = new TQLabel("", this);
- inputtqlayout->addWidget(m_labelUnit1, 0, 4);
+ inputlayout->addWidget(m_labelUnit1, 0, 4);
m_labelUnit2 = new TQLabel("", this);
- inputtqlayout->addWidget(m_labelUnit2, 1, 4);
- maintqlayout->addSpacing(5);
+ inputlayout->addWidget(m_labelUnit2, 1, 4);
+ mainlayout->addSpacing(5);
m_checkBoxPosition = new TQCheckBox(i18n("Relative &position"), this);
- maintqlayout->addWidget(m_checkBoxPosition);
- maintqlayout->addSpacing(5);
+ mainlayout->addWidget(m_checkBoxPosition);
+ mainlayout->addSpacing(5);
m_buttonDuplicate = new TQPushButton(i18n("&Duplicate"), this);
- maintqlayout->addWidget(m_buttonDuplicate);
- maintqlayout->addSpacing(1);
+ mainlayout->addWidget(m_buttonDuplicate);
+ mainlayout->addSpacing(1);
m_buttonApply = new KPushButton(KStdGuiItem::apply(), this);
- maintqlayout->addWidget(m_buttonApply);
+ mainlayout->addWidget(m_buttonApply);
- maintqlayout->activate();
+ mainlayout->activate();
setFixedSize(baseSize()); //Set the size tp fixed values
}