summaryrefslogtreecommitdiffstats
path: root/kbarcode/rectsettingsdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
commitc4189d200e71c7ef82e9a6e34935ad225154d658 (patch)
treef7f29a1159e0402472ff2ab22617a8113f66263c /kbarcode/rectsettingsdlg.cpp
parent2f888b1578e65ec1bc514996eb509fcaf34462d6 (diff)
downloadkbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.tar.gz
kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.zip
TQt4 port kbarcode
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1233956 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/rectsettingsdlg.cpp')
-rw-r--r--kbarcode/rectsettingsdlg.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kbarcode/rectsettingsdlg.cpp b/kbarcode/rectsettingsdlg.cpp
index 7cb112a..9f5fa45 100644
--- a/kbarcode/rectsettingsdlg.cpp
+++ b/kbarcode/rectsettingsdlg.cpp
@@ -17,12 +17,12 @@
#include "rectsettingsdlg.h"
-// Qt includes
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpen.h>
+// TQt includes
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpen.h>
// KDE includes
#include <kcolorbutton.h>
@@ -33,16 +33,16 @@
void fillLineCombo( KComboBox* box )
{
/* A small helper function to fill
- * a combobox with all by Qt
+ * a combobox with all by TQt
* supported pen styles.
*/
- QPainter p;
+ TQPainter p;
for( int i = 1; i < 6; i++ ) {
- QPixmap pixmap( 60, 20 );
- pixmap.fill( Qt::white );
+ TQPixmap pixmap( 60, 20 );
+ pixmap.fill( TQt::white );
p.begin( &pixmap );
- p.setPen( QPen( Qt::black, 3, (Qt::PenStyle)i ) );
+ p.setPen( TQPen( TQt::black, 3, (TQt::PenStyle)i ) );
p.drawLine( 5, 10, 55, 10 );
p.end();
@@ -50,13 +50,13 @@ void fillLineCombo( KComboBox* box )
}
}
-RectSettingsDlg::RectSettingsDlg(QWidget *parent, const char *name )
+RectSettingsDlg::RectSettingsDlg(TQWidget *tqparent, const char *name )
: KDialogBase( KDialogBase::Plain, i18n("Settings"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, tqparent,name)
{
- QFrame* frame = plainPage();
- QGridLayout* grid = new QGridLayout( frame, 6, 6 );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQFrame* frame = plainPage();
+ TQGridLayout* grid = new TQGridLayout( frame, 6, 6 );
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
buttonBorder = new KColorButton( frame );
@@ -68,20 +68,20 @@ RectSettingsDlg::RectSettingsDlg(QWidget *parent, const char *name )
comboLine = new KComboBox( false, frame );
fillLineCombo( comboLine );
- checkBorder = new QCheckBox( i18n("&Enable Border"), frame );
+ checkBorder = new TQCheckBox( i18n("&Enable Border"), frame );
- grid->addWidget( new QLabel( i18n("Fill Color:"), frame ), 0, 0 );
+ grid->addWidget( new TQLabel( i18n("Fill Color:"), frame ), 0, 0 );
grid->addWidget( buttonFill, 0, 1 );
grid->addItem( spacer, 1, 0 );
grid->addWidget( checkBorder, 2, 0 );
- grid->addWidget( new QLabel( i18n("Border Color:"), frame ), 3, 0 );
+ grid->addWidget( new TQLabel( i18n("Border Color:"), frame ), 3, 0 );
grid->addWidget( buttonBorder, 3, 1 );
- grid->addWidget( new QLabel( i18n("Border Width:"), frame ), 4, 0 );
+ grid->addWidget( new TQLabel( i18n("Border Width:"), frame ), 4, 0 );
grid->addWidget( spinWidth, 4, 1 );
- grid->addWidget( new QLabel( i18n("Line Style:"), frame ), 5, 0 );
+ grid->addWidget( new TQLabel( i18n("Line Style:"), frame ), 5, 0 );
grid->addWidget( comboLine, 5, 1 );
- connect( checkBorder, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
+ connect( checkBorder, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
}
RectSettingsDlg::~RectSettingsDlg()
@@ -95,12 +95,12 @@ void RectSettingsDlg::enableControls()
comboLine->setEnabled( checkBorder->isChecked() );
}
-void RectSettingsDlg::setBorderColor( const QColor & c )
+void RectSettingsDlg::setBorderColor( const TQColor & c )
{
buttonBorder->setColor( c );
}
-void RectSettingsDlg::setFillColor( const QColor & c )
+void RectSettingsDlg::setFillColor( const TQColor & c )
{
buttonFill->setColor( c );
}
@@ -121,12 +121,12 @@ void RectSettingsDlg::setPenStyle( int s )
enableControls();
}
-const QColor RectSettingsDlg::borderColor() const
+const TQColor RectSettingsDlg::borderColor() const
{
return buttonBorder->color();
}
-const QColor RectSettingsDlg::fillColor() const
+const TQColor RectSettingsDlg::fillColor() const
{
return buttonFill->color();
}
@@ -141,12 +141,12 @@ int RectSettingsDlg::penStyle() const
return checkBorder->isChecked() ? comboLine->currentItem() + 1 : 0;
}
-LineSettingsDlg::LineSettingsDlg(QWidget *parent, const char *name )
+LineSettingsDlg::LineSettingsDlg(TQWidget *tqparent, const char *name )
: KDialogBase( KDialogBase::Plain, i18n("Settings"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, tqparent,name)
{
- QFrame* frame = plainPage();
- QGridLayout* grid = new QGridLayout( frame, 6, 6 );
+ TQFrame* frame = plainPage();
+ TQGridLayout* grid = new TQGridLayout( frame, 6, 6 );
buttonColor = new KColorButton( frame );
@@ -156,11 +156,11 @@ LineSettingsDlg::LineSettingsDlg(QWidget *parent, const char *name )
comboLine = new KComboBox( false, frame );
fillLineCombo( comboLine );
- grid->addWidget( new QLabel( i18n("Color:"), frame ), 0, 0 );
+ grid->addWidget( new TQLabel( i18n("Color:"), frame ), 0, 0 );
grid->addWidget( buttonColor, 0, 1 );
- grid->addWidget( new QLabel( i18n("Line Width:"), frame ), 1, 0 );
+ grid->addWidget( new TQLabel( i18n("Line Width:"), frame ), 1, 0 );
grid->addWidget( spinWidth, 1, 1 );
- grid->addWidget( new QLabel( i18n("Line Style:"), frame ), 2, 0 );
+ grid->addWidget( new TQLabel( i18n("Line Style:"), frame ), 2, 0 );
grid->addWidget( comboLine, 2, 1 );
}
@@ -168,12 +168,12 @@ LineSettingsDlg::~LineSettingsDlg()
{
}
-QPen LineSettingsDlg::pen() const
+TQPen LineSettingsDlg::pen() const
{
- return QPen( buttonColor->color(), spinWidth->value(), (Qt::PenStyle)(comboLine->currentItem() + 1) );
+ return TQPen( buttonColor->color(), spinWidth->value(), (TQt::PenStyle)(comboLine->currentItem() + 1) );
}
-void LineSettingsDlg::setPen( const QPen p )
+void LineSettingsDlg::setPen( const TQPen p )
{
buttonColor->setColor( p.color() );
spinWidth->setValue( p.width() );