diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /karbon/dialogs | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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 'karbon/dialogs')
-rw-r--r-- | karbon/dialogs/vcolordlg.cc | 4 | ||||
-rw-r--r-- | karbon/dialogs/vcolordlg.h | 3 | ||||
-rw-r--r-- | karbon/dialogs/vcolortab.cc | 74 | ||||
-rw-r--r-- | karbon/dialogs/vcolortab.h | 11 | ||||
-rw-r--r-- | karbon/dialogs/vconfiguredlg.cc | 116 | ||||
-rw-r--r-- | karbon/dialogs/vconfiguredlg.h | 39 | ||||
-rw-r--r-- | karbon/dialogs/vstrokedlg.cc | 64 | ||||
-rw-r--r-- | karbon/dialogs/vstrokedlg.h | 15 |
8 files changed, 167 insertions, 159 deletions
diff --git a/karbon/dialogs/vcolordlg.cc b/karbon/dialogs/vcolordlg.cc index 6acefa24..b12d983b 100644 --- a/karbon/dialogs/vcolordlg.cc +++ b/karbon/dialogs/vcolordlg.cc @@ -24,8 +24,8 @@ #include "vcolordlg.h" #include "vcolortab.h" -VColorDlg::VColorDlg( const VColor &c, QWidget* parent, const char* name ) - : KDialogBase ( parent, name, true, i18n( "Uniform Color" ), +VColorDlg::VColorDlg( const VColor &c, TQWidget* tqparent, const char* name ) + : KDialogBase ( tqparent, name, true, i18n( "Uniform Color" ), KDialogBase::Ok | KDialogBase::Cancel ) { m_colortab = new VColorTab( VColor( c ), this, name ); diff --git a/karbon/dialogs/vcolordlg.h b/karbon/dialogs/vcolordlg.h index 820bb1bf..92fc0857 100644 --- a/karbon/dialogs/vcolordlg.h +++ b/karbon/dialogs/vcolordlg.h @@ -30,9 +30,10 @@ class VFill; class VColorDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - VColorDlg( const VColor &c, QWidget* parent = 0L, const char* name = 0L ); + VColorDlg( const VColor &c, TQWidget* tqparent = 0L, const char* name = 0L ); VColor Color(); diff --git a/karbon/dialogs/vcolortab.cc b/karbon/dialogs/vcolortab.cc index 037fdc6e..f66a9ced 100644 --- a/karbon/dialogs/vcolortab.cc +++ b/karbon/dialogs/vcolortab.cc @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kcolordialog.h> #include <klocale.h> @@ -34,67 +34,67 @@ #include <kdebug.h> -VColorTab::VColorTab( const VColor &c, QWidget* parent, const char* name ) - : QTabWidget( parent, name ) +VColorTab::VColorTab( const VColor &c, TQWidget* tqparent, const char* name ) + : TQTabWidget( tqparent, name ) { - QGridLayout *mainLayout; + TQGridLayout *mainLayout; - mRGBWidget = new QWidget( this ); - mainLayout = new QGridLayout( mRGBWidget, 3, 3 ); + mRGBWidget = new TQWidget( this ); + mainLayout = new TQGridLayout( mRGBWidget, 3, 3 ); mColorSelector = new KHSSelector( mRGBWidget ); mColorSelector->setMinimumHeight( 165 ); mColorSelector->setMinimumWidth( 165 ); - connect( mColorSelector, SIGNAL( valueChanged( int, int ) ), this, SLOT( slotHSChanged( int, int ) ) ); + connect( mColorSelector, TQT_SIGNAL( valueChanged( int, int ) ), this, TQT_SLOT( slotHSChanged( int, int ) ) ); mainLayout->addMultiCellWidget(mColorSelector, 0, 2, 0, 0 ); //Selector - mSelector = new KGradientSelector( KSelector::Vertical, mRGBWidget ); - mSelector->setColors( QColor( "white" ), QColor( "black" ) ); + mSelector = new KGradientSelector( Qt::Vertical, mRGBWidget ); + mSelector->setColors( TQColor( "white" ), TQColor( "black" ) ); mSelector->setMinimumWidth( 20 ); - //TODO: Make it autochange color if the solid-filled object is selected (also for QSpinBoxes) - connect( mSelector, SIGNAL( valueChanged( int ) ), this, SLOT( slotVChanged( int ) ) ); + //TODO: Make it autochange color if the solid-filled object is selected (also for TQSpinBoxes) + connect( mSelector, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotVChanged( int ) ) ); mainLayout->addMultiCellWidget( mSelector, 0, 2, 1, 1 ); //Reference - QGroupBox* groupbox = new QGroupBox( 2, Vertical, i18n( "Reference" ), mRGBWidget ); - new QLabel( i18n( "Old:" ), groupbox ); - new QLabel( i18n( "New:" ), groupbox ); + TQGroupBox* groupbox = new TQGroupBox( 2,Qt::Vertical, i18n( "Reference" ), mRGBWidget ); + new TQLabel( i18n( "Old:" ), groupbox ); + new TQLabel( i18n( "New:" ), groupbox ); mOldColor = new KColorPatch( groupbox ); mColorPreview = new KColorPatch( groupbox ); - QColor color( c ); + TQColor color( c ); mOldColor->setColor( color ); mColorPreview->setColor( color ); mainLayout->addWidget( groupbox, 0, 2 ); //Components - QGroupBox* cgroupbox = new QGroupBox( 3, Vertical, i18n( "Components" ), mRGBWidget ); + TQGroupBox* cgroupbox = new TQGroupBox( 3,Qt::Vertical, i18n( "Components" ), mRGBWidget ); //--->RGB - new QLabel( i18n( "R:" ), cgroupbox ); - new QLabel( i18n( "G:" ), cgroupbox ); - new QLabel( i18n( "B:" ), cgroupbox ); + new TQLabel( i18n( "R:" ), cgroupbox ); + new TQLabel( i18n( "G:" ), cgroupbox ); + new TQLabel( i18n( "B:" ), cgroupbox ); mRed = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); mGreen = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); mBlue = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); - connect( mRed, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) ); - connect( mGreen, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) ); - connect( mBlue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) ); + connect( mRed, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) ); + connect( mGreen, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) ); + connect( mBlue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) ); //--->HSV - new QLabel( i18n( "Hue:", "H:" ), cgroupbox ); - new QLabel( i18n( "Saturation:", "S:" ), cgroupbox ); - new QLabel( i18n( "Value:", "V:" ), cgroupbox ); + new TQLabel( i18n( "Hue:", "H:" ), cgroupbox ); + new TQLabel( i18n( "Saturation:", "S:" ), cgroupbox ); + new TQLabel( i18n( "Value:", "V:" ), cgroupbox ); mHue = new KIntSpinBox( 0, 359, 1, 0, 10, cgroupbox ); mSaturation = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); mValue = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox ); - connect( mHue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) ); - connect( mSaturation, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) ); - connect( mValue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) ); + connect( mHue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) ); + connect( mSaturation, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) ); + connect( mValue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) ); mainLayout->addWidget( cgroupbox, 1, 2 ); //--->Opacity - QGroupBox* ogroupBox = new QGroupBox( 1, Vertical, i18n( "Opacity" ), mRGBWidget ); + TQGroupBox* ogroupBox = new TQGroupBox( 1,Qt::Vertical, i18n( "Opacity" ), mRGBWidget ); mOpacity = new KIntNumInput( 100, ogroupBox ); mOpacity->setRange( 0, 100, 1, true ); mOpacity->setValue( int( c.opacity() * 100.0 ) ); @@ -114,7 +114,7 @@ VColorTab::VColorTab( const VColor &c, QWidget* parent, const char* name ) void VColorTab::slotUpdateFromRGBSpinBoxes() { - QColor color( mRed->value(), mGreen->value(), mBlue->value(), QColor::Rgb ); + TQColor color( mRed->value(), mGreen->value(), mBlue->value(), TQColor::Rgb ); mColorPreview->setColor( color ); mColorPreview->update(); @@ -143,7 +143,7 @@ void VColorTab::slotUpdateFromRGBSpinBoxes() void VColorTab::slotUpdateFromHSVSpinBoxes() { - QColor color( mHue->value(), mSaturation->value(), mValue->value(), QColor::Hsv ); + TQColor color( mHue->value(), mSaturation->value(), mValue->value(), TQColor::Hsv ); mColorPreview->setColor( color ); mColorPreview->update(); @@ -181,17 +181,17 @@ VColor VColorTab::Color() void VColorTab::slotHSChanged( int h, int s ) { - //QColor color( mHue->value(), mSaturation->value(), newVal, QColor::Hsv ); + //TQColor color( mHue->value(), mSaturation->value(), newVal, TQColor::Hsv ); mHue->setValue( h ); mSaturation->setValue( s ); - QColor color1( h, s, 255, QColor::Hsv ); - QColor color2( h, s, 0, QColor::Hsv ); + TQColor color1( h, s, 255, TQColor::Hsv ); + TQColor color2( h, s, 0, TQColor::Hsv ); mSelector->setColors( color1, color2 ); } void VColorTab::slotVChanged( int newVal ) { - //QColor color( mHue->value(), mSaturation->value(), newVal, QColor::Hsv ); + //TQColor color( mHue->value(), mSaturation->value(), newVal, TQColor::Hsv ); mValue->setValue( static_cast<int>( float( newVal ) / 99.0 * 255.0 ) ); } diff --git a/karbon/dialogs/vcolortab.h b/karbon/dialogs/vcolortab.h index 18a00f7c..5397cdb8 100644 --- a/karbon/dialogs/vcolortab.h +++ b/karbon/dialogs/vcolortab.h @@ -21,9 +21,9 @@ #ifndef __VCOLORTAB_H #define __VCOLORTAB_H -#include <qtabwidget.h> +#include <tqtabwidget.h> -class QColor; +class TQColor; class KHSSelector; class KIntSpinBox; class KGradientSelector; @@ -31,17 +31,18 @@ class KColorPatch; class KIntNumInput; class VColor; -class VColorTab : public QTabWidget +class VColorTab : public TQTabWidget { Q_OBJECT + TQ_OBJECT public: - VColorTab( const VColor &c, QWidget* parent = 0L, const char* name = 0L ); + VColorTab( const VColor &c, TQWidget* tqparent = 0L, const char* name = 0L ); VColor Color(); private: - QWidget* mRGBWidget; + TQWidget* mRGBWidget; KHSSelector* mColorSelector; KIntSpinBox* mRed; KIntSpinBox* mGreen; diff --git a/karbon/dialogs/vconfiguredlg.cc b/karbon/dialogs/vconfiguredlg.cc index c8439753..bbe6d629 100644 --- a/karbon/dialogs/vconfiguredlg.cc +++ b/karbon/dialogs/vconfiguredlg.cc @@ -19,14 +19,14 @@ #include <float.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qvgroupbox.h> -#include <qcombobox.h> -#include <qgrid.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqvgroupbox.h> +#include <tqcombobox.h> +#include <tqgrid.h> #include <kiconloader.h> #include <kconfig.h> @@ -43,38 +43,38 @@ #include "vconfiguredlg.h" -VConfigureDlg::VConfigureDlg( KarbonView* parent ) +VConfigureDlg::VConfigureDlg( KarbonView* tqparent ) : KDialogBase( KDialogBase::IconList, i18n( "Configure" ), KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Default, - KDialogBase::Ok, parent ) + KDialogBase::Ok, tqparent ) { - QVBox * page = addVBoxPage( + TQVBox * page = addVBoxPage( i18n( "Interface" ), i18n( "Interface" ), BarIcon( "misc", KIcon::SizeMedium ) ); - m_interfacePage = new VConfigInterfacePage( parent, page ); + m_interfacePage = new VConfigInterfacePage( tqparent, page ); page = addVBoxPage( i18n( "Misc" ), i18n( "Misc" ), BarIcon( "misc", KIcon::SizeMedium ) ); - m_miscPage = new VConfigMiscPage( parent, page ); + m_miscPage = new VConfigMiscPage( tqparent, page ); page = addVBoxPage( i18n( "Grid" ), i18n( "Grid" ), BarIcon( "grid", KIcon::SizeMedium ) ); - m_gridPage = new VConfigGridPage( parent, page ); + m_gridPage = new VConfigGridPage( tqparent, page ); - connect( m_miscPage, SIGNAL( unitChanged( int ) ), m_gridPage, SLOT( slotUnitChanged( int ) ) ); + connect( m_miscPage, TQT_SIGNAL( unitChanged( int ) ), m_gridPage, TQT_SLOT( slotUnitChanged( int ) ) ); page = addVBoxPage( i18n( "Document" ), i18n( "Document Settings" ), BarIcon( "document", KIcon::SizeMedium ) ); - m_defaultDocPage = new VConfigDefaultPage( parent, page ); - connect( this, SIGNAL( okClicked() ), this, SLOT( slotApply() ) ); + m_defaultDocPage = new VConfigDefaultPage( tqparent, page ); + connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotApply() ) ); } void VConfigureDlg::slotApply() @@ -104,8 +104,8 @@ void VConfigureDlg::slotDefault() VConfigInterfacePage::VConfigInterfacePage( KarbonView* view, - QVBox* box, char* name ) - : QObject( box->parent(), name ) + TQVBox* box, char* name ) + : TQObject( box->tqparent(), name ) { m_view = view; m_config = KarbonFactory::instance()->config(); @@ -115,7 +115,7 @@ VConfigInterfacePage::VConfigInterfacePage( KarbonView* view, m_oldDockerFontSize = 8; bool oldShowStatusBar = true; - QVGroupBox* tmpQGroupBox = new QVGroupBox( i18n( "Interface" ), box ); + TQVGroupBox* tmpTQGroupBox = new TQVGroupBox( i18n( "Interface" ), box ); m_config->setGroup( "" ); @@ -135,18 +135,18 @@ VConfigInterfacePage::VConfigInterfacePage( KarbonView* view, "CopyOffset", m_oldCopyOffset ); } - m_showStatusBar = new QCheckBox( i18n( "Show status bar" ), tmpQGroupBox ); + m_showStatusBar = new TQCheckBox( i18n( "Show status bar" ), tmpTQGroupBox ); m_showStatusBar->setChecked( oldShowStatusBar ); - m_recentFiles = new KIntNumInput( m_oldRecentFiles, tmpQGroupBox ); + m_recentFiles = new KIntNumInput( m_oldRecentFiles, tmpTQGroupBox ); m_recentFiles->setRange( 1, 20, 1 ); m_recentFiles->setLabel( i18n( "Number of recent files:" ) ); - m_copyOffset = new KIntNumInput( m_oldCopyOffset, tmpQGroupBox ); + m_copyOffset = new KIntNumInput( m_oldCopyOffset, tmpTQGroupBox ); m_copyOffset->setRange( 1, 50, 1 ); m_copyOffset->setLabel( i18n( "Copy offset:" ) ); - m_dockerFontSize = new KIntNumInput( m_oldDockerFontSize, tmpQGroupBox ); + m_dockerFontSize = new KIntNumInput( m_oldDockerFontSize, tmpTQGroupBox ); m_dockerFontSize->setRange( 5, 20, 1 ); m_dockerFontSize->setLabel( i18n( "Palette font size:" ) ); } @@ -209,23 +209,23 @@ void VConfigInterfacePage::slotDefault() } -VConfigMiscPage::VConfigMiscPage( KarbonView* view, QVBox* box, char* name ) - : QObject( box->parent(), name ) +VConfigMiscPage::VConfigMiscPage( KarbonView* view, TQVBox* box, char* name ) + : TQObject( box->tqparent(), name ) { m_view = view; m_config = KarbonFactory::instance()->config(); KoUnit::Unit unit = view->part()->unit(); - QGroupBox* tmpQGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Misc" ), box, "GroupBox" ); - tmpQGroupBox->layout()->setSpacing(KDialog::spacingHint()); - tmpQGroupBox->layout()->setMargin(KDialog::marginHint()); + TQGroupBox* tmpTQGroupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Misc" ), box, "GroupBox" ); + tmpTQGroupBox->tqlayout()->setSpacing(KDialog::spacingHint()); + tmpTQGroupBox->tqlayout()->setMargin(KDialog::marginHint()); - QGridLayout* grid = new QGridLayout(tmpQGroupBox->layout(), 4, 2 ); + TQGridLayout* grid = new TQGridLayout(tmpTQGroupBox->tqlayout(), 4, 2 ); m_oldUndoRedo = 30; - QString unitType = KoUnit::unitName( unit ); + TQString unitType = KoUnit::unitName( unit ); //#################"laurent //don't load unitType from config file because unit is //depend from kword file => unit can be different from config file @@ -236,20 +236,20 @@ VConfigMiscPage::VConfigMiscPage( KarbonView* view, QVBox* box, char* name ) m_oldUndoRedo = m_config->readNumEntry( "UndoRedo", m_oldUndoRedo ); } - m_undoRedo = new KIntNumInput( m_oldUndoRedo, tmpQGroupBox ); + m_undoRedo = new KIntNumInput( m_oldUndoRedo, tmpTQGroupBox ); m_undoRedo->setLabel( i18n( "Undo/redo limit:" ) ); m_undoRedo->setRange( 10, 60, 1 ); grid->addMultiCellWidget( m_undoRedo, 0, 0, 0, 1 ); - grid->addWidget( new QLabel( i18n( "Units:" ), tmpQGroupBox ), 1, 0 ); + grid->addWidget( new TQLabel( i18n( "Units:" ), tmpTQGroupBox ), 1, 0 ); - m_unit = new QComboBox( tmpQGroupBox ); + m_unit = new TQComboBox( tmpTQGroupBox ); m_unit->insertStringList( KoUnit::listOfUnitName() ); grid->addWidget( m_unit, 1, 1 ); m_oldUnit = KoUnit::unit( unitType ); m_unit->setCurrentItem( m_oldUnit ); - connect( m_unit, SIGNAL( activated( int ) ), SIGNAL( unitChanged( int ) ) ); + connect( m_unit, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( unitChanged( int ) ) ); } void VConfigMiscPage::apply() @@ -282,8 +282,8 @@ void VConfigMiscPage::slotDefault() m_unit->setCurrentItem( 0 ); } -VConfigGridPage::VConfigGridPage( KarbonView* view, QVBox* page, char* name ) - : QObject( page->parent(), name ) +VConfigGridPage::VConfigGridPage( KarbonView* view, TQVBox* page, char* name ) + : TQObject( page->tqparent(), name ) { m_view = view; KoUnit::Unit unit = view->part()->document().unit(); @@ -295,41 +295,41 @@ VConfigGridPage::VConfigGridPage( KarbonView* view, QVBox* page, char* name ) double sw = gd.snap.width(); double sh = gd.snap.height(); - m_gridChBox = new QCheckBox( i18n( "Show &grid" ), page ); + m_gridChBox = new TQCheckBox( i18n( "Show &grid" ), page ); m_gridChBox->setChecked( gd.isShow ); - m_snapChBox = new QCheckBox( i18n( "Snap to g&rid" ), page ); + m_snapChBox = new TQCheckBox( i18n( "Snap to g&rid" ), page ); m_snapChBox->setChecked( gd.isSnap ); - QLabel* gridColorLbl = new QLabel( i18n( "Grid &color:" ), page); + TQLabel* gridColorLbl = new TQLabel( i18n( "Grid &color:" ), page); m_gridColorBtn = new KColorButton( gd.color, page ); gridColorLbl->setBuddy( m_gridColorBtn ); - QGroupBox* spacingGrp = new QGroupBox( 2, Qt::Horizontal, i18n( "Spacing" ), page ); - QLabel* spaceHorizLbl = new QLabel( i18n( "&Horizontal:" ), spacingGrp ); + TQGroupBox* spacingGrp = new TQGroupBox( 2, Qt::Horizontal, i18n( "Spacing" ), page ); + TQLabel* spaceHorizLbl = new TQLabel( i18n( "&Horizontal:" ), spacingGrp ); m_spaceHorizUSpin = new KoUnitDoubleSpinBox( spacingGrp, 0.0, pgw, 0.1, fw, unit ); spaceHorizLbl->setBuddy( m_spaceHorizUSpin ); - QLabel* spaceVertLbl = new QLabel( i18n( "&Vertical:" ), spacingGrp ); + TQLabel* spaceVertLbl = new TQLabel( i18n( "&Vertical:" ), spacingGrp ); m_spaceVertUSpin = new KoUnitDoubleSpinBox( spacingGrp, 0.0, pgh, 0.1, fh, unit ); spaceVertLbl->setBuddy( m_spaceVertUSpin ); - QGroupBox* snapGrp = new QGroupBox( 2, Qt::Horizontal, i18n( "Snap Distance" ), page ); - QLabel* snapHorizLbl = new QLabel( i18n( "H&orizontal:" ), snapGrp ); + TQGroupBox* snapGrp = new TQGroupBox( 2, Qt::Horizontal, i18n( "Snap Distance" ), page ); + TQLabel* snapHorizLbl = new TQLabel( i18n( "H&orizontal:" ), snapGrp ); m_snapHorizUSpin = new KoUnitDoubleSpinBox( snapGrp, 0.0, fw, 0.1, sw, unit ); snapHorizLbl->setBuddy( m_snapHorizUSpin ); - QLabel* snapVertLbl = new QLabel( i18n( "V&ertical:" ), snapGrp ); + TQLabel* snapVertLbl = new TQLabel( i18n( "V&ertical:" ), snapGrp ); m_snapVertUSpin = new KoUnitDoubleSpinBox( snapGrp, 0.0, fh, 0.1, sh, unit ); snapVertLbl->setBuddy( m_snapVertUSpin ); - QGridLayout* gl = new QGridLayout(); + TQGridLayout* gl = new TQGridLayout(); gl->setSpacing( KDialog::spacingHint() ); gl->addMultiCellWidget( m_gridChBox, 0, 0, 0, 2 ); gl->addMultiCellWidget( m_snapChBox, 1, 1, 0, 2 ); gl->addWidget( gridColorLbl, 2, 0) ; gl->addWidget( m_gridColorBtn, 2, 1 ); - gl->addItem( new QSpacerItem( 0, 0 ), 2, 2 ); + gl->addItem( new TQSpacerItem( 0, 0 ), 2, 2 ); gl->addMultiCellWidget( spacingGrp, 3, 3, 0, 2 ); gl->addMultiCellWidget( snapGrp, 4, 4, 0, 2 ); - gl->addMultiCell( new QSpacerItem( 0, 0 ), 5, 5, 0, 2 ); + gl->addMultiCell( new TQSpacerItem( 0, 0 ), 5, 5, 0, 2 ); - connect( m_spaceHorizUSpin, SIGNAL( valueChanged( double ) ), SLOT( setMaxHorizSnap( double ) ) ); - connect( m_spaceVertUSpin, SIGNAL( valueChanged( double ) ), SLOT( setMaxVertSnap( double ) ) ) ; + connect( m_spaceHorizUSpin, TQT_SIGNAL( valueChanged( double ) ), TQT_SLOT( setMaxHorizSnap( double ) ) ); + connect( m_spaceVertUSpin, TQT_SIGNAL( valueChanged( double ) ), TQT_SLOT( setMaxVertSnap( double ) ) ) ; } void VConfigGridPage::setMaxHorizSnap( double v ) @@ -361,7 +361,7 @@ void VConfigGridPage::apply() gd.isShow = m_gridChBox->isChecked(); gd.isSnap = m_snapChBox->isChecked(); gd.color = m_gridColorBtn->color(); - m_view->repaintAll(); + m_view->tqrepaintAll(); } void VConfigGridPage::slotDefault() @@ -373,18 +373,18 @@ void VConfigGridPage::slotDefault() m_snapVertUSpin->setValue( KoUnit::toUserValue( 20.0, unit ) ); m_gridChBox->setChecked( true ); m_snapChBox->setChecked( true ); - m_gridColorBtn->setColor( QColor( 228, 228, 228 ) ); + m_gridColorBtn->setColor( TQColor( 228, 228, 228 ) ); } VConfigDefaultPage::VConfigDefaultPage( KarbonView* view, - QVBox* box, char* name ) - : QObject( box->parent(), name ) + TQVBox* box, char* name ) + : TQObject( box->tqparent(), name ) { m_view = view; m_config = KarbonFactory::instance()->config(); - QVGroupBox* gbDocumentSettings = new QVGroupBox( + TQVGroupBox* gbDocumentSettings = new TQVGroupBox( i18n( "Document Settings" ), box ); gbDocumentSettings->setMargin( KDialog::marginHint() ); gbDocumentSettings->setInsideSpacing( KDialog::spacingHint() ); @@ -409,10 +409,10 @@ VConfigDefaultPage::VConfigDefaultPage( KarbonView* view, m_autoSave->setSpecialValueText( i18n( "No auto save" ) ); m_autoSave->setSuffix( i18n( "min" ) ); - m_createBackupFile = new QCheckBox( i18n( "Create backup file" ), gbDocumentSettings ); + m_createBackupFile = new TQCheckBox( i18n( "Create backup file" ), gbDocumentSettings ); m_createBackupFile->setChecked( m_oldBackupFile ); - m_saveAsPath = new QCheckBox( i18n( "Save as path" ), gbDocumentSettings ); + m_saveAsPath = new TQCheckBox( i18n( "Save as path" ), gbDocumentSettings ); m_saveAsPath->setChecked( m_oldSaveAsPath ); } diff --git a/karbon/dialogs/vconfiguredlg.h b/karbon/dialogs/vconfiguredlg.h index f1470bea..dd12eba2 100644 --- a/karbon/dialogs/vconfiguredlg.h +++ b/karbon/dialogs/vconfiguredlg.h @@ -28,16 +28,17 @@ class KConfig; class KIntNumInput; class KColorButton; class KoUnitDoubleSpinBox; -class QCheckBox; -class QComboBox; +class TQCheckBox; +class TQComboBox; -class VConfigInterfacePage : public QObject +class VConfigInterfacePage : public TQObject { Q_OBJECT + TQ_OBJECT public: VConfigInterfacePage( - KarbonView* view, QVBox *box = 0L, char* name = 0L ); + KarbonView* view, TQVBox *box = 0L, char* name = 0L ); void apply(); @@ -51,7 +52,7 @@ private: KIntNumInput* m_recentFiles; int m_oldRecentFiles; - QCheckBox* m_showStatusBar; + TQCheckBox* m_showStatusBar; KIntNumInput* m_copyOffset; int m_oldCopyOffset; @@ -61,13 +62,14 @@ private: }; -class VConfigMiscPage : public QObject +class VConfigMiscPage : public TQObject { Q_OBJECT + TQ_OBJECT public: VConfigMiscPage( - KarbonView* view, QVBox* box, char* name = 0L ); + KarbonView* view, TQVBox* box, char* name = 0L ); void apply(); @@ -84,16 +86,17 @@ private: KIntNumInput* m_undoRedo; int m_oldUndoRedo; int m_oldUnit; - QComboBox *m_unit; + TQComboBox *m_unit; }; -class VConfigDefaultPage : public QObject +class VConfigDefaultPage : public TQObject { Q_OBJECT + TQ_OBJECT public: VConfigDefaultPage( - KarbonView* view, QVBox* box, char* name = 0L ); + KarbonView* view, TQVBox* box, char* name = 0L ); void apply(); @@ -106,19 +109,20 @@ private: KIntNumInput* m_autoSave; int m_oldAutoSave; - QCheckBox *m_createBackupFile; + TQCheckBox *m_createBackupFile; bool m_oldBackupFile; - QCheckBox *m_saveAsPath; + TQCheckBox *m_saveAsPath; bool m_oldSaveAsPath; }; -class VConfigGridPage : public QObject +class VConfigGridPage : public TQObject { Q_OBJECT + TQ_OBJECT public: VConfigGridPage( - KarbonView* view, QVBox* box, char* name = 0L ); + KarbonView* view, TQVBox* box, char* name = 0L ); void apply(); @@ -136,17 +140,18 @@ private: KoUnitDoubleSpinBox* m_spaceVertUSpin; KoUnitDoubleSpinBox* m_snapHorizUSpin; KoUnitDoubleSpinBox* m_snapVertUSpin; - QCheckBox* m_gridChBox; - QCheckBox* m_snapChBox; + TQCheckBox* m_gridChBox; + TQCheckBox* m_snapChBox; KColorButton* m_gridColorBtn; }; class VConfigureDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - VConfigureDlg( KarbonView* parent ); + VConfigureDlg( KarbonView* tqparent ); public slots: void slotApply(); diff --git a/karbon/dialogs/vstrokedlg.cc b/karbon/dialogs/vstrokedlg.cc index ed530178..8dcfa9f9 100644 --- a/karbon/dialogs/vstrokedlg.cc +++ b/karbon/dialogs/vstrokedlg.cc @@ -18,12 +18,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> #include <kiconloader.h> #include <klocale.h> @@ -39,68 +39,68 @@ #include "vstrokedlg.h" #include "vcolortab.h" -VStrokeDlg::VStrokeDlg( KarbonPart* part, QWidget* parent, const char* name ) - : KDialogBase ( parent, name, true, i18n( "Stroke" ), Ok | Cancel ), m_part( part ) +VStrokeDlg::VStrokeDlg( KarbonPart* part, TQWidget* tqparent, const char* name ) + : KDialogBase ( tqparent, name, true, i18n( "Stroke" ), Ok | Cancel ), m_part( part ) { enableButtonSeparator( true ); - QTabWidget *mainWidget = new QTabWidget( this, "strokemain" ); - QHBoxLayout *mainLayout = new QHBoxLayout (mainWidget, 3); + TQTabWidget *mainWidget = new TQTabWidget( this, "strokemain" ); + TQHBoxLayout *mainLayout = new TQHBoxLayout (mainWidget, 3); - QVBoxLayout *leftLayout = new QVBoxLayout( mainLayout, 4 ); + TQVBoxLayout *leftLayout = new TQVBoxLayout( mainLayout, 4 ); - QLabel* widthLabel = new QLabel( i18n ( "stroke width", "Width:" ), mainWidget ); + TQLabel* widthLabel = new TQLabel( i18n ( "stroke width", "Width:" ), mainWidget ); leftLayout->addWidget ( widthLabel ); m_setLineWidth = new KoUnitDoubleSpinBox( mainWidget, 0.0, 1000.0, 0.5, 1.0, KoUnit::U_PT, 1 ); leftLayout->addWidget ( m_setLineWidth ); //Dashing -> - QLabel* styleLabel = new QLabel( i18n ( "Style:" ), mainWidget ); + TQLabel* styleLabel = new TQLabel( i18n ( "Style:" ), mainWidget ); leftLayout->addWidget ( styleLabel ); - m_styleCombo = new QComboBox( mainWidget ); + m_styleCombo = new TQComboBox( mainWidget ); m_styleCombo->setEnabled ( false ); leftLayout->addWidget ( m_styleCombo ); // <- Dashing - reserved for later - QRadioButton* button; - m_typeOption = new QVButtonGroup ( mainWidget ); - button = new QRadioButton ( i18n( "None" ), m_typeOption ); + TQRadioButton* button; + m_typeOption = new TQVButtonGroup ( mainWidget ); + button = new TQRadioButton ( i18n( "None" ), m_typeOption ); m_typeOption->insert( button ); - button = new QRadioButton ( i18n( "Stroke" ), m_typeOption ); + button = new TQRadioButton ( i18n( "Stroke" ), m_typeOption ); m_typeOption->insert( button ); - button = new QRadioButton ( i18n( "Gradient" ), m_typeOption ); + button = new TQRadioButton ( i18n( "Gradient" ), m_typeOption ); m_typeOption->insert( button ); m_typeOption->setTitle( i18n( "Type" ) ); mainLayout->addWidget( m_typeOption ); - connect( m_typeOption, SIGNAL( clicked( int ) ), this, SLOT( slotTypeChanged( int ) ) ); + connect( m_typeOption, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotTypeChanged( int ) ) ); - m_capOption = new QVButtonGroup ( mainWidget ); - //button = new QRadioButton ( i18n( "Butt" ), m_capOption ); - button = new QRadioButton ( m_capOption ); + m_capOption = new TQVButtonGroup ( mainWidget ); + //button = new TQRadioButton ( i18n( "Butt" ), m_capOption ); + button = new TQRadioButton ( m_capOption ); button->setPixmap( DesktopIcon( "cap_butt" ) ); m_capOption->insert( button ); - button = new QRadioButton ( m_capOption ); + button = new TQRadioButton ( m_capOption ); button->setPixmap( DesktopIcon( "cap_round" ) ); m_capOption->insert( button ); - button = new QRadioButton ( m_capOption ); + button = new TQRadioButton ( m_capOption ); button->setPixmap( DesktopIcon( "cap_square" ) ); m_capOption->insert( button ); m_capOption->setTitle( i18n( "Cap" ) ); mainLayout->addWidget( m_capOption ); - connect( m_capOption, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) ); + connect( m_capOption, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) ); - m_joinOption = new QVButtonGroup ( mainWidget ); - button = new QRadioButton ( m_joinOption ); + m_joinOption = new TQVButtonGroup ( mainWidget ); + button = new TQRadioButton ( m_joinOption ); button->setPixmap( DesktopIcon( "join_miter" ) ); m_joinOption->insert( button ); - button = new QRadioButton ( m_joinOption ); + button = new TQRadioButton ( m_joinOption ); button->setPixmap( DesktopIcon( "join_round" ) ); m_joinOption->insert( button ); - button = new QRadioButton ( m_joinOption ); + button = new TQRadioButton ( m_joinOption ); button->setPixmap( DesktopIcon( "join_bevel" ) ); m_joinOption->insert( button ); m_joinOption->setTitle( i18n( "Join" ) ); mainLayout->addWidget( m_joinOption ); - connect( m_joinOption, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) ); + connect( m_joinOption, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) ); VSelection *sel = part->document().selection(); if( sel && sel->objects().count() > 0 ) // there is a selection, so take the stroke of first selected object @@ -126,7 +126,7 @@ VStrokeDlg::VStrokeDlg( KarbonPart* part, QWidget* parent, const char* name ) setMainWidget( m_colortab ); disableResize(); - connect (this, SIGNAL( okClicked( void ) ), this, SLOT( slotOKClicked ( void ) ) ); + connect (this, TQT_SIGNAL( okClicked( void ) ), this, TQT_SLOT( slotOKClicked ( void ) ) ); } void VStrokeDlg::slotTypeChanged( int ID ) diff --git a/karbon/dialogs/vstrokedlg.h b/karbon/dialogs/vstrokedlg.h index ddfa1b9f..a75a8727 100644 --- a/karbon/dialogs/vstrokedlg.h +++ b/karbon/dialogs/vstrokedlg.h @@ -23,8 +23,8 @@ #include <kdialogbase.h> -class QComboBox; -class QVButtonGroup; +class TQComboBox; +class TQVButtonGroup; class KarbonPart; class KoUnitDoubleSpinBox; @@ -34,18 +34,19 @@ class VColorTab; class VStrokeDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - VStrokeDlg( KarbonPart* part, QWidget* parent = 0L, const char* name = 0L ); + VStrokeDlg( KarbonPart* part, TQWidget* tqparent = 0L, const char* name = 0L ); private: VColorTab* m_colortab; KarbonPart *m_part; KoUnitDoubleSpinBox *m_setLineWidth; - QComboBox *m_styleCombo; - QVButtonGroup *m_typeOption; - QVButtonGroup *m_capOption; - QVButtonGroup *m_joinOption; + TQComboBox *m_styleCombo; + TQVButtonGroup *m_typeOption; + TQVButtonGroup *m_capOption; + TQVButtonGroup *m_joinOption; protected: VStroke m_stroke; |