|
From: <vz...@us...> - 2008-02-27 21:55:58
|
Revision: 22
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=22&view=rev
Author: vzsolt
Date: 2008-02-27 13:54:25 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Changed every K3 and Q3 class with their new (probably non-existant) ones.
My aim is to use no support classes.
Modified Paths:
--------------
trunk/src/barcodecombo.cpp
trunk/src/barcodecombo.h
trunk/src/barcodedialog.cpp
trunk/src/barcodedialog.h
trunk/src/barcodedialogs.cpp
trunk/src/barcodedialogs.h
trunk/src/barcodeitem.cpp
trunk/src/barcodeitem.h
trunk/src/barcodeprinterdlg.cpp
trunk/src/barkode.cpp
trunk/src/barkode.h
trunk/src/batchprinter.cpp
trunk/src/batchprinter.h
trunk/src/batchwizard.cpp
trunk/src/batchwizard.h
trunk/src/commands.cpp
trunk/src/commands.h
trunk/src/configdialog.cpp
trunk/src/confwizard.cpp
trunk/src/confwizard.h
trunk/src/csvfile.h
trunk/src/csvimportdlg.cpp
trunk/src/csvimportdlg.h
trunk/src/databasebrowser.cpp
trunk/src/definition.cpp
trunk/src/definition.h
trunk/src/definitiondialog.cpp
trunk/src/definitiondialog.h
trunk/src/documentitem.h
trunk/src/documentitemdlg.cpp
trunk/src/documentitemdlg.h
trunk/src/dsrichtext.cpp
trunk/src/dsrichtext.h
trunk/src/dstextedit.cpp
trunk/src/dstextedit.h
trunk/src/gnubarcode.cpp
trunk/src/imageitem.cpp
trunk/src/imageitem.h
trunk/src/kactionmap.cpp
trunk/src/kactionmap.h
trunk/src/kbarcode.cpp
trunk/src/label.cpp
trunk/src/label.h
trunk/src/labeleditor.cpp
trunk/src/labeleditor.h
trunk/src/labelutils.cpp
trunk/src/lineitem.cpp
trunk/src/lineitem.h
trunk/src/mainwindow.cpp
trunk/src/measurements.cpp
trunk/src/mimesources.cpp
trunk/src/mimesources.h
trunk/src/multilineeditdlg.cpp
trunk/src/mycanvasview.cpp
trunk/src/mycanvasview.h
trunk/src/mydatatable.cpp
trunk/src/mydatatable.h
trunk/src/newlabel.cpp
trunk/src/newlabel.h
trunk/src/pixmapbarcode.cpp
trunk/src/previewdialog.cpp
trunk/src/printlabeldlg.cpp
trunk/src/propertywidget.cpp
trunk/src/propertywidget.h
trunk/src/rectitem.cpp
trunk/src/rectitem.h
trunk/src/rectsettingsdlg.cpp
trunk/src/smalldialogs.cpp
trunk/src/sqltables.cpp
trunk/src/tbarcode2.cpp
trunk/src/tcanvasitem.cpp
trunk/src/tcanvasitem.h
trunk/src/textitem.cpp
trunk/src/textitem.h
trunk/src/textlineedit.cpp
trunk/src/textlineitem.cpp
trunk/src/textlineitem.h
trunk/src/tokendialog.cpp
trunk/src/tokendialog.h
trunk/src/tokenprovider.cpp
trunk/src/tokenprovider.h
trunk/src/xmlutils.h
trunk/src/zplutils.cpp
trunk/src/zplutils.h
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodecombo.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -29,7 +29,7 @@
#include <qregexp.h>
#include <qstring.h>
//Added by qt3to4:
-#include <Q3GridLayout>
+#include <QGridLayout>
#if QT_VERSION >= 0x030100
#include <ktextedit.h>
#else
@@ -122,7 +122,7 @@
{
m_token = NULL;
- Q3GridLayout* grid = new Q3GridLayout( this, 6, 6 );
+ QGridLayout* grid = new QGridLayout( this, 6, 6 );
labelStandard = new QLabel( i18n( "&Encoding Type:" ), this );
grid->addWidget( labelStandard, 1, 0 );
@@ -146,13 +146,13 @@
#if QT_VERSION >= 0x030100
multi = new KTextEdit( this );
#else
- multi = new Q3TextEdit( this );
+ multi = new QTextEdit( this );
#endif
multi->setTextFormat( Qt::PlainText );
- multi->setWordWrap( Q3TextEdit::NoWrap );
+ multi->setWordWrap( QTextEdit::NoWrap );
multi->setEnabled( false );
- multi->setVScrollBarMode( Q3ScrollView::AlwaysOn );
- multi->setHScrollBarMode( Q3ScrollView::AlwaysOn );
+ multi->setVScrollBarMode( QScrollView::AlwaysOn );
+ multi->setHScrollBarMode( QScrollView::AlwaysOn );
multi->hide();
connect( multi, SIGNAL( textChanged() ), this, SLOT( changed() ) );
grid->addMultiCellWidget( multi, 3, 3, 1, 3 );
Modified: trunk/src/barcodecombo.h
===================================================================
--- trunk/src/barcodecombo.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodecombo.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -71,7 +71,7 @@
#if QT_VERSION >= 0x030100
class KTextEdit;
#else
- class Q3TextEdit;
+ class QTextEdit;
#endif
class QCheckBox;
class QLabel;
@@ -117,7 +117,7 @@
#if QT_VERSION >= 0x030100
KTextEdit* multi;
#else
- Q3TextEdit* multi;
+ QTextEdit* multi;
#endif
KIntNumInput* spinMargin;
Modified: trunk/src/barcodedialog.cpp
===================================================================
--- trunk/src/barcodedialog.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodedialog.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -40,17 +40,17 @@
#include <q3paintdevicemetrics.h>
#include <q3picture.h>
//Added by qt3to4:
-#include <Q3HBoxLayout>
-#include <Q3VBoxLayout>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
BarCodeDialog::BarCodeDialog( QWidget* parent )
: QDialog( parent, false)
{
setCaption( i18n( "Barcode Generator" ) );
- BarCodeDialogLayout = new Q3HBoxLayout( this, 11, 6, "BarCodeDialogLayout");
- Layout5 = new Q3VBoxLayout( 0, 0, 6, "Layout5");
- Layout6 = new Q3VBoxLayout( 0, 0, 6, "Layout2");
+ BarCodeDialogLayout = new QHBoxLayout( this, 11, 6, "BarCodeDialogLayout");
+ Layout5 = new QVBoxLayout( 0, 0, 6, "Layout5");
+ Layout6 = new QVBoxLayout( 0, 0, 6, "Layout2");
widget = new BarcodeWidget( this );
m_token = new TokenProvider( KApplication::desktop() );
@@ -81,7 +81,7 @@
buttonClose->setIconSet( SmallIconSet("fileclose") );
- Q3ScrollView* sv = new Q3ScrollView( this );
+ QScrollView* sv = new QScrollView( this );
barcode = new QLabel( sv->viewport(), "barcode" );
sv->addChild( barcode );
@@ -175,12 +175,12 @@
// unless we can center the barcode
printer->setFullPage( false );
- Q3PaintDeviceMetrics metrics( printer );
+ QPaintDeviceMetrics metrics( printer );
double scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
double scaley = (double)metrics.logicalDpiY() / (double)QPaintDevice::x11AppDpiY();
- Q3Picture picture;
+ QPicture picture;
QPainter p( printer );
p.scale( scalex, scaley );
// TODO: center barcode
Modified: trunk/src/barcodedialog.h
===================================================================
--- trunk/src/barcodedialog.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodedialog.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -20,10 +20,10 @@
#include <qdialog.h>
//Added by qt3to4:
-#include <Q3VBoxLayout>
-#include <Q3GridLayout>
+#include <QVBoxLayout>
+#include <QGridLayout>
#include <QPixmap>
-#include <Q3HBoxLayout>
+#include <QHBoxLayout>
#include <QLabel>
class BarcodeCombo;
@@ -39,9 +39,9 @@
class QCheckBox;
class QLabel;
class QPixmap;
-class Q3VBoxLayout;
-class Q3HBoxLayout;
-class Q3GridLayout;
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
class TokenProvider;
/** This class provides a dialog, where the user can create a single barcode
@@ -77,9 +77,9 @@
void copy();
protected:
- Q3HBoxLayout* BarCodeDialogLayout;
- Q3VBoxLayout* Layout6;
- Q3VBoxLayout* Layout5;
+ QHBoxLayout* BarCodeDialogLayout;
+ QVBoxLayout* Layout6;
+ QVBoxLayout* Layout5;
};
#endif // BARCODEDIALOG_H
Modified: trunk/src/barcodedialogs.cpp
===================================================================
--- trunk/src/barcodedialogs.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodedialogs.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -32,9 +32,9 @@
#include <q3vbox.h>
#include <q3vgroupbox.h>
//Added by qt3to4:
-#include <Q3HBoxLayout>
-#include <Q3GridLayout>
-#include <Q3VBoxLayout>
+#include <QHBoxLayout>
+#include <QGridLayout>
+#include <QVBoxLayout>
// KDE includes
#include <kcombobox.h>
@@ -107,14 +107,14 @@
TBarcodeDlg::TBarcodeDlg(QWidget *parent)
: QWidget( parent )
{
- Q3VBoxLayout* layout = new Q3VBoxLayout( this, 6, 6 );
+ QVBoxLayout* layout = new QVBoxLayout( this, 6, 6 );
- Q3GroupBox* gb = new Q3GroupBox( i18n("TBarcode"), this );
+ QGroupBox* gb = new QGroupBox( i18n("TBarcode"), this );
gb->setColumnLayout(0, Qt::Vertical );
gb->layout()->setSpacing( 6 );
gb->layout()->setMargin( 11 );
gb->setEnabled( Barkode::haveTBarcode() || Barkode::haveTBarcode2() );
- Q3VBoxLayout* gbLayout = new Q3VBoxLayout( gb->layout() );
+ QVBoxLayout* gbLayout = new QVBoxLayout( gb->layout() );
spinModule = new KDoubleNumInput( gb );
spinModule->setLabel( i18n("Module width (mm):"), Qt::AlignLeft | Qt::AlignVCenter );
@@ -133,7 +133,7 @@
QLabel* label = new QLabel( i18n("&Checksum calculation method:"), gb );
label->setBuddy( comboCheckSum );
- Q3HBoxLayout * hbox = new Q3HBoxLayout( 0, 6, 6 );
+ QHBoxLayout * hbox = new QHBoxLayout( 0, 6, 6 );
hbox->addWidget( label );
hbox->addWidget( comboCheckSum );
@@ -257,14 +257,14 @@
PDF417BarcodeDlg::PDF417BarcodeDlg(QWidget *parent)
: QWidget( parent )
{
- Q3VBoxLayout* layout = new Q3VBoxLayout( this, 6, 6 );
+ QVBoxLayout* layout = new QVBoxLayout( this, 6, 6 );
- Q3GroupBox* gpdf = new Q3GroupBox( i18n("PDF417"), this );
+ QGroupBox* gpdf = new QGroupBox( i18n("PDF417"), this );
gpdf->setColumnLayout(0, Qt::Vertical );
gpdf->layout()->setSpacing( 6 );
gpdf->layout()->setMargin( 11 );
gpdf->setEnabled( Barkode::haveTBarcode() || Barkode::havePDFBarcode() );
- Q3VBoxLayout* gpdfLayout = new Q3VBoxLayout( gpdf->layout() );
+ QVBoxLayout* gpdfLayout = new QVBoxLayout( gpdf->layout() );
spinRow = new KIntNumInput( gpdf );
spinRow->setLabel( i18n("Rows:"), Qt::AlignLeft | Qt::AlignVCenter );
@@ -311,7 +311,7 @@
DataMatrixDlg::DataMatrixDlg(QWidget *parent )
: QWidget( parent )
{
- Q3HBoxLayout* datamLayout = new Q3HBoxLayout( this, 6, 6 );
+ QHBoxLayout* datamLayout = new QHBoxLayout( this, 6, 6 );
comboDataMatrix = new KComboBox( false, this );
@@ -365,13 +365,13 @@
SequenceDlg::SequenceDlg( QWidget *parent )
: QWidget( parent )
{
- Q3VBoxLayout* main = new Q3VBoxLayout( this, 6, 6 );
+ QVBoxLayout* main = new QVBoxLayout( this, 6, 6 );
- Q3ButtonGroup* group = new Q3ButtonGroup( i18n("Sequence"), this );
+ QButtonGroup* group = new QButtonGroup( i18n("Sequence"), this );
group->setColumnLayout(0, Qt::Vertical );
group->layout()->setSpacing( 6 );
group->layout()->setMargin( 11 );
- Q3VBoxLayout* layout = new Q3VBoxLayout( group->layout() );
+ QVBoxLayout* layout = new QVBoxLayout( group->layout() );
checkSequence = new QCheckBox( i18n("&Enable sequence"), group );
@@ -443,14 +443,14 @@
}
ColorDlg::ColorDlg(QWidget *parent)
- : Q3VBox( parent )
+ : QVBox( parent )
{
- Q3GroupBox* gb = new Q3GroupBox( i18n("Colors"), this );
+ QGroupBox* gb = new QGroupBox( i18n("Colors"), this );
gb->setColumnLayout(0, Qt::Vertical );
gb->layout()->setSpacing( 6 );
gb->layout()->setMargin( 11 );
gb->setEnabled( Barkode::havePurePostscriptBarcode() );
- Q3GridLayout* gbLayout = new Q3GridLayout( gb->layout() );
+ QGridLayout* gbLayout = new QGridLayout( gb->layout() );
buttonBarColor = new KColorButton( gb );
buttonBackColor = new KColorButton( gb );
@@ -479,9 +479,9 @@
}
PurePostscriptDlg::PurePostscriptDlg(QWidget *parent)
- : Q3VBox( parent )
+ : QVBox( parent )
{
- Q3VGroupBox* gb = new Q3VGroupBox( i18n("Barcode Writer in Pure Postscript"), this );
+ QVGroupBox* gb = new QVGroupBox( i18n("Barcode Writer in Pure Postscript"), this );
gb->setEnabled( Barkode::havePurePostscriptBarcode() );
checkChecksum = new QCheckBox( i18n("Enable &Checksum"), gb );
Modified: trunk/src/barcodedialogs.h
===================================================================
--- trunk/src/barcodedialogs.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodedialogs.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -66,7 +66,7 @@
void getData( Barkode* b );
private:
- Q3PtrList<BarcodeDlgBase> list;
+ QPtrList<BarcodeDlgBase> list;
};
/** A configuration widget for TBarcode settings.
@@ -150,7 +150,7 @@
/** A configuration widget for colors in pure postscript barcodes
* @author Dominik Seichter
*/
-class ColorDlg : public Q3VBox, public BarcodeDlgBase {
+class ColorDlg : public QVBox, public BarcodeDlgBase {
Q_OBJECT
public:
ColorDlg(QWidget *parent=0);
@@ -167,7 +167,7 @@
/** A configuration widget for colors in pure postscript barcodes
* @author Dominik Seichter
*/
-class PurePostscriptDlg : public Q3VBox, public BarcodeDlgBase {
+class PurePostscriptDlg : public QVBox, public BarcodeDlgBase {
Q_OBJECT
public:
PurePostscriptDlg(QWidget *parent=0);
Modified: trunk/src/barcodeitem.cpp
===================================================================
--- trunk/src/barcodeitem.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodeitem.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -188,7 +188,7 @@
DocumentItem::drawBorder( painter );
}
-void BarcodeItem::drawZpl( Q3TextStream* stream )
+void BarcodeItem::drawZpl( QTextStream* stream )
{
QString encoding = ZPLUtils::encoding( type() );
if( encoding.isNull() )
@@ -202,7 +202,7 @@
*stream << ZPLUtils::fieldData( value() );
}
-void BarcodeItem::drawIpl( Q3TextStream* stream, IPLUtils* utils )
+void BarcodeItem::drawIpl( QTextStream* stream, IPLUtils* utils )
{
QString encoding = utils->encoding( type() );
@@ -225,7 +225,7 @@
utils->addValue( value() );
}
-void BarcodeItem::drawEPcl( Q3TextStream* stream )
+void BarcodeItem::drawEPcl( QTextStream* stream )
{
QString encoding = EPCLUtils::encoding( type() );
if( encoding.isEmpty() )
Modified: trunk/src/barcodeitem.h
===================================================================
--- trunk/src/barcodeitem.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodeitem.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -41,9 +41,9 @@
void loadXML (QDomElement* element);
void saveXML (QDomElement* element);
void draw (QPainter* painter);
- void drawZpl( Q3TextStream* stream );
- void drawIpl( Q3TextStream* stream, IPLUtils* utils );
- void drawEPcl( Q3TextStream* stream );
+ void drawZpl( QTextStream* stream );
+ void drawIpl( QTextStream* stream, IPLUtils* utils );
+ void drawEPcl( QTextStream* stream );
private:
void init();
Modified: trunk/src/barcodeprinterdlg.cpp
===================================================================
--- trunk/src/barcodeprinterdlg.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barcodeprinterdlg.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -27,13 +27,13 @@
#include <qlayout.h>
#include <qvbuttongroup.h>
//Added by qt3to4:
-#include <Q3GridLayout>
+#include <QGridLayout>
BarcodePrinterDlg::BarcodePrinterDlg(QWidget *parent)
: KDialogBase( KDialogBase::Plain, i18n("Barcode Printer"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent)
{
- Q3GridLayout* layout = new Q3GridLayout( plainPage(), 6, 6 );
+ QGridLayout* layout = new QGridLayout( plainPage(), 6, 6 );
QLabel* label = new QLabel( i18n("&Output Format:"), plainPage() );
comboFormat = new KComboBox( false, plainPage() );
Modified: trunk/src/barkode.cpp
===================================================================
--- trunk/src/barkode.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barkode.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -27,7 +27,7 @@
#ifdef _ENABLE_NATIVE_GNU_BARCODE
# include <barcode.h>
//Added by qt3to4:
-#include <Q3ValueList>
+#include <QValueList>
#else
#define BARCODE_DEFAULT_FLAGS 0x00000000
@@ -72,7 +72,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
-Q3ValueList<tBarcodeInfo> Barkode::s_info;
+QValueList<tBarcodeInfo> Barkode::s_info;
QStringList* Barkode::s_encoding = NULL;
bool Barkode::s_haveGnuBarcode = false;
bool Barkode::s_havePdfEncode = false;
@@ -199,9 +199,9 @@
return b;
}
-const Q3Picture Barkode::picture()
+const QPicture Barkode::picture()
{
- Q3Picture pic;
+ QPicture pic;
QPainter painter( &pic );
painter.fillRect( 0, 0, size().width(), size().height(), m_background );
Modified: trunk/src/barkode.h
===================================================================
--- trunk/src/barkode.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/barkode.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -24,7 +24,7 @@
#include <qcolor.h>
#include <qstring.h>
//Added by qt3to4:
-#include <Q3ValueList>
+#include <QValueList>
#include <QPixmap>
#include "barkodeengine.h"
@@ -84,11 +84,11 @@
QString validatorNot;
};
-typedef Q3ValueList<tBarcodeInfo> TBarcodeInfoList;
+typedef QValueList<tBarcodeInfo> TBarcodeInfoList;
class BarkodeEngine;
class QPainter;
-class Q3Picture;
+class QPicture;
class QSize;
class QPaintDevice;
class TokenProvider;
@@ -118,7 +118,7 @@
const QString parsedValue();
const QPixmap pixmap( double scalex = 1.0, double scaley = 1.0 );
- const Q3Picture picture();
+ const QPicture picture();
const QSize size() const;
bool isValid() const;
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/batchprinter.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -29,7 +29,7 @@
#include <q3paintdevicemetrics.h>
#include <q3progressdialog.h>
//Added by qt3to4:
-#include <Q3ValueList>
+#include <QValueList>
#include <QPixmap>
// KDE includes
@@ -102,7 +102,7 @@
painter = new QPainter( printer );
m_cur_data_count = 0;
- Q3PaintDeviceMetrics pdm( painter->device() );
+ QPaintDeviceMetrics pdm( painter->device() );
pageh = pdm.height(); // in pixel
@@ -111,7 +111,7 @@
c_h = 0;
c_w = 0;
- Q3ProgressDialog* progress = createProgressDialog( i18n("Printing...") );
+ QProgressDialog* progress = createProgressDialog( i18n("Printing...") );
m_measure = def->getMeasurements();
@@ -126,7 +126,7 @@
delete painter;
}
-void BatchPrinter::startPrintData( Q3ProgressDialog* progress )
+void BatchPrinter::startPrintData( QProgressDialog* progress )
{
labelprinterdata* lpdata = PrinterSettings::getInstance()->getData();
@@ -197,7 +197,7 @@
}
}
-void BatchPrinter::startPrintVarData( Q3ProgressDialog* progress )
+void BatchPrinter::startPrintVarData( QProgressDialog* progress )
{
Label* l;
while( ( l = initLabel() ) != NULL )
@@ -273,7 +273,7 @@
void BatchPrinter::startImages()
{
- Q3ProgressDialog* progress = createProgressDialog( i18n("Creating Images...") );
+ QProgressDialog* progress = createProgressDialog( i18n("Creating Images...") );
int number = 0;
m_cur_data_count = 0;
@@ -341,7 +341,7 @@
return;
}
- Q3ProgressDialog* progress = createProgressDialog( i18n("Printing...") );
+ QProgressDialog* progress = createProgressDialog( i18n("Printing...") );
if( m_bcp_format == PrinterSettings::ZEBRA )
// Zebra printers are printed at 304dpi, this should
@@ -358,7 +358,7 @@
m_paintDevice = new BarcodePrinterDevice( 304.0, 304.0 );
- Q3TextStream stream( &file );
+ QTextStream stream( &file );
Label* l;
while( ( l = initLabel( &number ) ) != NULL )
{
@@ -503,15 +503,15 @@
}
}
-Q3ProgressDialog* BatchPrinter::createProgressDialog( const QString & caption )
+QProgressDialog* BatchPrinter::createProgressDialog( const QString & caption )
{
- Q3ProgressDialog* progress = new Q3ProgressDialog( caption, i18n("&Cancel"), m_labels+1, parent );
+ QProgressDialog* progress = new QProgressDialog( caption, i18n("&Cancel"), m_labels+1, parent );
progress->setProgress( 0 );
progress->show();
return progress;
}
-bool BatchPrinter::checkProgressDialog( Q3ProgressDialog* progress )
+bool BatchPrinter::checkProgressDialog( QProgressDialog* progress )
{
kapp->processEvents( 0 );
progress->setProgress( progress->progress() + 1 );
@@ -522,7 +522,7 @@
return true;
}
-void BatchPrinter::setData( Q3ValueList<data>* list )
+void BatchPrinter::setData( QValueList<data>* list )
{
if( m_data )
delete m_data;
Modified: trunk/src/batchprinter.h
===================================================================
--- trunk/src/batchprinter.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/batchprinter.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -33,11 +33,11 @@
class Measurements;
class QBuffer;
class QPainter;
-class Q3ProgressDialog;
+class QProgressDialog;
class QWidget;
class QPaintDevice;
-typedef Q3ValueList< QMap<QString,QString> > TVariableList;
+typedef QValueList< QMap<QString,QString> > TVariableList;
/**
This class is responsible for batch printing of articles.
It is also responsible for creating images of all articles.
@@ -86,7 +86,7 @@
/** set the sql data for the batchprinter
* @p list will be deleted by the batchprinter
*/
- void setData( Q3ValueList<data>* list );
+ void setData( QValueList<data>* list );
/** set the variable data for the batchprinter
* @p list will be deleted by the batchprinter
@@ -140,19 +140,19 @@
/** print the labels using data from the m_data structure
*/
- void startPrintData( Q3ProgressDialog* progress );
+ void startPrintData( QProgressDialog* progress );
/** print the labels using data from the m_vardata or m_addrdata structure
*/
- void startPrintVarData( Q3ProgressDialog* progress );
+ void startPrintVarData( QProgressDialog* progress );
/** Create and return a progressdialog
*/
- Q3ProgressDialog* createProgressDialog( const QString & caption );
- bool checkProgressDialog( Q3ProgressDialog* progress );
+ QProgressDialog* createProgressDialog( const QString & caption );
+ bool checkProgressDialog( QProgressDialog* progress );
Definition* def;
Measurements m_measure;
- Q3ValueList<data>* m_data;
+ QValueList<data>* m_data;
TVariableList* m_vardata;
KABC::AddresseeList* m_addrdata;
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/batchwizard.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -43,13 +43,13 @@
#include <qvbuttongroup.h>
#include <q3widgetstack.h>
//Added by qt3to4:
-#include <Q3HBoxLayout>
-#include <Q3ValueList>
+#include <QHBoxLayout>
+#include <QValueList>
#include <QSqlQuery>
-#include <Q3SqlCursor>
-#include <Q3Frame>
+#include <QSqlCursor>
+#include <QFrame>
#include <QSqlError>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
#include <kabc/addressee.h>
#include <kabc/addresseelist.h>
@@ -75,10 +75,10 @@
#define PNG_FORMAT "PNG"
-class AddressListViewItem : public K3ListViewItem {
+class AddressListViewItem : public KListViewItem {
public:
- AddressListViewItem(Q3ListView *parent, KABC::Addressee & addr )
- : K3ListViewItem( parent ), m_address( addr )
+ AddressListViewItem(QListView *parent, KABC::Addressee & addr )
+ : KListViewItem( parent ), m_address( addr )
{
this->setText( 0, m_address.givenName() );
this->setText( 1, m_address.familyName() );
@@ -120,7 +120,7 @@
void BatchWizard::setupPage1()
{
page1 = new QWidget( this );
- Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page1, 11, 6, "pageLayout");
+ QVBoxLayout* pageLayout = new QVBoxLayout( page1, 11, 6, "pageLayout");
QLabel* label = new QLabel( i18n("<qt>This wizard will guide you through the process "
"of printing many labels with KBarcode.<br>The first step "
@@ -148,9 +148,9 @@
void BatchWizard::setupPage2()
{
page2 = new QWidget( this );
- Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page2, 11, 6, "pageLayout");
+ QVBoxLayout* pageLayout = new QVBoxLayout( page2, 11, 6, "pageLayout");
- Q3VButtonGroup* group = new Q3VButtonGroup( page2 );
+ QVButtonGroup* group = new QVButtonGroup( page2 );
radioSimple = new QRadioButton( i18n("Print &labels without data"), group );
radioSqlArticles = new QRadioButton( i18n("Print &articles from KBarcodes SQL database"), group );
@@ -172,7 +172,7 @@
void BatchWizard::setupPage3()
{
- page3 = new Q3WidgetStack( this );
+ page3 = new QWidgetStack( this );
setupStackPage1();
setupStackPage2();
@@ -184,10 +184,10 @@
void BatchWizard::setupPage4()
{
- page4 = new Q3VBox( this );
+ page4 = new QVBox( this );
page4->setSpacing( 5 );
- Q3HBox* hbox = new Q3HBox( page4 );
+ QHBox* hbox = new QHBox( page4 );
hbox->setSpacing( 5 );
buttonTableInsert = new KPushButton( i18n("Insert Row"), hbox );
@@ -195,9 +195,9 @@
buttonTableRemove = new KPushButton( i18n("Delete Row"), hbox );
buttonTableRemove->setIconSet( BarIconSet( "editdelete") );
- m_varTable = new Q3Table( page4 );
+ m_varTable = new QTable( page4 );
m_varTable->setReadOnly( false );
- m_varTable->setSelectionMode( Q3Table::SingleRow );
+ m_varTable->setSelectionMode( QTable::SingleRow );
addPage( page4, i18n("Import Variables") );
@@ -209,7 +209,7 @@
{
TokenProvider serial( this );
- page5 = new Q3VBox( this );
+ page5 = new QVBox( this );
new QLabel( i18n( "<qt>KBarcode has support for placing serial numbers on labels. "
"If you did not use the [serial] token on your label in "
@@ -218,7 +218,7 @@
"number. This number is increased for every printed label on the "
"print out.</qt>"), page5 );
- Q3HBox* hbox = new Q3HBox( page5 );
+ QHBox* hbox = new QHBox( page5 );
hbox->setSpacing( 5 );
new QLabel( i18n( "Serial start:" ), hbox );
@@ -234,26 +234,26 @@
void BatchWizard::setupPage10()
{
page10 = new QWidget( this );
- Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page10, 11, 6, "pageLayout");
+ QVBoxLayout* pageLayout = new QVBoxLayout( page10, 11, 6, "pageLayout");
- Q3VButtonGroup* group = new Q3VButtonGroup( page10 );
+ QVButtonGroup* group = new QVButtonGroup( page10 );
radioPrinter = new QRadioButton( i18n("&Print to a system printer or to a file"), group );
radioImage = new QRadioButton( i18n("&Create images"), group );
- imageBox = new Q3VBox( group );
+ imageBox = new QVBox( group );
imageBox->setMargin( 10 );
radioBarcode = new QRadioButton( i18n("Print to a special &barcode printer"), group );
- Q3HBox* directoryBox = new Q3HBox( imageBox );
+ QHBox* directoryBox = new QHBox( imageBox );
directoryBox->setSpacing( 5 );
QLabel* label = new QLabel( i18n("Output &Directory:"), directoryBox );
imageDirPath = new KUrlRequester( directoryBox );
imageDirPath->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
label->setBuddy( directoryBox );
- Q3HBox* formatBox = new Q3HBox( imageBox );
+ QHBox* formatBox = new QHBox( imageBox );
label = new QLabel( i18n("Output File &Format:"), formatBox );
QStringList formats = KImageIO::types( KImageIO::Writing );
@@ -263,7 +263,7 @@
comboFormat->setCurrentItem( formats.findIndex( PNG_FORMAT ) );
label->setBuddy( comboFormat );
- Q3VButtonGroup* imageNameGroup = new Q3VButtonGroup( i18n("&Filename:"), imageBox );
+ QVButtonGroup* imageNameGroup = new QVButtonGroup( i18n("&Filename:"), imageBox );
radioImageFilenameArticle = new QRadioButton( i18n("Use &article number for filename"), imageNameGroup );
radioImageFilenameBarcode = new QRadioButton( i18n("Use &barcode number for filename"), imageNameGroup );
radioImageFilenameCustom = new QRadioButton( i18n("Use &custom filename:"), imageNameGroup );
@@ -297,17 +297,17 @@
void BatchWizard::setupStackPage1()
{
- stack1 = new Q3VBox( page3, "stack1" );
+ stack1 = new QVBox( page3, "stack1" );
stack1->setSpacing( 5 );
- Q3HBox* hbox = new Q3HBox( stack1 );
+ QHBox* hbox = new QHBox( stack1 );
hbox->setSpacing( 5 );
new QLabel( i18n( "Customer name and no.:" ), hbox );
customerName = new KComboBox( false, hbox );
customerId = new KComboBox( false, hbox );
- Q3HBox* hButtonBox = new Q3HBox( stack1 );
+ QHBox* hButtonBox = new QHBox( stack1 );
hButtonBox->setSpacing( 5 );
buttonAdd = new KPushButton( i18n( "&Add..." ), hButtonBox );
@@ -322,14 +322,14 @@
mnuImport->insertItem( i18n("Import barcode_basic"), this, SLOT( addAllItems() ) );
buttonImport->setPopup( mnuImport );
- sqlList = new K3ListView( stack1 );
+ sqlList = new KListView( stack1 );
sqlList->addColumn( i18n("Index") );
sqlList->addColumn( i18n("Number of Labels") );
sqlList->addColumn( i18n("Article Number") );
sqlList->addColumn( i18n("Group") );
sqlList->setAllColumnsShowFocus( true );
- connect( sqlList, SIGNAL(doubleClicked(Q3ListViewItem*,const QPoint &,int)),
- this, SLOT(changeItem(Q3ListViewItem*,const QPoint &,int)));
+ connect( sqlList, SIGNAL(doubleClicked(QListViewItem*,const QPoint &,int)),
+ this, SLOT(changeItem(QListViewItem*,const QPoint &,int)));
connect( customerName, SIGNAL( activated(int) ), this, SLOT( customerNameChanged(int) ) );
connect( customerId, SIGNAL( activated(int) ), this, SLOT( customerIdChanged(int) ) );
@@ -344,10 +344,10 @@
void BatchWizard::setupStackPage2()
{
- stack2 = new Q3HBox( page3, "stack2" );
+ stack2 = new QHBox( page3, "stack2" );
stack2->setSpacing( 5 );
- Q3VButtonGroup* group = new Q3VButtonGroup( stack2 );
+ QVButtonGroup* group = new QVButtonGroup( stack2 );
radioImportManual = new QRadioButton( i18n("Enter &data manually"), group );
radioImportSql = new QRadioButton( i18n("Import variables from a &SQL table"), group );
labelSqlQuery = new QLabel( i18n("Please enter a sql &query:"), group );
@@ -364,11 +364,11 @@
radioImportManual->setChecked( true );
- Q3VBox* box = new Q3VBox( stack2 );
+ QVBox* box = new QVBox( stack2 );
box->setSpacing( 5 );
new QLabel( i18n("Available Variables:"), box );
- m_varList = new K3ListBox( box );
+ m_varList = new KListBox( box );
connect( radioImportManual, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
connect( radioImportSql, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
@@ -381,7 +381,7 @@
void BatchWizard::setupStackPage3()
{
- stack3 = new Q3VBox( page3, "stack3" );
+ stack3 = new QVBox( page3, "stack3" );
numLabels = new KIntNumInput( 1, stack3 );
numLabels->setRange( 1, 100000, 1, true );
@@ -394,15 +394,15 @@
{
stack4 = new QWidget( page3, "stack4" );
- Q3HBoxLayout* mainLayout = new Q3HBoxLayout( stack4 );
+ QHBoxLayout* mainLayout = new QHBoxLayout( stack4 );
- Q3VBox* list1 = new Q3VBox( stack4 );
- Q3VBox* list2 = new Q3VBox( stack4 );
+ QVBox* list1 = new QVBox( stack4 );
+ QVBox* list2 = new QVBox( stack4 );
- Q3Frame* buttons = new Q3Frame( stack4 );
+ QFrame* buttons = new QFrame( stack4 );
buttons->setMargin( 10 );
- Q3VBoxLayout* layout = new Q3VBoxLayout( buttons );
+ QVBoxLayout* layout = new QVBoxLayout( buttons );
QSpacerItem* spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
@@ -438,27 +438,27 @@
new QLabel( i18n("All Addresses"), list1 );
new QLabel( i18n("Selected Addresses"), list2 );
- listAddress = new K3ListView( list1 );
+ listAddress = new KListView( list1 );
listAddress->addColumn( i18n("Given Name"), 0 );
listAddress->addColumn( i18n("Family Name"), 1 );
listAddress->addColumn( i18n("Email Address"), 2 );
listAddress->setMultiSelection( true );
listAddress->setAllColumnsShowFocus( true );
- listAddress->setColumnWidthMode( 0, Q3ListView::Maximum );
- listAddress->setColumnWidthMode( 1, Q3ListView::Maximum );
- listAddress->setColumnWidthMode( 2, Q3ListView::Maximum );
+ listAddress->setColumnWidthMode( 0, QListView::Maximum );
+ listAddress->setColumnWidthMode( 1, QListView::Maximum );
+ listAddress->setColumnWidthMode( 2, QListView::Maximum );
- listSelectedAddress = new K3ListView( list2 );
+ listSelectedAddress = new KListView( list2 );
listSelectedAddress->addColumn( i18n("Given Name"), 0 );
listSelectedAddress->addColumn( i18n("Family Name"), 1 );
listSelectedAddress->addColumn( i18n("Email Address"), 2 );
listSelectedAddress->setMultiSelection( true );
listSelectedAddress->setAllColumnsShowFocus( true );
- listSelectedAddress->setColumnWidthMode( 0, Q3ListView::Maximum );
- listSelectedAddress->setColumnWidthMode( 1, Q3ListView::Maximum );
- listSelectedAddress->setColumnWidthMode( 2, Q3ListView::Maximum );
+ listSelectedAddress->setColumnWidthMode( 0, QListView::Maximum );
+ listSelectedAddress->setColumnWidthMode( 1, QListView::Maximum );
+ listSelectedAddress->setColumnWidthMode( 2, QListView::Maximum );
connect( buttonAddAddress, SIGNAL( clicked() ), this, SLOT( slotAddAddress() ) );
connect( buttonRemoveAddress, SIGNAL( clicked() ), this, SLOT( slotRemoveAddress() ) );
@@ -474,7 +474,7 @@
if( !tables->isConnected() )
return;
- Q3SqlCursor cur( TABLE_CUSTOMER );
+ QSqlCursor cur( TABLE_CUSTOMER );
cur.select();
customerId->clear();
customerName->clear();
@@ -663,8 +663,8 @@
sqlList->setSorting( 3, true );
sqlList->sort();
- Q3ValueList<BatchPrinter::data>* dlist = new Q3ValueList<BatchPrinter::data>;
- Q3ListViewItem* item = sqlList->firstChild();
+ QValueList<BatchPrinter::data>* dlist = new QValueList<BatchPrinter::data>;
+ QListViewItem* item = sqlList->firstChild();
while( item )
{
BatchPrinter::data m_data;
@@ -685,7 +685,7 @@
batch->setLabels( numLabels->value() );
// do a dirty drick, TODO: refactor BatchPrinter in the future
- Q3ValueList<BatchPrinter::data>* dlist = new Q3ValueList<BatchPrinter::data>;
+ QValueList<BatchPrinter::data>* dlist = new QValueList<BatchPrinter::data>;
BatchPrinter::data m_data;
m_data.number = numLabels->value();
dlist->append( m_data );
@@ -708,7 +708,7 @@
else if( radioAddressBook->isChecked() )
{
KABC::AddresseeList* list = new KABC::AddresseeList;
- Q3ListViewItem* item = listSelectedAddress->firstChild();
+ QListViewItem* item = listSelectedAddress->firstChild();
while( item )
{
list->append( static_cast<AddressListViewItem*>(item)->address() );
@@ -755,7 +755,7 @@
QString temp;
temp.sprintf("%0*i", 5, sqlList->childCount() + 1 );
- K3ListViewItem* item = new K3ListViewItem( sqlList, temp, QString( "%1" ).arg( count ),
+ KListViewItem* item = new KListViewItem( sqlList, temp, QString( "%1" ).arg( count ),
article, group );
sqlList->insertItem( item );
@@ -789,12 +789,12 @@
void BatchWizard::editItem()
{
- Q3ListViewItem* item = sqlList->selectedItem();
+ QListViewItem* item = sqlList->selectedItem();
if( item )
changeItem( item, QPoint(0,0), 0 );
}
-void BatchWizard::changeItem( Q3ListViewItem* item, const QPoint &, int )
+void BatchWizard::changeItem( QListViewItem* item, const QPoint &, int )
{
if(!item)
return;
@@ -815,12 +815,12 @@
void BatchWizard::removeItem()
{
- Q3ListViewItem* item = sqlList->firstChild();
+ QListViewItem* item = sqlList->firstChild();
while( item )
{
if( item->isSelected() )
{
- Q3ListViewItem* it = item->nextSibling();
+ QListViewItem* it = item->nextSibling();
delete item;
while( it )
@@ -865,7 +865,7 @@
while( query.next() )
{
temp.sprintf("%0*i", 5, sqlList->childCount() + 1 );
- new K3ListViewItem( sqlList, temp, num, query.value( 0 ).toString(), group );
+ new KListViewItem( sqlList, temp, num, query.value( 0 ).toString(), group );
}
enableControls();
@@ -1057,7 +1057,7 @@
{
int y = 0;
int x;
- Q3SqlSelectCursor query( importSqlQuery->text(), SqlTables::getInstance()->database() );
+ QSqlSelectCursor query( importSqlQuery->text(), SqlTables::getInstance()->database() );
query.select();
if( query.lastError().type() != QSqlError::None )
{
@@ -1139,7 +1139,7 @@
void BatchWizard::slotTableRemove()
{
- Q3TableSelection sel = m_varTable->selection( m_varTable->currentSelection() );
+ QTableSelection sel = m_varTable->selection( m_varTable->currentSelection() );
m_varTable->removeRow( sel.topRow() );
}
@@ -1249,10 +1249,10 @@
enableControls();
}
-void BatchWizard::moveAddress( Q3ListView* src, Q3ListView* dst, bool bAll )
+void BatchWizard::moveAddress( QListView* src, QListView* dst, bool bAll )
{
- Q3ListViewItem* item = src->firstChild();
- Q3ListViewItem* cur;
+ QListViewItem* item = src->firstChild();
+ QListViewItem* cur;
while( item )
{
Modified: trunk/src/batchwizard.h
===================================================================
--- trunk/src/batchwizard.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/batchwizard.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -27,19 +27,19 @@
class KCompletion;
class KIntNumInput;
class KLineEdit;
-class K3ListBox;
-class K3ListView;
+class KListBox;
+class KListView;
class KPushButton;
class KUrlRequester;
class QCheckBox;
-class Q3HBox;
+class QHBox;
class QLabel;
-class Q3ListView;
-class Q3ListViewItem;
+class QListView;
+class QListViewItem;
class QRadioButton;
-class Q3Table;
-class Q3VBox;
-class Q3WidgetStack;
+class QTable;
+class QVBox;
+class QWidgetStack;
class BatchWizard : public KWizard {
Q_OBJECT
@@ -131,7 +131,7 @@
void customerNameChanged( int index );
void addItem();
bool slotAddItem( const QString & article, const QString & group, int count );
- void changeItem( Q3ListViewItem* item, const QPoint &, int );
+ void changeItem( QListViewItem* item, const QPoint &, int );
void editItem();
void removeItem();
@@ -145,7 +145,7 @@
void slotRemoveAllAddress();
private:
- void moveAddress( Q3ListView* src, Q3ListView* dst, bool bAll = false );
+ void moveAddress( QListView* src, QListView* dst, bool bAll = false );
void fillByteArray();
void fillVarList();
@@ -186,17 +186,17 @@
QWidget* page1;
QWidget* page2;
- Q3WidgetStack* page3;
- Q3VBox* page4;
- Q3VBox* page5;
+ QWidgetStack* page3;
+ QVBox* page4;
+ QVBox* page5;
QWidget* page10;
- Q3VBox* stack1;
- Q3HBox* stack2;
- Q3VBox* stack3;
+ QVBox* stack1;
+ QHBox* stack2;
+ QVBox* stack3;
QWidget* stack4;
- Q3VBox* imageBox;
+ QVBox* imageBox;
QLabel* labelInfo;
QLabel* labelSqlQuery;
@@ -235,13 +235,13 @@
KIntNumInput* serialInc;
KIntNumInput* numLabels;
- Q3Table* m_varTable;
- K3ListBox* m_varList;
+ QTable* m_varTable;
+ KListBox* m_varList;
- K3ListView* listAddress;
- K3ListView* listSelectedAddress;
+ KListView* listAddress;
+ KListView* listSelectedAddress;
- K3ListView* sqlList;
+ KListView* sqlList;
KLineEdit* serialStart;
QCheckBox* checkKeepOpen;
Modified: trunk/src/commands.cpp
===================================================================
--- trunk/src/commands.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/commands.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -36,7 +36,7 @@
#include <QPixmap>
#include <krandom.h>
-QPoint getFreePos( Q3Canvas* c )
+QPoint getFreePos( QCanvas* c )
{
MyCanvas* canvas = (MyCanvas*)c;
@@ -75,7 +75,7 @@
{
if( m_canvas_item && c )
{
- Q3CanvasItemList list = c->allItems();
+ QCanvasItemList list = c->allItems();
for( unsigned int i=0;i<list.count();i++)
if( m_canvas_item == list[i] )
return true;
@@ -100,7 +100,7 @@
}
NewItemCommand::NewItemCommand( MyCanvasView* view, const QString & name )
- : QObject(), K3Command()
+ : QObject(), KCommand()
{
cv = view;
m_name = name;
Modified: trunk/src/commands.h
===================================================================
--- trunk/src/commands.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/commands.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -38,7 +38,7 @@
class MyCanvasView;
class CanvasBarcode;
class PictureRectangle;
-class Q3CanvasItem;
+class QCanvasItem;
class QColor;
class QFont;
class QImage;
@@ -66,7 +66,7 @@
void documentItemDeleted();
protected:
- Q3Canvas* c;
+ QCanvas* c;
TCanvasItem* m_canvas_item;
};
@@ -77,11 +77,11 @@
* You have to implement void create() which creates
* a QCanvasItem in item.
* NewItemCommand takes care about possitioning and
- * undo/redo (because of K3Command).
+ * undo/redo (because of KCommand).
*
* @author Dominik Seichter
*/
-class NewItemCommand : public QObject, public K3Command {
+class NewItemCommand : public QObject, public KCommand {
Q_OBJECT
public:
NewItemCommand( MyCanvasView* view, const QString & name );
@@ -124,7 +124,7 @@
QString m_name;
};
-class ResizeCommand : public K3Command, CommandUtils {
+class ResizeCommand : public KCommand, CommandUtils {
public:
ResizeCommand( TCanvasItem* it, bool shift = false )
: CommandUtils( it )
@@ -150,7 +150,7 @@
/** Move a TCanvasItem on the canvas
*/
-class MoveCommand : public K3Command, CommandUtils {
+class MoveCommand : public KCommand, CommandUtils {
public:
/**
* @param cx move in x direction cx mm
@@ -175,7 +175,7 @@
int y;
};
-class ChangeZCommand : public K3Command, CommandUtils {
+class ChangeZCommand : public KCommand, CommandUtils {
public:
ChangeZCommand( int z, TCanvasItem* it );
@@ -189,7 +189,7 @@
int m_z, m_oldz;
};
-class LockCommand : public K3Command, CommandUtils {
+class LockCommand : public KCommand, CommandUtils {
public:
LockCommand( bool lock, TCanvasItem* it )
: CommandUtils( it )
@@ -207,7 +207,7 @@
bool m_locked;
};
-class PictureCommand : public K3Command, CommandUtils {
+class PictureCommand : public KCommand, CommandUtils {
public:
PictureCommand( double r, bool mirrorh, bool mirrorv, EImageScaling s, ImageItem* it );
~PictureCommand() {}
@@ -233,7 +233,7 @@
ImageItem* m_item;
};
-class TextChangeCommand : public K3Command, CommandUtils {
+class TextChangeCommand : public KCommand, CommandUtils {
public:
TextChangeCommand( TextItem* it, QString t );
~TextChangeCommand() { }
@@ -248,7 +248,7 @@
TextItem* m_item;
};
-class TextRotationCommand : public K3Command, protected CommandUtils {
+class TextRotationCommand : public KCommand, protected CommandUtils {
public:
TextRotationCommand( double rot, TextItem* t );
@@ -265,7 +265,7 @@
//NY28
-class TextLineChangeCommand : public K3Command, CommandUtils {
+class TextLineChangeCommand : public KCommand, CommandUtils {
public:
TextLineChangeCommand( TextLineItem* it, QString t, int font, int magvert, int maghor );
~TextLineChangeCommand() { }
@@ -284,7 +284,7 @@
};
//NY28
-class BarcodeCommand : public K3Command, CommandUtils {
+class BarcodeCommand : public KCommand, CommandUtils {
public:
BarcodeCommand( BarcodeItem* bcode, Barkode* d );
~BarcodeCommand() {
@@ -363,7 +363,7 @@
TokenProvider* m_token;
};
-class DeleteCommand : public K3Command, CommandUtils {
+class DeleteCommand : public KCommand, CommandUtils {
public:
DeleteCommand( TCanvasItem* it )
: CommandUtils( it )
@@ -378,7 +378,7 @@
}
};
-class BorderCommand : public K3Command, protected CommandUtils {
+class BorderCommand : public KCommand, protected CommandUtils {
public:
BorderCommand( bool border, const QPen & pen, DocumentItem* item );
@@ -397,7 +397,7 @@
DocumentItem* m_item;
};
-class FillCommand : public K3Command, protected CommandUtils {
+class FillCommand : public KCommand, protected CommandUtils {
public:
FillCommand( QColor c, RectItem* r );
@@ -412,7 +412,7 @@
RectItem* m_item;
};
-class ScriptCommand : public K3Command, CommandUtils {
+class ScriptCommand : public KCommand, CommandUtils {
public:
ScriptCommand( const QString & script, TCanvasItem* it )
: CommandUtils( it )
Modified: trunk/src/configdialog.cpp
===================================================================
--- trunk/src/configdialog.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/configdialog.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -29,10 +29,10 @@
#include <qsqldatabase.h>
#include <qtooltip.h>
//Added by qt3to4:
-#include <Q3HBoxLayout>
-#include <Q3GridLayout>
-#include <Q3Frame>
-#include <Q3VBoxLayout>
+#include <QHBoxLayout>
+#include <QGridLayout>
+#include <QFrame>
+#include <QVBoxLayout>
// KDE includes
#include <kabc/addressee.h>
@@ -70,7 +70,7 @@
void ConfigDialog::setupTab1( )
{
QFrame* box = addPage( i18n("SQL Settings"), "", BarIcon("connect_no") );
- Q3VBoxLayout* layout = new Q3VBoxLayout( box, 6, 6 );
+ QVBoxLayout* layout = new QVBoxLayout( box, 6, 6 );
QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding );
sqlwidget = new SqlWidget( false, box, "sqlwidget" );
@@ -85,9 +85,9 @@
QFrame* box = addPage( i18n("Print Settings"), "", BarIcon("fileprint") );
- Q3VBoxLayout* tabLayout = new Q3VBoxLayout( box, 11, 6 );
- Q3HBoxLayout* Layout0 = new Q3HBoxLayout( 0, 6, 6 );
- Q3HBoxLayout* Layout1 = new Q3HBoxLayout( 0, 6, 6 );
+ QVBoxLayout* tabLayout = new QVBoxLayout( box, 11, 6 );
+ QHBoxLayout* Layout0 = new QHBoxLayout( 0, 6, 6 );
+ QHBoxLayout* Layout1 = new QHBoxLayout( 0, 6, 6 );
QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding );
printerQuality = new KComboBox( false, box );
@@ -127,7 +127,7 @@
labelprinterdata* lb = PrinterSettings::getInstance()->getData();
QFrame* box = addPage( i18n("Import"), "", BarIcon("fileimport") );
- Q3GridLayout* grid = new Q3GridLayout( box, 2, 2 );
+ QGridLayout* grid = new QGridLayout( box, 2, 2 );
QLabel* label = new QLabel( box );
label->setText( i18n("Comment:") );
@@ -155,7 +155,7 @@
grid->addMultiCellWidget( checkUseCustomNo, 3, 3, 0, 2 );
- Q3HBoxLayout* Layout1 = new Q3HBoxLayout( 0, 6, 6 );
+ QHBoxLayout* Layout1 = new QHBoxLayout( 0, 6, 6 );
Layout1->addWidget( new QLabel( i18n("File Format:"), box ) );
combo1 = new KComboBox( box );
@@ -190,7 +190,7 @@
void ConfigDialog::setupTab4()
{
QFrame* box = addPage( i18n("Label Editor"), "", BarIcon("kbarcode") );
- Q3GridLayout* tabLayout = new Q3GridLayout( box, 11, 6 );
+ QGridLayout* tabLayout = new QGridLayout( box, 11, 6 );
checkNewDlg = new QCheckBox( box );
checkNewDlg->setText( i18n("&Create a new label on startup") );
@@ -220,13 +220,13 @@
labelprinterdata* lb = PrinterSettings::getInstance()->getData();
QFrame* box = addPage( i18n("On New"), "", BarIcon("filenew") );
- Q3VBoxLayout* tabLayout = new Q3VBoxLayout( box, 11, 6 );
+ QVBoxLayout* tabLayout = new QVBoxLayout( box, 11, 6 );
- Q3ButtonGroup* bg = new Q3ButtonGroup( i18n("On New Article"), box );
+ QButtonGroup* bg = new QButtonGroup( i18n("On New Article"), box );
bg->setColumnLayout(0, Qt::Vertical );
bg->layout()->setSpacing( 6 );
bg->layout()->setMargin( 11 );
- Q3GridLayout* bgLayout = new Q3GridLayout( bg->layout() );
+ QGridLayout* bgLayout = new QGridLayout( bg->layout() );
QStringList alist, glist;
alist.append( i18n("No Line Break") );
@@ -263,11 +263,11 @@
bgLayout->addWidget( onNewArticle3, 2, 1 );
bgLayout->addWidget( onNewArticle4, 3, 1 );
- Q3ButtonGroup* bg2 = new Q3ButtonGroup( i18n("On New Group"), box );
+ QButtonGroup* bg2 = new QButtonGroup( i18n("On New Group"), box );
bg2->setColumnLayout(0, Qt::Vertical );
bg2->layout()->setSpacing( 6 );
bg2->layout()->setMargin( 11 );
- Q3GridLayout* bg2Layout = new Q3GridLayout( bg2->layout() );
+ QGridLayout* bg2Layout = new QGridLayout( bg2->layout() );
onNewGroup1 = new KComboBox( false, bg2 );
onNewGroup2 = new KComboBox( false, bg2 );
Modified: trunk/src/confwizard.cpp
===================================================================
--- trunk/src/confwizard.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/confwizard.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -30,8 +30,8 @@
#include <qprinter.h>
#include <q3textbrowser.h>
//Added by qt3to4:
-#include <Q3HBoxLayout>
-#include <Q3VBoxLayout>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
#include <QLabel>
// KDE includes
@@ -88,11 +88,11 @@
void ConfWizard::setupPage1()
{
page = new QWidget( this );
- pageLayout = new Q3VBoxLayout( page, 11, 6, "pageLayout");
+ pageLayout = new QVBoxLayout( page, 11, 6, "pageLayout");
- Layout8 = new Q3HBoxLayout( 0, 0, 6, "Layout8");
+ Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
- Layout7 = new Q3VBoxLayout( 0, 0, 6, "Layout7");
+ Layout7 = new QVBoxLayout( 0, 0, 6, "Layout7");
logo = new QLabel( page );
logo->setPixmap( locate("data", "kbarcode/logo.png") );
@@ -118,9 +118,9 @@
void ConfWizard::setupPage0()
{
QWidget* page_0 = new QWidget( this );
- Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page_0, 11, 6, "pageLayout");
+ QVBoxLayout* pageLayout = new QVBoxLayout( page_0, 11, 6, "pageLayout");
- Q3TextBrowser* b = new Q3TextBrowser( page_0, "b" );
+ QTextBrowser* b = new QTextBrowser( page_0, "b" );
b->setText( MainWindow::systemCheck() );
pageLayout->addWidget( b );
@@ -131,7 +131,7 @@
void ConfWizard::setupPage2()
{
page_2 = new QWidget( this );
- pageLayout_2 = new Q3VBoxLayout( page_2, 11, 6, "pageLayout_2");
+ pageLayout_2 = new QVBoxLayout( page_2, 11, 6, "pageLayout_2");
checkDatabase = new QCheckBox( page_2 );
checkDatabase->setText( i18n("&Use database with KBarcode") );
@@ -151,14 +151,14 @@
void ConfWizard::setupPage3()
{
page_3 = new QWidget( this );
- pageLayout_3 = new Q3VBoxLayout( page_3, 11, 6, "pageLayout_3");
+ pageLayout_3 = new QVBoxLayout( page_3, 11, 6, "pageLayout_3");
TextLabel1_2 = new QLabel( page_3 );
TextLabel1_2->setText( i18n( "KBarcode can create the required SQL tables for you.<br>KBarcode will add also some Label Definitions to the tables.<br>After that you can fill the tables with some example data." ) );
TextLabel1_2->setAlignment( int( QLabel::WordBreak | Qt::AlignVCenter ) );
pageLayout_3->addWidget( TextLabel1_2 );
- Layout5_2 = new Q3VBoxLayout( 0, 0, 6, "Layout5_2");
+ Layout5_2 = new QVBoxLayout( 0, 0, 6, "Layout5_2");
buttonCreate = new KPushButton( page_3 );
buttonCreate->setText( i18n( "&Create Tables" ) );
@@ -233,7 +233,7 @@
void ConfWizard::showPage( QWidget* page )
{
- Q3Wizard::showPage(page);
+ QWizard::showPage(page);
if( page == page_2 && !sqlwidget->driverCount() ) {
KMessageBox::information( this, i18n(
Modified: trunk/src/confwizard.h
===================================================================
--- trunk/src/confwizard.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/confwizard.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -20,16 +20,16 @@
#include <kwizard.h>
//Added by qt3to4:
-#include <Q3GridLayout>
-#include <Q3HBoxLayout>
-#include <Q3VBoxLayout>
+#include <QGridLayout>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
#include <QLabel>
-class Q3ButtonGroup;
+class QButtonGroup;
class QCheckBox;
-class Q3VBoxLayout;
-class Q3HBoxLayout;
-class Q3GridLayout;
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
class QRadioButton;
class KComboBox;
class KLineEdit;
@@ -89,20 +89,20 @@
QLabel* TextLabel1_2;
KPushButton* buttonCreate;
KPushButton* buttonExample;
- Q3ButtonGroup* groupDatabase;
+ QButtonGroup* groupDatabase;
protected:
- Q3VBoxLayout* pageLayout;
- Q3HBoxLayout* Layout8;
- Q3VBoxLayout* Layout7;
- Q3VBoxLayout* pageLayout_2;
- Q3VBoxLayout* pageLayout_4;
- Q3HBoxLayout* Layout5;
- Q3VBoxLayout* Layout3;
- Q3VBoxLayout* Layout4;
- Q3VBoxLayout* Layout6;
- Q3VBoxLayout* pageLayout_3;
- Q3VBoxLayout* Layout5_2;
+ QVBoxLayout* pageLayout;
+ QHBoxLayout* Layout8;
+ QVBoxLayout* Layout7;
+ QVBoxLayout* pageLayout_2;
+ QVBoxLayout* pageLayout_4;
+ QHBoxLayout* Layout5;
+ QVBoxLayout* Layout3;
+ QVBoxLayout* Layout4;
+ QVBoxLayout* Layout6;
+ QVBoxLayout* pageLayout_3;
+ QVBoxLayout* Layout5_2;
};
#endif // CONFWIZARD_H
Modified: trunk/src/csvfile.h
===================================================================
--- trunk/src/csvfile.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/csvfile.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -22,7 +22,7 @@
#include <qstringlist.h>
#include <q3textstream.h>
//Added by qt3to4:
-#include <Q3ValueList>
+#include <QValueList>
class QBuffer;
@@ -67,7 +67,7 @@
/** set the field widths for fixed field width files
*/
- inline void setFieldWidth( const Q3ValueList<int> & width );
+ inline void setFieldWidth( const QValueList<int> & width );
/** sets wether this is a CSV file or
* a file with fixed field width.
@@ -94,13 +94,13 @@
/** the filehandle which is used to access the file
*/
QFile m_file;
- Q3TextStream m_stream;
+ QTextStream m_stream;
QString m_quote;
QString m_separator;
QString m_comment;
- Q3ValueList<int> m_width;
+ QValueList<int> m_width;
bool m_csv;
bool m_eof;
@@ -144,7 +144,7 @@
m_comment = comment;
}
-void CSVFile::setFieldWidth( const Q3ValueList<int> & width )
+void CSVFile::setFieldWidth( const QValueList<int> & width )
{
m_width = width;
}
Modified: trunk/src/csvimportdlg.cpp
===================================================================
--- trunk/src/csvimportdlg.cpp 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/csvimportdlg.cpp 2008-02-27 21:54:25 UTC (rev 22)
@@ -38,10 +38,10 @@
#include <q3textstream.h>
#include <q3vbox.h>
//Added by qt3to4:
-#include <Q3HBoxLayout>
-#include <Q3GridLayout>
-#include <Q3ValueList>
-#include <Q3VBoxLayout>
+#include <QHBoxLayout>
+#include <QGridLayout>
+#include <QValueList>
+#include <QVBoxLayout>
// KDE includes
#include <kapplication.h>
@@ -96,8 +96,8 @@
void CSVImportDlg::createPage1()
{
QFrame* box = addPage( i18n("&Import Data") );
- Q3VBoxLayout* layout = new Q3VBoxLayout( box, 6, 6 );
- Q3GridLayout* grid = new Q3GridLayout( 2 );
+ QVBoxLayout* layout = new QVBoxLayout( box, 6, 6 );
+ QGridLayout* grid = new QGridLayout( 2 );
requester = new KUrlRequester( box );
comboEncoding = new EncodingCombo( box );
@@ -115,11 +115,11 @@
spinLoadOnly->setRange( 0, 10000, 1, false );
checkLoadAll->setChecked( true );
- table = new Q3Table( box );
+ table = new QTable( box );
table->setReadOnly( true );
- frame = new Q3Frame( box );
- Q3HBoxLayout* layout2 = new Q3HBoxLayout( frame, 6, 6 );
+ frame = new QFrame( box );
+ QHBoxLayout* layout2 = new QHBoxLayout( frame, 6, 6 );
spinCol = new KIntNumInput( frame );
spinCol->setLabel( i18n("Column:"), Qt::AlignLeft | Qt::AlignVCenter );
@@ -154,25 +154,25 @@
{
labelprinterdata* lb = PrinterSettings::getInstance()->getData();
QFrame* mainBox = addPage( i18n("&Import Settings") );
- Q3VBoxLayout* layout = new Q3VBoxLayout( mainBox, 6, 6 );
+ QVBoxLayout* layout = new QVBoxLayout( mainBox, 6, 6 );
QSpacerItem* spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- Q3HButtonGroup* buttonGroup = new Q3HButtonGroup( i18n("File Format:"), mainBox );
+ QHButtonGroup* buttonGroup = new QHButtonGroup( i18n("File Format:"), mainBox );
radioCSVFile = new QRadioButton( i18n("&CSV File"), buttonGroup );
radioFixedFile = new QRadioButton( i18n("File with &fixed field width"), buttonGroup );
- Q3HBox* hboxFrame = new Q3HBox( mainBox );
+ QHBox* hboxFrame = new QHBox( mainBox );
- groupCSV = new Q3GroupBox( i18n("CSV File"), hboxFrame );
- groupFixed = new Q3GroupBox( i18n("Fixed Field Width File"), hboxFrame );
+ groupCSV = new QGroupBox( i18n("CSV File"), hboxFrame );
+ groupFixed = new QGroupBox( i18n("Fixed Field Width File"), hboxFrame );
groupCSV->setColumnLayout(0, Qt::Vertical );
groupCSV->layout()->setSpacing( 6 );
groupCSV->layout()->setMargin( 11 );
- Q3VBoxLayout* vbox = new Q3VBoxLayout( groupCSV->layout() );
- Q3GridLayout* grid = new Q3GridLayout( 2, 2 );
+ QVBoxLayout* vbox = new QVBoxLayout( groupCSV->layout() );
+ QGridLayout* grid = new QGridLayout( 2, 2 );
grid->setSpacing( 6 );
grid->setMargin( 11 );
@@ -203,10 +203,10 @@
groupFixed->setColumnLayout(0, Qt::Horizontal );
groupFixed->layout()->setSpacing( 6 );
groupFixed->layout()->setMargin( 11 );
- Q3HBoxLayout* groupFixedLayout = new Q3HBoxLayout( groupFixed->layout() );
+ QHBoxLayout* groupFixedLayout = new QHBoxLayout( groupFixed->layout() );
groupFixedLayout->setAlignment( Qt::AlignTop );
- listWidth = new K3ListBox( groupFixed );
+ listWidth = new KListBox( groupFixed );
buttonAdd = new KPushButton( groupFixed );
buttonAdd->setText( i18n( "&Add Field" ) );
@@ -219,7 +219,7 @@
spinNumber->setValue( 1 );
spinNumber->setFocus();
- Q3VBoxLayout* layout2 = new Q3VBoxLayout( 0, 6, 6 );
+ QVBoxLayout* layout2 = new QVBoxLayout( 0, 6, 6 );
layout2->addWidget( buttonAdd );
layout2->addWidget( buttonRemove );
layout2->addWidget( spinNumber );
@@ -335,8 +335,8 @@
void CSVImportDlg::accept()
{
CSVFile file( requester->url() );
- Q3Header* h = table->horizontalHeader();
- Q3ValueList<int> headers;
+ QHeader* h = table->horizontalHeader();
+ QValueList<int> headers;
QStringList list;
QString name = getDatabaseName();
int i = 0;
@@ -409,9 +409,9 @@
settingsChanged();
}
-Q3ValueList<int> CSVImportDlg::getFieldWidth()
+QValueList<int> CSVImportDlg::getFieldWidth()
{
- Q3ValueList<int> list;
+ QValueList<int> list;
for( unsigned int i=0;i<listWidth->count();i++ )
list << listWidth->text( i ).toInt();
@@ -421,7 +421,7 @@
void CSVImportDlg::initCsvFile( CSVFile* file )
{
- Q3ValueList<int> width = getFieldWidth();
+ QValueList<int> width = getFieldWidth();
file->setEncoding( comboEncoding->currentText() );
file->setCSVFile( radioCSVFile->isChecked() );
Modified: trunk/src/csvimportdlg.h
===================================================================
--- trunk/src/csvimportdlg.h 2008-02-27 21:35:23 UTC (rev 21)
+++ trunk/src/csvimportdlg.h 2008-02-27 21:54:25 UTC (rev 22)
@@ -20,8 +20,8 @@
#include <qwidget.h>
//Added by qt3to4:
-#include <Q3Frame>
-#include <Q3ValueList>...
[truncated message content] |