summaryrefslogtreecommitdiffstats
path: root/kword/KWTableDia.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kword/KWTableDia.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kword/KWTableDia.cpp')
-rw-r--r--kword/KWTableDia.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kword/KWTableDia.cpp b/kword/KWTableDia.cpp
index 28df4ca8..711c76c5 100644
--- a/kword/KWTableDia.cpp
+++ b/kword/KWTableDia.cpp
@@ -31,12 +31,12 @@
#include "KWPage.h"
#include <kcommand.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
#include <klocale.h>
@@ -47,15 +47,15 @@
/* Class: KWTablePreview */
/******************************************************************/
-void KWTablePreview::paintEvent( QPaintEvent * )
+void KWTablePreview::paintEvent( TQPaintEvent * )
{
int wid = ( width() - 10 ) / cols;
int hei = ( height() - 10 ) / rows;
- QPainter p;
+ TQPainter p;
p.begin( this );
- p.setPen( QPen( black ) );
+ p.setPen( TQPen( black ) );
for ( int i = 0; i < rows; i++ )
{
@@ -70,9 +70,9 @@ void KWTablePreview::paintEvent( QPaintEvent * )
/* Class: KWTableDia */
/******************************************************************/
-KWTableDia::KWTableDia( QWidget* parent, const char* name, UseMode _useMode, KWCanvas *_canvas, KWDocument *_doc,
- int rows, int cols, CellSize wid, CellSize hei, bool floating , const QString & _templateName, int format)
- : KDialogBase( Tabbed, i18n("Table Settings"), Ok | Cancel, Ok, parent, name, true)
+KWTableDia::KWTableDia( TQWidget* tqparent, const char* name, UseMode _useMode, KWCanvas *_canvas, KWDocument *_doc,
+ int rows, int cols, CellSize wid, CellSize hei, bool floating , const TQString & _templateName, int format)
+ : KDialogBase( Tabbed, i18n("Table Settings"), Ok | Cancel, Ok, tqparent, name, true)
{
m_useMode = _useMode;
canvas = _canvas;
@@ -81,7 +81,7 @@ KWTableDia::KWTableDia( QWidget* parent, const char* name, UseMode _useMode, KWC
setupTab1( rows, cols, wid, hei, floating );
setupTab2( _templateName,format );
- setInitialSize( QSize(500, 480) );
+ setInitialSize( TQSize(500, 480) );
oldRowCount = rows;
oldColCount = cols;
@@ -98,38 +98,38 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
{
tab1 = addPage( i18n( "Geometry" ) );
- QGridLayout *grid = new QGridLayout( tab1, 9, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( tab1, 9, 2, 0, KDialog::spacingHint() );
- lRows = new QLabel( i18n( "Number of rows:" ), tab1 );
+ lRows = new TQLabel( i18n( "Number of rows:" ), tab1 );
grid->addWidget( lRows, 0, 0 );
- nRows = new QSpinBox( 1, 128, 1, tab1 );
+ nRows = new TQSpinBox( 1, 128, 1, tab1 );
nRows->setValue( rows );
grid->addWidget( nRows, 1, 0 );
- lCols = new QLabel( i18n( "Number of columns:" ), tab1 );
+ lCols = new TQLabel( i18n( "Number of columns:" ), tab1 );
grid->addWidget( lCols, 2, 0 );
- nCols = new QSpinBox( 1, 128, 1, tab1 );
+ nCols = new TQSpinBox( 1, 128, 1, tab1 );
nCols->setValue( cols );
grid->addWidget( nCols, 3, 0 );
#ifdef ALLOW_NON_INLINE_TABLES
if ( m_useMode==NEW )
{
- lHei = new QLabel( i18n( "Cell heights:" ), tab1 );
+ lHei = new TQLabel( i18n( "Cell heights:" ), tab1 );
grid->addWidget( lHei, 4, 0 );
- cHei = new QComboBox( FALSE, tab1 );
+ cHei = new TQComboBox( FALSE, tab1 );
cHei->insertItem( i18n( "Automatic" ) );
cHei->insertItem( i18n( "Manual" ) );
cHei->setCurrentItem( (int)hei );
grid->addWidget( cHei, 5, 0 );
- lWid = new QLabel( i18n( "Cell widths:" ), tab1 );
+ lWid = new TQLabel( i18n( "Cell widths:" ), tab1 );
grid->addWidget( lWid, 6, 0 );
- cWid = new QComboBox( FALSE, tab1 );
+ cWid = new TQComboBox( FALSE, tab1 );
cWid->insertItem( i18n( "Automatic" ) );
cWid->insertItem( i18n( "Manual" ) );
cWid->setCurrentItem( (int)wid );
@@ -149,21 +149,21 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
{
#ifdef ALLOW_NON_INLINE_TABLES
// Checkbox for floating/fixed location. The default is floating (aka inline).
- cbIsFloating = new QCheckBox( i18n( "The table is &inline" ), tab1 );
+ cbIsFloating = new TQCheckBox( i18n( "The table is &inline" ), tab1 );
//cbIsFloating->setEnabled(false);
cbIsFloating->setChecked( floating );
grid->addMultiCellWidget( cbIsFloating, 9, 9, 0, 2 );
- connect( cbIsFloating, SIGNAL( toggled ( bool ) ), this, SLOT( slotInlineTable( bool ) ) );
+ connect( cbIsFloating, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( slotInlineTable( bool ) ) );
#endif
}
else
if (m_useMode==EDIT)
{
- cbReapplyTemplate1 = new QCheckBox( i18n("Reapply template to table"), tab1 );
+ cbReapplyTemplate1 = new TQCheckBox( i18n("Reapply template to table"), tab1 );
grid->addMultiCellWidget( cbReapplyTemplate1, 9, 9, 0, 2);
- connect( cbReapplyTemplate1, SIGNAL( toggled ( bool ) ), this, SLOT( slotSetReapply( bool ) ) );
+ connect( cbReapplyTemplate1, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( slotSetReapply( bool ) ) );
}
grid->addRowSpacing( 0, lRows->height() );
@@ -214,28 +214,28 @@ void KWTableDia::setupTab1( int rows, int cols, CellSize wid, CellSize hei, bool
grid->activate();
- connect( nRows, SIGNAL( valueChanged( int ) ), this, SLOT( rowsChanged( int ) ) );
- connect( nCols, SIGNAL( valueChanged( int ) ), this, SLOT( colsChanged( int ) ) );
+ connect( nRows, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( rowsChanged( int ) ) );
+ connect( nCols, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( colsChanged( int ) ) );
}
-void KWTableDia::setupTab2(const QString & _templateName, int format )
+void KWTableDia::setupTab2(const TQString & _templateName, int format )
{
- QWidget *tab2 = addPage( i18n("Templates"));
+ TQWidget *tab2 = addPage( i18n("Templates"));
- QGridLayout *grid = new QGridLayout( tab2, 2, 1, 0, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( tab2, 2, 1, 0, KDialog::spacingHint() );
tableTemplateSelector = new KWTableTemplateSelector( doc, tab2, _templateName,format );
grid->addWidget(tableTemplateSelector, 0, 0);
if (m_useMode==EDIT)
{
- cbReapplyTemplate2 = new QCheckBox( i18n("Reapply template to table"), tab2 );
+ cbReapplyTemplate2 = new TQCheckBox( i18n("Reapply template to table"), tab2 );
grid->addWidget( cbReapplyTemplate2, 1, 0);
grid->setRowStretch( 0, 1);
grid->setRowStretch( 1, 0);
- connect( cbReapplyTemplate2, SIGNAL( toggled ( bool ) ), this, SLOT( slotSetReapply( bool ) ) );
+ connect( cbReapplyTemplate2, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( slotSetReapply( bool ) ) );
}
grid->activate();
}