|
From: <vz...@us...> - 2008-02-26 21:46:02
|
Revision: 12
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=12&view=rev
Author: vzsolt
Date: 2008-02-26 13:46:07 -0800 (Tue, 26 Feb 2008)
Log Message:
-----------
As a first manual step, I've replaced KPrinter with QPrinter everywhere.
With this simple change, the number of build errors went down from 3400 to 3000 :)
Modified Paths:
--------------
trunk/src/barcodedialog.cpp
trunk/src/barkode.cpp
trunk/src/batchprinter.cpp
trunk/src/batchprinter.h
trunk/src/batchwizard.cpp
trunk/src/label.cpp
trunk/src/label.h
trunk/src/labeleditor.cpp
trunk/src/labeleditor.h
trunk/src/labelutils.h
trunk/src/printersettings.cpp
trunk/src/printersettings.h
trunk/src/tec.cpp
trunk/src/tec.h
Modified: trunk/src/barcodedialog.cpp
===================================================================
--- trunk/src/barcodedialog.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/barcodedialog.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -29,7 +29,7 @@
#include <kimageio.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <kprinter.h>
+#include <qprinter.h>
#include <kpushbutton.h>
// Qt includes
@@ -168,7 +168,7 @@
if( d.isValid() )
return;
- KPrinter* printer = PrinterSettings::getInstance()->setupPrinter( "kbarcode", this );
+ QPrinter* printer = PrinterSettings::getInstance()->setupPrinter( "kbarcode", this );
if( !printer )
return;
Modified: trunk/src/barkode.cpp
===================================================================
--- trunk/src/barkode.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/barkode.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -693,6 +693,7 @@
s_havePurePostscript = !KStandardDirs::findExe( "gs" ).isNull()
&& PurePostscriptBarcode::hasPurePostscriptBarcode();
+// TODO: I think this functionality should be moved to the engines. - VZsolt
if( s_haveGnuBarcode )
{
s_info.append( createInfo( "128raw", i18n("Raw code 128"), GNU_BARCODE, 0, BARCODE_128RAW ) );
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/batchprinter.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -40,7 +40,7 @@
#include <kimageio.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <kprinter.h>
+#include <qprinter.h>
// Other includes
#include <stdlib.h>
@@ -49,7 +49,7 @@
#include <krun.h>
#define MAXDATASIZE 32550
-BatchPrinter::BatchPrinter( KPrinter* p, QWidget* _parent )
+BatchPrinter::BatchPrinter( QPrinter* p, QWidget* _parent )
: printer( p ), parent( _parent )
{
m_events = true;
Modified: trunk/src/batchprinter.h
===================================================================
--- trunk/src/batchprinter.h 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/batchprinter.h 2008-02-26 21:46:07 UTC (rev 12)
@@ -29,7 +29,7 @@
class Definition;
class Label;
-class KPrinter;
+class QPrinter;
class Measurements;
class QBuffer;
class QPainter;
@@ -58,7 +58,7 @@
/** Use this constructor if you want to print to
* a printer.
*/
- BatchPrinter( KPrinter* p, QWidget* _parent );
+ BatchPrinter( QPrinter* p, QWidget* _parent );
/** This constructor is used in image gernaration mode.
* @p path is the path to an existing directory where
* the images are saved.
@@ -202,7 +202,7 @@
QPaintDevice* m_paintDevice;
QBuffer* buffer;
- KPrinter* printer;
+ QPrinter* printer;
QPainter* painter;
/** parent for dialogs
*/
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/batchwizard.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -561,7 +561,7 @@
void BatchWizard::printNow( const QString & printer, bool bUserInteraction )
{
BatchPrinter* batch = NULL;
- KPrinter* prn = NULL;
+ QPrinter* prn = NULL;
int batchType = 0;
// let's check if the label file does even exist!
Modified: trunk/src/label.cpp
===================================================================
--- trunk/src/label.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/label.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -41,7 +41,7 @@
// KDE includes
#include <kapplication.h>
#include <klocale.h>
-#include <kprinter.h>
+#include <qprinter.h>
Label::Label( Definition* _def, QIODevice* device, QString labelname, QPaintDevice* _printer, QString customer_id, QString _article_no, QString _group )
: TokenProvider( _printer )
Modified: trunk/src/label.h
===================================================================
--- trunk/src/label.h 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/label.h 2008-02-26 21:46:07 UTC (rev 12)
@@ -33,7 +33,7 @@
class QPainter;
class QPaintDevice;
class Q3TextStream;
-class KPrinter;
+class QPrinter;
/** Creates a QPicture from the XML KBarcode file. If a SQL connections is available
* the data from the SQL tables will be used, too.
*/
@@ -52,7 +52,7 @@
int getId() const;
static void getXLabel( double x, double y, double width, double height, QPainter* painter, int mode, QString value = "" );
- //void setPrinter( KPrinter* p ) { m_printer = p; }
+ //void setPrinter( QPrinter* p ) { m_printer = p; }
/** reimplemented from TokenProvider
* returns wether this label has to be regenerated everytime
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/labeleditor.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -101,7 +101,7 @@
#include <knuminput.h>
#include <kmenu.h>
#include <kpushbutton.h>
-#include <kprinter.h>
+#include <qprinter.h>
#include <krun.h>
#include <kspell.h>
#include <kstatusbar.h>
@@ -767,7 +767,7 @@
PrinterSettings::getInstance()->getData()->border = pld.border();
- KPrinter* printer = PrinterSettings::getInstance()->setupPrinter( KUrl( filename ), this );
+ QPrinter* printer = PrinterSettings::getInstance()->setupPrinter( KUrl( filename ), this );
if( !printer )
return;
Modified: trunk/src/labeleditor.h
===================================================================
--- trunk/src/labeleditor.h 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/labeleditor.h 2008-02-26 21:46:07 UTC (rev 12)
@@ -72,7 +72,7 @@
class QPaintDevice;
class QString;
class KPushButton;
-class KPrinter;
+class QPrinter;
class Q3CanvasItem;
class TCanvasItem;
class RectItem;
Modified: trunk/src/labelutils.h
===================================================================
--- trunk/src/labelutils.h 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/labelutils.h 2008-02-26 21:46:07 UTC (rev 12)
@@ -22,7 +22,7 @@
#define LABELUTILS_H
class Definition;
-class KPrinter;
+class QPrinter;
class QDomElement;
class QFont;
class QImage;
Modified: trunk/src/printersettings.cpp
===================================================================
--- trunk/src/printersettings.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/printersettings.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -36,35 +36,35 @@
const PageFormatInfo pageFormatInfo[]=
{
- { KPrinter::A3, "A3", I18N_NOOP("ISO A3"), 297.0, 420.0 },
- { KPrinter::A4, "A4", I18N_NOOP("ISO A4"), 210.0, 297.0 },
- { KPrinter::A5, "A5", I18N_NOOP("ISO A5"), 148.0, 210.0 },
- { KPrinter::Letter, "Letter", I18N_NOOP("US Letter"), 216.0, 279.0 }, // should be 215.9 mm x 279.4 mm
- { KPrinter::Legal, "Legal", I18N_NOOP("US Legal"), 216.0, 356.0 }, // should be 215.9 mm x 335.6 mm
- { KPrinter::A4, "Screen", I18N_NOOP("Screen"), 297.0, 210.0 }, // Custom, so fall back to A4
- { KPrinter::A4, "Custom", I18N_NOOP("Custom"), 210.0, 297.0 }, // Custom, so fall back to A4
- { KPrinter::B5, "B5", I18N_NOOP("ISO B5"), 182.0, 257.0 },
- { KPrinter::Executive, "Executive", I18N_NOOP("US Executive"), 191.0, 254.0 }, // should be 190.5 mm x 254.0 mm
- { KPrinter::A0, "A0", I18N_NOOP("ISO A0"), 841.0, 1189.0 },
- { KPrinter::A1, "A1", I18N_NOOP("ISO A1"), 594.0, 841.0 },
- { KPrinter::A2, "A2", I18N_NOOP("ISO A2"), 420.0, 594.0 },
- { KPrinter::A6, "A6", I18N_NOOP("ISO A6"), 105.0, 148.0 },
- { KPrinter::A7, "A7", I18N_NOOP("ISO A7"), 74.0, 105.0 },
- { KPrinter::A8, "A8", I18N_NOOP("ISO A8"), 52.0, 74.0 },
- { KPrinter::A9, "A9", I18N_NOOP("ISO A9"), 37.0, 52.0 },
- { KPrinter::B0, "B0", I18N_NOOP("ISO B0"), 1030.0, 1456.0 },
- { KPrinter::B1, "B1", I18N_NOOP("ISO B1"), 728.0, 1030.0 },
- { KPrinter::B10, "B10", I18N_NOOP("ISO B10"), 32.0, 45.0 },
- { KPrinter::B2, "B2", I18N_NOOP("ISO B2"), 515.0, 728.0 },
- { KPrinter::B3, "B3", I18N_NOOP("ISO B3"), 364.0, 515.0 },
- { KPrinter::B4, "B4", I18N_NOOP("ISO B4"), 257.0, 364.0 },
- { KPrinter::B6, "B6", I18N_NOOP("ISO B6"), 128.0, 182.0 },
- { KPrinter::C5E, "C5", I18N_NOOP("ISO C5"), 163.0, 229.0 }, // Some sources tells: 162 mm x 228 mm
- { KPrinter::Comm10E, "Comm10", I18N_NOOP("US Common 10"), 105.0, 241.0 }, // should be 104.775 mm x 241.3 mm
- { KPrinter::DLE, "DL", I18N_NOOP("ISO DL"), 110.0, 220.0 },
- { KPrinter::Folio, "Folio", I18N_NOOP("US Folio"), 210.0, 330.0 }, // should be 209.54 mm x 330.2 mm
- { KPrinter::Ledger, "Ledger", I18N_NOOP("US Ledger"), 432.0, 279.0 }, // should be 431.8 mm x 297.4 mm
- { KPrinter::Tabloid, "Tabloid", I18N_NOOP("US Tabloid"), 279.0, 432.0 } // should be 297.4 mm x 431.8 mm
+ { QPrinter::A3, "A3", I18N_NOOP("ISO A3"), 297.0, 420.0 },
+ { QPrinter::A4, "A4", I18N_NOOP("ISO A4"), 210.0, 297.0 },
+ { QPrinter::A5, "A5", I18N_NOOP("ISO A5"), 148.0, 210.0 },
+ { QPrinter::Letter, "Letter", I18N_NOOP("US Letter"), 216.0, 279.0 }, // should be 215.9 mm x 279.4 mm
+ { QPrinter::Legal, "Legal", I18N_NOOP("US Legal"), 216.0, 356.0 }, // should be 215.9 mm x 335.6 mm
+ { QPrinter::A4, "Screen", I18N_NOOP("Screen"), 297.0, 210.0 }, // Custom, so fall back to A4
+ { QPrinter::A4, "Custom", I18N_NOOP("Custom"), 210.0, 297.0 }, // Custom, so fall back to A4
+ { QPrinter::B5, "B5", I18N_NOOP("ISO B5"), 182.0, 257.0 },
+ { QPrinter::Executive, "Executive", I18N_NOOP("US Executive"), 191.0, 254.0 }, // should be 190.5 mm x 254.0 mm
+ { QPrinter::A0, "A0", I18N_NOOP("ISO A0"), 841.0, 1189.0 },
+ { QPrinter::A1, "A1", I18N_NOOP("ISO A1"), 594.0, 841.0 },
+ { QPrinter::A2, "A2", I18N_NOOP("ISO A2"), 420.0, 594.0 },
+ { QPrinter::A6, "A6", I18N_NOOP("ISO A6"), 105.0, 148.0 },
+ { QPrinter::A7, "A7", I18N_NOOP("ISO A7"), 74.0, 105.0 },
+ { QPrinter::A8, "A8", I18N_NOOP("ISO A8"), 52.0, 74.0 },
+ { QPrinter::A9, "A9", I18N_NOOP("ISO A9"), 37.0, 52.0 },
+ { QPrinter::B0, "B0", I18N_NOOP("ISO B0"), 1030.0, 1456.0 },
+ { QPrinter::B1, "B1", I18N_NOOP("ISO B1"), 728.0, 1030.0 },
+ { QPrinter::B10, "B10", I18N_NOOP("ISO B10"), 32.0, 45.0 },
+ { QPrinter::B2, "B2", I18N_NOOP("ISO B2"), 515.0, 728.0 },
+ { QPrinter::B3, "B3", I18N_NOOP("ISO B3"), 364.0, 515.0 },
+ { QPrinter::B4, "B4", I18N_NOOP("ISO B4"), 257.0, 364.0 },
+ { QPrinter::B6, "B6", I18N_NOOP("ISO B6"), 128.0, 182.0 },
+ { QPrinter::C5E, "C5", I18N_NOOP("ISO C5"), 163.0, 229.0 }, // Some sources tells: 162 mm x 228 mm
+ { QPrinter::Comm10E, "Comm10", I18N_NOOP("US Common 10"), 105.0, 241.0 }, // should be 104.775 mm x 241.3 mm
+ { QPrinter::DLE, "DL", I18N_NOOP("ISO DL"), 110.0, 220.0 },
+ { QPrinter::Folio, "Folio", I18N_NOOP("US Folio"), 210.0, 330.0 }, // should be 209.54 mm x 330.2 mm
+ { QPrinter::Ledger, "Ledger", I18N_NOOP("US Ledger"), 432.0, 279.0 }, // should be 431.8 mm x 297.4 mm
+ { QPrinter::Tabloid, "Tabloid", I18N_NOOP("US Tabloid"), 279.0, 432.0 } // should be 297.4 mm x 431.8 mm
};
// end stolen
@@ -119,7 +119,7 @@
// get default page size from KDE
if( lpdata->format == -1 )
for( unsigned int i = 0; i < sizeof( pageFormatInfo ) / sizeof( PageFormatInfo ); i++ )
- if( pageFormatInfo[i].kprinter == KGlobal::locale()->pageSize() ) {
+ if( pageFormatInfo[i].qprinter == KGlobal::locale()->pageSize() ) {
lpdata->format = i;
break;
}
@@ -157,9 +157,9 @@
return lpdata->quality == Middle || lpdata->quality == VeryHigh? High : lpdata->quality;
};
-KPrinter* PrinterSettings::setupPrinter( const KUrl & url, QWidget* parent, bool immediately, const QString & prn )
+QPrinter* PrinterSettings::setupPrinter( const KUrl & url, QWidget* parent, bool immediately, const QString & prn )
{
- KPrinter* printer = new KPrinter( true, (enum QPrinter::PrinterMode)getQuality() );
+ QPrinter* printer = new QPrinter( true, (enum QPrinter::PrinterMode)getQuality() );
if( getData()->quality == Middle )
printer->setResolution( 300 );
else if( getData()->quality == VeryHigh )
Modified: trunk/src/printersettings.h
===================================================================
--- trunk/src/printersettings.h 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/printersettings.h 2008-02-26 21:46:07 UTC (rev 12)
@@ -20,7 +20,7 @@
#include <qobject.h>
#include <qstring.h>
-#include <kprinter.h>
+#include <qprinter.h>
class KUrl;
@@ -48,14 +48,14 @@
typedef struct PageFormatInfo
{
- KPrinter::PageSize kprinter;
+ QPrinter::PageSize qprinter;
const char* shortName; // Short name
const char* descriptiveName; // Full name, which will be translated
double width; // in mm
double height; // in mm
};
-class KPrinter;
+class QPrinter;
class KComboBox;
class PrinterSettings: public QObject {
Q_OBJECT
@@ -80,7 +80,7 @@
static PrinterSettings* getInstance();
// don't forget to delete printer
- KPrinter* setupPrinter( const KUrl & url, QWidget* parent, bool immediately = false, const QString & prn = QString::null );
+ QPrinter* setupPrinter( const KUrl & url, QWidget* parent, bool immediately = false, const QString & prn = QString::null );
public slots:
void loadConfig();
Modified: trunk/src/tec.cpp
===================================================================
--- trunk/src/tec.cpp 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/tec.cpp 2008-02-26 21:46:07 UTC (rev 12)
@@ -47,7 +47,7 @@
#include <kmessagebox.h>
#include <kmenu.h>
#include <knuminput.h>
-#include <kprinter.h>
+#include <qprinter.h>
#include <kurlrequester.h>
#define MAXDATASIZE 32550
Modified: trunk/src/tec.h
===================================================================
--- trunk/src/tec.h 2008-02-09 13:35:39 UTC (rev 11)
+++ trunk/src/tec.h 2008-02-26 21:46:07 UTC (rev 12)
@@ -45,7 +45,7 @@
#include <kmessagebox.h>
#include <kmenu.h>
#include <knuminput.h>
-#include <kprinter.h>
+#include <qprinter.h>
#include <kurlrequester.h>
QString tec452(const QString &file, int count, const QString &art, const QString &group, const QString &id);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-26 22:23:32
|
Revision: 13
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=13&view=rev
Author: vzsolt
Date: 2008-02-26 14:23:37 -0800 (Tue, 26 Feb 2008)
Log Message:
-----------
QComboBox's insertItem method is deprecated. I've replaced them with "addItem", as it's equivalent.
This cleaned up around 40 messages from the build log.
Modified Paths:
--------------
trunk/src/barcodedialogs.cpp
trunk/src/barcodeprinterdlg.cpp
trunk/src/batchwizard.cpp
trunk/src/configdialog.cpp
trunk/src/csvimportdlg.cpp
trunk/src/definitiondialog.cpp
trunk/src/previewdialog.cpp
trunk/src/printersettings.cpp
trunk/src/propertywidget.cpp
trunk/src/sqltables.cpp
trunk/src/tokendialog.cpp
Modified: trunk/src/barcodedialogs.cpp
===================================================================
--- trunk/src/barcodedialogs.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/barcodedialogs.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -319,37 +319,37 @@
datamLayout->addWidget( comboDataMatrix );
datamLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) );
- comboDataMatrix->insertItem( i18n("Automatic calculation" ) );
- comboDataMatrix->insertItem( "10 x 10" );
- comboDataMatrix->insertItem( "12 x 12" );
- comboDataMatrix->insertItem( "14 x 14" );
- comboDataMatrix->insertItem( "16 x 16" );
- comboDataMatrix->insertItem( "18 x 18" );
- comboDataMatrix->insertItem( "20 x 20" );
- comboDataMatrix->insertItem( "22 x 22" );
- comboDataMatrix->insertItem( "24 x 24" );
- comboDataMatrix->insertItem( "26 x 26" );
- comboDataMatrix->insertItem( "32 x 32" );
- comboDataMatrix->insertItem( "36 x 36" );
- comboDataMatrix->insertItem( "40 x 40" );
- comboDataMatrix->insertItem( "44 x 44" );
- comboDataMatrix->insertItem( "48 x 48" );
- comboDataMatrix->insertItem( "52 x 52" );
- comboDataMatrix->insertItem( "64 x 64" );
- comboDataMatrix->insertItem( "72 x 72" );
- comboDataMatrix->insertItem( "80 x 80" );
- comboDataMatrix->insertItem( "88 x 88" );
- comboDataMatrix->insertItem( "96 x 96" );
- comboDataMatrix->insertItem( "104 x 104" );
- comboDataMatrix->insertItem( "120 x 120" );
- comboDataMatrix->insertItem( "132 x 132" );
- comboDataMatrix->insertItem( "144 x 144" );
- comboDataMatrix->insertItem( "8 x 18" );
- comboDataMatrix->insertItem( "8 x 32" );
- comboDataMatrix->insertItem( "12 x 26" );
- comboDataMatrix->insertItem( "12 x 36" );
- comboDataMatrix->insertItem( "16 x 36" );
- comboDataMatrix->insertItem( "16 x 48" );
+ comboDataMatrix->addItem( i18n("Automatic calculation" ) );
+ comboDataMatrix->addItem( "10 x 10" );
+ comboDataMatrix->addItem( "12 x 12" );
+ comboDataMatrix->addItem( "14 x 14" );
+ comboDataMatrix->addItem( "16 x 16" );
+ comboDataMatrix->addItem( "18 x 18" );
+ comboDataMatrix->addItem( "20 x 20" );
+ comboDataMatrix->addItem( "22 x 22" );
+ comboDataMatrix->addItem( "24 x 24" );
+ comboDataMatrix->addItem( "26 x 26" );
+ comboDataMatrix->addItem( "32 x 32" );
+ comboDataMatrix->addItem( "36 x 36" );
+ comboDataMatrix->addItem( "40 x 40" );
+ comboDataMatrix->addItem( "44 x 44" );
+ comboDataMatrix->addItem( "48 x 48" );
+ comboDataMatrix->addItem( "52 x 52" );
+ comboDataMatrix->addItem( "64 x 64" );
+ comboDataMatrix->addItem( "72 x 72" );
+ comboDataMatrix->addItem( "80 x 80" );
+ comboDataMatrix->addItem( "88 x 88" );
+ comboDataMatrix->addItem( "96 x 96" );
+ comboDataMatrix->addItem( "104 x 104" );
+ comboDataMatrix->addItem( "120 x 120" );
+ comboDataMatrix->addItem( "132 x 132" );
+ comboDataMatrix->addItem( "144 x 144" );
+ comboDataMatrix->addItem( "8 x 18" );
+ comboDataMatrix->addItem( "8 x 32" );
+ comboDataMatrix->addItem( "12 x 26" );
+ comboDataMatrix->addItem( "12 x 36" );
+ comboDataMatrix->addItem( "16 x 36" );
+ comboDataMatrix->addItem( "16 x 48" );
}
void DataMatrixDlg::setData( Barkode* b )
Modified: trunk/src/barcodeprinterdlg.cpp
===================================================================
--- trunk/src/barcodeprinterdlg.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/barcodeprinterdlg.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -57,18 +57,18 @@
layout->addWidget( label3, 3, 0 );
layout->addMultiCellWidget( comboDevice, 3, 3, 1, 2 );
- comboFormat->insertItem( i18n("TEC Printer (TEC)") );
- comboFormat->insertItem( i18n("Zebra Printer (ZPL)") );
- comboFormat->insertItem( i18n("Intermec Printer (IPL)") );
- comboFormat->insertItem( i18n("EPCL Printer (EPCL)") );
+ comboFormat->addItem( i18n("TEC Printer (TEC)") );
+ comboFormat->addItem( i18n("Zebra Printer (ZPL)") );
+ comboFormat->addItem( i18n("Intermec Printer (IPL)") );
+ comboFormat->addItem( i18n("EPCL Printer (EPCL)") );
// do not translate unix devicenames...
- comboDevice->insertItem( "/dev/lp0" );
- comboDevice->insertItem( "/dev/lp1" );
- comboDevice->insertItem( "/dev/lp2" );
- comboDevice->insertItem( "/dev/usb/lp0" );
- comboDevice->insertItem( "/dev/usb/lp1" );
- comboDevice->insertItem( "/dev/usb/lp2" );
+ comboDevice->addItem( "/dev/lp0" );
+ comboDevice->addItem( "/dev/lp1" );
+ comboDevice->addItem( "/dev/lp2" );
+ comboDevice->addItem( "/dev/usb/lp0" );
+ comboDevice->addItem( "/dev/usb/lp1" );
+ comboDevice->addItem( "/dev/usb/lp2" );
connect( checkFile, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/batchwizard.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -480,8 +480,8 @@
customerId->clear();
customerName->clear();
while ( cur.next() ) {
- customerId->insertItem( cur.value("customer_no" ).toString() );
- customerName->insertItem( cur.value("customer_name" ).toString() );
+ customerId->addItem( cur.value("customer_no" ).toString() );
+ customerName->addItem( cur.value("customer_name" ).toString() );
}
}
Modified: trunk/src/configdialog.cpp
===================================================================
--- trunk/src/configdialog.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/configdialog.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -91,9 +91,9 @@
QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding );
printerQuality = new KComboBox( false, box );
- printerQuality->insertItem( i18n("Medium Resolution (300dpi)") );
- printerQuality->insertItem( i18n("High Resolution (600dpi)") );
- printerQuality->insertItem( i18n("Very High Resolution (1200dpi)") );
+ printerQuality->addItem( i18n("Medium Resolution (300dpi)") );
+ printerQuality->addItem( i18n("High Resolution (600dpi)") );
+ printerQuality->addItem( i18n("Very High Resolution (1200dpi)") );
switch( lb->quality ) {
case PrinterSettings::Middle:
@@ -159,21 +159,21 @@
Layout1->addWidget( new QLabel( i18n("File Format:"), box ) );
combo1 = new KComboBox( box );
- combo1->insertItem( i18n("Quantity") );
- combo1->insertItem( i18n("Article Number") );
- combo1->insertItem( i18n("Group") );
+ combo1->addItem( i18n("Quantity") );
+ combo1->addItem( i18n("Article Number") );
+ combo1->addItem( i18n("Group") );
Layout1->addWidget( combo1 );
combo2 = new KComboBox( box );
- combo2->insertItem( i18n("Quantity") );
- combo2->insertItem( i18n("Article Number") );
- combo2->insertItem( i18n("Group") );
+ combo2->addItem( i18n("Quantity") );
+ combo2->addItem( i18n("Article Number") );
+ combo2->addItem( i18n("Group") );
Layout1->addWidget( combo2 );
combo3 = new KComboBox( box );
- combo3->insertItem( i18n("Quantity") );
- combo3->insertItem( i18n("Article Number") );
- combo3->insertItem( i18n("Group") );
+ combo3->addItem( i18n("Quantity") );
+ combo3->addItem( i18n("Article Number") );
+ combo3->addItem( i18n("Group") );
Layout1->addWidget( combo3 );
grid->addMultiCellLayout( Layout1, 4, 4, 0, 2 );
Modified: trunk/src/csvimportdlg.cpp
===================================================================
--- trunk/src/csvimportdlg.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/csvimportdlg.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -102,11 +102,11 @@
requester = new KUrlRequester( box );
comboEncoding = new EncodingCombo( box );
comboSQL = new KComboBox( false, box );
- comboSQL->insertItem( TABLE_BASIC );
- comboSQL->insertItem( TABLE_CUSTOMER );
- comboSQL->insertItem( TABLE_CUSTOMER_TEXT );
- comboSQL->insertItem( TABLE_LABEL_DEF );
- comboSQL->insertItem( i18n("Other table...") );
+ comboSQL->addItem( TABLE_BASIC );
+ comboSQL->addItem( TABLE_CUSTOMER );
+ comboSQL->addItem( TABLE_CUSTOMER_TEXT );
+ comboSQL->addItem( TABLE_LABEL_DEF );
+ comboSQL->addItem( i18n("Other table...") );
databaseName = new KLineEdit( box );
checkLoadAll = new QCheckBox( i18n("&Load complete file into preview"), box );
@@ -305,10 +305,10 @@
QString name = getDatabaseName();
comboField->clear();
- comboField->insertItem( NOFIELD );
+ comboField->add( NOFIELD );
QSqlQuery query( SqlTables::getInstance()->driver()->showColumns( name ) );
while( query.next() )
- comboField->insertItem( query.value( 0 ).toString() );
+ comboField->addItem( query.value( 0 ).toString() );
for( int i = 0; i < table->horizontalHeader()->count(); i++ )
table->horizontalHeader()->setLabel( i, QString::number( i + 1 ) );
Modified: trunk/src/definitiondialog.cpp
===================================================================
--- trunk/src/definitiondialog.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/definitiondialog.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -267,7 +267,7 @@
if( comboProducer->currentText() == comboProducer->text( comboProducer->currentItem() ) )
if( comboProducer->currentItem() < comboProducer->count())
comboType->insertStringList( types[ comboProducer->currentItem() ] );
- comboType->insertItem( i18n( "Custom" ), 0 );
+ comboType->addItem( i18n( "Custom" ), 0 );
}
const Measurements DefinitionDialog::getCurrentMeasure()
Modified: trunk/src/previewdialog.cpp
===================================================================
--- trunk/src/previewdialog.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/previewdialog.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -170,8 +170,8 @@
customerId->clear();
customerName->clear();
while ( cur.next() ) {
- customerId->insertItem( cur.value("customer_no" ).toString() );
- customerName->insertItem( cur.value("customer_name" ).toString() );
+ customerId->addItem( cur.value("customer_no" ).toString() );
+ customerName->addItem( cur.value("customer_name" ).toString() );
}
customerId->setCurrentItem( customer_index );
Modified: trunk/src/printersettings.cpp
===================================================================
--- trunk/src/printersettings.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/printersettings.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -182,7 +182,7 @@
void PrinterSettings::insertPageFormat( KComboBox* combo )
{
for( unsigned int i = 0; i < sizeof( pageFormatInfo ) / sizeof( PageFormatInfo ); i++ )
- combo->insertItem( pageFormatInfo[i].descriptiveName );
+ combo->addItem( pageFormatInfo[i].descriptiveName );
}
double PrinterSettings::pageWidth() const
Modified: trunk/src/propertywidget.cpp
===================================================================
--- trunk/src/propertywidget.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/propertywidget.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -144,10 +144,10 @@
comboRotation = new KComboBox( FALSE, this );
label->setBuddy( comboRotation );
- comboRotation->insertItem( i18n("0") );
- comboRotation->insertItem( i18n("90") );
- comboRotation->insertItem( i18n("180") );
- comboRotation->insertItem( i18n("270") );
+ comboRotation->addItem( i18n("0") );
+ comboRotation->addItem( i18n("90") );
+ comboRotation->addItem( i18n("180") );
+ comboRotation->addItem( i18n("270") );
grid->addWidget( label, 0, 0 );
grid->addWidget( comboRotation, 0, 1 );
@@ -219,17 +219,17 @@
{
QSqlQuery* query = new QSqlQuery("select encoding_type from barcode_basic group by encoding_type");
while( query->next() )
- comboComplex->insertItem( "Main:" + query->value( 0 ).toString() );
+ comboComplex->addItem( "Main:" + query->value( 0 ).toString() );
delete query;
query = new QSqlQuery("select customer_no, encoding_type from customer_text group by customer_no, encoding_type");
while( query->next() )
- comboComplex->insertItem( query->value( 0 ).toString() + ":" + query->value( 1 ).toString() );
+ comboComplex->addItem( query->value( 0 ).toString() + ":" + query->value( 1 ).toString() );
delete query;
}
- comboComplex->insertItem( "Static" );
+ comboComplex->addItem( "Static" );
barcode = new BarcodeWidget( this, "barcode" );
barcode->setTokenProvider( token );
@@ -484,10 +484,10 @@
buttonToken = new KPushButton( i18n("&Insert Data Field..."), imgHBox );
buttonToken->setIconSet( QIcon( SmallIcon("contents") ) );
- comboRotation->insertItem( i18n("0") );
- comboRotation->insertItem( i18n("90") );
- comboRotation->insertItem( i18n("180") );
- comboRotation->insertItem( i18n("270") );
+ comboRotation->addItem( i18n("0") );
+ comboRotation->addItem( i18n("90") );
+ comboRotation->addItem( i18n("180") );
+ comboRotation->addItem( i18n("270") );
Q3VButtonGroup* group = new Q3VButtonGroup( i18n("&Size"), this );
Modified: trunk/src/sqltables.cpp
===================================================================
--- trunk/src/sqltables.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/sqltables.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -565,7 +565,7 @@
QStringList drList = QSqlDatabase::drivers();
QStringList::Iterator it = drList.begin();
while( it != drList.end() ) {
- m_driver->insertItem( *it );
+ m_driver->addItem( *it );
++it;
}
grid->addWidget( m_driver, 4, 1 );
Modified: trunk/src/tokendialog.cpp
===================================================================
--- trunk/src/tokendialog.cpp 2008-02-26 21:46:07 UTC (rev 12)
+++ trunk/src/tokendialog.cpp 2008-02-26 22:23:37 UTC (rev 13)
@@ -338,10 +338,10 @@
unsigned int i, z;
Q3ValueList<tCategories>* categories = TokenProvider::getTokens();
- category->insertItem( i18n("All") );
+ category->addItem( i18n("All") );
for( i = 0; i < categories->count(); i++ )
- category->insertItem( TokenProvider::captionForCategory( (TokenProvider::ECategories)(*categories)[i].category ) );
+ category->addItem( TokenProvider::captionForCategory( (TokenProvider::ECategories)(*categories)[i].category ) );
for( i = 0; i < categories->count(); i++ )
for( z = 0; z < (*categories)[i].tokens.count(); z++ )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 17:18:22
|
Revision: 14
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=14&view=rev
Author: vzsolt
Date: 2008-02-27 09:18:28 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Cleaned up the Qt::Align[something] constants and some related method names. They were borked by the scripts presumably.
Modified Paths:
--------------
trunk/src/barcodecombo.cpp
trunk/src/batchwizard.cpp
trunk/src/multilineeditdlg.cpp
trunk/src/multilineeditdlg.h
trunk/src/printlabeldlg.cpp
trunk/src/smalldialogs.cpp
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-02-26 22:23:37 UTC (rev 13)
+++ trunk/src/barcodecombo.cpp 2008-02-27 17:18:28 UTC (rev 14)
@@ -172,28 +172,28 @@
grid->addWidget( buttonToken, 4, 3 );
spinMargin = new KIntNumInput( this, "spinMargin" );
- spinMargin->setLabel( i18n( "&Margin:" ), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ spinMargin->setLabel( i18n( "&Margin:" ), Qt::AlignLeft | Qt::AlignVCenter );
spinMargin->setRange( 0, 10000, 1, false );
spinMargin->setValue( 10 );
connect( spinMargin, SIGNAL( valueChanged(int) ), this, SLOT( changed() ) );
grid->addMultiCellWidget( spinMargin, 5, 5, 0, 1 );
spinRotation = new KIntNumInput( this );
- spinRotation->setLabel( i18n( "&Rotation:" ), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ spinRotation->setLabel( i18n( "&Rotation:" ), Qt::AlignLeft | Qt::AlignVCenter );
spinRotation->setRange( 0, 360, 90, false );
spinRotation->setValue( 0 );
connect( spinRotation, SIGNAL( valueChanged(int) ), this, SLOT( changed() ) );
grid->addMultiCellWidget( spinRotation, 5, 5, 2, 3 );
spinScale = new KIntNumInput( spinMargin, 1000, this );
- spinScale->setLabel( i18n("&Scale (in permille):"), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ spinScale->setLabel( i18n("&Scale (in permille):"), Qt::AlignLeft | Qt::AlignVCenter );
spinScale->setRange( 100, 10000, 100, false );
spinScale->setValue( 1000 );
connect( spinScale, SIGNAL( valueChanged(int) ), this, SLOT( changed() ) );
grid->addMultiCellWidget( spinScale, 6, 6, 0, 1 );
spinCut = new KIntNumInput( spinRotation, 100, this );
- spinCut->setLabel( i18n("&Crop:"), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ spinCut->setLabel( i18n("&Crop:"), Qt::AlignLeft | Qt::AlignVCenter );
spinCut->setRange( 1, 100, 1, false );
connect( spinCut, SIGNAL( valueChanged(int) ), this, SLOT( changed() ) );
grid->addMultiCellWidget( spinCut, 6, 6, 2, 3 );
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-26 22:23:37 UTC (rev 13)
+++ trunk/src/batchwizard.cpp 2008-02-27 17:18:28 UTC (rev 14)
@@ -226,7 +226,7 @@
serialStart = new KLineEdit( serial.serial(), hbox );
serialInc = new KIntNumInput( 1, hbox );
- serialInc->setLabel( i18n( "Serial increment:" ), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ serialInc->setLabel( i18n( "Serial increment:" ), Qt::AlignLeft | Qt::AlignVCenter );
serialInc->setRange( 1, 10000, 1, false );
addPage( page5, i18n("Serial Number") );
Modified: trunk/src/multilineeditdlg.cpp
===================================================================
--- trunk/src/multilineeditdlg.cpp 2008-02-26 22:23:37 UTC (rev 13)
+++ trunk/src/multilineeditdlg.cpp 2008-02-27 17:18:28 UTC (rev 14)
@@ -119,13 +119,13 @@
// Alignment
//
action_align_left = new KToggleAction( i18n("Align &Left"), "text_left", 0, ac, "format_align_left" );
- connect( action_align_left, SIGNAL( toggled(bool) ), this, SLOT( setQt::AlignLeft(bool) ) );
+ connect( action_align_left, SIGNAL( toggled(bool) ), this, SLOT( setAlignLeft(bool) ) );
action_align_center = new KToggleAction( i18n("Align &Center"), "text_center", 0, ac, "format_align_center" );
- connect( action_align_center, SIGNAL( toggled(bool) ), this, SLOT( setQt::AlignCenter(bool) ) );
+ connect( action_align_center, SIGNAL( toggled(bool) ), this, SLOT( setAlignCenter(bool) ) );
action_align_right = new KToggleAction( i18n("Align &Right"), "text_right", 0, ac, "format_align_right" );
- connect( action_align_right, SIGNAL( toggled(bool) ), this, SLOT( setQt::AlignRight(bool) ) );
+ connect( action_align_right, SIGNAL( toggled(bool) ), this, SLOT( setAlignRight(bool) ) );
action_align_justify = new KToggleAction( i18n("&Justify"), "text_block", 0, ac, "format_align_justify" );
connect( action_align_justify, SIGNAL( toggled(bool) ), this, SLOT( setAlignJustify(bool) ) );
@@ -240,19 +240,19 @@
editor->setColor( col );
}
-void MultiLineEditor::setQt::AlignLeft( bool yes )
+void MultiLineEditor::setAlignLeft( bool yes )
{
if ( yes )
editor->setAlignment( Qt::AlignLeft );
}
-void MultiLineEditor::setQt::AlignRight( bool yes )
+void MultiLineEditor::setAlignRight( bool yes )
{
if ( yes )
editor->setAlignment( Qt::AlignRight );
}
-void MultiLineEditor::setQt::AlignCenter( bool yes )
+void MultiLineEditor::setAlignCenter( bool yes )
{
if ( yes )
editor->setAlignment( Qt::AlignCenter );
Modified: trunk/src/multilineeditdlg.h
===================================================================
--- trunk/src/multilineeditdlg.h 2008-02-26 22:23:37 UTC (rev 13)
+++ trunk/src/multilineeditdlg.h 2008-02-27 17:18:28 UTC (rev 14)
@@ -50,9 +50,9 @@
void updateAligment();
void formatColor();
void checkSpelling();
- void setQt::AlignLeft( bool yes );
- void setQt::AlignRight( bool yes );
- void setQt::AlignCenter( bool yes );
+ void setAlignLeft( bool yes );
+ void setAlignRight( bool yes );
+ void setAlignCenter( bool yes );
void setAlignJustify( bool yes );
void insertNewField();
Modified: trunk/src/printlabeldlg.cpp
===================================================================
--- trunk/src/printlabeldlg.cpp 2008-02-26 22:23:37 UTC (rev 13)
+++ trunk/src/printlabeldlg.cpp 2008-02-27 17:18:28 UTC (rev 14)
@@ -35,11 +35,11 @@
Q3VBoxLayout* box = new Q3VBoxLayout( plainPage() );
numLabels = new KIntNumInput( plainPage() );
- numLabels->setLabel( i18n("Number of labels:" ), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ numLabels->setLabel( i18n("Number of labels:" ), Qt::AlignLeft | Qt::AlignVCenter );
numLabels->setRange( 1, 100000, 1, false );
numPos = new KIntNumInput( numLabels, 1, plainPage() );
- numPos->setLabel( i18n("Start at label position:" ), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ numPos->setLabel( i18n("Start at label position:" ), Qt::AlignLeft | Qt::AlignVCenter );
numPos->setRange( 1, 100, 1, false );
checkBorder = new QCheckBox( i18n("&Print crop marks (borders)"), plainPage() );
Modified: trunk/src/smalldialogs.cpp
===================================================================
--- trunk/src/smalldialogs.cpp 2008-02-26 22:23:37 UTC (rev 13)
+++ trunk/src/smalldialogs.cpp 2008-02-27 17:18:28 UTC (rev 14)
@@ -90,7 +90,7 @@
article = new KLineEdit( plainPage() );
number = new KIntNumInput( plainPage() );
- number->setLabel( i18n( "Number of labels:" ), KNumInput::Qt::AlignLeft | KNumInput::Qt::AlignVCenter );
+ number->setLabel( i18n( "Number of labels:" ), Qt::AlignLeft | Qt::AlignVCenter );
number->setRange( 1, 10000, 1, false );
layout->addWidget( number );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 17:30:51
|
Revision: 15
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=15&view=rev
Author: vzsolt
Date: 2008-02-27 09:30:57 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
DCOP is dead. Removed the interface files from the source.
Modified Paths:
--------------
trunk/src/CMakeLists.txt
Removed Paths:
-------------
trunk/src/batchiface.h
trunk/src/batchiface_skel.cpp
trunk/src/kbarcodeiface.h
trunk/src/kbarcodeiface_skel.cpp
Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt 2008-02-27 17:18:28 UTC (rev 14)
+++ trunk/src/CMakeLists.txt 2008-02-27 17:30:57 UTC (rev 15)
@@ -16,7 +16,6 @@
barcodeprinterdlg.cpp
barkode.cpp
barkodeengine.cpp
- batchiface_skel.cpp
batchprinter.cpp
batchwizard.cpp
commands.cpp
@@ -39,7 +38,6 @@
imageitem.cpp
kactionmap.cpp
kbarcode.cpp
- kbarcodeiface_skel.cpp
kbarcodesettings.cpp
label.cpp
labeleditor.cpp
Deleted: trunk/src/batchiface.h
===================================================================
--- trunk/src/batchiface.h 2008-02-27 17:18:28 UTC (rev 14)
+++ trunk/src/batchiface.h 2008-02-27 17:30:57 UTC (rev 15)
@@ -1,46 +0,0 @@
-/***************************************************************************
- batchiface.h - description
- -------------------
- begin : Sat Dec 27 23:54:28 CET 2003
- copyright : (C) 2003 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef BATCHIFACE_H
-#define BATCHIFACE_H
-
-#include <dcopobject.h>
-#include <qstringlist.h>
-#include "batchprinter.h"
-
-class BatchIface : virtual public DCOPObject
-{
- K_DCOP
-
- public:
- k_dcop:
- virtual void setFilename( const QString & url ) = 0;
- virtual void setImportCsvFile( const QString & filename ) = 0;
- virtual void setImportSqlQuery( const QString & query ) = 0;
- virtual void setNumLabels( const int n ) = 0;
- virtual void setOutputFormat( const int e ) = 0;
- virtual void setSerialNumber( const QString & val, int inc ) = 0;
-
- virtual bool addItem( const QString & article, const QString & group, int count = 1, bool msg = true ) = 0;
- virtual bool existsArticle( const QString & article ) = 0;
- virtual void loadFromFile( const QString & url ) = 0;
- virtual void loadFromClipboard() = 0;
- virtual void printNow( const QString & printer, bool bUserInteraction = true ) = 0;
-};
-
-#endif /* BATCHIFACE_H */
-
Deleted: trunk/src/batchiface_skel.cpp
===================================================================
--- trunk/src/batchiface_skel.cpp 2008-02-27 17:18:28 UTC (rev 14)
+++ trunk/src/batchiface_skel.cpp 2008-02-27 17:30:57 UTC (rev 15)
@@ -1,184 +0,0 @@
-/****************************************************************************
-**
-** DCOP Skeleton generated by dcopidl2cpp from batchiface.kidl
-**
-** WARNING! All changes made in this file will be lost!
-**
-*****************************************************************************/
-
-#include "/home/dominik/Desktop/Programming/kbarcode/kbarcode/batchiface.h"
-
-#include <kdatastream.h>
-#include <q3asciidict.h>
-//Added by qt3to4:
-#include <Q3CString>
-
-
-static const int BatchIface_fhash = 13;
-static const char* const BatchIface_ftable[12][3] = {
- { "void", "setFilename(QString)", "setFilename(QString url)" },
- { "void", "setImportCsvFile(QString)", "setImportCsvFile(QString filename)" },
- { "void", "setImportSqlQuery(QString)", "setImportSqlQuery(QString query)" },
- { "void", "setNumLabels(int)", "setNumLabels(int n)" },
- { "void", "setOutputFormat(int)", "setOutputFormat(int e)" },
- { "void", "setSerialNumber(QString,int)", "setSerialNumber(QString val,int inc)" },
- { "bool", "addItem(QString,QString,int,bool)", "addItem(QString article,QString group,int count,bool msg)" },
- { "bool", "existsArticle(QString)", "existsArticle(QString article)" },
- { "void", "loadFromFile(QString)", "loadFromFile(QString url)" },
- { "void", "loadFromClipboard()", "loadFromClipboard()" },
- { "void", "printNow(QString,bool)", "printNow(QString printer,bool bUserInteraction)" },
- { 0, 0, 0 }
-};
-static const int BatchIface_ftable_hiddens[11] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-bool BatchIface::process(const Q3CString &fun, const QByteArray &data, Q3CString& replyType, QByteArray &replyData)
-{
- static Q3AsciiDict<int>* fdict = 0;
- if ( !fdict ) {
- fdict = new Q3AsciiDict<int>( BatchIface_fhash, true, false );
- for ( int i = 0; BatchIface_ftable[i][1]; i++ )
- fdict->insert( BatchIface_ftable[i][1], new int( i ) );
- }
- int* fp = fdict->find( fun );
- switch ( fp?*fp:-1) {
- case 0: { // void setFilename(QString)
- QString arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = BatchIface_ftable[0][0];
- setFilename(arg0 );
- } break;
- case 1: { // void setImportCsvFile(QString)
- QString arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = BatchIface_ftable[1][0];
- setImportCsvFile(arg0 );
- } break;
- case 2: { // void setImportSqlQuery(QString)
- QString arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = BatchIface_ftable[2][0];
- setImportSqlQuery(arg0 );
- } break;
- case 3: { // void setNumLabels(int)
- int arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = BatchIface_ftable[3][0];
- setNumLabels(arg0 );
- } break;
- case 4: { // void setOutputFormat(int)
- int arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = BatchIface_ftable[4][0];
- setOutputFormat(arg0 );
- } break;
- case 5: { // void setSerialNumber(QString,int)
- QString arg0;
- int arg1;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- if (arg.atEnd()) return false;
- arg >> arg1;
- replyType = BatchIface_ftable[5][0];
- setSerialNumber(arg0, arg1 );
- } break;
- case 6: { // bool addItem(QString,QString,int,bool)
- QString arg0;
- QString arg1;
- int arg2;
- bool arg3;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- if (arg.atEnd()) return false;
- arg >> arg1;
- if (arg.atEnd()) return false;
- arg >> arg2;
- if (arg.atEnd()) return false;
- arg >> arg3;
- replyType = BatchIface_ftable[6][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << addItem(arg0, arg1, arg2, arg3 );
- } break;
- case 7: { // bool existsArticle(QString)
- QString arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = BatchIface_ftable[7][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << existsArticle(arg0 );
- } break;
- case 8: { // void loadFromFile(QString)
- QString arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = BatchIface_ftable[8][0];
- loadFromFile(arg0 );
- } break;
- case 9: { // void loadFromClipboard()
- replyType = BatchIface_ftable[9][0];
- loadFromClipboard( );
- } break;
- case 10: { // void printNow(QString,bool)
- QString arg0;
- bool arg1;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- if (arg.atEnd()) return false;
- arg >> arg1;
- replyType = BatchIface_ftable[10][0];
- printNow(arg0, arg1 );
- } break;
- default:
- return DCOPObject::process( fun, data, replyType, replyData );
- }
- return true;
-}
-
-QCStringList BatchIface::interfaces()
-{
- QCStringList ifaces = DCOPObject::interfaces();
- ifaces += "BatchIface";
- return ifaces;
-}
-
-QCStringList BatchIface::functions()
-{
- QCStringList funcs = DCOPObject::functions();
- for ( int i = 0; BatchIface_ftable[i][2]; i++ ) {
- if (BatchIface_ftable_hiddens[i])
- continue;
- Q3CString func = BatchIface_ftable[i][0];
- func += ' ';
- func += BatchIface_ftable[i][2];
- funcs << func;
- }
- return funcs;
-}
-
-
Deleted: trunk/src/kbarcodeiface.h
===================================================================
--- trunk/src/kbarcodeiface.h 2008-02-27 17:18:28 UTC (rev 14)
+++ trunk/src/kbarcodeiface.h 2008-02-27 17:30:57 UTC (rev 15)
@@ -1,46 +0,0 @@
-/***************************************************************************
- kbarcodeiface.h - description
- -------------------
- begin : Sat Dec 27 23:53:28 CET 2003
- copyright : (C) 2003 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef KBARCODEIFACE_H
-#define KBARCODEIFACE_H
-
-#include <dcopobject.h>
-
-class KBarcodeIface : virtual public DCOPObject
-{
- K_DCOP
-
- public:
- k_dcop:
- virtual void startBarcode() = 0;
- virtual void startLabelEditor() = 0;
- virtual void startBatchPrint() = 0;
-
- virtual void editArticles() = 0;
- virtual void editCustomers() = 0;
- virtual void editCustomerText() = 0;
- virtual void editLabelDef() = 0;
-
- virtual void importCSV() = 0;
-
- virtual bool isSQLConnected() const = 0;
- virtual bool connectSQL() = 0;
- virtual void showWizard() = 0;
- virtual void showConfigure() = 0;
-};
-
-#endif /* KBARCODEIFACE_H */
Deleted: trunk/src/kbarcodeiface_skel.cpp
===================================================================
--- trunk/src/kbarcodeiface_skel.cpp 2008-02-27 17:18:28 UTC (rev 14)
+++ trunk/src/kbarcodeiface_skel.cpp 2008-02-27 17:30:57 UTC (rev 15)
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** DCOP Skeleton generated by dcopidl2cpp from kbarcodeiface.kidl
-**
-** WARNING! All changes made in this file will be lost!
-**
-*****************************************************************************/
-
-#include "/home/dominik/Desktop/Programming/kbarcode/kbarcode/kbarcodeiface.h"
-
-#include <kdatastream.h>
-#include <q3asciidict.h>
-//Added by qt3to4:
-#include <Q3CString>
-
-
-static const int KBarcodeIface_fhash = 13;
-static const char* const KBarcodeIface_ftable[13][3] = {
- { "void", "startBarcode()", "startBarcode()" },
- { "void", "startLabelEditor()", "startLabelEditor()" },
- { "void", "startBatchPrint()", "startBatchPrint()" },
- { "void", "editArticles()", "editArticles()" },
- { "void", "editCustomers()", "editCustomers()" },
- { "void", "editCustomerText()", "editCustomerText()" },
- { "void", "editLabelDef()", "editLabelDef()" },
- { "void", "importCSV()", "importCSV()" },
- { "bool", "isSQLConnected()", "isSQLConnected()" },
- { "bool", "connectSQL()", "connectSQL()" },
- { "void", "showWizard()", "showWizard()" },
- { "void", "showConfigure()", "showConfigure()" },
- { 0, 0, 0 }
-};
-static const int KBarcodeIface_ftable_hiddens[12] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-bool KBarcodeIface::process(const Q3CString &fun, const QByteArray &data, Q3CString& replyType, QByteArray &replyData)
-{
- static Q3AsciiDict<int>* fdict = 0;
- if ( !fdict ) {
- fdict = new Q3AsciiDict<int>( KBarcodeIface_fhash, true, false );
- for ( int i = 0; KBarcodeIface_ftable[i][1]; i++ )
- fdict->insert( KBarcodeIface_ftable[i][1], new int( i ) );
- }
- int* fp = fdict->find( fun );
- switch ( fp?*fp:-1) {
- case 0: { // void startBarcode()
- replyType = KBarcodeIface_ftable[0][0];
- startBarcode( );
- } break;
- case 1: { // void startLabelEditor()
- replyType = KBarcodeIface_ftable[1][0];
- startLabelEditor( );
- } break;
- case 2: { // void startBatchPrint()
- replyType = KBarcodeIface_ftable[2][0];
- startBatchPrint( );
- } break;
- case 3: { // void editArticles()
- replyType = KBarcodeIface_ftable[3][0];
- editArticles( );
- } break;
- case 4: { // void editCustomers()
- replyType = KBarcodeIface_ftable[4][0];
- editCustomers( );
- } break;
- case 5: { // void editCustomerText()
- replyType = KBarcodeIface_ftable[5][0];
- editCustomerText( );
- } break;
- case 6: { // void editLabelDef()
- replyType = KBarcodeIface_ftable[6][0];
- editLabelDef( );
- } break;
- case 7: { // void importCSV()
- replyType = KBarcodeIface_ftable[7][0];
- importCSV( );
- } break;
- case 8: { // bool isSQLConnected()
- replyType = KBarcodeIface_ftable[8][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << isSQLConnected( );
- } break;
- case 9: { // bool connectSQL()
- replyType = KBarcodeIface_ftable[9][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << connectSQL( );
- } break;
- case 10: { // void showWizard()
- replyType = KBarcodeIface_ftable[10][0];
- showWizard( );
- } break;
- case 11: { // void showConfigure()
- replyType = KBarcodeIface_ftable[11][0];
- showConfigure( );
- } break;
- default:
- return DCOPObject::process( fun, data, replyType, replyData );
- }
- return true;
-}
-
-QCStringList KBarcodeIface::interfaces()
-{
- QCStringList ifaces = DCOPObject::interfaces();
- ifaces += "KBarcodeIface";
- return ifaces;
-}
-
-QCStringList KBarcodeIface::functions()
-{
- QCStringList funcs = DCOPObject::functions();
- for ( int i = 0; KBarcodeIface_ftable[i][2]; i++ ) {
- if (KBarcodeIface_ftable_hiddens[i])
- continue;
- Q3CString func = KBarcodeIface_ftable[i][0];
- func += ' ';
- func += KBarcodeIface_ftable[i][2];
- funcs << func;
- }
- return funcs;
-}
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 17:39:02
|
Revision: 16
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=16&view=rev
Author: vzsolt
Date: 2008-02-27 09:39:01 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
One more DCOP interface axed.
Modified Paths:
--------------
trunk/src/CMakeLists.txt
Removed Paths:
-------------
trunk/src/editoriface.h
trunk/src/editoriface_skel.cpp
Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt 2008-02-27 17:30:57 UTC (rev 15)
+++ trunk/src/CMakeLists.txt 2008-02-27 17:39:01 UTC (rev 16)
@@ -30,9 +30,7 @@
documentitemdlg.cpp
dsrichtext.cpp
dstextedit.cpp
- editoriface_skel.cpp
encodingcombo.cpp
- encodingcombo.moc.cpp
gnubarcode.cpp
gnubarkodeengine.cpp
imageitem.cpp
Deleted: trunk/src/editoriface.h
===================================================================
--- trunk/src/editoriface.h 2008-02-27 17:30:57 UTC (rev 15)
+++ trunk/src/editoriface.h 2008-02-27 17:39:01 UTC (rev 16)
@@ -1,55 +0,0 @@
-/***************************************************************************
- editoriface.h - description
- -------------------
- begin : Sat Dec 27 09:53:28 CET 2003
- copyright : (C) 2003 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef EDITORIFACE_H
-#define EDITORIFACE_H
-
-#include <dcopobject.h>
-
-class EditorIface : virtual public DCOPObject
-{
- K_DCOP
-
- public:
- k_dcop:
-
- virtual const QString fileName() const = 0;
- virtual bool isChanged() = 0;
- virtual void print() = 0;
- virtual bool newLabel() = 0;
-
- virtual void insertBarcode() = 0;
- virtual void insertPicture() = 0;
- virtual void insertText() = 0;
- virtual void insertRect() = 0;
- virtual void insertCircle() = 0;
- virtual void insertLine() = 0;
-
- virtual void changeDes() = 0;
- virtual void changeSize() = 0;
-
- virtual void preview() = 0;
- virtual void toggleGrid() = 0;
-
- virtual void closeLabel() = 0;
-
- virtual bool openUrl( const QString & url ) = 0;
- virtual bool save( QString url ) = 0;
-
-};
-
-#endif /* EDITORIFACE_H */
Deleted: trunk/src/editoriface_skel.cpp
===================================================================
--- trunk/src/editoriface_skel.cpp 2008-02-27 17:30:57 UTC (rev 15)
+++ trunk/src/editoriface_skel.cpp 2008-02-27 17:39:01 UTC (rev 16)
@@ -1,176 +0,0 @@
-/****************************************************************************
-**
-** DCOP Skeleton generated by dcopidl2cpp from editoriface.kidl
-**
-** WARNING! All changes made in this file will be lost!
-**
-*****************************************************************************/
-
-#include "/home/dominik/Desktop/Programming/kbarcode/kbarcode/editoriface.h"
-
-#include <kdatastream.h>
-#include <q3asciidict.h>
-//Added by qt3to4:
-#include <Q3CString>
-
-
-static const int EditorIface_fhash = 19;
-static const char* const EditorIface_ftable[18][3] = {
- { "QString", "fileName()", "fileName()" },
- { "bool", "isChanged()", "isChanged()" },
- { "void", "print()", "print()" },
- { "bool", "newLabel()", "newLabel()" },
- { "void", "insertBarcode()", "insertBarcode()" },
- { "void", "insertPicture()", "insertPicture()" },
- { "void", "insertText()", "insertText()" },
- { "void", "insertRect()", "insertRect()" },
- { "void", "insertCircle()", "insertCircle()" },
- { "void", "insertLine()", "insertLine()" },
- { "void", "changeDes()", "changeDes()" },
- { "void", "changeSize()", "changeSize()" },
- { "void", "preview()", "preview()" },
- { "void", "toggleGrid()", "toggleGrid()" },
- { "void", "closeLabel()", "closeLabel()" },
- { "bool", "openUrl(QString)", "openUrl(QString url)" },
- { "bool", "save(QString)", "save(QString url)" },
- { 0, 0, 0 }
-};
-static const int EditorIface_ftable_hiddens[17] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-};
-
-bool EditorIface::process(const Q3CString &fun, const QByteArray &data, Q3CString& replyType, QByteArray &replyData)
-{
- static Q3AsciiDict<int>* fdict = 0;
- if ( !fdict ) {
- fdict = new Q3AsciiDict<int>( EditorIface_fhash, true, false );
- for ( int i = 0; EditorIface_ftable[i][1]; i++ )
- fdict->insert( EditorIface_ftable[i][1], new int( i ) );
- }
- int* fp = fdict->find( fun );
- switch ( fp?*fp:-1) {
- case 0: { // QString fileName()
- replyType = EditorIface_ftable[0][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << fileName( );
- } break;
- case 1: { // bool isChanged()
- replyType = EditorIface_ftable[1][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << isChanged( );
- } break;
- case 2: { // void print()
- replyType = EditorIface_ftable[2][0];
- print( );
- } break;
- case 3: { // bool newLabel()
- replyType = EditorIface_ftable[3][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << newLabel( );
- } break;
- case 4: { // void insertBarcode()
- replyType = EditorIface_ftable[4][0];
- insertBarcode( );
- } break;
- case 5: { // void insertPicture()
- replyType = EditorIface_ftable[5][0];
- insertPicture( );
- } break;
- case 6: { // void insertText()
- replyType = EditorIface_ftable[6][0];
- insertText( );
- } break;
- case 7: { // void insertRect()
- replyType = EditorIface_ftable[7][0];
- insertRect( );
- } break;
- case 8: { // void insertCircle()
- replyType = EditorIface_ftable[8][0];
- insertCircle( );
- } break;
- case 9: { // void insertLine()
- replyType = EditorIface_ftable[9][0];
- insertLine( );
- } break;
- case 10: { // void changeDes()
- replyType = EditorIface_ftable[10][0];
- changeDes( );
- } break;
- case 11: { // void changeSize()
- replyType = EditorIface_ftable[11][0];
- changeSize( );
- } break;
- case 12: { // void preview()
- replyType = EditorIface_ftable[12][0];
- preview( );
- } break;
- case 13: { // void toggleGrid()
- replyType = EditorIface_ftable[13][0];
- toggleGrid( );
- } break;
- case 14: { // void closeLabel()
- replyType = EditorIface_ftable[14][0];
- closeLabel( );
- } break;
- case 15: { // bool openUrl(QString)
- QString arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = EditorIface_ftable[15][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << openUrl(arg0 );
- } break;
- case 16: { // bool save(QString)
- QString arg0;
- QDataStream arg( data, QIODevice::ReadOnly );
- if (arg.atEnd()) return false;
- arg >> arg0;
- replyType = EditorIface_ftable[16][0];
- QDataStream _replyStream( replyData, QIODevice::WriteOnly );
- _replyStream << save(arg0 );
- } break;
- default:
- return DCOPObject::process( fun, data, replyType, replyData );
- }
- return true;
-}
-
-QCStringList EditorIface::interfaces()
-{
- QCStringList ifaces = DCOPObject::interfaces();
- ifaces += "EditorIface";
- return ifaces;
-}
-
-QCStringList EditorIface::functions()
-{
- QCStringList funcs = DCOPObject::functions();
- for ( int i = 0; EditorIface_ftable[i][2]; i++ ) {
- if (EditorIface_ftable_hiddens[i])
- continue;
- Q3CString func = EditorIface_ftable[i][0];
- func += ' ';
- func += EditorIface_ftable[i][2];
- funcs << func;
- }
- return funcs;
-}
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 20:15:30
|
Revision: 19
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=19&view=rev
Author: vzsolt
Date: 2008-02-27 12:15:27 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Removed the header includes for DCOP.
Modified Paths:
--------------
trunk/src/batchwizard.h
trunk/src/kbarcode.h
trunk/src/labeleditor.h
trunk/src/tec.h
Modified: trunk/src/batchwizard.h
===================================================================
--- trunk/src/batchwizard.h 2008-02-27 19:31:52 UTC (rev 18)
+++ trunk/src/batchwizard.h 2008-02-27 20:15:27 UTC (rev 19)
@@ -19,8 +19,6 @@
#define BATCHWIZARD_H
#include <kwizard.h>
-#include "batchiface.h"
-//Added by qt3to4:
#include <QLabel>
class BatchPrinter;
Modified: trunk/src/kbarcode.h
===================================================================
--- trunk/src/kbarcode.h 2008-02-27 19:31:52 UTC (rev 18)
+++ trunk/src/kbarcode.h 2008-02-27 20:15:27 UTC (rev 19)
@@ -33,7 +33,6 @@
};
#include "mainwindow.h"
-#include "kbarcodeiface.h"
class KAction;
class KPushButton;
Modified: trunk/src/labeleditor.h
===================================================================
--- trunk/src/labeleditor.h 2008-02-27 19:31:52 UTC (rev 18)
+++ trunk/src/labeleditor.h 2008-02-27 20:15:27 UTC (rev 19)
@@ -27,7 +27,6 @@
#include "definition.h"
#include "mainwindow.h"
#include "xmlutils.h"
-#include "editoriface.h"
#include <kdialogbase.h>
#include <qdialog.h>
Modified: trunk/src/tec.h
===================================================================
--- trunk/src/tec.h 2008-02-27 19:31:52 UTC (rev 18)
+++ trunk/src/tec.h 2008-02-27 20:15:27 UTC (rev 19)
@@ -15,7 +15,6 @@
#include "labelutils.h"
#include "xmlutils.h"
#include "definition.h"
-#include "batchiface.h"
// Other includes
#include <stdlib.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 20:44:45
|
Revision: 20
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=20&view=rev
Author: vzsolt
Date: 2008-02-27 12:44:24 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Qt4 has dropped the name parameter from QObject's constructor. So did I.
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/barcodeprinterdlg.cpp
trunk/src/barcodeprinterdlg.h
trunk/src/batchwizard.cpp
trunk/src/batchwizard.h
trunk/src/confwizard.cpp
trunk/src/confwizard.h
trunk/src/csvimportdlg.cpp
trunk/src/definitiondialog.cpp
trunk/src/definitiondialog.h
trunk/src/dstextedit.cpp
trunk/src/dstextedit.h
trunk/src/kactionmap.cpp
trunk/src/kactionmap.h
trunk/src/kbarcode.cpp
trunk/src/labeleditor.cpp
trunk/src/mimesources.cpp
trunk/src/mimesources.h
trunk/src/multilineeditdlg.cpp
trunk/src/multilineeditdlg.h
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/previewdialog.cpp
trunk/src/previewdialog.h
trunk/src/printlabeldlg.cpp
trunk/src/printlabeldlg.h
trunk/src/rectsettingsdlg.cpp
trunk/src/rectsettingsdlg.h
trunk/src/smalldialogs.cpp
trunk/src/smalldialogs.h
trunk/src/textlineedit.cpp
trunk/src/textlineedit.h
trunk/src/tokendialog.cpp
trunk/src/tokendialog.h
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodecombo.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -43,8 +43,8 @@
#include <klocale.h>
#include <kpushbutton.h>
-BarcodeValidator::BarcodeValidator( QObject* parent, const char* name )
- : QValidator( parent, name )
+BarcodeValidator::BarcodeValidator( QObject* parent )
+ : QValidator( parent )
{
m_valid = NULL;
m_notValid = NULL;
@@ -90,8 +90,8 @@
return Acceptable;
}
-BarcodeCombo::BarcodeCombo(QWidget *parent, const char *name )
- : KComboBox( false, parent, name )
+BarcodeCombo::BarcodeCombo(QWidget *parent)
+ : KComboBox( false, parent )
{
this->insertStringList( *Barkode::encodingTypes() );
@@ -117,8 +117,8 @@
}
}
-BarcodeWidget::BarcodeWidget(QWidget *parent, const char *name )
- : QWidget( parent, name ), m_validator( this )
+BarcodeWidget::BarcodeWidget(QWidget *parent)
+ : QWidget( parent ), m_validator( this )
{
m_token = NULL;
Modified: trunk/src/barcodecombo.h
===================================================================
--- trunk/src/barcodecombo.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodecombo.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -31,7 +31,7 @@
*/
class BarcodeValidator : public QValidator {
public:
- BarcodeValidator( QObject* parent = 0, const char* name = 0 );
+ BarcodeValidator( QObject* parent = 0);
QValidator::State validate( QString & input, int & pos ) const;
@@ -58,7 +58,7 @@
class BarcodeCombo : public KComboBox {
Q_OBJECT
public:
- BarcodeCombo(QWidget *parent=0, const char *name=0);
+ BarcodeCombo(QWidget *parent=0);
~BarcodeCombo();
const char* getEncodingType();
@@ -87,7 +87,7 @@
class BarcodeWidget : public QWidget {
Q_OBJECT
public:
- BarcodeWidget(QWidget *parent=0, const char *name=0);
+ BarcodeWidget(QWidget *parent=0);
~BarcodeWidget() { }
void getData( Barkode & barkode );
Modified: trunk/src/barcodedialog.cpp
===================================================================
--- trunk/src/barcodedialog.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodedialog.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -43,8 +43,8 @@
#include <Q3HBoxLayout>
#include <Q3VBoxLayout>
-BarCodeDialog::BarCodeDialog( QWidget* parent, const char* name )
- : QDialog( parent, name, false)
+BarCodeDialog::BarCodeDialog( QWidget* parent )
+ : QDialog( parent, false)
{
setCaption( i18n( "Barcode Generator" ) );
Modified: trunk/src/barcodedialog.h
===================================================================
--- trunk/src/barcodedialog.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodedialog.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -56,7 +56,7 @@
Q_OBJECT
public:
- BarCodeDialog( QWidget* parent = 0, const char* name = 0 );
+ BarCodeDialog( QWidget* parent = 0 );
~BarCodeDialog();
private:
Modified: trunk/src/barcodedialogs.cpp
===================================================================
--- trunk/src/barcodedialogs.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodedialogs.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -43,9 +43,9 @@
#include <kcolorbutton.h>
-AdvancedBarcodeDialog::AdvancedBarcodeDialog( QString type, QWidget* parent, const char* name )
+AdvancedBarcodeDialog::AdvancedBarcodeDialog( QString type, QWidget* parent )
: KDialogBase( KDialogBase::Tabbed, i18n("Barcode Settings"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent)
{
list.setAutoDelete( false );
@@ -104,8 +104,8 @@
}
}
-TBarcodeDlg::TBarcodeDlg(QWidget *parent, const char *name )
- : QWidget( parent, name )
+TBarcodeDlg::TBarcodeDlg(QWidget *parent)
+ : QWidget( parent )
{
Q3VBoxLayout* layout = new Q3VBoxLayout( this, 6, 6 );
@@ -254,8 +254,8 @@
}
}
-PDF417BarcodeDlg::PDF417BarcodeDlg(QWidget *parent, const char *name )
- : QWidget( parent, name )
+PDF417BarcodeDlg::PDF417BarcodeDlg(QWidget *parent)
+ : QWidget( parent )
{
Q3VBoxLayout* layout = new Q3VBoxLayout( this, 6, 6 );
@@ -308,8 +308,8 @@
}
}
-DataMatrixDlg::DataMatrixDlg(QWidget *parent, const char *name )
- : QWidget( parent, name )
+DataMatrixDlg::DataMatrixDlg(QWidget *parent )
+ : QWidget( parent )
{
Q3HBoxLayout* datamLayout = new Q3HBoxLayout( this, 6, 6 );
@@ -362,8 +362,8 @@
b->setDatamatrixSize( comboDataMatrix->currentItem() );
}
-SequenceDlg::SequenceDlg( QWidget *parent, const char *name )
- : QWidget( parent, name )
+SequenceDlg::SequenceDlg( QWidget *parent )
+ : QWidget( parent )
{
Q3VBoxLayout* main = new Q3VBoxLayout( this, 6, 6 );
@@ -442,8 +442,8 @@
spinStart->setEnabled( checkSequence->isChecked() && radioNumbers->isChecked() );
}
-ColorDlg::ColorDlg(QWidget *parent, const char *name)
- : Q3VBox( parent, name )
+ColorDlg::ColorDlg(QWidget *parent)
+ : Q3VBox( parent )
{
Q3GroupBox* gb = new Q3GroupBox( i18n("Colors"), this );
gb->setColumnLayout(0, Qt::Vertical );
@@ -478,8 +478,8 @@
b->setTextColor( buttonTextColor->color() );
}
-PurePostscriptDlg::PurePostscriptDlg(QWidget *parent, const char *name)
- : Q3VBox( parent, name )
+PurePostscriptDlg::PurePostscriptDlg(QWidget *parent)
+ : Q3VBox( parent )
{
Q3VGroupBox* gb = new Q3VGroupBox( i18n("Barcode Writer in Pure Postscript"), this );
gb->setEnabled( Barkode::havePurePostscriptBarcode() );
Modified: trunk/src/barcodedialogs.h
===================================================================
--- trunk/src/barcodedialogs.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodedialogs.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -59,7 +59,7 @@
class AdvancedBarcodeDialog : public KDialogBase {
Q_OBJECT
public:
- AdvancedBarcodeDialog( QString type, QWidget* parent = 0, const char* name = 0 );
+ AdvancedBarcodeDialog( QString type, QWidget* parent = 0 );
~AdvancedBarcodeDialog();
void setData( Barkode* b );
@@ -75,7 +75,7 @@
class TBarcodeDlg : public QWidget, public BarcodeDlgBase {
Q_OBJECT
public:
- TBarcodeDlg(QWidget *parent=0, const char *name=0);
+ TBarcodeDlg(QWidget *parent=0 );
void setData( Barkode* b );
void getData( Barkode* b ) const;
@@ -97,7 +97,7 @@
class PDF417BarcodeDlg : public QWidget, public BarcodeDlgBase {
Q_OBJECT
public:
- PDF417BarcodeDlg(QWidget *parent=0, const char *name=0);
+ PDF417BarcodeDlg(QWidget *parent=0);
void setData( Barkode* b );
void getData( Barkode* b ) const;
@@ -114,7 +114,7 @@
class DataMatrixDlg : public QWidget, public BarcodeDlgBase {
Q_OBJECT
public:
- DataMatrixDlg(QWidget *parent=0, const char *name=0);
+ DataMatrixDlg(QWidget *parent=0);
void setData( Barkode* b );
void getData( Barkode* b ) const;
@@ -129,7 +129,7 @@
class SequenceDlg : public QWidget, public BarcodeDlgBase {
Q_OBJECT
public:
- SequenceDlg(QWidget *parent=0, const char *name=0);
+ SequenceDlg(QWidget *parent=0);
void setData( Barkode* b );
void getData( Barkode* b ) const;
@@ -153,7 +153,7 @@
class ColorDlg : public Q3VBox, public BarcodeDlgBase {
Q_OBJECT
public:
- ColorDlg(QWidget *parent=0, const char *name=0);
+ ColorDlg(QWidget *parent=0);
void setData( Barkode* b );
void getData( Barkode* b ) const;
@@ -170,7 +170,7 @@
class PurePostscriptDlg : public Q3VBox, public BarcodeDlgBase {
Q_OBJECT
public:
- PurePostscriptDlg(QWidget *parent=0, const char *name=0);
+ PurePostscriptDlg(QWidget *parent=0);
void setData( Barkode* b );
void getData( Barkode* b ) const;
Modified: trunk/src/barcodeprinterdlg.cpp
===================================================================
--- trunk/src/barcodeprinterdlg.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodeprinterdlg.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -29,9 +29,9 @@
//Added by qt3to4:
#include <Q3GridLayout>
-BarcodePrinterDlg::BarcodePrinterDlg(QWidget *parent, const char *name)
+BarcodePrinterDlg::BarcodePrinterDlg(QWidget *parent)
: KDialogBase( KDialogBase::Plain, i18n("Barcode Printer"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent)
{
Q3GridLayout* layout = new Q3GridLayout( plainPage(), 6, 6 );
Modified: trunk/src/barcodeprinterdlg.h
===================================================================
--- trunk/src/barcodeprinterdlg.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/barcodeprinterdlg.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -33,7 +33,7 @@
{
Q_OBJECT
public:
- BarcodePrinterDlg(QWidget *parent = 0, const char *name = 0);
+ BarcodePrinterDlg(QWidget *parent = 0);
~BarcodePrinterDlg();
int outputFormat() const;
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/batchwizard.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -94,9 +94,9 @@
};
-BatchWizard::BatchWizard( QWidget* parent, const char* name )
+BatchWizard::BatchWizard( QWidget* parent )
: DCOPObject("BatchPrinting"),
- KWizard( parent, name )
+ KWizard( parent )
{
setupPage1();
setupPage2();
Modified: trunk/src/batchwizard.h
===================================================================
--- trunk/src/batchwizard.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/batchwizard.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -44,7 +44,7 @@
class BatchWizard : public KWizard, public BatchIface {
Q_OBJECT
public:
- BatchWizard( QWidget* parent = NULL, const char* name = NULL );
+ BatchWizard( QWidget* parent = NULL );
~BatchWizard();
/** reimplemented DCOP method from BatchIface
Modified: trunk/src/confwizard.cpp
===================================================================
--- trunk/src/confwizard.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/confwizard.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -57,8 +57,8 @@
"replacement for the creation of barcodes. All major types of barcodes "
"like EAN, UPC, CODE39 and ISBN are supported." );
-ConfWizard::ConfWizard( QWidget* parent, const char* name, bool modal )
- : KWizard( parent, name, modal )
+ConfWizard::ConfWizard( QWidget* parent, bool modal )
+ : KWizard( parent, modal )
{
setCaption( i18n( "Configure KBarcode" ) );
Modified: trunk/src/confwizard.h
===================================================================
--- trunk/src/confwizard.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/confwizard.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -45,7 +45,7 @@
Q_OBJECT
public:
- ConfWizard( QWidget* parent = 0, const char* name = 0, bool modal = true );
+ ConfWizard( QWidget* parent = 0, bool modal = true );
~ConfWizard();
void showPage( QWidget* page );
Modified: trunk/src/csvimportdlg.cpp
===================================================================
--- trunk/src/csvimportdlg.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/csvimportdlg.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -59,9 +59,9 @@
const char* NOFIELD = "<NONE>";
-CSVImportDlg::CSVImportDlg(QWidget *parent, const char *name )
+CSVImportDlg::CSVImportDlg(QWidget *parent )
: KDialogBase( KDialogBase::Tabbed, i18n("Import"),
- KDialogBase::Ok | KDialogBase::Close, KDialogBase::Ok, parent,name,false,true)
+ KDialogBase::Ok | KDialogBase::Close, KDialogBase::Ok, parent,false,true)
{
setButtonOK( i18n("&Import"), i18n("Import the selected file into your tables.") );
Modified: trunk/src/definitiondialog.cpp
===================================================================
--- trunk/src/definitiondialog.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/definitiondialog.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -35,8 +35,8 @@
// KDE includes
#include <klocale.h>
-LabelPreview::LabelPreview( QWidget* parent, const char* name )
- : QWidget( parent, name)
+LabelPreview::LabelPreview( QWidget* parent )
+ : QWidget( parent )
{
// For old DIN A4 preview
PrinterSettings* ps = PrinterSettings::getInstance();
@@ -80,8 +80,8 @@
}
/*****************************************/
-DefinitionDialog::DefinitionDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
- : QDialog( parent, name, modal, fl )
+DefinitionDialog::DefinitionDialog( QWidget* parent, bool modal, Qt::WFlags fl )
+ : QDialog( parent, modal, fl )
{
resize( 465, 345 );
setCaption( i18n( "Add Label Definition" ) );
Modified: trunk/src/definitiondialog.h
===================================================================
--- trunk/src/definitiondialog.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/definitiondialog.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -28,7 +28,7 @@
class LabelPreview : public QWidget {
Q_OBJECT
public:
- LabelPreview( QWidget* parent = 0, const char* name = 0 );
+ LabelPreview( QWidget* parent = 0 );
~LabelPreview();
void setRect( QRect label ) { size = label; }
@@ -52,7 +52,7 @@
Q_OBJECT
public:
- DefinitionDialog( QWidget* parent = 0, const char* name = 0, bool modal = true, Qt::WFlags fl = 0 );
+ DefinitionDialog( QWidget* parent = 0, bool modal = true, Qt::WFlags fl = 0 );
~DefinitionDialog();
private:
const Measurements getCurrentMeasure();
Modified: trunk/src/dstextedit.cpp
===================================================================
--- trunk/src/dstextedit.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/dstextedit.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -21,8 +21,8 @@
//Added by qt3to4:
#include <Q3ValueList>
-DSTextEdit::DSTextEdit( QWidget* parent, const char* name )
- : TextEditBase( parent, name )
+DSTextEdit::DSTextEdit( QWidget* parent )
+ : TextEditBase( parent )
{
connect( this, SIGNAL( textChanged() ), this, SLOT( fixParagraphs() ) );
}
Modified: trunk/src/dstextedit.h
===================================================================
--- trunk/src/dstextedit.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/dstextedit.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -37,7 +37,7 @@
Q_OBJECT
public:
- DSTextEdit( QWidget* parent, const char* name = 0 );
+ DSTextEdit( QWidget* parent );
//virtual void moveCursor( CursorAction action, bool select );
private slots:
Modified: trunk/src/kactionmap.cpp
===================================================================
--- trunk/src/kactionmap.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/kactionmap.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -89,8 +89,8 @@
KAction* m_action;
};
-KActionMapDlg::KActionMapDlg( KActionCollection* actions, QWidget* parent, const char* name )
- : KDialogBase( parent, name, false, i18n("Action Map"), KDialogBase::Close, KDialogBase::Close )
+KActionMapDlg::KActionMapDlg( KActionCollection* actions, QWidget* parent )
+ : KDialogBase( parent, false, i18n("Action Map"), KDialogBase::Close, KDialogBase::Close )
{
KVBox *page = makeVBoxMainWidget();
@@ -105,8 +105,8 @@
m_map->updateEnabledState();
}
-KActionMap::KActionMap( KActionCollection* actions, QWidget* parent, const char* name )
- : QWidget( parent, name ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false )
+KActionMap::KActionMap( KActionCollection* actions, QWidget* parent )
+ : QWidget( parent ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false )
{
Q3VBoxLayout* layout = new Q3VBoxLayout( this );
Modified: trunk/src/kactionmap.h
===================================================================
--- trunk/src/kactionmap.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/kactionmap.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -34,7 +34,7 @@
*/
class KActionMapDlg : public KDialogBase {
public:
- KActionMapDlg( KActionCollection* actions, QWidget* parent = NULL, const char* name = NULL );
+ KActionMapDlg( KActionCollection* actions, QWidget* parent = NULL );
/** Call this function whenever you changed the enabled/disalbed state of an action
* in your application.
@@ -74,7 +74,7 @@
* @param parent the parent
* @param name the name
*/
- KActionMap( KActionCollection* actions, QWidget* parent = NULL, const char* name = NULL );
+ KActionMap( KActionCollection* actions, QWidget* parent = NULL );
~KActionMap();
public slots:
Modified: trunk/src/kbarcode.cpp
===================================================================
--- trunk/src/kbarcode.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/kbarcode.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -41,9 +41,8 @@
#include <kpushbutton.h>
#include <kmessagebox.h>
-KBarcode::KBarcode( QWidget *parent, const char *name, Qt::WFlags f)
- : DCOPObject("KBarcode"),
- MainWindow( parent, name, f )
+KBarcode::KBarcode( QWidget *parent, Qt::WFlags f)
+ : MainWindow( parent, f )
{
Q3GroupBox* w = new Q3GroupBox( this );
w->setColumnLayout(0, Qt::Vertical );
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/labeleditor.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -129,9 +129,8 @@
using namespace KABC;
-LabelEditor::LabelEditor( QWidget *parent, QString _filename, const char *name, Qt::WFlags f )
- : DCOPObject( "LabelEditor" ),
- MainWindow( parent, f )
+LabelEditor::LabelEditor( QWidget *parent, QString _filename, Qt::WFlags f )
+ : MainWindow( parent, f )
{
undoAct =
redoAct = NULL;
Modified: trunk/src/mimesources.cpp
===================================================================
--- trunk/src/mimesources.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/mimesources.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -46,8 +46,8 @@
-DocumentItemDrag::DocumentItemDrag( QWidget* dragSource, const char* name )
- : Q3StoredDrag( DocumentItemDrag::mimeType(), dragSource, name )
+DocumentItemDrag::DocumentItemDrag( QWidget* dragSource )
+ : Q3StoredDrag( DocumentItemDrag::mimeType(), dragSource )
{
}
Modified: trunk/src/mimesources.h
===================================================================
--- trunk/src/mimesources.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/mimesources.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -28,7 +28,7 @@
class DocumentItemDrag : public Q3StoredDrag {
Q_OBJECT
public:
- DocumentItemDrag( QWidget* dragSource = NULL, const char* name = 0 );
+ DocumentItemDrag( QWidget* dragSource = NULL );
static QString mimeType();
Modified: trunk/src/multilineeditdlg.cpp
===================================================================
--- trunk/src/multilineeditdlg.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/multilineeditdlg.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -35,8 +35,8 @@
//Added by qt3to4:
#include <Q3VBoxLayout>
-MultiLineEditor::MultiLineEditor( TokenProvider* token, QWidget *parent, const char *name )
- : QWidget( parent, name ), m_token( token )
+MultiLineEditor::MultiLineEditor( TokenProvider* token, QWidget *parent )
+ : QWidget( parent ), m_token( token )
{
Q3VBoxLayout* layout = new Q3VBoxLayout( this, 6, 6 );
Modified: trunk/src/multilineeditdlg.h
===================================================================
--- trunk/src/multilineeditdlg.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/multilineeditdlg.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -34,7 +34,7 @@
class MultiLineEditor : public QWidget {
Q_OBJECT
public:
- MultiLineEditor( TokenProvider* token, QWidget *parent=0, const char *name=0);
+ MultiLineEditor( TokenProvider* token, QWidget *parent=0 );
~MultiLineEditor();
QString text();
void setText( const QString & t );
Modified: trunk/src/mycanvasview.cpp
===================================================================
--- trunk/src/mycanvasview.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/mycanvasview.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -33,8 +33,8 @@
#include <kruler.h>
#include <kstatusbar.h>
-MyCanvas::MyCanvas( QObject* parent, const char* name )
- : Q3Canvas( parent, name )
+MyCanvas::MyCanvas( QObject* parent )
+ : Q3Canvas( parent )
{
m_grid = false;
@@ -77,8 +77,8 @@
}
}
-MyCanvasView::MyCanvasView( Definition* d, MyCanvas* c, QWidget* parent, const char* name, Qt::WFlags f)
- : Q3CanvasView(c,parent,name,f)
+MyCanvasView::MyCanvasView( Definition* d, MyCanvas* c, QWidget* parent, Qt::WFlags f)
+ : Q3CanvasView(c,parent,f)
{
statusbar = 0;
m_commov = 0;
Modified: trunk/src/mycanvasview.h
===================================================================
--- trunk/src/mycanvasview.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/mycanvasview.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -37,7 +37,7 @@
Q_OBJECT
public:
- MyCanvas( QObject* parent, const char* name = 0 );
+ MyCanvas( QObject* parent );
~MyCanvas();
void setRect( QRect r ) {
Modified: trunk/src/mydatatable.cpp
===================================================================
--- trunk/src/mydatatable.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/mydatatable.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -17,8 +17,8 @@
#include "mydatatable.h"
-MyDataTable::MyDataTable(QWidget *parent, const char *name )
- : Q3DataTable(parent,name)
+MyDataTable::MyDataTable(QWidget *parent )
+ : Q3DataTable(parent)
{ }
MyDataTable::~MyDataTable()
Modified: trunk/src/mydatatable.h
===================================================================
--- trunk/src/mydatatable.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/mydatatable.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -26,7 +26,7 @@
class MyDataTable : public Q3DataTable {
Q_OBJECT
public:
- MyDataTable(QWidget *parent=0, const char *name=0);
+ MyDataTable(QWidget *parent=0);
~MyDataTable();
bool update();
Modified: trunk/src/newlabel.cpp
===================================================================
--- trunk/src/newlabel.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/newlabel.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -39,8 +39,8 @@
#define I2S(x) QString("%1").arg(x)
#endif // I2S
-NewLabel::NewLabel( QWidget* parent, const char* name, bool change, Qt::WFlags fl )
- : QDialog( parent, name, true, fl )
+NewLabel::NewLabel( QWidget* parent, bool change, Qt::WFlags fl )
+ : QDialog( parent, true, fl )
{
setCaption( i18n( "New Label" ) );
curid = 0;
Modified: trunk/src/newlabel.h
===================================================================
--- trunk/src/newlabel.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/newlabel.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -42,7 +42,7 @@
{
Q_OBJECT
public:
- NewLabel( QWidget* parent = 0, const char* name = 0, bool change = FALSE, Qt::WFlags fl = 0 );
+ NewLabel( QWidget* parent = 0, bool change = FALSE, Qt::WFlags fl = 0 );
~NewLabel();
int labelId() const { return curid; }
Modified: trunk/src/previewdialog.cpp
===================================================================
--- trunk/src/previewdialog.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/previewdialog.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -52,8 +52,8 @@
QString PreviewDialog::group = "";
QString PreviewDialog::article = "";
-PreviewDialog::PreviewDialog( QIODevice* device, Definition* d, QString filename, QWidget *parent, const char *name )
- : QDialog( parent, name, true, Qt::WDestructiveClose )
+PreviewDialog::PreviewDialog( QIODevice* device, Definition* d, QString filename, QWidget *parent)
+ : QDialog( parent, true, Qt::WDestructiveClose )
{
file = device;
def = d;
Modified: trunk/src/previewdialog.h
===================================================================
--- trunk/src/previewdialog.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/previewdialog.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -34,7 +34,7 @@
class PreviewDialog : public QDialog {
Q_OBJECT
public:
- PreviewDialog( QIODevice* device, Definition* d, QString filename, QWidget *parent=0, const char *name=0);
+ PreviewDialog( QIODevice* device, Definition* d, QString filename, QWidget *parent=0);
~PreviewDialog();
private slots:
Modified: trunk/src/printlabeldlg.cpp
===================================================================
--- trunk/src/printlabeldlg.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/printlabeldlg.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -28,9 +28,9 @@
#include <knuminput.h>
#include <klocale.h>
-PrintLabelDlg::PrintLabelDlg(QWidget *parent, const char *name )
+PrintLabelDlg::PrintLabelDlg(QWidget *parent )
: KDialogBase( KDialogBase::Plain, i18n("Print"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent)
{
Q3VBoxLayout* box = new Q3VBoxLayout( plainPage() );
Modified: trunk/src/printlabeldlg.h
===================================================================
--- trunk/src/printlabeldlg.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/printlabeldlg.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -34,7 +34,7 @@
class PrintLabelDlg : public KDialogBase {
Q_OBJECT
public:
- PrintLabelDlg(QWidget *parent=0, const char *name=0);
+ PrintLabelDlg(QWidget *parent=0);
~PrintLabelDlg();
/**
Modified: trunk/src/rectsettingsdlg.cpp
===================================================================
--- trunk/src/rectsettingsdlg.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/rectsettingsdlg.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -54,9 +54,9 @@
}
}
-RectSettingsDlg::RectSettingsDlg(QWidget *parent, const char *name )
+RectSettingsDlg::RectSettingsDlg(QWidget *parent )
: KDialogBase( KDialogBase::Plain, i18n("Settings"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent)
{
QFrame* frame = plainPage();
Q3GridLayout* grid = new Q3GridLayout( frame, 6, 6 );
@@ -145,9 +145,9 @@
return checkBorder->isChecked() ? comboLine->currentItem() + 1 : 0;
}
-LineSettingsDlg::LineSettingsDlg(QWidget *parent, const char *name )
+LineSettingsDlg::LineSettingsDlg(QWidget *parent )
: KDialogBase( KDialogBase::Plain, i18n("Settings"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name)
+ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent)
{
QFrame* frame = plainPage();
Q3GridLayout* grid = new Q3GridLayout( frame, 6, 6 );
Modified: trunk/src/rectsettingsdlg.h
===================================================================
--- trunk/src/rectsettingsdlg.h 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/rectsettingsdlg.h 2008-02-27 20:44:24 UTC (rev 20)
@@ -27,7 +27,7 @@
class RectSettingsDlg : public KDialogBase {
Q_OBJECT
public:
- RectSettingsDlg(QWidget *parent=0, const char *name=0);
+ RectSettingsDlg(QWidget *parent=0);
~RectSettingsDlg();
void setBorderColor( const QColor & c );
@@ -57,7 +57,7 @@
class LineSettingsDlg : public KDialogBase {
Q_OBJECT
public:
- LineSettingsDlg(QWidget *parent=0, const char *name=0);
+ LineSettingsDlg(QWidget *parent=0);
~LineSettingsDlg();
void setPen( const QPen p );
Modified: trunk/src/smalldialogs.cpp
===================================================================
--- trunk/src/smalldialogs.cpp 2008-02-27 20:15:27 UTC (rev 19)
+++ trunk/src/smalldialogs.cpp 2008-02-27 20:44:24 UTC (rev 20)
@@ -36,9 +36,9 @@
using namespace DSSmallDialogs;
-AddAllDialog::AddAllDialog(QWidget *parent, const char *name )
+AddAllDialog::AddAllDialog(QWidget *parent)
: KDialogBase( KDialogBase::Plain, i18n("Add Barcode_basic"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent,name...
[truncated message content] |
|
From: <vz...@us...> - 2008-02-27 21:35:20
|
Revision: 21
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=21&view=rev
Author: vzsolt
Date: 2008-02-27 13:35:23 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Removed the name parameter from the constructor calls as well.
Also removed the traces of DCOP.
Modified Paths:
--------------
trunk/src/barcodecombo.cpp
trunk/src/barcodedialog.cpp
trunk/src/batchwizard.cpp
trunk/src/batchwizard.h
trunk/src/confwizard.cpp
trunk/src/databasebrowser.cpp
trunk/src/definitiondialog.cpp
trunk/src/kbarcode.cpp
trunk/src/kbarcode.h
trunk/src/labeleditor.cpp
trunk/src/labeleditor.h
trunk/src/main.cpp
trunk/src/multilineeditdlg.cpp
trunk/src/mycanvasview.h
trunk/src/newlabel.cpp
trunk/src/propertywidget.cpp
trunk/src/sqltables.cpp
trunk/src/textlineedit.cpp
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/barcodecombo.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -127,7 +127,7 @@
labelStandard = new QLabel( i18n( "&Encoding Type:" ), this );
grid->addWidget( labelStandard, 1, 0 );
- comboStandard = new BarcodeCombo( this, "comboStandard" );
+ comboStandard = new BarcodeCombo( this );
connect( comboStandard, SIGNAL( activated(int) ), this, SLOT( encodingChanged() ) );
connect( comboStandard, SIGNAL( activated(int) ), this, SLOT( changed() ) );
grid->addMultiCellWidget( comboStandard, 1, 1, 1, 3 );
@@ -136,7 +136,7 @@
labelData = new QLabel( i18n( "&Value:" ), this );
grid->addWidget( labelData, 2, 0 );
- data = new KLineEdit( this, "data" );
+ data = new KLineEdit( this );
labelData->setBuddy( data );
connect( data, SIGNAL( textChanged( const QString & ) ), this, SLOT( changed() ) );
@@ -171,7 +171,7 @@
buttonToken->setIconSet( QIcon( SmallIcon("contents") ) );
grid->addWidget( buttonToken, 4, 3 );
- spinMargin = new KIntNumInput( this, "spinMargin" );
+ spinMargin = new KIntNumInput( this );
spinMargin->setLabel( i18n( "&Margin:" ), Qt::AlignLeft | Qt::AlignVCenter );
spinMargin->setRange( 0, 10000, 1, false );
spinMargin->setValue( 10 );
@@ -299,7 +299,7 @@
void BarcodeWidget::advanced()
{
- AdvancedBarcodeDialog abd( comboStandard->getEncodingType(), this, "abd" );
+ AdvancedBarcodeDialog abd( comboStandard->getEncodingType(), this );
abd.setData( &m_barcode );
if( abd.exec() == QDialog::Accepted )
abd.getData( &m_barcode );
@@ -307,7 +307,7 @@
void BarcodeWidget::tokens()
{
- TokenDialog tokendlg( m_token, this, "tokendlg" );
+ TokenDialog tokendlg( m_token, this );
if( tokendlg.exec() == QDialog::Accepted )
{
if( data->isEnabled() )
Modified: trunk/src/barcodedialog.cpp
===================================================================
--- trunk/src/barcodedialog.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/barcodedialog.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -51,22 +51,22 @@
BarCodeDialogLayout = new Q3HBoxLayout( this, 11, 6, "BarCodeDialogLayout");
Layout5 = new Q3VBoxLayout( 0, 0, 6, "Layout5");
Layout6 = new Q3VBoxLayout( 0, 0, 6, "Layout2");
- widget = new BarcodeWidget( this, "widget" );
+ widget = new BarcodeWidget( this );
m_token = new TokenProvider( KApplication::desktop() );
widget->setTokenProvider( m_token );
- buttonGenerate = new KPushButton( this, "buttonGenerate" );
+ buttonGenerate = new KPushButton( this );
buttonGenerate->setText( i18n( "&Generate" ) );
buttonGenerate->setEnabled( Barkode::haveBarcode() );
buttonGenerate->setIconSet( SmallIconSet("barcode") );
- buttonSave = new KPushButton( this, "buttonSave" );
+ buttonSave = new KPushButton( this );
buttonSave->setText( i18n( "&Save" ) );
buttonSave->setEnabled( false );
buttonSave->setIconSet( SmallIconSet("filesave") );
- buttonCopy = new KPushButton( this, "buttonCopy" );
+ buttonCopy = new KPushButton( this );
buttonCopy->setText( i18n("&Copy") );
buttonCopy->setEnabled( false );
buttonCopy->setIconSet( SmallIconSet("editcopy") );
@@ -139,7 +139,7 @@
if(!bc.isValid())
{
- KFileDialog fd( ":save_image", KImageIO::pattern( KImageIO::Writing ), this, "fd", true );
+ KFileDialog fd( ":save_image", KImageIO::pattern( KImageIO::Writing ), this, true );
fd.setMode( KFile::File );
fd.setOperationMode( KFileDialog::Saving );
if( fd.exec() == QDialog::Accepted )
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/batchwizard.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -95,8 +95,7 @@
};
BatchWizard::BatchWizard( QWidget* parent )
- : DCOPObject("BatchPrinting"),
- KWizard( parent )
+ : KWizard( parent )
{
setupPage1();
setupPage2();
@@ -120,7 +119,7 @@
void BatchWizard::setupPage1()
{
- page1 = new QWidget( this, "page1" );
+ page1 = new QWidget( this );
Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page1, 11, 6, "pageLayout");
QLabel* label = new QLabel( i18n("<qt>This wizard will guide you through the process "
@@ -148,7 +147,7 @@
void BatchWizard::setupPage2()
{
- page2 = new QWidget( this, "page2" );
+ page2 = new QWidget( this );
Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page2, 11, 6, "pageLayout");
Q3VButtonGroup* group = new Q3VButtonGroup( page2 );
@@ -173,7 +172,7 @@
void BatchWizard::setupPage3()
{
- page3 = new Q3WidgetStack( this, "page3" );
+ page3 = new Q3WidgetStack( this );
setupStackPage1();
setupStackPage2();
@@ -185,7 +184,7 @@
void BatchWizard::setupPage4()
{
- page4 = new Q3VBox( this, "page4" );
+ page4 = new Q3VBox( this );
page4->setSpacing( 5 );
Q3HBox* hbox = new Q3HBox( page4 );
@@ -210,7 +209,7 @@
{
TokenProvider serial( this );
- page5 = new Q3VBox( this, "page5" );
+ page5 = new Q3VBox( 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 "
@@ -234,7 +233,7 @@
void BatchWizard::setupPage10()
{
- page10 = new QWidget( this, "page10" );
+ page10 = new QWidget( this );
Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page10, 11, 6, "pageLayout");
Q3VButtonGroup* group = new Q3VButtonGroup( page10 );
@@ -576,7 +575,7 @@
int move = 0;
if( bUserInteraction )
{
- PrintLabelDlg pld( this, "pld" );
+ PrintLabelDlg pld( this );
pld.setLabelsEnabled( false );
if( pld.exec() != QDialog::Accepted )
return;
@@ -732,7 +731,7 @@
void BatchWizard::addItem()
{
- DSSmallDialogs::AddItemsDialog aid( this, "aid" );
+ DSSmallDialogs::AddItemsDialog aid( this );
aid.setGroupCompletion( compGroup );
connect( &aid, SIGNAL( add( const QString &, const QString &, int) ),
this, SLOT( slotAddItem( const QString &, const QString &, int) ) );
@@ -855,7 +854,7 @@
void BatchWizard::addAllItems()
{
- DSSmallDialogs::AddAllDialog* dlg = new DSSmallDialogs::AddAllDialog( this, "dlg" );
+ DSSmallDialogs::AddAllDialog* dlg = new DSSmallDialogs::AddAllDialog( this );
if( dlg->exec() == QDialog::Accepted )
{
QString temp;
Modified: trunk/src/batchwizard.h
===================================================================
--- trunk/src/batchwizard.h 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/batchwizard.h 2008-02-27 21:35:23 UTC (rev 21)
@@ -41,7 +41,7 @@
class Q3VBox;
class Q3WidgetStack;
-class BatchWizard : public KWizard, public BatchIface {
+class BatchWizard : public KWizard {
Q_OBJECT
public:
BatchWizard( QWidget* parent = NULL );
Modified: trunk/src/confwizard.cpp
===================================================================
--- trunk/src/confwizard.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/confwizard.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -87,28 +87,28 @@
void ConfWizard::setupPage1()
{
- page = new QWidget( this, "page" );
+ page = new QWidget( this );
pageLayout = new Q3VBoxLayout( page, 11, 6, "pageLayout");
Layout8 = new Q3HBoxLayout( 0, 0, 6, "Layout8");
Layout7 = new Q3VBoxLayout( 0, 0, 6, "Layout7");
- logo = new QLabel( page, "logo" );
+ logo = new QLabel( page );
logo->setPixmap( locate("data", "kbarcode/logo.png") );
QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
pageLayout->addWidget( logo );
Layout7->addItem( spacer );
Layout8->addLayout( Layout7 );
- TextLabel2_2 = new QLabel( page, "TextLabel2_2" );
+ TextLabel2_2 = new QLabel( page );
TextLabel2_2->setText( i18n( "<qt><h1>Welcome to KBarcode</h1><br><br>") +
i18n( description ) + "</qt>" );
Layout8->addWidget( TextLabel2_2 );
pageLayout->addLayout( Layout8 );
- KUrlLabel1 = new KUrlLabel( page, "KUrlLabel1" );
+ KUrlLabel1 = new KUrlLabel( page );
KUrlLabel1->setText( "http://www.kbarcode.net" );
KUrlLabel1->setURL("http://www.kbarcode.net");
pageLayout->addWidget( KUrlLabel1 );
@@ -117,7 +117,7 @@
void ConfWizard::setupPage0()
{
- QWidget* page_0 = new QWidget( this, "page_0" );
+ QWidget* page_0 = new QWidget( this );
Q3VBoxLayout* pageLayout = new Q3VBoxLayout( page_0, 11, 6, "pageLayout");
Q3TextBrowser* b = new Q3TextBrowser( page_0, "b" );
@@ -130,7 +130,7 @@
void ConfWizard::setupPage2()
{
- page_2 = new QWidget( this, "page_2" );
+ page_2 = new QWidget( this );
pageLayout_2 = new Q3VBoxLayout( page_2, 11, 6, "pageLayout_2");
checkDatabase = new QCheckBox( page_2 );
@@ -150,21 +150,21 @@
void ConfWizard::setupPage3()
{
- page_3 = new QWidget( this, "page_3" );
+ page_3 = new QWidget( this );
pageLayout_3 = new Q3VBoxLayout( page_3, 11, 6, "pageLayout_3");
- TextLabel1_2 = new QLabel( page_3, "TextLabel1_2" );
+ 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");
- buttonCreate = new KPushButton( page_3, "buttonCreate" );
+ buttonCreate = new KPushButton( page_3 );
buttonCreate->setText( i18n( "&Create Tables" ) );
Layout5_2->addWidget( buttonCreate );
- buttonExample = new KPushButton( page_3, "buttonExample" );
+ buttonExample = new KPushButton( page_3 );
buttonExample->setEnabled( FALSE );
buttonExample->setText( i18n( "&Add Example Data" ) );
Layout5_2->addWidget( buttonExample );
Modified: trunk/src/databasebrowser.cpp
===================================================================
--- trunk/src/databasebrowser.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/databasebrowser.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -138,7 +138,7 @@
void DatabaseBrowser::find()
{
if( !findDlg )
- findDlg = new KEdFind( this, "findDlg", false );
+ findDlg = new KEdFind( this, false );
findDlg->setText( m_find );
findDlg->setDirection( m_direction );
Modified: trunk/src/definitiondialog.cpp
===================================================================
--- trunk/src/definitiondialog.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/definitiondialog.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -145,42 +145,42 @@
comboType->setEditable( TRUE );
Layout14->addWidget( comboType );
- editWidth = new KRestrictedLine( this, "editWidth" );
+ editWidth = new KRestrictedLine( this );
editWidth->setText( i18n( "0" ) );
editWidth->setValidChars( i18n( "0123456789." ) );
Layout14->addWidget( editWidth );
- editHeight = new KRestrictedLine( this, "editHeight" );
+ editHeight = new KRestrictedLine( this );
editHeight->setText( i18n( "0" ) );
editHeight->setValidChars( i18n( "0123456789." ) );
Layout14->addWidget( editHeight );
- editHGap = new KRestrictedLine( this, "editHGap" );
+ editHGap = new KRestrictedLine( this );
editHGap->setText( i18n( "0" ) );
editHGap->setValidChars( i18n( "0123456789." ) );
Layout14->addWidget( editHGap );
- editVGap = new KRestrictedLine( this, "editVGap" );
+ editVGap = new KRestrictedLine( this );
editVGap->setText( i18n( "0" ) );
editVGap->setValidChars( i18n( "0123456789." ) );
Layout14->addWidget( editVGap );
- editTGap = new KRestrictedLine( this, "editTGap" );
+ editTGap = new KRestrictedLine( this );
editTGap->setText( i18n( "0" ) );
editTGap->setValidChars( i18n( "0123456789." ) );
Layout14->addWidget( editTGap );
- editLGap = new KRestrictedLine( this, "editLGap" );
+ editLGap = new KRestrictedLine( this );
editLGap->setText( i18n( "0" ) );
editLGap->setValidChars( i18n( "0123456789." ) );
Layout14->addWidget( editLGap );
- editNumH = new KRestrictedLine( this, "editNumH" );
+ editNumH = new KRestrictedLine( this );
editNumH->setText( i18n( "0" ) );
editNumH->setValidChars( "0123456789" );
Layout14->addWidget( editNumH );
- editNumV = new KRestrictedLine( this, "editNumV" );
+ editNumV = new KRestrictedLine( this );
editNumV->setText( i18n( "0" ) );
editNumV->setValidChars( "0123456789" );
Layout14->addWidget( editNumV );
@@ -199,11 +199,11 @@
QSpacerItem* spacer_3 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout16->addItem( spacer_3 );
- buttonAdd = new KPushButton( this, "buttonAdd" );
+ buttonAdd = new KPushButton( this );
buttonAdd->setText( i18n( "&Add" ) );
Layout16->addWidget( buttonAdd );
- buttonCancel = new KPushButton( this, "buttonCancel" );
+ buttonCancel = new KPushButton( this );
buttonCancel->setText( i18n( "&Cancel" ) );
Layout16->addWidget( buttonCancel );
DefinitionDialogLayout->addLayout( Layout16 );
Modified: trunk/src/kbarcode.cpp
===================================================================
--- trunk/src/kbarcode.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/kbarcode.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -117,7 +117,7 @@
void KBarcode::startLabelEditor()
{
- LabelEditor* ed = new LabelEditor( NULL, QString::null, "LabelEditorWindow" );
+ LabelEditor* ed = new LabelEditor( NULL, QString::null );
ed->startupDlg( LabelEditor::eCreateNewLabel, QString::null );
}
@@ -128,22 +128,22 @@
void KBarcode::editArticles()
{
- new DatabaseBrowser( TABLE_BASIC, NULL, "basicbrowser" );
+ new DatabaseBrowser( TABLE_BASIC, NULL );
}
void KBarcode::editCustomers()
{
- new DatabaseBrowser( TABLE_CUSTOMER, NULL, "customerbrowser" );
+ new DatabaseBrowser( TABLE_CUSTOMER, NULL );
}
void KBarcode::editCustomerText()
{
- new DatabaseBrowser( TABLE_CUSTOMER_TEXT, NULL, "customertextbrowser" );
+ new DatabaseBrowser( TABLE_CUSTOMER_TEXT, NULL );
}
void KBarcode::editLabelDef()
{
- new DatabaseBrowser( TABLE_LABEL_DEF, NULL, "defbrowser" );
+ new DatabaseBrowser( TABLE_LABEL_DEF, NULL );
}
void KBarcode::enableData()
@@ -266,7 +266,7 @@
void KBarcode::importCSV()
{
- new CSVImportDlg( this, "csvimportdlg" );
+ new CSVImportDlg( this );
}
bool KBarcode::isSQLConnected() const
Modified: trunk/src/kbarcode.h
===================================================================
--- trunk/src/kbarcode.h 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/kbarcode.h 2008-02-27 21:35:23 UTC (rev 21)
@@ -41,7 +41,7 @@
* LabelPrinter (Batchprinting), DatabaseBrowser and BarcodeDialog.
* There are also a few smaller modules.
*/
-class KBarcode: public MainWindow, public KBarcodeIface {
+class KBarcode: public MainWindow {
Q_OBJECT
public:
KBarcode( QWidget *parent=0, Qt::WFlags f = Qt::WType_TopLevel | Qt::WDestructiveClose );
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/labeleditor.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -107,7 +107,6 @@
#include <kstatusbar.h>
#include <kstandarddirs.h>
#include <ktemporaryfile.h>
-#include <dcopclient.h>
#include <kglobal.h>
#include "tcanvasitem.h"
@@ -497,7 +496,7 @@
copyAct->plug( toolBar() );
pasteAct->plug( toolBar() );
- tools = new KToolBar( this, this->leftDock(), true, "tools" );
+ tools = new KToolBar( this, this->leftDock(), true);
barcodeAct->plug( tools );
pictureAct->plug( tools );
@@ -635,7 +634,7 @@
// DocumentItemList list = cv->getAllItems();
// QStringList vars = m_token->listUserVars( &list );
- TokenDialog dlg( m_token, this, "dlg" );
+ TokenDialog dlg( m_token, this );
if( dlg.exec() == QDialog::Accepted )
insertText( dlg.token() );
}
@@ -687,7 +686,7 @@
void LabelEditor::changeSize()
{
- NewLabel* nl = new NewLabel( this, "nl", true, true );
+ NewLabel* nl = new NewLabel( this, true, true );
nl->setLabelId( d->getId() );
if( nl->exec() == QDialog::Rejected )
{
@@ -760,7 +759,7 @@
void LabelEditor::print()
{
- PrintLabelDlg pld( this, "pld" );
+ PrintLabelDlg pld( this );
if( pld.exec() != QDialog::Accepted )
return;
@@ -792,7 +791,7 @@
void LabelEditor::printImage()
{
- KFileDialog fd( ":save_image", KImageIO::pattern( KImageIO::Writing ), this, "fd", true );
+ KFileDialog fd( ":save_image", KImageIO::pattern( KImageIO::Writing ), this, true );
fd.setMode( KFile::File );
fd.setOperationMode( KFileDialog::Saving );
if( fd.exec() == QDialog::Accepted ) {
@@ -1002,7 +1001,7 @@
void LabelEditor::startEditor()
{
if( isChanged() ) {
- LabelEditor* lb = new LabelEditor( NULL, QString::null, "LabelEditorWindow" );
+ LabelEditor* lb = new LabelEditor( NULL, QString::null );
lb->startupDlg( eCreateNewLabel, QString::null );
} else
newLabel();
@@ -1022,7 +1021,7 @@
}
if( isChanged() )
- new LabelEditor( 0, url.path(), "LabelEditorWindow" );
+ new LabelEditor( 0, url.path() );
else
openUrl( url.path() );
}
@@ -1030,7 +1029,7 @@
void LabelEditor::startLoadEditor()
{
if( isChanged() ) {
- LabelEditor* lb = new LabelEditor( 0, QString::null, "LabelEditorWindow" );
+ LabelEditor* lb = new LabelEditor( 0, QString::null );
lb->startupDlg( eLoadLabel, QString::null );
} else
open();
Modified: trunk/src/labeleditor.h
===================================================================
--- trunk/src/labeleditor.h 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/labeleditor.h 2008-02-27 21:35:23 UTC (rev 21)
@@ -83,7 +83,7 @@
* and save them. Labels can also be printed directly, but without database
* support. Use Batchprinting (LabelPrinter) for this.
*/
-class LabelEditor : public MainWindow, public EditorIface, private LabelUtils, private XMLUtils {
+class LabelEditor : public MainWindow, private LabelUtils, private XMLUtils {
Q_OBJECT
public:
enum ELabelEditorMode {
Modified: trunk/src/main.cpp
===================================================================
--- trunk/src/main.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/main.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -112,7 +112,7 @@
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
- KBarcode* kbc = new KBarcode( 0, "KBarcodeMainWindow" );
+ KBarcode* kbc = new KBarcode( 0 );
if( kbc->parseCmdLine() )
return 0;
Modified: trunk/src/multilineeditdlg.cpp
===================================================================
--- trunk/src/multilineeditdlg.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/multilineeditdlg.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -68,7 +68,7 @@
{
ac = new KActionCollection( this );
- KAction* action_export = new KAction( i18n("Export"), "fileexport", 0, this, SLOT( save() ), ac );
+ KAction* action_export = new KAction( i18n("Export"), 0, this, SLOT( save() ), ac );
//
// Edit Actions
@@ -266,7 +266,7 @@
void MultiLineEditor::insertNewField()
{
- TokenDialog dlg( m_token, this, "dlg" );
+ TokenDialog dlg( m_token, this );
if( dlg.exec() == QDialog::Accepted )
editor->insert( dlg.token() );
}
Modified: trunk/src/mycanvasview.h
===================================================================
--- trunk/src/mycanvasview.h 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/mycanvasview.h 2008-02-27 21:35:23 UTC (rev 21)
@@ -89,7 +89,7 @@
};
public:
- MyCanvasView( Definition* d, MyCanvas *c, QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
+ MyCanvasView( Definition* d, MyCanvas *c, QWidget* parent=0, Qt::WFlags f=0);
~MyCanvasView();
/** return a list of all DocumentItems on the canvas
Modified: trunk/src/newlabel.cpp
===================================================================
--- trunk/src/newlabel.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/newlabel.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -92,8 +92,8 @@
Layout2->addItem( spacer_2 );
NewLabelLayout->addLayout( Layout2 );
- TextLabel4 = new QLabel( this, "TextLabel4" );
- preview = new LabelPreview( this, "preview" );
+ TextLabel4 = new QLabel( this );
+ preview = new LabelPreview( this );
Q3HBoxLayout* hlayout = new Q3HBoxLayout( 0, 6, 6 );
hlayout->addWidget( TextLabel4 );
@@ -104,19 +104,19 @@
Layout1 = new Q3HBoxLayout( 0, 0, 6, "Layout1");
- buttonOwnFormat = new KPushButton( this, "buttonOwnFormat" );
+ buttonOwnFormat = new KPushButton( this );
buttonOwnFormat->setText( i18n( "&Add own Label Definition" ) );
Layout1->addWidget( buttonOwnFormat );
QSpacerItem* spacer_4 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1->addItem( spacer_4 );
- buttonOk = new KPushButton( this, "buttonOk" );
+ buttonOk = new KPushButton( this );
buttonOk->setText( i18n( "&OK" ) );
buttonOk->setDefault( true );
Layout1->addWidget( buttonOk );
- buttonCancel = new KPushButton( this, "buttonCancel" );
+ buttonCancel = new KPushButton( this );
buttonCancel->setText( i18n( "&Cancel" ) );
Layout1->addWidget( buttonCancel );
NewLabelLayout->addLayout( Layout1 );
Modified: trunk/src/propertywidget.cpp
===================================================================
--- trunk/src/propertywidget.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/propertywidget.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -231,7 +231,7 @@
comboComplex->addItem( "Static" );
- barcode = new BarcodeWidget( this, "barcode" );
+ barcode = new BarcodeWidget( this );
barcode->setTokenProvider( token );
//connect( this, SIGNAL( defaultClicked() ), this, SLOT( defaults() ) );
@@ -293,7 +293,7 @@
PropertyText::PropertyText( TokenProvider* token, QWidget* parent )
: PropertyWidget( parent )
{
- m_editor = new MultiLineEditor( token, this, "m_editor" );
+ m_editor = new MultiLineEditor( token, this );
grid->addWidget( m_editor, 0, 0 );
}
@@ -603,7 +603,7 @@
void PropertyImage::slotTokens()
{
- TokenDialog tokendlg( m_token, this, "tokendlg" );
+ TokenDialog tokendlg( m_token, this );
if( tokendlg.exec() == QDialog::Accepted )
imgExpression->insert( tokendlg.token() );
}
Modified: trunk/src/sqltables.cpp
===================================================================
--- trunk/src/sqltables.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/sqltables.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -574,7 +574,7 @@
m_autoconnect = new QCheckBox( i18n("&Autoconnect on program start"), groupDatabase );
groupDatabaseLayout->addWidget( m_autoconnect );
- buttonTest = new KPushButton( groupDatabase, "buttonTest" );
+ buttonTest = new KPushButton( groupDatabase );
buttonTest->setText( i18n( "&Test Settings" ) );
groupDatabaseLayout->addWidget( buttonTest );
Modified: trunk/src/textlineedit.cpp
===================================================================
--- trunk/src/textlineedit.cpp 2008-02-27 20:44:24 UTC (rev 20)
+++ trunk/src/textlineedit.cpp 2008-02-27 21:35:23 UTC (rev 21)
@@ -131,16 +131,16 @@
textDataAct->plug( tool2Bar );
- action_font_type = new KComboBox(tool2Bar,"font_type") ;
+ action_font_type = new KComboBox(tool2Bar) ;
connect( action_font_type, SIGNAL( activated(int) ), this, SLOT( setFontType(int) ) );
action_font_type->insertStringList(fuentes) ;
QLabel* labelv = new QLabel( i18n("&Mag. Vert.:"), tool3Bar );
- mag_vert = new KIntNumInput( tool3Bar,"magvert" );
+ mag_vert = new KIntNumInput( tool3Bar);
QLabel* labelh = new QLabel( i18n("&Mag. Hor.:"), tool3Bar );
- mag_hor = new KIntNumInput( tool3Bar,"maghor" );
+ mag_hor = new KIntNumInput( tool3Bar );
connect( mag_vert, SIGNAL( activated(int) ), this, SLOT( setVerMag(int) ) );
connect( mag_hor, SIGNAL( activated(int) ), this, SLOT( setHorMag(int) ) );
mag_vert->setRange( 1, 9, 1, false );
@@ -176,7 +176,7 @@
void TextLineEditor::insertNewField()
{
- TokenDialog dlg( m_token, this, "dlg" );
+ TokenDialog dlg( m_token, this);
if( dlg.exec() == QDialog::Accepted )
editor->insert( dlg.token() ) ;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 22:58:41
|
Revision: 23
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=23&view=rev
Author: vzsolt
Date: 2008-02-27 14:58:46 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
QValueList has been replaced with QList.
Based on the porting guide, the API changes are minimal, so I assume it's as easy as renaming the classes.
Modified Paths:
--------------
trunk/src/barkode.cpp
trunk/src/barkode.h
trunk/src/batchprinter.cpp
trunk/src/batchprinter.h
trunk/src/batchwizard.cpp
trunk/src/csvfile.h
trunk/src/csvimportdlg.cpp
trunk/src/csvimportdlg.h
trunk/src/dsrichtext.cpp
trunk/src/dsrichtext.h
trunk/src/dstextedit.cpp
trunk/src/labeleditor.cpp
trunk/src/mycanvasview.h
trunk/src/tokendialog.cpp
trunk/src/tokendialog.h
trunk/src/tokenprovider.cpp
trunk/src/tokenprovider.h
Modified: trunk/src/barkode.cpp
===================================================================
--- trunk/src/barkode.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/barkode.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -27,7 +27,7 @@
#ifdef _ENABLE_NATIVE_GNU_BARCODE
# include <barcode.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#else
#define BARCODE_DEFAULT_FLAGS 0x00000000
@@ -72,7 +72,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
-QValueList<tBarcodeInfo> Barkode::s_info;
+QList<tBarcodeInfo> Barkode::s_info;
QStringList* Barkode::s_encoding = NULL;
bool Barkode::s_haveGnuBarcode = false;
bool Barkode::s_havePdfEncode = false;
Modified: trunk/src/barkode.h
===================================================================
--- trunk/src/barkode.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/barkode.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -24,7 +24,7 @@
#include <qcolor.h>
#include <qstring.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <QPixmap>
#include "barkodeengine.h"
@@ -84,7 +84,7 @@
QString validatorNot;
};
-typedef QValueList<tBarcodeInfo> TBarcodeInfoList;
+typedef QList<tBarcodeInfo> TBarcodeInfoList;
class BarkodeEngine;
class QPainter;
@@ -175,7 +175,7 @@
inline const BarkodeEngine* engine() const;
/** Test if the encodingType @p type has a certain
- * @p feature, as defined in the codes QValueList.
+ * @p feature, as defined in the codes QList.
*/
static bool hasFeature( const QString & type, unsigned int feature );
/** Returns the internal value for the encoding type @p typedef
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/batchprinter.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -29,7 +29,7 @@
#include <q3paintdevicemetrics.h>
#include <q3progressdialog.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <QPixmap>
// KDE includes
@@ -522,7 +522,7 @@
return true;
}
-void BatchPrinter::setData( QValueList<data>* list )
+void BatchPrinter::setData( QList<data>* list )
{
if( m_data )
delete m_data;
Modified: trunk/src/batchprinter.h
===================================================================
--- trunk/src/batchprinter.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/batchprinter.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -21,7 +21,7 @@
#include "measurements.h"
#include <qmap.h>
-#include <q3valuelist.h>
+#include <QList>
namespace KABC {
class AddresseeList;
@@ -37,7 +37,7 @@
class QWidget;
class QPaintDevice;
-typedef QValueList< QMap<QString,QString> > TVariableList;
+typedef QList< 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( QValueList<data>* list );
+ void setData( QList<data>* list );
/** set the variable data for the batchprinter
* @p list will be deleted by the batchprinter
@@ -152,7 +152,7 @@
Definition* def;
Measurements m_measure;
- QValueList<data>* m_data;
+ QList<data>* m_data;
TVariableList* m_vardata;
KABC::AddresseeList* m_addrdata;
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/batchwizard.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -44,7 +44,7 @@
#include <q3widgetstack.h>
//Added by qt3to4:
#include <QHBoxLayout>
-#include <QValueList>
+#include <QList>
#include <QSqlQuery>
#include <QSqlCursor>
#include <QFrame>
@@ -663,7 +663,7 @@
sqlList->setSorting( 3, true );
sqlList->sort();
- QValueList<BatchPrinter::data>* dlist = new QValueList<BatchPrinter::data>;
+ QList<BatchPrinter::data>* dlist = new QList<BatchPrinter::data>;
QListViewItem* item = sqlList->firstChild();
while( item )
{
@@ -685,7 +685,7 @@
batch->setLabels( numLabels->value() );
// do a dirty drick, TODO: refactor BatchPrinter in the future
- QValueList<BatchPrinter::data>* dlist = new QValueList<BatchPrinter::data>;
+ QList<BatchPrinter::data>* dlist = new QList<BatchPrinter::data>;
BatchPrinter::data m_data;
m_data.number = numLabels->value();
dlist->append( m_data );
Modified: trunk/src/csvfile.h
===================================================================
--- trunk/src/csvfile.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/csvfile.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -22,7 +22,7 @@
#include <qstringlist.h>
#include <q3textstream.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
class QBuffer;
@@ -67,7 +67,7 @@
/** set the field widths for fixed field width files
*/
- inline void setFieldWidth( const QValueList<int> & width );
+ inline void setFieldWidth( const QList<int> & width );
/** sets wether this is a CSV file or
* a file with fixed field width.
@@ -100,7 +100,7 @@
QString m_separator;
QString m_comment;
- QValueList<int> m_width;
+ QList<int> m_width;
bool m_csv;
bool m_eof;
@@ -144,7 +144,7 @@
m_comment = comment;
}
-void CSVFile::setFieldWidth( const QValueList<int> & width )
+void CSVFile::setFieldWidth( const QList<int> & width )
{
m_width = width;
}
Modified: trunk/src/csvimportdlg.cpp
===================================================================
--- trunk/src/csvimportdlg.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/csvimportdlg.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -40,7 +40,7 @@
//Added by qt3to4:
#include <QHBoxLayout>
#include <QGridLayout>
-#include <QValueList>
+#include <QList>
#include <QVBoxLayout>
// KDE includes
@@ -336,7 +336,7 @@
{
CSVFile file( requester->url() );
QHeader* h = table->horizontalHeader();
- QValueList<int> headers;
+ QList<int> headers;
QStringList list;
QString name = getDatabaseName();
int i = 0;
@@ -409,9 +409,9 @@
settingsChanged();
}
-QValueList<int> CSVImportDlg::getFieldWidth()
+QList<int> CSVImportDlg::getFieldWidth()
{
- QValueList<int> list;
+ QList<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 )
{
- QValueList<int> width = getFieldWidth();
+ QList<int> width = getFieldWidth();
file->setEncoding( comboEncoding->currentText() );
file->setCSVFile( radioCSVFile->isChecked() );
Modified: trunk/src/csvimportdlg.h
===================================================================
--- trunk/src/csvimportdlg.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/csvimportdlg.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -21,7 +21,7 @@
#include <qwidget.h>
//Added by qt3to4:
#include <QFrame>
-#include <QValueList>
+#include <QList>
#include <kdialogbase.h>
class CSVFile;
@@ -77,7 +77,7 @@
/** Get the field with from listWidth
* as an integer list.
*/
- QValueList<int> getFieldWidth();
+ QList<int> getFieldWidth();
/** Create the first tab of the dialog
* to set the import data.
Modified: trunk/src/dsrichtext.cpp
===================================================================
--- trunk/src/dsrichtext.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/dsrichtext.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -24,7 +24,7 @@
#include <qpainter.h>
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
// for DSREPLACE
#include "sqltables.h"
@@ -85,7 +85,7 @@
f->color = m_color;
}
-void DSRichText::initLine( QValueList<formated_line>* l )
+void DSRichText::initLine( QList<formated_line>* l )
{
formated_line li;
li.width = 0;
@@ -96,7 +96,7 @@
l->append( li );
}
-void DSRichText::updateSpacing( QValueList<formated_line>* l, QFontMetrics* fm )
+void DSRichText::updateSpacing( QList<formated_line>* l, QFontMetrics* fm )
{
l->last().lineSpacing = (l->last().lineSpacing < fm->lineSpacing()) ? fm->lineSpacing() : l->last().lineSpacing;
l->last().ascent = (l->last().ascent < fm->ascent()) ? fm->ascent() : l->last().ascent;
Modified: trunk/src/dsrichtext.h
===================================================================
--- trunk/src/dsrichtext.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/dsrichtext.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -25,7 +25,7 @@
#include <qcolor.h>
#include <qfont.h>
#include <qstring.h>
-#include <q3valuelist.h>
+#include <QList>
class DSRichText;
@@ -41,7 +41,7 @@
bool line;
};
-typedef QValueList<formated_word> WordList;
+typedef QList<formated_word> WordList;
/** This structure represents a single line.
* Every line contains a list of formated_words.
@@ -59,7 +59,7 @@
WordList formats;
};
-typedef QValueList<formated_line> LineList;
+typedef QList<formated_line> LineList;
class QColor;
class QPainter;
@@ -151,8 +151,8 @@
QString parse( const QString & t, const QString & find, const QString & end, int start );
void parseWords( const QString & t, formated_word* w, WordList* words );
void initFormat( formated_word* f, int alignment );
- void initLine( QValueList<formated_line>* l );
- void updateSpacing( QValueList<formated_line>* l, QFontMetrics* fm );
+ void initLine( QList<formated_line>* l );
+ void updateSpacing( QList<formated_line>* l, QFontMetrics* fm );
/** draw the line @p line justified as blockquote
*/
void drawJustified( formated_line* line );
@@ -185,8 +185,8 @@
QColor m_color;
QPainter* painter;
- QValueList<LineList> line_p;
- QValueList<WordList> word_p;
+ QList<LineList> line_p;
+ QList<WordList> word_p;
};
#endif // QT_TEXT_BUG
Modified: trunk/src/dstextedit.cpp
===================================================================
--- trunk/src/dstextedit.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/dstextedit.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -19,7 +19,7 @@
#include "dstextedit.moc"
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
DSTextEdit::DSTextEdit( QWidget* parent )
: TextEditBase( parent )
@@ -41,7 +41,7 @@
int i;
int para, index; // needed to save the cursor position
int paraFrom, indexFrom, paraTo, indexTo; // needed to save the selection
- QValueList<int> chars;
+ QList<int> chars;
QRegExp reg("<p[^>]*>");
for( i = 0; i < paragraphs(); i++ )
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/labeleditor.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -78,7 +78,7 @@
#if QT_VERSION <= 0x030100
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <QCString>
#include <QCloseEvent>
#endif
@@ -816,7 +816,7 @@
batch->setCustomer( QString::null );
batch->setEvents( false );
- QValueList<BatchPrinter::data>* list = new QValueList<BatchPrinter::data>;
+ QList<BatchPrinter::data>* list = new QList<BatchPrinter::data>;
BatchPrinter::data m_data;
m_data.number = copies;
m_data.article_no = QString::null;
Modified: trunk/src/mycanvasview.h
===================================================================
--- trunk/src/mycanvasview.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/mycanvasview.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -19,7 +19,7 @@
#define MYCANVASVIEW_H
#include <q3canvas.h>
-#include <q3valuelist.h>
+#include <QList>
//Added by qt3to4:
#include <QResizeEvent>
#include <QLabel>
@@ -28,7 +28,7 @@
class TCanvasItem;
-typedef QValueList<TCanvasItem*> TCanvasItemList;
+typedef QList<TCanvasItem*> TCanvasItemList;
class QRect;
Modified: trunk/src/tokendialog.cpp
===================================================================
--- trunk/src/tokendialog.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokendialog.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -30,7 +30,7 @@
#include <qlayout.h>
#include <qsplitter.h>
#include <qtooltip.h>
-#include <q3valuelist.h>
+#include <QList>
#include <q3vbox.h>
#include <qvbuttongroup.h>
#include <q3widgetstack.h>
@@ -154,7 +154,7 @@
"In the case of the sqlquery token, the sure has to enter a sql query in "
"this text field.</qt>" ) );
- QValueList<int> sizes;
+ QList<int> sizes;
int w = (width() / 4);
sizes << w << w * 3;
@@ -336,7 +336,7 @@
void TokenDialog::initAll()
{
unsigned int i, z;
- QValueList<tCategories>* categories = TokenProvider::getTokens();
+ QList<tCategories>* categories = TokenProvider::getTokens();
category->addItem( i18n("All") );
@@ -374,7 +374,7 @@
else
return;
- QValueList<tCategories>* categories = TokenProvider::getTokens();
+ QList<tCategories>* categories = TokenProvider::getTokens();
for( int i = 0; i < (int)categories->count(); i++ )
{
if( (*categories)[i].category == cat )
@@ -391,7 +391,7 @@
void TokenDialog::categoryChanged( QListBoxItem* item )
{
unsigned int i;
- QValueList<tCategories>* categories = TokenProvider::getTokens();
+ QList<tCategories>* categories = TokenProvider::getTokens();
allList->clear();
lineEdit->setEnabled( false );
Modified: trunk/src/tokendialog.h
===================================================================
--- trunk/src/tokendialog.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokendialog.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -22,7 +22,7 @@
#include "documentitem.h"
#include "tokenprovider.h"
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
class KListBox;
class KListView;
@@ -118,7 +118,7 @@
QWidget* stack2Page4;
QWidget* stack2Page5;
- QValueList<tToken> m_tokens;
+ QList<tToken> m_tokens;
TokenProvider* m_token;
KListBox* category;
Modified: trunk/src/tokenprovider.cpp
===================================================================
--- trunk/src/tokenprovider.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokenprovider.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -28,7 +28,7 @@
#include <q3paintdevicemetrics.h>
#include <qsqlquery.h>
#include <qregexp.h>
-#include <q3valuelist.h>
+#include <QList>
#include <time.h>
#include <klocale.h>
@@ -177,7 +177,7 @@
{
}
-QValueList<tCategories> TokenProvider::s_categories;
+QList<tCategories> TokenProvider::s_categories;
QMap<TokenProvider::ECategories,QString> TokenProvider::s_captions;
#ifdef NO_KJS_EMBED
KJS::Interpreter* TokenProvider::s_interpreter = NULL;
@@ -194,7 +194,7 @@
#endif // USE_JAVASCRIPT
}
-QValueList<tCategories>* TokenProvider::getTokens()
+QList<tCategories>* TokenProvider::getTokens()
{
TokenProvider::init();
return &s_categories;
Modified: trunk/src/tokenprovider.h
===================================================================
--- trunk/src/tokenprovider.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokenprovider.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -26,7 +26,7 @@
#include <qstring.h>
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <time.h>
#include "documentitem.h"
@@ -60,7 +60,7 @@
struct tCategories {
int category;
- QValueList<tToken> tokens;
+ QList<tToken> tokens;
};
@@ -89,7 +89,7 @@
static bool hasJavaScript();
- static QValueList<tCategories>* getTokens();
+ static QList<tCategories>* getTokens();
/**
* Get a caption which can be displayed to the user from
@@ -229,7 +229,7 @@
KABC::Addressee* m_address;
QStringList* m_findUserVarsList;
- static QValueList<tCategories> s_categories;
+ static QList<tCategories> s_categories;
static QMap<ECategories, QString> s_captions;
#ifdef NO_KJS_EMBED
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 23:06:23
|
Revision: 24
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=24&view=rev
Author: vzsolt
Date: 2008-02-27 15:06:27 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Replaced Q3CString with QByteArray. Removed the header where it wasn't used.
Modified Paths:
--------------
trunk/src/labeleditor.cpp
trunk/src/mimesources.cpp
trunk/src/purepostscript.h
trunk/src/zplutils.cpp
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-27 22:58:46 UTC (rev 23)
+++ trunk/src/labeleditor.cpp 2008-02-27 23:06:27 UTC (rev 24)
@@ -74,14 +74,12 @@
#include <q3textbrowser.h>
#include <qtooltip.h>
#include <qvalidator.h>
-#include <qxml.h>
-#if QT_VERSION <= 0x030100
- #include <qregexp.h>
-//Added by qt3to4:
+#include <QtXml>
+#include <qregexp.h>
#include <QList>
-#include <QCString>
+#include <QByteArray>
#include <QCloseEvent>
-#endif
+#include <qprinter.h>
// KDE includes
#include <kabc/stdaddressbook.h>
@@ -101,7 +99,6 @@
#include <knuminput.h>
#include <kmenu.h>
#include <kpushbutton.h>
-#include <qprinter.h>
#include <krun.h>
#include <kspell.h>
#include <kstatusbar.h>
@@ -344,7 +341,7 @@
writeXMLDocumentItem( &root, &ditem );
}
- QCString xml = doc.toCString();
+ QByteArray xml = doc.toByteArray();
device->write( xml, xml.length() );
device->close();
}
Modified: trunk/src/mimesources.cpp
===================================================================
--- trunk/src/mimesources.cpp 2008-02-27 22:58:46 UTC (rev 23)
+++ trunk/src/mimesources.cpp 2008-02-27 23:06:27 UTC (rev 24)
@@ -24,7 +24,6 @@
#include <k3command.h>
#include <qbuffer.h>
-#include <q3cstring.h>
#include <qdom.h>
class DragCommand : public NewItemCommand {
Modified: trunk/src/purepostscript.h
===================================================================
--- trunk/src/purepostscript.h 2008-02-27 22:58:46 UTC (rev 23)
+++ trunk/src/purepostscript.h 2008-02-27 23:06:27 UTC (rev 24)
@@ -22,8 +22,6 @@
#include "pixmapbarcode.h"
#include "barkode.h"
-#include <q3cstring.h>
-
class PurePostscriptOptions : public BarkodeEngineOptions {
public:
PurePostscriptOptions();
Modified: trunk/src/zplutils.cpp
===================================================================
--- trunk/src/zplutils.cpp 2008-02-27 22:58:46 UTC (rev 23)
+++ trunk/src/zplutils.cpp 2008-02-27 23:06:27 UTC (rev 24)
@@ -19,7 +19,6 @@
// Qt includes
#include <qbuffer.h>
-#include <q3cstring.h>
#include <qimage.h>
#include <q3paintdevicemetrics.h>
#include <qregexp.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-27 23:37:00
|
Revision: 25
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=25&view=rev
Author: vzsolt
Date: 2008-02-27 15:37:04 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
QPaintDeviceMetrics has been merged into QPaintDevice.
I've rewritten every place except for a comment - which is now flagged with a FIXME.
Modified Paths:
--------------
trunk/src/barcodedialog.cpp
trunk/src/barcodeitem.cpp
trunk/src/batchprinter.cpp
trunk/src/configdialog.cpp
trunk/src/documentitem.cpp
trunk/src/dsrichtext.h
trunk/src/gnubarcode.cpp
trunk/src/imageitem.cpp
trunk/src/label.cpp
trunk/src/labeleditor.cpp
trunk/src/labelutils.cpp
trunk/src/measurements.cpp
trunk/src/mycanvasview.cpp
trunk/src/pixmapbarcode.cpp
trunk/src/tec.cpp
trunk/src/tec.h
trunk/src/textitem.cpp
trunk/src/textlineitem.cpp
trunk/src/tokenprovider.cpp
trunk/src/zplutils.cpp
Modified: trunk/src/barcodedialog.cpp
===================================================================
--- trunk/src/barcodedialog.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/barcodedialog.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -37,9 +37,9 @@
#include <qlabel.h>
#include <qlayout.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
#include <q3picture.h>
-//Added by qt3to4:
+#include <QX11Info>
#include <QHBoxLayout>
#include <QVBoxLayout>
@@ -175,11 +175,9 @@
// unless we can center the barcode
printer->setFullPage( false );
- QPaintDeviceMetrics metrics( printer );
+ double scalex = (double)printer->logicalDpiX() / (double)QX11Info::appDpiX();
+ double scaley = (double)printer->logicalDpiY() / (double)QX11Info::appDpiY();
- double scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
- double scaley = (double)metrics.logicalDpiY() / (double)QPaintDevice::x11AppDpiY();
-
QPicture picture;
QPainter p( printer );
p.scale( scalex, scaley );
Modified: trunk/src/barcodeitem.cpp
===================================================================
--- trunk/src/barcodeitem.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/barcodeitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -20,7 +20,7 @@
#include <qdom.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
BarcodeItem::BarcodeItem()
: Barkode(), DocumentItem()
@@ -159,6 +159,7 @@
{
painter->save();
+ // FIXME: What's this?
/*
QPaintDeviceMetrics metrics( DocumentItem::paintDevice() );
double scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/batchprinter.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -26,7 +26,7 @@
// Qt includes
#include <qfile.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
#include <q3progressdialog.h>
//Added by qt3to4:
#include <QList>
@@ -101,11 +101,9 @@
{
painter = new QPainter( printer );
m_cur_data_count = 0;
+
+ pageh = painter->device()->height(); // in pixel
- QPaintDeviceMetrics pdm( painter->device() );
-
- pageh = pdm.height(); // in pixel
-
curw = 0;
curh = 0;
c_h = 0;
Modified: trunk/src/configdialog.cpp
===================================================================
--- trunk/src/configdialog.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/configdialog.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -24,11 +24,9 @@
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <q3paintdevicemetrics.h>
#include <qradiobutton.h>
#include <qsqldatabase.h>
#include <qtooltip.h>
-//Added by qt3to4:
#include <QHBoxLayout>
#include <QGridLayout>
#include <QFrame>
Modified: trunk/src/documentitem.cpp
===================================================================
--- trunk/src/documentitem.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/documentitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -23,7 +23,6 @@
#include <kapplication.h>
#include <qpen.h>
-#include <q3paintdevicemetrics.h>
#include <qpainter.h>
#include <qdom.h>
Modified: trunk/src/dsrichtext.h
===================================================================
--- trunk/src/dsrichtext.h 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/dsrichtext.h 2008-02-27 23:37:04 UTC (rev 25)
@@ -92,9 +92,8 @@
* <pre>
* QPrinter printer( QPrinter::HighResolution );
* QPainter painter( &printer );
- * QPaintDeviceMetrics metrics( &printer );
- * double scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
- * double scaley = (double)metrics.logicalDpiY() / (double)QPaintDevice::x11AppDpiY();
+ * m_scalex = printer->logicalDpiX() / (double)QX11Info::appDpiX();
+ * m_scaley = printer->logicalDpiY() / (double)QX11Info::appDpiY();
*
* DSRichText dsr( "<html><p>Hallo World</p></html>" );
* dsr.setWidth( 200 ); // in screenresolution coordinates
Modified: trunk/src/gnubarcode.cpp
===================================================================
--- trunk/src/gnubarcode.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/gnubarcode.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -26,7 +26,8 @@
#include <qfont.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
+#include <QX11Info>
#include <klocale.h>
@@ -90,14 +91,13 @@
}
delete [] value;
-
- QPaintDeviceMetrics metrics( device );
- m_scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
- m_scaley = (double)metrics.logicalDpiY() / (double)QPaintDevice::x11AppDpiY();
+
+ m_scalex = device->logicalDpiX() / (double)QX11Info::appDpiX();
+ m_scaley = device->logicalDpiY() / (double)QX11Info::appDpiY();
// 72.0 is the postscript resolution generated by GNU barcode
- m_scale_ps_x = (double)metrics.logicalDpiX() / 72.0;
- m_scale_ps_y = (double)metrics.logicalDpiY() / 72.0;
+ m_scale_ps_x = device->logicalDpiX() / 72.0;
+ m_scale_ps_y = device->logicalDpiY() / 72.0;
/* m_scalex *= m_scale_ps_x;
m_scaley *= m_scale_ps_y;*/
Modified: trunk/src/imageitem.cpp
===================================================================
--- trunk/src/imageitem.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/imageitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -21,9 +21,10 @@
#include <qbuffer.h>
#include <qdom.h>
#include <qimage.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
+#include <QX11Info>
+
#include <qpainter.h>
-//Added by qt3to4:
#include <QPixmap>
#include <klocale.h>
@@ -237,11 +238,12 @@
// we have to scale because of the bigger printer resolution
if( DocumentItem::paintDevice()->isExtDev() )
{
- QPaintDeviceMetrics metrics( DocumentItem::paintDevice() );
+ QPaintDevice* device = DocumentItem::paintDevice();
- img = img.smoothScale( (int)(img.width() * ((double)metrics.logicalDpiX()/QPaintDevice::x11AppDpiX())),
- (int)(img.height() * ((double)metrics.logicalDpiY()/QPaintDevice::x11AppDpiY())),
- Qt::ScaleMin );
+ img = img.smoothScale(
+ (int)(img.width() * ((double)device->logicalDpiX()/QX11Info::appDpiX())),
+ (int)(img.height() * ((double)device->logicalDpiY()/QX11Info::appDpiY())),
+ Qt::ScaleMin );
}
}
Modified: trunk/src/label.cpp
===================================================================
--- trunk/src/label.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/label.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -30,7 +30,6 @@
// Qt includes
#include <qimage.h>
#include <qiodevice.h>
-#include <q3paintdevicemetrics.h>
#include <qpainter.h>
#include <qpen.h>
#include <q3sqlcursor.h>
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/labeleditor.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -66,7 +66,6 @@
#include <qmap.h>
#include <qmime.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
#include <q3picture.h>
#include <qpoint.h>
#include <q3progressdialog.h>
Modified: trunk/src/labelutils.cpp
===================================================================
--- trunk/src/labelutils.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/labelutils.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -21,7 +21,7 @@
// Qt includes
#include <qbitmap.h>
#include <qimage.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
#include <qpainter.h>
#include <q3simplerichtext.h>
//Added by qt3to4:
@@ -46,11 +46,15 @@
double LabelUtils::pixelToMm( double pixel, const QPaintDevice* device, int mode )
{
- QPaintDeviceMetrics pdm( device ? device : KApplication::desktop() );
+ if (device == 0)
+ {
+ device = KApplication::desktop();
+ }
+
if( mode == DpiX )
- return (pixel * CONVERSION_FACTOR) / (double)pdm.logicalDpiX();
+ return (pixel * CONVERSION_FACTOR) / (double)device->logicalDpiX();
else
- return (pixel * CONVERSION_FACTOR) / (double)pdm.logicalDpiY();
+ return (pixel * CONVERSION_FACTOR) / (double)device->logicalDpiY();
}
double LabelUtils::mmToPixel( double mm, const QPaintDevice* device, int mode )
@@ -61,31 +65,28 @@
// We don't get valid metrics from the printer - and we want a better resolution
// anyway (it's the PS driver that takes care of the printer resolution).
- QPaintDeviceMetrics pdm( device ? device : KApplication::desktop() );
+ if (device == 0)
+ {
+ device = KApplication::desktop();
+ }
// qDebug("DpiX=%i", pdm.logicalDpiX());
// qDebug("DpiY=%i", pdm.logicalDpiY());
if( mode == DpiX )
- return (mm / CONVERSION_FACTOR) * (double)pdm.logicalDpiX();
+ return (mm / CONVERSION_FACTOR) * (double)device->logicalDpiX();
else
- return (mm / CONVERSION_FACTOR) * (double)pdm.logicalDpiY();
+ return (mm / CONVERSION_FACTOR) * (double)device->logicalDpiY();
}
double LabelUtils::pixelToPixelX( double unit, const QPaintDevice* src, const QPaintDevice* dest )
{
- QPaintDeviceMetrics p1( src );
- QPaintDeviceMetrics p2( dest );
-
- return ( unit * (double)p2.logicalDpiX() ) / (double)p1.logicalDpiX();
+ return ( unit * (double)dest->logicalDpiX() ) / (double)src->logicalDpiX();
}
double LabelUtils::pixelToPixelY( double unit, const QPaintDevice* src, const QPaintDevice* dest )
{
- QPaintDeviceMetrics p1( src );
- QPaintDeviceMetrics p2( dest );
-
//return pixelToPixelX( unit, src, dest );
- return ( unit * (double)p2.logicalDpiY() ) / (double)p1.logicalDpiY();
+ return ( unit * (double)dest->logicalDpiY() ) / (double)src->logicalDpiY();
}
const QString LabelUtils::getTypeFromCaption( const QString & cap )
Modified: trunk/src/measurements.cpp
===================================================================
--- trunk/src/measurements.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/measurements.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -18,7 +18,7 @@
#include "measurements.h"
// Qt includes
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
// KDE includes
#include <kglobal.h>
@@ -78,11 +78,10 @@
}
double Measurements::mmToPixel( double mm, const QPaintDevice* device, int mode ) const {
- QPaintDeviceMetrics pdm( device );
if( mode == DpiX )
- return (mm / 25.4) * pdm.logicalDpiX();
+ return (mm / 25.4) * device->logicalDpiX();
else
- return (mm / 25.4 ) * pdm.logicalDpiY();
+ return (mm / 25.4 ) * device->logicalDpiY();
}
double Measurements::gapLeft( const QPaintDevice* device ) const {
Modified: trunk/src/mycanvasview.cpp
===================================================================
--- trunk/src/mycanvasview.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/mycanvasview.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -24,8 +24,6 @@
// Qt includes
#include <qcursor.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
-//Added by qt3to4:
#include <QResizeEvent>
#include <QMouseEvent>
@@ -407,11 +405,9 @@
rulerv->setMaxValue( height() );
rulerh->setMaxValue( width() );
-
- QPaintDeviceMetrics pdm( this );
if( Measurements::measurementSystem() == Measurements::Metric ) {
- rulerh->setPixelPerMark( (1/ 25.4)* pdm.logicalDpiX() );
- rulerv->setPixelPerMark( (1/25.4)* pdm.logicalDpiY() );
+ rulerh->setPixelPerMark( (1/ 25.4)* logicalDpiX() );
+ rulerv->setPixelPerMark( (1/25.4)* logicalDpiY() );
}
}
Modified: trunk/src/pixmapbarcode.cpp
===================================================================
--- trunk/src/pixmapbarcode.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/pixmapbarcode.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -30,7 +30,7 @@
#include <qfile.h>
#include <qfileinfo.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
#include <qpixmap.h>
#include <q3textstream.h>
@@ -306,9 +306,8 @@
void PixmapBarcode::createBarcode( QPixmap* target, const QPaintDevice* device )
{
- QPaintDeviceMetrics pdm( device );
- int resx = pdm.logicalDpiX();
- int resy = pdm.logicalDpiY();
+ int resx = device->logicalDpiX();
+ int resy = device->logicalDpiY();
QPixmap* cached = 0;//BarcodeCache::instance()->read( barcode, resx, resy, value );
@@ -325,9 +324,8 @@
// we have to scale to the correct resolution.
// we scale already here and not at the end,
// so that the addMargin function does not get a scaled margin.
- QPaintDeviceMetrics pdm( KApplication::desktop() );
- int screenresx = pdm.logicalDpiX();
- int screenresy = pdm.logicalDpiY();
+ int screenresx = KApplication::desktop()->logicalDpiX();
+ int screenresy = KApplication::desktop()->logicalDpiY();
QMatrix m;
double scalex = (resx/screenresx)*barkode->scaling();
Modified: trunk/src/tec.cpp
===================================================================
--- trunk/src/tec.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/tec.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -28,7 +28,6 @@
#include <q3hbox.h>
#include <qlayout.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
#include <q3progressdialog.h>
#include <q3sqlcursor.h>
#include <qvalidator.h>
Modified: trunk/src/tec.h
===================================================================
--- trunk/src/tec.h 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/tec.h 2008-02-27 23:37:04 UTC (rev 25)
@@ -27,7 +27,6 @@
#include <q3hbox.h>
#include <qlayout.h>
#include <qpainter.h>
-#include <q3paintdevicemetrics.h>
#include <q3progressdialog.h>
#include <q3sqlcursor.h>
#include <qvalidator.h>
Modified: trunk/src/textitem.cpp
===================================================================
--- trunk/src/textitem.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/textitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -25,7 +25,8 @@
#include <qapplication.h>
#include <qdom.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
+#include <QX11Info>
#include <qpainter.h>
#include <q3picture.h>
#include <q3simplerichtext.h>
@@ -56,10 +57,10 @@
if( t != m_text )
autosize = true;
- QPaintDeviceMetrics metrics( DocumentItem::paintDevice() );
+ QPaintDevice* device = DocumentItem::paintDevice();
- double scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
- double scaley = (double)metrics.logicalDpiY() / (double)QPaintDevice::x11AppDpiY();
+ double scalex = (double)device->logicalDpiX() / (double)QX11Info::appDpiX();
+ double scaley = (double)device->logicalDpiY() / (double)QX11Info::appDpiY();
QColorGroup cg;
QSimpleRichText srt( t, painter->font() );
Modified: trunk/src/textlineitem.cpp
===================================================================
--- trunk/src/textlineitem.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/textlineitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -21,7 +21,8 @@
#include <qapplication.h>
#include <qdom.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
+#include <QX11Info>
#include <qpainter.h>
#include <q3simplerichtext.h>
@@ -55,10 +56,10 @@
QString text = tokenProvider() ? tokenProvider()->parse( m_text ) : m_text;
QColorGroup cg;
QSimpleRichText srt( text, painter->font() );
- QPaintDeviceMetrics metrics( DocumentItem::paintDevice() );
-
- double scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
- double scaley = (double)metrics.logicalDpiY() / (double)QPaintDevice::x11AppDpiY();
+
+ QPaintDevice* device = DocumentItem::paintDevice();
+ double scalex = (double)device->logicalDpiX() / (double)QX11Info::appDpiX();
+ double scaley = (double)device->logicalDpiY() / (double)QX11Info::appDpiY();
int width = (rect().width() > 0) ? (int)((double)rect().width() / scalex) : srt.widthUsed();
int height = (rect().height() > 0) ? (int)((double)rect().height() / scaley): srt.height();
Modified: trunk/src/tokenprovider.cpp
===================================================================
--- trunk/src/tokenprovider.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/tokenprovider.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -25,7 +25,6 @@
// Qt includes
#include <qdatetime.h>
-#include <q3paintdevicemetrics.h>
#include <qsqlquery.h>
#include <qregexp.h>
#include <QList>
@@ -557,8 +556,7 @@
if( m_printer && t == TOK_RESOLUTION )
{
- QPaintDeviceMetrics metrics( m_printer );
- ret = QString( "%1dpi" ).arg( metrics.logicalDpiY() );
+ ret = QString( "%1dpi" ).arg( m_printer->logicalDpiY() );
}
if( !m_serial.isEmpty() && t == TOK_SERIAL )
Modified: trunk/src/zplutils.cpp
===================================================================
--- trunk/src/zplutils.cpp 2008-02-27 23:06:27 UTC (rev 24)
+++ trunk/src/zplutils.cpp 2008-02-27 23:37:04 UTC (rev 25)
@@ -20,7 +20,7 @@
// Qt includes
#include <qbuffer.h>
#include <qimage.h>
-#include <q3paintdevicemetrics.h>
+#include <QPaintDevice>
#include <qregexp.h>
#include <qstring.h>
#include <q3textstream.h>
@@ -51,30 +51,30 @@
{
int val = 0;
switch ( e ) {
- case QPaintDeviceMetrics::PdmPhysicalDpiX:
+ case QPaintDevice::PdmPhysicalDpiX:
val = (int)m_resolution_y;
break;
- case QPaintDeviceMetrics::PdmPhysicalDpiY:
+ case QPaintDevice::PdmPhysicalDpiY:
val = (int)m_resolution_x;
break;
- case QPaintDeviceMetrics::PdmDpiX:
+ case QPaintDevice::PdmDpiX:
val = (int)m_resolution_x;
break;
- case QPaintDeviceMetrics::PdmDpiY:
+ case QPaintDevice::PdmDpiY:
val = (int)m_resolution_y;
break;
- case QPaintDeviceMetrics::PdmNumColors:
+ case QPaintDevice::PdmNumColors:
val = 2; // black and white
break;
- case QPaintDeviceMetrics::PdmDepth:
+ case QPaintDevice::PdmDepth:
val = 1; // black and white
break;
- case QPaintDeviceMetrics::PdmWidth:
- case QPaintDeviceMetrics::PdmHeight:
- case QPaintDeviceMetrics::PdmWidthMM:
- case QPaintDeviceMetrics::PdmHeightMM:
+ case QPaintDevice::PdmWidth:
+ case QPaintDevice::PdmHeight:
+ case QPaintDevice::PdmWidthMM:
+ case QPaintDevice::PdmHeightMM:
default:
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-02-28 00:10:03
|
Revision: 26
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=26&view=rev
Author: vzsolt
Date: 2008-02-27 16:10:08 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
I've yet to find what's really new in the QTextStream class. It's supposed to be buffered now both when reading and writing, so I've added flush() everywhere when the stream is not on the stack.
(The buffers get flushed while the object is being destroyed.)
Modified Paths:
--------------
trunk/src/barcodeitem.cpp
trunk/src/barcodeitem.h
trunk/src/batchprinter.cpp
trunk/src/csvfile.h
trunk/src/csvimportdlg.cpp
trunk/src/definition.cpp
trunk/src/documentitem.h
trunk/src/imageitem.cpp
trunk/src/imageitem.h
trunk/src/label.cpp
trunk/src/label.h
trunk/src/purepostscript.cpp
trunk/src/rectitem.cpp
trunk/src/rectitem.h
trunk/src/textitem.cpp
trunk/src/textitem.h
trunk/src/textlineitem.cpp
trunk/src/textlineitem.h
trunk/src/zplutils.cpp
trunk/src/zplutils.h
Modified: trunk/src/barcodeitem.cpp
===================================================================
--- trunk/src/barcodeitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/barcodeitem.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -21,6 +21,7 @@
#include <qdom.h>
#include <qpainter.h>
#include <QPaintDevice>
+#include <QTextStream>
BarcodeItem::BarcodeItem()
: Barkode(), DocumentItem()
@@ -201,6 +202,7 @@
*stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() );
*stream << "^B" << encoding;
*stream << ZPLUtils::fieldData( value() );
+ stream -> flush();
}
void BarcodeItem::drawIpl( QTextStream* stream, IPLUtils* utils )
@@ -224,6 +226,7 @@
*stream << utils->field( s );
utils->addValue( value() );
+ stream -> flush();
}
void BarcodeItem::drawEPcl( QTextStream* stream )
@@ -243,6 +246,7 @@
s += QString(" %1").arg( value() );
*stream << EPCLUtils::field( s );
+ stream -> flush();
}
void BarcodeItem::updateBarcode()
Modified: trunk/src/barcodeitem.h
===================================================================
--- trunk/src/barcodeitem.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/barcodeitem.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -20,6 +20,7 @@
#include <qmap.h>
#include <qpixmap.h>
+#include <QTextStream>
#include "barkode.h"
#include "gnubarcode.h"
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/batchprinter.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -27,8 +27,8 @@
#include <qfile.h>
#include <qpainter.h>
#include <QPaintDevice>
+#include <QTextStream>
#include <q3progressdialog.h>
-//Added by qt3to4:
#include <QList>
#include <QPixmap>
Modified: trunk/src/csvfile.h
===================================================================
--- trunk/src/csvfile.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/csvfile.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -20,8 +20,7 @@
#include <qfile.h>
#include <qstringlist.h>
-#include <q3textstream.h>
-//Added by qt3to4:
+#include <QTextStream>
#include <QList>
class QBuffer;
Modified: trunk/src/csvimportdlg.cpp
===================================================================
--- trunk/src/csvimportdlg.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/csvimportdlg.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -35,7 +35,7 @@
#include <qsqlquery.h>
#include <q3table.h>
#include <qradiobutton.h>
-#include <q3textstream.h>
+#include <QTextStream>
#include <q3vbox.h>
//Added by qt3to4:
#include <QHBoxLayout>
Modified: trunk/src/definition.cpp
===================================================================
--- trunk/src/definition.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/definition.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -19,7 +19,7 @@
#include "sqltables.h"
// Qt includes
-#include <q3textstream.h>
+#include <QTextStream>
#include <qsqlquery.h>
#include <qregexp.h>
Modified: trunk/src/documentitem.h
===================================================================
--- trunk/src/documentitem.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/documentitem.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -22,7 +22,7 @@
#include <qobject.h>
#include <q3sortedlist.h>
#include <qstring.h>
-#include <q3textstream.h>
+#include <QTextStream>
#include <qcolor.h>
#include <qpen.h>
Modified: trunk/src/imageitem.cpp
===================================================================
--- trunk/src/imageitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/imageitem.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -23,6 +23,7 @@
#include <qimage.h>
#include <QPaintDevice>
#include <QX11Info>
+#include <QTextStream>
#include <qpainter.h>
#include <QPixmap>
@@ -81,7 +82,8 @@
*stream << "~DYD,p,P," << QString::number( data.size() ) + ",0,";
for( unsigned int i=0;i<data.size();i++)
*stream << data[i];
- }
+ }
+ stream -> flush();
}
void ImageItem::drawIpl( QTextStream*, IPLUtils* )
@@ -125,6 +127,8 @@
*stream << "\r\n";
}
+
+ stream -> flush();
}
void ImageItem::loadXML(QDomElement* element)
Modified: trunk/src/imageitem.h
===================================================================
--- trunk/src/imageitem.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/imageitem.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -20,6 +20,7 @@
#include "documentitem.h"
#include <qpixmap.h>
+#include <QTextStream>
enum EImageScaling { eImage_Original = 0, eImage_Scaled, eImage_Zoomed };
Modified: trunk/src/label.cpp
===================================================================
--- trunk/src/label.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/label.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -85,6 +85,8 @@
item->drawEPcl( stream );
*stream << EPCLUtils::footer();
+
+ stream -> flush();
}
void Label::ipl( QTextStream* stream )
@@ -98,6 +100,8 @@
item->drawIpl( stream, &utils );
*stream << utils.footer();
+
+ stream -> flush();
}
@@ -111,6 +115,8 @@
item->drawZpl( stream );
*stream << ZPLUtils::footer();
+
+ stream -> flush();
}
void Label::InitBarcodes()
Modified: trunk/src/label.h
===================================================================
--- trunk/src/label.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/label.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -20,6 +20,8 @@
#include <qfont.h>
#include <q3picture.h>
+#include <QTextStream>
+
#include "labelutils.h"
#include "xmlutils.h"
#include "definition.h"
@@ -32,7 +34,6 @@
class QString;
class QPainter;
class QPaintDevice;
-class QTextStream;
class QPrinter;
/** Creates a QPicture from the XML KBarcode file. If a SQL connections is available
* the data from the SQL tables will be used, too.
Modified: trunk/src/purepostscript.cpp
===================================================================
--- trunk/src/purepostscript.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/purepostscript.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -22,7 +22,7 @@
#include <qdom.h>
#include <qfile.h>
-#include <q3textstream.h>
+#include <QTextStream>
#include <kstandarddirs.h>
#include <ktemporaryfile.h>
Modified: trunk/src/rectitem.cpp
===================================================================
--- trunk/src/rectitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/rectitem.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -84,6 +84,8 @@
*stream << QString("~GE%1,%2,%3,B").arg( rect().width() ).arg( rect().height() ).arg( thick );
else
*stream << QString("~GB%1,%2,%3,B,0").arg( rect().width() ).arg( rect().height() ).arg( thick );
+
+ stream -> flush();
}
void RectItem::drawIpl( QTextStream* stream, IPLUtils* utils )
@@ -106,6 +108,8 @@
*stream << utils->field( s );
}
+
+ stream -> flush();
}
void RectItem::drawEPcl( QTextStream* stream )
@@ -117,6 +121,8 @@
s += QString(" %1 2").arg( pen().width() );
*stream << EPCLUtils::field( s );
+
+ stream -> flush();
}
void RectItem::init()
Modified: trunk/src/rectitem.h
===================================================================
--- trunk/src/rectitem.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/rectitem.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -18,6 +18,8 @@
#ifndef RECTITEM_H
#define RECTITEM_H
#include <qstring.h>
+#include <QTextStream>
+
#include "documentitem.h"
#include "qcolor.h"
Modified: trunk/src/textitem.cpp
===================================================================
--- trunk/src/textitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/textitem.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -126,6 +126,8 @@
QString data = m_text.replace( QRegExp("<[^>]*>"), "" );
*stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() );
*stream << ZPLUtils::font( QFont() ); // todo: select a valid font
+
+ stream -> flush();
}
void TextItem::drawIpl( QTextStream* stream, IPLUtils* utils )
@@ -146,6 +148,7 @@
*stream << utils->field( s );
utils->addValue( data );
+ stream -> flush();
}
void TextItem::drawEPcl( QTextStream* stream )
@@ -171,6 +174,7 @@
s += QString(" %1").arg( *line );
*stream << EPCLUtils::field( s );
}
+ stream -> flush();
}
void TextItem::loadXML (QDomElement* element)
Modified: trunk/src/textitem.h
===================================================================
--- trunk/src/textitem.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/textitem.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -19,6 +19,7 @@
#define TEXTITEM_H
#include <qstring.h>
#include "documentitem.h"
+#include <QTextStream>
class LabelEditor;
Modified: trunk/src/textlineitem.cpp
===================================================================
--- trunk/src/textlineitem.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/textlineitem.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -91,6 +91,8 @@
QString data = m_text.replace( QRegExp("<[^>]*>"), "" );
*stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() );
*stream << ZPLUtils::font( QFont() ); // todo: select a valid font
+
+ stream -> flush();
}
void TextLineItem::drawIpl( QTextStream* stream, IPLUtils* utils )
@@ -111,6 +113,8 @@
*stream << utils->field( s );
utils->addValue( data );
+
+ stream -> flush();
}
void TextLineItem::drawEPcl( QTextStream* stream )
@@ -135,6 +139,8 @@
s += QString(" %1").arg( *line );
*stream << EPCLUtils::field( s );
}
+
+ stream -> flush();
}
void TextLineItem::loadXML (QDomElement* element)
Modified: trunk/src/textlineitem.h
===================================================================
--- trunk/src/textlineitem.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/textlineitem.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -18,6 +18,8 @@
#ifndef TEXTLINEITEM_H
#define TEXTLINEITEM_H
#include <qstring.h>
+#include <QTextStream>
+
#include "documentitem.h"
/**
Modified: trunk/src/zplutils.cpp
===================================================================
--- trunk/src/zplutils.cpp 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/zplutils.cpp 2008-02-28 00:10:08 UTC (rev 26)
@@ -23,7 +23,6 @@
#include <QPaintDevice>
#include <qregexp.h>
#include <qstring.h>
-#include <q3textstream.h>
// font table for IPL, thanks to Erich Kitzmueller
struct { int size; int c; int h; int w; } iplfonttable[] = {
Modified: trunk/src/zplutils.h
===================================================================
--- trunk/src/zplutils.h 2008-02-27 23:37:04 UTC (rev 25)
+++ trunk/src/zplutils.h 2008-02-28 00:10:08 UTC (rev 26)
@@ -22,12 +22,12 @@
#include <qstring.h>
#include <qstringlist.h>
#include <qmap.h>
+#include <QTextStream>
class QColor;
class QFont;
class QImage;
class QSize;
-class QTextStream;
class BarcodePrinterDevice : public QPaintDevice {
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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()
...
[truncated message content] |
|
From: Dominik S. <dom...@we...> - 2008-02-28 08:17:13
|
Am Mittwoch, 27. Februar 2008 schrieb vz...@us...: > 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. That's a very wise decision! Using no support classes will save us some trouble in the future. -- ********************************************************************** Dominik Seichter - dom...@we... KRename - http://www.krename.net - Powerful batch renamer for KDE KBarcode - http://www.kbarcode.net - Barcode and label printing PoDoFo - http://podofo.sf.net - PDF generation and parsing library SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE Alan - http://alan.sf.net - A Turing Machine in Java ********************************************************************** |
|
From: <vz...@us...> - 2008-03-03 19:07:46
|
Revision: 27
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=27&view=rev
Author: vzsolt
Date: 2008-03-03 11:07:51 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
Started renaming BarCodeDialog to BarcodeGenerator.
Modified Paths:
--------------
trunk/src/CMakeLists.txt
trunk/src/barcodecombo.h
trunk/src/barcodedialog.cpp
trunk/src/barcodedialog.h
trunk/src/kbarcode.cpp
trunk/src/labeleditor.cpp
trunk/src/main.cpp
Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt 2008-02-28 00:10:08 UTC (rev 26)
+++ trunk/src/CMakeLists.txt 2008-03-03 19:07:51 UTC (rev 27)
@@ -10,7 +10,7 @@
set(kbarcode_SRCS
barcodecombo.cpp
- barcodedialog.cpp
+ barcodegenerator.cpp
barcodedialogs.cpp
barcodeitem.cpp
barcodeprinterdlg.cpp
Modified: trunk/src/barcodecombo.h
===================================================================
--- trunk/src/barcodecombo.h 2008-02-28 00:10:08 UTC (rev 26)
+++ trunk/src/barcodecombo.h 2008-03-03 19:07:51 UTC (rev 27)
@@ -76,12 +76,12 @@
class QCheckBox;
class QLabel;
-/** This widget is used in BarCodeDialog and BarcodeSettingsDlg and
+/** This widget is used in BarcodeGenerator and BarcodeSettingsDlg and
* allows the user to change the data of a barcodeData struct. This powerful
* widget is always used when the user has to change some property of
* a barcode.
*
- * @see BarCodeDialog, @see BarcodeSettingsDlg
+ * @see BarcodeGenerator, @see BarcodeSettingsDlg
* @author Dominik Seichter
*/
class BarcodeWidget : public QWidget {
Modified: trunk/src/barcodedialog.cpp
===================================================================
--- trunk/src/barcodedialog.cpp 2008-02-28 00:10:08 UTC (rev 26)
+++ trunk/src/barcodedialog.cpp 2008-03-03 19:07:51 UTC (rev 27)
@@ -1,5 +1,5 @@
/***************************************************************************
- barcodedialog.cpp - description
+ barcodegenerator.cpp - description
-------------------
begin : Son Dez 29 2002
copyright : (C) 2002 by Dominik Seichter
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include "barcodedialog.h"
+#include "barcodegenerator.h"
#include "barcodeitem.h"
#include "printersettings.h"
#include "barcodecombo.h"
@@ -43,12 +43,12 @@
#include <QHBoxLayout>
#include <QVBoxLayout>
-BarCodeDialog::BarCodeDialog( QWidget* parent )
+BarcodeGenerator::BarcodeGenerator( QWidget* parent )
: QDialog( parent, false)
{
setCaption( i18n( "Barcode Generator" ) );
- BarCodeDialogLayout = new QHBoxLayout( this, 11, 6, "BarCodeDialogLayout");
+ BarcodeGeneratorLayout = new QHBoxLayout( this, 11, 6, "BarcodeGeneratorLayout");
Layout5 = new QVBoxLayout( 0, 0, 6, "Layout5");
Layout6 = new QVBoxLayout( 0, 0, 6, "Layout2");
widget = new BarcodeWidget( this );
@@ -102,9 +102,9 @@
Layout6->addWidget( widget );
Layout6->addWidget( sv );
- BarCodeDialogLayout->addLayout( Layout6 );
- BarCodeDialogLayout->addLayout( Layout5 );
- BarCodeDialogLayout->setStretchFactor( Layout6, 2 );
+ BarcodeGeneratorLayout->addLayout( Layout6 );
+ BarcodeGeneratorLayout->addLayout( Layout5 );
+ BarcodeGeneratorLayout->setStretchFactor( Layout6, 2 );
connect( buttonClose, SIGNAL( clicked() ), this, SLOT( close() ) );
@@ -113,12 +113,12 @@
show();
}
-BarCodeDialog::~BarCodeDialog()
+BarcodeGenerator::~BarcodeGenerator()
{
delete m_token;
}
-void BarCodeDialog::generate()
+void BarcodeGenerator::generate()
{
Barkode d;
widget->getData( d );
@@ -132,7 +132,7 @@
buttonCopy->setEnabled( !barcode->pixmap()->isNull() );
}
-void BarCodeDialog::save()
+void BarcodeGenerator::save()
{
Barkode bc;
widget->getData( bc );
@@ -160,7 +160,7 @@
}
}
-void BarCodeDialog::print()
+void BarcodeGenerator::print()
{
Barkode d;
widget->getData( d );
@@ -195,7 +195,7 @@
delete printer;
}
-void BarCodeDialog::copy()
+void BarcodeGenerator::copy()
{
if( barcode->pixmap()->isNull() )
return;
@@ -216,4 +216,4 @@
#endif
}
-#include "barcodedialog.moc"
+#include "barcodegenerator.moc"
Modified: trunk/src/barcodedialog.h
===================================================================
--- trunk/src/barcodedialog.h 2008-02-28 00:10:08 UTC (rev 26)
+++ trunk/src/barcodedialog.h 2008-03-03 19:07:51 UTC (rev 27)
@@ -1,5 +1,5 @@
/***************************************************************************
- barcodedialog.h - description
+ barcodegenerator.h - description
-------------------
begin : Son Dez 29 2002
copyright : (C) 2002 by Dominik Seichter
@@ -51,13 +51,13 @@
* All barcoding features are available for the user. This dialog allows also
* to just experiment a little bit with barcodes.
*/
-class BarCodeDialog : public QDialog
+class BarcodeGenerator : public QDialog
{
Q_OBJECT
public:
- BarCodeDialog( QWidget* parent = 0 );
- ~BarCodeDialog();
+ BarcodeGenerator( QWidget* parent = 0 );
+ ~BarcodeGenerator();
private:
BarcodeWidget* widget;
@@ -77,7 +77,7 @@
void copy();
protected:
- QHBoxLayout* BarCodeDialogLayout;
+ QHBoxLayout* BarcodeGeneratorLayout;
QVBoxLayout* Layout6;
QVBoxLayout* Layout5;
};
Modified: trunk/src/kbarcode.cpp
===================================================================
--- trunk/src/kbarcode.cpp 2008-02-28 00:10:08 UTC (rev 26)
+++ trunk/src/kbarcode.cpp 2008-03-03 19:07:51 UTC (rev 27)
@@ -17,7 +17,7 @@
#include "kbarcode.h"
#include "barkode.h"
-#include "barcodedialog.h"
+#include "barcodegenerator.h"
#include "batchwizard.h"
#include "labeleditor.h"
#include "databasebrowser.h"
@@ -112,7 +112,7 @@
void KBarcode::startBarcode()
{
- new BarCodeDialog();
+ new BarcodeGenerator();
}
void KBarcode::startLabelEditor()
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-28 00:10:08 UTC (rev 26)
+++ trunk/src/labeleditor.cpp 2008-03-03 19:07:51 UTC (rev 27)
@@ -18,7 +18,7 @@
#include "labeleditor.h"
#include "barcodecombo.h"
-#include "barcodedialog.h"
+#include "barcodegenerator.h"
#include "barcodeitem.h"
#include "barcodeprinterdlg.h"
#include "batchprinter.h"
@@ -1005,7 +1005,7 @@
void LabelEditor::startBarcodeGen()
{
- new BarCodeDialog();
+ new BarcodeGenerator();
}
void LabelEditor::startLoadRecentEditor( const KUrl& url )
Modified: trunk/src/main.cpp
===================================================================
--- trunk/src/main.cpp 2008-02-28 00:10:08 UTC (rev 26)
+++ trunk/src/main.cpp 2008-03-03 19:07:51 UTC (rev 27)
@@ -24,7 +24,7 @@
#include "kbarcode.h"
#include "labeleditor.h"
-#include "barcodedialog.h"
+#include "barcodegenerator.h"
#ifndef VERSION
#define VERSION "Unknown Version"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-03-03 19:10:26
|
Revision: 28
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=28&view=rev
Author: vzsolt
Date: 2008-03-03 11:10:26 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
Finished renaming to BarcodeGenerator.
Added Paths:
-----------
trunk/src/barcodegenerator.cpp
trunk/src/barcodegenerator.h
Removed Paths:
-------------
trunk/src/barcodedialog.cpp
trunk/src/barcodedialog.h
Deleted: trunk/src/barcodedialog.cpp
===================================================================
--- trunk/src/barcodedialog.cpp 2008-03-03 19:07:51 UTC (rev 27)
+++ trunk/src/barcodedialog.cpp 2008-03-03 19:10:26 UTC (rev 28)
@@ -1,219 +0,0 @@
-/***************************************************************************
- barcodegenerator.cpp - description
- -------------------
- begin : Son Dez 29 2002
- copyright : (C) 2002 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "barcodegenerator.h"
-#include "barcodeitem.h"
-#include "printersettings.h"
-#include "barcodecombo.h"
-#include "mimesources.h"
-#include "tokenprovider.h"
-
-// KDE includes
-#include <kapplication.h>
-#include <kfiledialog.h>
-#include <kiconloader.h>
-#include <kimageio.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <qprinter.h>
-#include <kpushbutton.h>
-
-// Qt includes
-#include <qclipboard.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <QPaintDevice>
-#include <q3picture.h>
-#include <QX11Info>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-
-BarcodeGenerator::BarcodeGenerator( QWidget* parent )
- : QDialog( parent, false)
-{
- setCaption( i18n( "Barcode Generator" ) );
-
- BarcodeGeneratorLayout = new QHBoxLayout( this, 11, 6, "BarcodeGeneratorLayout");
- Layout5 = new QVBoxLayout( 0, 0, 6, "Layout5");
- Layout6 = new QVBoxLayout( 0, 0, 6, "Layout2");
- widget = new BarcodeWidget( this );
-
- m_token = new TokenProvider( KApplication::desktop() );
- widget->setTokenProvider( m_token );
-
- buttonGenerate = new KPushButton( this );
- buttonGenerate->setText( i18n( "&Generate" ) );
- buttonGenerate->setEnabled( Barkode::haveBarcode() );
- buttonGenerate->setIconSet( SmallIconSet("barcode") );
-
- buttonSave = new KPushButton( this );
- buttonSave->setText( i18n( "&Save" ) );
- buttonSave->setEnabled( false );
- buttonSave->setIconSet( SmallIconSet("filesave") );
-
- buttonCopy = new KPushButton( this );
- buttonCopy->setText( i18n("&Copy") );
- buttonCopy->setEnabled( false );
- buttonCopy->setIconSet( SmallIconSet("editcopy") );
-
- buttonPrint = new KPushButton( this );
- buttonPrint->setText( i18n("&Print") );
- buttonPrint->setEnabled( false );
- buttonPrint->setIconSet( SmallIconSet("fileprint") );
-
- buttonClose = new KPushButton( this );
- buttonClose->setText( i18n("&Close" ) );
- buttonClose->setIconSet( SmallIconSet("fileclose") );
-
-
- QScrollView* sv = new QScrollView( this );
-
- barcode = new QLabel( sv->viewport(), "barcode" );
- sv->addChild( barcode );
- connect( buttonGenerate, SIGNAL( clicked() ), this, SLOT( generate() ) );
- connect( buttonSave, SIGNAL( clicked() ), this, SLOT( save() ) );
- connect( buttonPrint, SIGNAL( clicked() ), this, SLOT( print() ) );
- connect( buttonCopy, SIGNAL( clicked() ), this, SLOT( copy() ) );
-
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
-
- Layout5->addWidget( buttonGenerate );
- Layout5->addWidget( buttonSave );
- Layout5->addWidget( buttonPrint );
- Layout5->addWidget( buttonCopy );
- Layout5->addItem( spacer );
- Layout5->addWidget( buttonClose );
-
- Layout6->addWidget( widget );
- Layout6->addWidget( sv );
-
- BarcodeGeneratorLayout->addLayout( Layout6 );
- BarcodeGeneratorLayout->addLayout( Layout5 );
- BarcodeGeneratorLayout->setStretchFactor( Layout6, 2 );
-
- connect( buttonClose, SIGNAL( clicked() ), this, SLOT( close() ) );
-
- buttonGenerate->setDefault( true );
-
- show();
-}
-
-BarcodeGenerator::~BarcodeGenerator()
-{
- delete m_token;
-}
-
-void BarcodeGenerator::generate()
-{
- Barkode d;
- widget->getData( d );
- d.setTokenProvider( m_token );
- d.update( KApplication::desktop() );
-
- barcode->setPixmap( d.pixmap() );
-
- buttonSave->setEnabled( !barcode->pixmap()->isNull() );
- buttonPrint->setEnabled( !barcode->pixmap()->isNull() );
- buttonCopy->setEnabled( !barcode->pixmap()->isNull() );
-}
-
-void BarcodeGenerator::save()
-{
- Barkode bc;
- widget->getData( bc );
-
- if(!bc.isValid())
- {
- KFileDialog fd( ":save_image", KImageIO::pattern( KImageIO::Writing ), this, true );
- fd.setMode( KFile::File );
- fd.setOperationMode( KFileDialog::Saving );
- if( fd.exec() == QDialog::Accepted )
- {
- QString path = fd.selectedURL().path();
- QString extension = KImageIO::type( path );
-
- if( extension.isNull() )
- extension = KImageIO::type( fd.currentFilter() );
-
-
- bc.setTokenProvider( m_token );
- bc.update( KApplication::desktop() );
-
- if(!bc.pixmap().save( path, extension, 0 ))
- KMessageBox::error( this, i18n("An error occurred during saving the image") );
- }
- }
-}
-
-void BarcodeGenerator::print()
-{
- Barkode d;
- widget->getData( d );
-
- if( d.isValid() )
- return;
-
- QPrinter* printer = PrinterSettings::getInstance()->setupPrinter( "kbarcode", this );
- if( !printer )
- return;
-
- // unless we can center the barcode
- printer->setFullPage( false );
-
- double scalex = (double)printer->logicalDpiX() / (double)QX11Info::appDpiX();
- double scaley = (double)printer->logicalDpiY() / (double)QX11Info::appDpiY();
-
- QPicture picture;
- QPainter p( printer );
- p.scale( scalex, scaley );
- // TODO: center barcode
-
- TokenProvider tp( printer );
-
- d.setTokenProvider( &tp );
- d.update( printer );
-
- picture = d.picture();
- p.drawPicture( QPoint( 0, 0 ), picture );
- p.end();
-
- delete printer;
-}
-
-void BarcodeGenerator::copy()
-{
- if( barcode->pixmap()->isNull() )
- return;
-
- Barkode bc;
- widget->getData( bc );
-
- BarcodeItem* item = new BarcodeItem( bc );
- DocumentItemList list;
- list.append( item );
- DocumentItemDrag* drag = new DocumentItemDrag();
- drag->setDocumentItem( &list );
-
-#if QT_VERSION >= 0x030100
- kapp->clipboard()->setData( drag, QClipboard::Clipboard );
-#else
- kapp->clipboard()->setData( drag );
-#endif
-}
-
-#include "barcodegenerator.moc"
Deleted: trunk/src/barcodedialog.h
===================================================================
--- trunk/src/barcodedialog.h 2008-03-03 19:07:51 UTC (rev 27)
+++ trunk/src/barcodedialog.h 2008-03-03 19:10:26 UTC (rev 28)
@@ -1,85 +0,0 @@
-/***************************************************************************
- barcodegenerator.h - description
- -------------------
- begin : Son Dez 29 2002
- copyright : (C) 2002 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef BARCODEDIALOG_H
-#define BARCODEDIALOG_H
-
-#include <qdialog.h>
-//Added by qt3to4:
-#include <QVBoxLayout>
-#include <QGridLayout>
-#include <QPixmap>
-#include <QHBoxLayout>
-#include <QLabel>
-
-class BarcodeCombo;
-class BarcodeWidget;
-class KAction;
-class KColorButton;
-class KMenuBar;
-class KToolBar;
-class KIntNumInput;
-class KLineEdit;
-class KPushButton;
-class KMenu;
-class QCheckBox;
-class QLabel;
-class QPixmap;
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class TokenProvider;
-
-/** This class provides a dialog, where the user can create a single barcode
- * and print it, copy it to the clipboard or save it in various image formats.
- * This dialog can also be seen as a powerful replacement for e.g. xbarcode.
- *
- * All barcoding features are available for the user. This dialog allows also
- * to just experiment a little bit with barcodes.
- */
-class BarcodeGenerator : public QDialog
-{
- Q_OBJECT
-
- public:
- BarcodeGenerator( QWidget* parent = 0 );
- ~BarcodeGenerator();
-
- private:
- BarcodeWidget* widget;
- TokenProvider* m_token;
-
- KPushButton* buttonGenerate;
- KPushButton* buttonPrint;
- KPushButton* buttonSave;
- KPushButton* buttonCopy;
- KPushButton* buttonClose;
- QLabel* barcode;
-
- private slots:
- void generate();
- void save();
- void print();
- void copy();
-
- protected:
- QHBoxLayout* BarcodeGeneratorLayout;
- QVBoxLayout* Layout6;
- QVBoxLayout* Layout5;
-};
-
-#endif // BARCODEDIALOG_H
Copied: trunk/src/barcodegenerator.cpp (from rev 27, trunk/src/barcodedialog.cpp)
===================================================================
--- trunk/src/barcodegenerator.cpp (rev 0)
+++ trunk/src/barcodegenerator.cpp 2008-03-03 19:10:26 UTC (rev 28)
@@ -0,0 +1,219 @@
+/***************************************************************************
+ barcodegenerator.cpp - description
+ -------------------
+ begin : Son Dez 29 2002
+ copyright : (C) 2002 by Dominik Seichter
+ email : dom...@we...
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "barcodegenerator.h"
+#include "barcodeitem.h"
+#include "printersettings.h"
+#include "barcodecombo.h"
+#include "mimesources.h"
+#include "tokenprovider.h"
+
+// KDE includes
+#include <kapplication.h>
+#include <kfiledialog.h>
+#include <kiconloader.h>
+#include <kimageio.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <qprinter.h>
+#include <kpushbutton.h>
+
+// Qt includes
+#include <qclipboard.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qpainter.h>
+#include <QPaintDevice>
+#include <q3picture.h>
+#include <QX11Info>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+
+BarcodeGenerator::BarcodeGenerator( QWidget* parent )
+ : QDialog( parent, false)
+{
+ setCaption( i18n( "Barcode Generator" ) );
+
+ BarcodeGeneratorLayout = new QHBoxLayout( this, 11, 6, "BarcodeGeneratorLayout");
+ Layout5 = new QVBoxLayout( 0, 0, 6, "Layout5");
+ Layout6 = new QVBoxLayout( 0, 0, 6, "Layout2");
+ widget = new BarcodeWidget( this );
+
+ m_token = new TokenProvider( KApplication::desktop() );
+ widget->setTokenProvider( m_token );
+
+ buttonGenerate = new KPushButton( this );
+ buttonGenerate->setText( i18n( "&Generate" ) );
+ buttonGenerate->setEnabled( Barkode::haveBarcode() );
+ buttonGenerate->setIconSet( SmallIconSet("barcode") );
+
+ buttonSave = new KPushButton( this );
+ buttonSave->setText( i18n( "&Save" ) );
+ buttonSave->setEnabled( false );
+ buttonSave->setIconSet( SmallIconSet("filesave") );
+
+ buttonCopy = new KPushButton( this );
+ buttonCopy->setText( i18n("&Copy") );
+ buttonCopy->setEnabled( false );
+ buttonCopy->setIconSet( SmallIconSet("editcopy") );
+
+ buttonPrint = new KPushButton( this );
+ buttonPrint->setText( i18n("&Print") );
+ buttonPrint->setEnabled( false );
+ buttonPrint->setIconSet( SmallIconSet("fileprint") );
+
+ buttonClose = new KPushButton( this );
+ buttonClose->setText( i18n("&Close" ) );
+ buttonClose->setIconSet( SmallIconSet("fileclose") );
+
+
+ QScrollView* sv = new QScrollView( this );
+
+ barcode = new QLabel( sv->viewport(), "barcode" );
+ sv->addChild( barcode );
+ connect( buttonGenerate, SIGNAL( clicked() ), this, SLOT( generate() ) );
+ connect( buttonSave, SIGNAL( clicked() ), this, SLOT( save() ) );
+ connect( buttonPrint, SIGNAL( clicked() ), this, SLOT( print() ) );
+ connect( buttonCopy, SIGNAL( clicked() ), this, SLOT( copy() ) );
+
+ QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
+
+ Layout5->addWidget( buttonGenerate );
+ Layout5->addWidget( buttonSave );
+ Layout5->addWidget( buttonPrint );
+ Layout5->addWidget( buttonCopy );
+ Layout5->addItem( spacer );
+ Layout5->addWidget( buttonClose );
+
+ Layout6->addWidget( widget );
+ Layout6->addWidget( sv );
+
+ BarcodeGeneratorLayout->addLayout( Layout6 );
+ BarcodeGeneratorLayout->addLayout( Layout5 );
+ BarcodeGeneratorLayout->setStretchFactor( Layout6, 2 );
+
+ connect( buttonClose, SIGNAL( clicked() ), this, SLOT( close() ) );
+
+ buttonGenerate->setDefault( true );
+
+ show();
+}
+
+BarcodeGenerator::~BarcodeGenerator()
+{
+ delete m_token;
+}
+
+void BarcodeGenerator::generate()
+{
+ Barkode d;
+ widget->getData( d );
+ d.setTokenProvider( m_token );
+ d.update( KApplication::desktop() );
+
+ barcode->setPixmap( d.pixmap() );
+
+ buttonSave->setEnabled( !barcode->pixmap()->isNull() );
+ buttonPrint->setEnabled( !barcode->pixmap()->isNull() );
+ buttonCopy->setEnabled( !barcode->pixmap()->isNull() );
+}
+
+void BarcodeGenerator::save()
+{
+ Barkode bc;
+ widget->getData( bc );
+
+ if(!bc.isValid())
+ {
+ KFileDialog fd( ":save_image", KImageIO::pattern( KImageIO::Writing ), this, true );
+ fd.setMode( KFile::File );
+ fd.setOperationMode( KFileDialog::Saving );
+ if( fd.exec() == QDialog::Accepted )
+ {
+ QString path = fd.selectedURL().path();
+ QString extension = KImageIO::type( path );
+
+ if( extension.isNull() )
+ extension = KImageIO::type( fd.currentFilter() );
+
+
+ bc.setTokenProvider( m_token );
+ bc.update( KApplication::desktop() );
+
+ if(!bc.pixmap().save( path, extension, 0 ))
+ KMessageBox::error( this, i18n("An error occurred during saving the image") );
+ }
+ }
+}
+
+void BarcodeGenerator::print()
+{
+ Barkode d;
+ widget->getData( d );
+
+ if( d.isValid() )
+ return;
+
+ QPrinter* printer = PrinterSettings::getInstance()->setupPrinter( "kbarcode", this );
+ if( !printer )
+ return;
+
+ // unless we can center the barcode
+ printer->setFullPage( false );
+
+ double scalex = (double)printer->logicalDpiX() / (double)QX11Info::appDpiX();
+ double scaley = (double)printer->logicalDpiY() / (double)QX11Info::appDpiY();
+
+ QPicture picture;
+ QPainter p( printer );
+ p.scale( scalex, scaley );
+ // TODO: center barcode
+
+ TokenProvider tp( printer );
+
+ d.setTokenProvider( &tp );
+ d.update( printer );
+
+ picture = d.picture();
+ p.drawPicture( QPoint( 0, 0 ), picture );
+ p.end();
+
+ delete printer;
+}
+
+void BarcodeGenerator::copy()
+{
+ if( barcode->pixmap()->isNull() )
+ return;
+
+ Barkode bc;
+ widget->getData( bc );
+
+ BarcodeItem* item = new BarcodeItem( bc );
+ DocumentItemList list;
+ list.append( item );
+ DocumentItemDrag* drag = new DocumentItemDrag();
+ drag->setDocumentItem( &list );
+
+#if QT_VERSION >= 0x030100
+ kapp->clipboard()->setData( drag, QClipboard::Clipboard );
+#else
+ kapp->clipboard()->setData( drag );
+#endif
+}
+
+#include "barcodegenerator.moc"
Copied: trunk/src/barcodegenerator.h (from rev 27, trunk/src/barcodedialog.h)
===================================================================
--- trunk/src/barcodegenerator.h (rev 0)
+++ trunk/src/barcodegenerator.h 2008-03-03 19:10:26 UTC (rev 28)
@@ -0,0 +1,85 @@
+/***************************************************************************
+ barcodegenerator.h - description
+ -------------------
+ begin : Son Dez 29 2002
+ copyright : (C) 2002 by Dominik Seichter
+ email : dom...@we...
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef BARCODEDIALOG_H
+#define BARCODEDIALOG_H
+
+#include <qdialog.h>
+//Added by qt3to4:
+#include <QVBoxLayout>
+#include <QGridLayout>
+#include <QPixmap>
+#include <QHBoxLayout>
+#include <QLabel>
+
+class BarcodeCombo;
+class BarcodeWidget;
+class KAction;
+class KColorButton;
+class KMenuBar;
+class KToolBar;
+class KIntNumInput;
+class KLineEdit;
+class KPushButton;
+class KMenu;
+class QCheckBox;
+class QLabel;
+class QPixmap;
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class TokenProvider;
+
+/** This class provides a dialog, where the user can create a single barcode
+ * and print it, copy it to the clipboard or save it in various image formats.
+ * This dialog can also be seen as a powerful replacement for e.g. xbarcode.
+ *
+ * All barcoding features are available for the user. This dialog allows also
+ * to just experiment a little bit with barcodes.
+ */
+class BarcodeGenerator : public QDialog
+{
+ Q_OBJECT
+
+ public:
+ BarcodeGenerator( QWidget* parent = 0 );
+ ~BarcodeGenerator();
+
+ private:
+ BarcodeWidget* widget;
+ TokenProvider* m_token;
+
+ KPushButton* buttonGenerate;
+ KPushButton* buttonPrint;
+ KPushButton* buttonSave;
+ KPushButton* buttonCopy;
+ KPushButton* buttonClose;
+ QLabel* barcode;
+
+ private slots:
+ void generate();
+ void save();
+ void print();
+ void copy();
+
+ protected:
+ QHBoxLayout* BarcodeGeneratorLayout;
+ QVBoxLayout* Layout6;
+ QVBoxLayout* Layout5;
+};
+
+#endif // BARCODEDIALOG_H
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-03-03 22:30:20
|
Revision: 29
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=29&view=rev
Author: vzsolt
Date: 2008-03-03 14:30:26 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
Taking KDE4's Kolourpaint sources for example, I've moved every dialog to a separate directory. This small reorganization should help to see which dialogs are already KDE4 compatible - none as of now, though.
The includes in the source are not updated yet, CMake itself seems to work.
Modified Paths:
--------------
trunk/src/CMakeLists.txt
Added Paths:
-----------
trunk/src/dialogs/
trunk/src/dialogs/barcodedialogs.cpp
trunk/src/dialogs/barcodedialogs.h
trunk/src/dialogs/barcodeprinterdlg.cpp
trunk/src/dialogs/barcodeprinterdlg.h
trunk/src/dialogs/configdialog.cpp
trunk/src/dialogs/configdialog.h
trunk/src/dialogs/csvimportdlg.cpp
trunk/src/dialogs/csvimportdlg.h
trunk/src/dialogs/definitiondialog.cpp
trunk/src/dialogs/definitiondialog.h
trunk/src/dialogs/documentitemdlg.cpp
trunk/src/dialogs/documentitemdlg.h
trunk/src/dialogs/multilineeditdlg.cpp
trunk/src/dialogs/multilineeditdlg.h
trunk/src/dialogs/previewdialog.cpp
trunk/src/dialogs/previewdialog.h
trunk/src/dialogs/printlabeldlg.cpp
trunk/src/dialogs/printlabeldlg.h
trunk/src/dialogs/rectsettingsdlg.cpp
trunk/src/dialogs/rectsettingsdlg.h
trunk/src/dialogs/smalldialogs.cpp
trunk/src/dialogs/smalldialogs.h
trunk/src/dialogs/tokendialog.cpp
trunk/src/dialogs/tokendialog.h
Removed Paths:
-------------
trunk/src/barcodedialogs.cpp
trunk/src/barcodedialogs.h
trunk/src/barcodeprinterdlg.cpp
trunk/src/barcodeprinterdlg.h
trunk/src/configdialog.cpp
trunk/src/configdialog.h
trunk/src/csvimportdlg.cpp
trunk/src/csvimportdlg.h
trunk/src/definitiondialog.cpp
trunk/src/definitiondialog.h
trunk/src/documentitemdlg.cpp
trunk/src/documentitemdlg.h
trunk/src/multilineeditdlg.cpp
trunk/src/multilineeditdlg.h
trunk/src/previewdialog.cpp
trunk/src/previewdialog.h
trunk/src/printlabeldlg.cpp
trunk/src/printlabeldlg.h
trunk/src/rectsettingsdlg.cpp
trunk/src/rectsettingsdlg.h
trunk/src/smalldialogs.cpp
trunk/src/smalldialogs.h
trunk/src/tokendialog.cpp
trunk/src/tokendialog.h
Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt 2008-03-03 19:10:26 UTC (rev 28)
+++ trunk/src/CMakeLists.txt 2008-03-03 22:30:26 UTC (rev 29)
@@ -2,32 +2,25 @@
add_subdirectory( pics )
include_directories( ${CMAKE_SOURCE_DIR} ${KDE4_INCLUDE_DIR}
- ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
+ ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} dialogs )
add_definitions( ${KDE4_DEFINITIONS} )
########### next target ###############
-
set(kbarcode_SRCS
barcodecombo.cpp
barcodegenerator.cpp
- barcodedialogs.cpp
barcodeitem.cpp
- barcodeprinterdlg.cpp
barkode.cpp
barkodeengine.cpp
batchprinter.cpp
batchwizard.cpp
commands.cpp
- configdialog.cpp
confwizard.cpp
csvfile.cpp
- csvimportdlg.cpp
databasebrowser.cpp
definition.cpp
- definitiondialog.cpp
documentitem.cpp
- documentitemdlg.cpp
dsrichtext.cpp
dstextedit.cpp
encodingcombo.cpp
@@ -45,20 +38,15 @@
mainwindow.cpp
measurements.cpp
mimesources.cpp
- multilineeditdlg.cpp
mycanvasitem.cpp
mycanvasview.cpp
mydatatable.cpp
newlabel.cpp
pixmapbarcode.cpp
- previewdialog.cpp
printersettings.cpp
- printlabeldlg.cpp
propertywidget.cpp
purepostscript.cpp
rectitem.cpp
- rectsettingsdlg.cpp
- smalldialogs.cpp
sqltables.cpp
tbarcode2.cpp
tcanvasitem.cpp
@@ -66,13 +54,24 @@
textitem.cpp
textlineedit.cpp
textlineitem.cpp
- tokendialog.cpp
tokenprovider.cpp
xmlutils.cpp
zplutils.cpp
+ dialogs/barcodedialogs.cpp
+ dialogs/barcodeprinterdlg.cpp
+ dialogs/configdialog.cpp
+ dialogs/csvimportdlg.cpp
+ dialogs/definitiondialog.cpp
+ dialogs/documentitemdlg.cpp
+ dialogs/multilineeditdlg.cpp
+ dialogs/previewdialog.cpp
+ dialogs/printlabeldlg.cpp
+ dialogs/rectsettingsdlg.cpp
+ dialogs/smalldialogs.cpp
+ dialogs/tokendialog.cpp
)
-kde4_add_ui_files( kbarcode_SRCS
+kde4_add_ui_files( kbarcode_SRCS
)
kde4_add_executable(kbarcode ${kbarcode_SRCS})
Deleted: trunk/src/barcodedialogs.cpp
===================================================================
--- trunk/src/barcodedialogs.cpp 2008-03-03 19:10:26 UTC (rev 28)
+++ trunk/src/barcodedialogs.cpp 2008-03-03 22:30:26 UTC (rev 29)
@@ -1,510 +0,0 @@
-/***************************************************************************
- barcodedialogs.cpp - description
- -------------------
- begin : Fre Sep 5 2003
- copyright : (C) 2003 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "barcodedialogs.h"
-#include "barkode.h"
-#include "purepostscript.h"
-#include "tbarcode2.h"
-
-// Qt includes
-#include <q3buttongroup.h>
-#include <qcheckbox.h>
-#include <q3groupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qradiobutton.h>
-#include <qtooltip.h>
-#include <q3vbox.h>
-#include <q3vgroupbox.h>
-//Added by qt3to4:
-#include <QHBoxLayout>
-#include <QGridLayout>
-#include <QVBoxLayout>
-
-// KDE includes
-#include <kcombobox.h>
-#include <knuminput.h>
-#include <klocale.h>
-#include <kcolorbutton.h>
-
-
-AdvancedBarcodeDialog::AdvancedBarcodeDialog( QString type, QWidget* parent )
- : KDialogBase( KDialogBase::Tabbed, i18n("Barcode Settings"),
- KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent)
-{
- list.setAutoDelete( false );
-
- if( Barkode::hasFeature( type, PDF417BARCODE ) ) {
- KVBox* box = addVBoxPage( i18n("PDF417") );
- PDF417BarcodeDlg* dlg = new PDF417BarcodeDlg( box );
- list.append( (BarcodeDlgBase*)dlg );
- }
-
- if( Barkode::hasFeature( type, DATAMATRIX ) ) {
- KVBox* box = addVBoxPage( i18n("DataMatrix") );
- DataMatrixDlg* dlg = new DataMatrixDlg( box );
- list.append( (BarcodeDlgBase*)dlg );
- }
-
- if( Barkode::hasFeature( type, TBARCODEADV ) ) {
- KVBox* box = addVBoxPage( i18n("TBarcode") );
- TBarcodeDlg* dlg = new TBarcodeDlg( box );
- list.append( (BarcodeDlgBase*)dlg );
- }
-
- if( Barkode::hasFeature( type, PUREADV ) ) {
- KVBox* box = addVBoxPage( i18n("Barcode Writer in Pure Postscript") );
- PurePostscriptDlg* dlg = new PurePostscriptDlg( box );
- list.append( (BarcodeDlgBase*)dlg );
- }
-
- if( Barkode::hasFeature( type, COLORED ) ) {
- KVBox* box = addVBoxPage( i18n("Colors") );
- ColorDlg* dlg = new ColorDlg( box );
- list.append( (BarcodeDlgBase*)dlg );
- }
-
- KVBox* box = addVBoxPage( i18n("Sequence") );
- SequenceDlg* dlg = new SequenceDlg( box );
- list.append( (BarcodeDlgBase*)dlg );
-}
-
-AdvancedBarcodeDialog::~AdvancedBarcodeDialog()
-{
-}
-
-void AdvancedBarcodeDialog::setData( Barkode* b )
-{
- for( unsigned int i = 0; i < list.count(); i++ ) {
- BarcodeDlgBase* bdb = list.at( i );
- bdb->setData( b );
- }
-}
-
-void AdvancedBarcodeDialog::getData( Barkode* b )
-{
- for( unsigned int i = 0; i < list.count(); i++ ) {
- BarcodeDlgBase* bdb = list.at( i );
- bdb->getData( b );
- }
-}
-
-TBarcodeDlg::TBarcodeDlg(QWidget *parent)
- : QWidget( parent )
-{
- QVBoxLayout* layout = new QVBoxLayout( this, 6, 6 );
-
- 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() );
- QVBoxLayout* gbLayout = new QVBoxLayout( gb->layout() );
-
- spinModule = new KDoubleNumInput( gb );
- spinModule->setLabel( i18n("Module width (mm):"), Qt::AlignLeft | Qt::AlignVCenter );
- spinModule->setRange( 0.190, 1.500, 0.001, true );
-
- spinHeight = new KIntNumInput( gb );
- spinHeight->setLabel( i18n("Barcode Height (mm):"), Qt::AlignLeft | Qt::AlignVCenter );
- spinHeight->setRange( 1, 1000, 10, false );
-
- checkEscape = new QCheckBox( i18n("&Translate escape sequences"), gb );
- checkAbove = new QCheckBox( i18n("&Text above barcode"), gb );
- checkAutoCorrect = new QCheckBox( i18n("&Auto correction"), gb );
-
- comboCheckSum = new KComboBox( false, gb );
-
- QLabel* label = new QLabel( i18n("&Checksum calculation method:"), gb );
- label->setBuddy( comboCheckSum );
-
- QHBoxLayout * hbox = new QHBoxLayout( 0, 6, 6 );
- hbox->addWidget( label );
- hbox->addWidget( comboCheckSum );
-
- gbLayout->addWidget( spinModule );
- gbLayout->addWidget( spinHeight );
- gbLayout->addWidget( checkEscape );
- gbLayout->addWidget( checkAbove );
- gbLayout->addWidget( checkAutoCorrect );
- gbLayout->addLayout( hbox );
-
- QToolTip::add( spinModule, i18n("<qt>Change the module with used by tbarcode. Take a look into the "
- "tbarcode documentation for details. Normaly you do not want to change "
- "this value.</qt>") );
-
- layout->addWidget( gb );
-}
-
-void TBarcodeDlg::setData( Barkode* b )
-{
- TBarcodeOptions* options = dynamic_cast<TBarcodeOptions*>( b->engine()->options() );
-
- if( options )
- {
- spinModule->setValue( options->moduleWidth() );
- spinHeight->setValue( options->height() );
- checkEscape->setChecked( options->escape() );
- checkAbove->setChecked( options->above() );
- checkAutoCorrect->setChecked( options->autocorrect() );
-
- map.insert( i18n("No Checksum"), 0 );
- map.insert( i18n("Default Checksum Method"), 1 );
-
- if( Barkode::hasFeature( b->type(), MODULOALLCHECK ) ||
- Barkode::hasFeature( b->type(), MODULO10CHECK ) )
- map.insert( i18n("Modulo 10 Checksum"), 2 );
-
- if( Barkode::hasFeature( b->type(), MODULOALLCHECK ) ||
- b->type() == "b13" || // EAN 13
- b->type() == "b14" || // EAN 13
- b->type() == "b15" || // EAN 13
- b->type() == "b18" ) // CodaBar (2 width)
- map.insert( i18n("Module 43 (suggested for Code39 and Logmars, 1 digit)"), 3 );
-
- if( Barkode::hasFeature( b->type(), MODULOALLCHECK ) )
- map.insert( i18n("Modula 47 (2 digits)"), 4 );
-
- if( b->type() == "b21" ) // Deutsche Post Leitcode
- map.insert( i18n("Deutsche Post Leitcode"), 5 );
-
- if( b->type() == "b22") // Deutsche Post Identcode
- map.insert( i18n("Deutsche Post Identcode"), 6 );
-
- if( b->type() == "b1" ) { // Code11
- map.insert( i18n("Code 11 (1 digit)"), 7 );
- map.insert( i18n("Code 11 (2 digits)"), 8 );
- }
-
- if( Barkode::hasFeature( b->type(), POSTNETCHECK ) )
- map.insert( i18n("USPS Postnet"), 9 );
-
- if( b->type() == "b47" ) { // MSI
- map.insert( i18n("MSI (1 digit)"), 10 );
- map.insert( i18n("MSI (2 digits)"), 11 );
- }
-
- if( b->type() == "b46" ) // Plessey
- map.insert( i18n("Plessey"), 12 );
-
- if( Barkode::hasFeature( b->type(), EAN8CHECK ) )
- map.insert( i18n("EAN 8"), 13 );
-
- if( Barkode::hasFeature( b->type(), EAN13CHECK ) )
- map.insert( i18n("EAN 13"), 14 );
-
- if( Barkode::hasFeature( b->type(), UPCACHECK ) )
- map.insert( i18n("UPC A"), 15 );
-
- if( Barkode::hasFeature( b->type(), UPCECHECK ) )
- map.insert( i18n("UPC E"), 16 );
-
- if( b->type() == "b16" ) // EAN 128
- map.insert( i18n("EAN 128"), 17 );
-
- if( Barkode::hasFeature( b->type(), CODE128CHECK ) )
- map.insert( i18n("Code 128"), 18 );
-
- if( b->type() == "b70" ) // Royal Mail 4 State
- map.insert( i18n("Royal Mail 4 State"), 19 );
-
- comboCheckSum->insertStringList( map.keys() );
-
- QMap<QString,int>::Iterator it;
- for ( it = map.begin(); it != map.end(); ++it ) {
- if( it.data() == options->checksum() ) {
- for( int i = 0; i < comboCheckSum->count(); i++ )
- if( comboCheckSum->text( i ) == it.key() ) {
- comboCheckSum->setCurrentItem( i );
- break;
- }
- break;
- }
- }
- }
-}
-
-void TBarcodeDlg::getData( Barkode* b ) const
-{
- TBarcodeOptions* options = dynamic_cast<TBarcodeOptions*>( b->engine()->options() );
-
- if( options )
- {
- options->setModuleWidth( spinModule->value() );
- options->setEscape( checkEscape->isChecked() );
- options->setAbove( checkAbove->isChecked() );
- options->setAutocorrect( checkAutoCorrect->isChecked() );
- options->setCheckSum( map[comboCheckSum->currentText()] );
- options->setHeight( spinHeight->value() );
- }
-}
-
-PDF417BarcodeDlg::PDF417BarcodeDlg(QWidget *parent)
- : QWidget( parent )
-{
- QVBoxLayout* layout = new QVBoxLayout( this, 6, 6 );
-
- 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() );
- QVBoxLayout* gpdfLayout = new QVBoxLayout( gpdf->layout() );
-
- spinRow = new KIntNumInput( gpdf );
- spinRow->setLabel( i18n("Rows:"), Qt::AlignLeft | Qt::AlignVCenter );
- spinRow->setRange( 0, 90, 1, true );
-
- spinCol = new KIntNumInput( spinRow, 0, gpdf );
- spinCol->setLabel( i18n("Columns:"), Qt::AlignLeft | Qt::AlignVCenter );
- spinCol->setRange( 0, 30, 1, true );
-
- spinErr = new KIntNumInput( spinCol, 0, gpdf );
- spinErr->setLabel( i18n("Error correction level:"), Qt::AlignLeft | Qt::AlignVCenter );
- spinErr->setRange( 1, 8, 1, true );
-
- gpdfLayout->addWidget( spinRow );
- gpdfLayout->addWidget( spinCol );
- gpdfLayout->addWidget( spinErr );
- layout->addWidget( gpdf );
-}
-
-void PDF417BarcodeDlg::setData( Barkode* b )
-{
- PDF417Options* options = dynamic_cast<PDF417Options*>( b->engine()->options() );
-
- if( options )
- {
- spinRow->setValue( options->row() );
- spinCol->setValue( options->col() );
- spinErr->setValue( options->err() );
- }
-}
-
-void PDF417BarcodeDlg::getData( Barkode* b ) const
-{
- PDF417Options* options = dynamic_cast<PDF417Options*>( b->engine()->options() );
-
- if( options )
- {
- options->setRow( spinRow->value() );
- options->setCol( spinCol->value() );
- options->setErr( spinErr->value() );
- }
-}
-
-DataMatrixDlg::DataMatrixDlg(QWidget *parent )
- : QWidget( parent )
-{
- QHBoxLayout* datamLayout = new QHBoxLayout( this, 6, 6 );
-
- comboDataMatrix = new KComboBox( false, this );
-
- datamLayout->addWidget( new QLabel( i18n("Data Matrix symbol sizes (rows x cols):"), this ) );
- datamLayout->addWidget( comboDataMatrix );
- datamLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) );
-
- comboDataMatrix->addItem( i18n("Automatic calculation" ) );
- comboDataMatrix->addItem( "10 x 10" );
- comboDataMatrix->addItem( "12 x 12" );
- comboDataMatrix->addItem( "14 x 14" );
- comboDataMatrix->addItem( "16 x 16" );
- comboDataMatrix->addItem( "18 x 18" );
- comboDataMatrix->addItem( "20 x 20" );
- comboDataMatrix->addItem( "22 x 22" );
- comboDataMatrix->addItem( "24 x 24" );
- comboDataMatrix->addItem( "26 x 26" );
- comboDataMatrix->addItem( "32 x 32" );
- comboDataMatrix->addItem( "36 x 36" );
- comboDataMatrix->addItem( "40 x 40" );
- comboDataMatrix->addItem( "44 x 44" );
- comboDataMatrix->addItem( "48 x 48" );
- comboDataMatrix->addItem( "52 x 52" );
- comboDataMatrix->addItem( "64 x 64" );
- comboDataMatrix->addItem( "72 x 72" );
- comboDataMatrix->addItem( "80 x 80" );
- comboDataMatrix->addItem( "88 x 88" );
- comboDataMatrix->addItem( "96 x 96" );
- comboDataMatrix->addItem( "104 x 104" );
- comboDataMatrix->addItem( "120 x 120" );
- comboDataMatrix->addItem( "132 x 132" );
- comboDataMatrix->addItem( "144 x 144" );
- comboDataMatrix->addItem( "8 x 18" );
- comboDataMatrix->addItem( "8 x 32" );
- comboDataMatrix->addItem( "12 x 26" );
- comboDataMatrix->addItem( "12 x 36" );
- comboDataMatrix->addItem( "16 x 36" );
- comboDataMatrix->addItem( "16 x 48" );
-}
-
-void DataMatrixDlg::setData( Barkode* b )
-{
- comboDataMatrix->setCurrentItem( b->datamatrixSize());
-}
-
-void DataMatrixDlg::getData( Barkode* b ) const
-{
- b->setDatamatrixSize( comboDataMatrix->currentItem() );
-}
-
-SequenceDlg::SequenceDlg( QWidget *parent )
- : QWidget( parent )
-{
- QVBoxLayout* main = new QVBoxLayout( this, 6, 6 );
-
- QButtonGroup* group = new QButtonGroup( i18n("Sequence"), this );
- group->setColumnLayout(0, Qt::Vertical );
- group->layout()->setSpacing( 6 );
- group->layout()->setMargin( 11 );
- QVBoxLayout* layout = new QVBoxLayout( group->layout() );
-
- checkSequence = new QCheckBox( i18n("&Enable sequence"), group );
-
- radioNumbers = new QRadioButton( i18n("Iterate over numbers 0-9"), group );
- radioAlpha = new QRadioButton( i18n("Iterate over characters A-Z"), group );
- radioAlphaNum = new QRadioButton( i18n("Iterate over A-Z, 0-9"), group );
-
- spinStep = new KIntNumInput( group );
- spinStep->setLabel( i18n("Step:"), Qt::AlignLeft | Qt::AlignVCenter );
- spinStep->setRange( -100, 100, 1, false );
-
- spinStart = new KIntNumInput( spinStep, 1, group );
- spinStart->setLabel( i18n("Start:"), Qt::AlignLeft | Qt::AlignVCenter );
- spinStart->setRange( -100000, 100000, 1, false );
-
- layout->addWidget( checkSequence );
- layout->addWidget( radioNumbers );
- layout->addWidget( radioAlpha );
- layout->addWidget( radioAlphaNum );
- layout->addWidget( spinStep );
- layout->addWidget( spinStart );
-
- main->addWidget( group );
-
- connect( checkSequence, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
- connect( radioNumbers, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
- connect( radioAlpha, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
- connect( radioAlphaNum, SIGNAL( clicked() ), this, SLOT( enableControls() ) );
-}
-
-void SequenceDlg::setData( Barkode* b )
-{
- checkSequence->setChecked( b->sequenceEnabled() );
- spinStep->setValue( b->sequenceStep() );
- spinStart->setValue( b->sequenceStart() );
-
- if( b->sequenceMode() == NUM )
- radioNumbers->setChecked( true );
- else if( b->sequenceMode() == ALPHA )
- radioAlpha->setChecked( true );
- else if( b->sequenceMode() == ALPHANUM )
- radioAlphaNum->setChecked( true );
-
- enableControls();
-}
-
-void SequenceDlg::getData( Barkode* b ) const
-{
- b->setSequenceEnabled( checkSequence->isChecked() );
-
- b->setSequenceStep( spinStep->value() );
- b->setSequenceStart( spinStart->value() );
-
- if( radioNumbers->isChecked() )
- b->setSequenceMode( NUM );
- else if( radioAlpha->isChecked() )
- b->setSequenceMode( ALPHA );
- else if( radioAlphaNum->isChecked() )
- b->setSequenceMode( ALPHANUM );
-}
-
-void SequenceDlg::enableControls()
-{
- radioNumbers->setEnabled( checkSequence->isChecked() );
- radioAlpha->setEnabled( checkSequence->isChecked() );
- radioAlphaNum->setEnabled( false ); //checkSequence->isChecked() );
- spinStep->setEnabled( checkSequence->isChecked() );
- spinStart->setEnabled( checkSequence->isChecked() && radioNumbers->isChecked() );
-}
-
-ColorDlg::ColorDlg(QWidget *parent)
- : QVBox( parent )
-{
- QGroupBox* gb = new QGroupBox( i18n("Colors"), this );
- gb->setColumnLayout(0, Qt::Vertical );
- gb->layout()->setSpacing( 6 );
- gb->layout()->setMargin( 11 );
- gb->setEnabled( Barkode::havePurePostscriptBarcode() );
- QGridLayout* gbLayout = new QGridLayout( gb->layout() );
-
- buttonBarColor = new KColorButton( gb );
- buttonBackColor = new KColorButton( gb );
- buttonTextColor = new KColorButton( gb );
-
- gbLayout->addWidget( new QLabel( i18n("Bar Color:"), gb ), 0, 0 );
- gbLayout->addWidget( new QLabel( i18n("Background Color:"), gb ), 1, 0 );
- gbLayout->addWidget( new QLabel( i18n("Text Color:"), gb ), 2, 0 );
- gbLayout->addWidget( buttonBarColor, 0, 1 );
- gbLayout->addWidget( buttonBackColor, 1, 1 );
- gbLayout->addWidget( buttonTextColor, 2, 1 );
-}
-
-void ColorDlg::setData( Barkode* b )
-{
- buttonBarColor->setColor( b->foreground() );
- buttonBackColor->setColor( b->background() );
- buttonTextColor->setColor( b->textColor() );
-}
-
-void ColorDlg::getData( Barkode* b ) const
-{
- b->setForeground( buttonBarColor->color() );
- b->setBackground( buttonBackColor->color() );
- b->setTextColor( buttonTextColor->color() );
-}
-
-PurePostscriptDlg::PurePostscriptDlg(QWidget *parent)
- : QVBox( parent )
-{
- QVGroupBox* gb = new QVGroupBox( i18n("Barcode Writer in Pure Postscript"), this );
- gb->setEnabled( Barkode::havePurePostscriptBarcode() );
-
- checkChecksum = new QCheckBox( i18n("Enable &Checksum"), gb );
-}
-
-void PurePostscriptDlg::setData( Barkode* b )
-{
- PurePostscriptOptions* options = dynamic_cast<PurePostscriptOptions*>( b->engine()->options() );
-
- if( options )
- {
- checkChecksum->setChecked( options->checksum() );
- checkChecksum->setEnabled( Barkode::hasFeature( b->type(), MODULOALLCHECK ) );
- }
-}
-
-void PurePostscriptDlg::getData( Barkode* b ) const
-{
- PurePostscriptOptions* options = dynamic_cast<PurePostscriptOptions*>( b->engine()->options() );
-
- if( options )
- options->setChecksum( checkChecksum->isChecked() );
-}
-
-
-#include "barcodedialogs.moc"
Deleted: trunk/src/barcodedialogs.h
===================================================================
--- trunk/src/barcodedialogs.h 2008-03-03 19:10:26 UTC (rev 28)
+++ trunk/src/barcodedialogs.h 2008-03-03 22:30:26 UTC (rev 29)
@@ -1,182 +0,0 @@
-/***************************************************************************
- barcodedialogs.h - description
- -------------------
- begin : Fre Sep 5 2003
- copyright : (C) 2003 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef BARCODEDIALOGS_H
-#define BARCODEDIALOGS_H
-
-#include <qmap.h>
-#include <q3ptrlist.h>
-#include <qwidget.h>
-#include <q3vbox.h>
-#include <kdialog.h>
-
-class Barkode;
-class KColorButton;
-class KComboBox;
-class KDoubleNumInput;
-class KIntNumInput;
-class QCheckBox;
-class QRadioButton;
-
-/** A base class for all widgets, that will be used in AdvancedBarcodeDialog
- * to modify the settings of a barcode. The API is simple. You can only set the
- * current barcode settings and retrieve them after the user modified them.
- *
- * @author Dominik Seichter
- */
-class BarcodeDlgBase {
- public:
- virtual ~BarcodeDlgBase() { }
-
- virtual void setData( Barkode* b ) = 0;
- virtual void getData( Barkode* b ) const = 0;
-};
-
-/**
- * A configuration dialog for advanced barcode settings.
- * Used in BarcodeWidget. It loads the wigets below into tabs.
- * @see TBarcodeDlg
- * @see PDF417BarcodeDlg
- * @see DataMatrixDlg
- * @seeSequenceDlg
- *
- * @author Dominik Seichter
- */
-class AdvancedBarcodeDialog : public KDialogBase {
- Q_OBJECT
- public:
- AdvancedBarcodeDialog( QString type, QWidget* parent = 0 );
- ~AdvancedBarcodeDialog();
-
- void setData( Barkode* b );
- void getData( Barkode* b );
-
- private:
- QPtrList<BarcodeDlgBase> list;
-};
-
-/** A configuration widget for TBarcode settings.
- * @author Dominik Seichter
- */
-class TBarcodeDlg : public QWidget, public BarcodeDlgBase {
- Q_OBJECT
- public:
- TBarcodeDlg(QWidget *parent=0 );
-
- void setData( Barkode* b );
- void getData( Barkode* b ) const;
-
- private:
- KDoubleNumInput* spinModule;
- KIntNumInput* spinHeight;
- QCheckBox* checkEscape;
- QCheckBox* checkAbove;
- QCheckBox* checkAutoCorrect;
- KComboBox* comboCheckSum;
-
- QMap<QString,int> map;
-};
-
-/** A configuration Dialog for PDF417 settings.
- * @author Dominik Seichter
- */
-class PDF417BarcodeDlg : public QWidget, public BarcodeDlgBase {
- Q_OBJECT
- public:
- PDF417BarcodeDlg(QWidget *parent=0);
-
- void setData( Barkode* b );
- void getData( Barkode* b ) const;
-
- private:
- KIntNumInput* spinRow;
- KIntNumInput* spinCol;
- KIntNumInput* spinErr;
-};
-
-/** A configuration widget for DataMatrix settings.
- * @author Dominik Seichter
- */
-class DataMatrixDlg : public QWidget, public BarcodeDlgBase {
- Q_OBJECT
- public:
- DataMatrixDlg(QWidget *parent=0);
-
- void setData( Barkode* b );
- void getData( Barkode* b ) const;
-
- private:
- KComboBox* comboDataMatrix;
-};
-
-/** A configuration widget for barcode sequences.
- * @author Dominik Seichter
- */
-class SequenceDlg : public QWidget, public BarcodeDlgBase {
- Q_OBJECT
- public:
- SequenceDlg(QWidget *parent=0);
-
- void setData( Barkode* b );
- void getData( Barkode* b ) const;
-
- private slots:
- void enableControls();
-
- private:
- QCheckBox* checkSequence;
- QRadioButton* radioNumbers;
- QRadioButton* radioAlpha;
- QRadioButton* radioAlphaNum;
-
- KIntNumInput* spinStep;
- KIntNumInput* spinStart;
-};
-
-/** A configuration widget for colors in pure postscript barcodes
- * @author Dominik Seichter
- */
-class ColorDlg : public QVBox, public BarcodeDlgBase {
- Q_OBJECT
- public:
- ColorDlg(QWidget *parent=0);
-
- void setData( Barkode* b );
- void getData( Barkode* b ) const;
-
- private:
- KColorButton* buttonBarColor;
- KColorButton* buttonBackColor;
- KColorButton* buttonTextColor;
-};
-
-/** A configuration widget for colors in pure postscript barcodes
- * @author Dominik Seichter
- */
-class PurePostscriptDlg : public QVBox, public BarcodeDlgBase {
- Q_OBJECT
- public:
- PurePostscriptDlg(QWidget *parent=0);
-
- void setData( Barkode* b );
- void getData( Barkode* b ) const;
-
- private:
- QCheckBox* checkChecksum;
-};
-
-#endif
Deleted: trunk/src/barcodeprinterdlg.cpp
===================================================================
--- trunk/src/barcodeprinterdlg.cpp 2008-03-03 19:10:26 UTC (rev 28)
+++ trunk/src/barcodeprinterdlg.cpp 2008-03-03 22:30:26 UTC (rev 29)
@@ -1,127 +0,0 @@
-/***************************************************************************
- barcodeprinterdlg.cpp - description
- -------------------
- begin : Fri Oct 01 2004
- copyright : (C) 2004 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "barcodeprinterdlg.h"
-#include "printersettings.h"
-
-#include <kcombobox.h>
-#include <klocale.h>
-#include <kurlrequester.h>
-
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-//Added by qt3to4:
-#include <QGridLayout>
-
-Barc...
[truncated message content] |
|
From: <dom...@us...> - 2008-03-04 08:50:49
|
Revision: 30
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=30&view=rev
Author: domseichter
Date: 2008-03-04 00:50:46 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Minor porting work here and there.
Modified Paths:
--------------
trunk/src/barcodecombo.cpp
trunk/src/documentitem.h
trunk/src/xmlutils.cpp
trunk/src/xmlutils.h
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/barcodecombo.cpp 2008-03-04 08:50:46 UTC (rev 30)
@@ -65,7 +65,7 @@
if( pattern->isEmpty() )
return true;
- compiled = pcre_compile( pattern->latin1(), 0, &error, &erroffset, NULL );
+ compiled = pcre_compile( pattern->toLatin1().data(), 0, &error, &erroffset, NULL );
if( !compiled ) // ignore all errors
return true;
@@ -109,12 +109,7 @@
void BarcodeCombo::setEncodingType( const QString & type )
{
const QString name = Barkode::nameFromType( type );
- for( unsigned int z = 0; z < (unsigned int)count(); z++ )
- if( text( z ) == name )
- {
- setCurrentItem( z );
- break;
- }
+ setCurrentItem( name, false );
}
BarcodeWidget::BarcodeWidget(QWidget *parent)
Modified: trunk/src/documentitem.h
===================================================================
--- trunk/src/documentitem.h 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/documentitem.h 2008-03-04 08:50:46 UTC (rev 30)
@@ -224,7 +224,7 @@
return m_visibilityScript;
}
-typedef QSortedList<DocumentItem> DocumentItemList;
+typedef QList<DocumentItem> DocumentItemList;
#endif //DOCUMENTITEM_H
Modified: trunk/src/xmlutils.cpp
===================================================================
--- trunk/src/xmlutils.cpp 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/xmlutils.cpp 2008-03-04 08:50:46 UTC (rev 30)
@@ -213,6 +213,7 @@
}
}
+ qSort( list->begin(), list->end() );
}
void XMLUtils::writeXMLDocumentItem( QDomElement* root, DocumentItem** item )
Modified: trunk/src/xmlutils.h
===================================================================
--- trunk/src/xmlutils.h 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/xmlutils.h 2008-03-04 08:50:46 UTC (rev 30)
@@ -34,7 +34,7 @@
class QRect;
class QString;
class QWidget;
-typedef QSortedList<DocumentItem> DocumentItemList;
+typedef QList<DocumentItem> DocumentItemList;
/** This class provides helper function for saving and reading to XML files.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dom...@us...> - 2008-03-04 11:44:48
|
Revision: 31
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=31&view=rev
Author: domseichter
Date: 2008-03-04 03:44:54 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Some more porting
Modified Paths:
--------------
trunk/src/barcodecombo.cpp
trunk/src/barcodegenerator.cpp
trunk/src/documentitem.h
trunk/src/mimesources.cpp
trunk/src/mimesources.h
trunk/src/xmlutils.h
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-03-04 08:50:46 UTC (rev 30)
+++ trunk/src/barcodecombo.cpp 2008-03-04 11:44:54 UTC (rev 31)
@@ -144,10 +144,10 @@
multi = new QTextEdit( this );
#endif
multi->setTextFormat( Qt::PlainText );
- multi->setWordWrap( QTextEdit::NoWrap );
+ multi->setWordWrapMode( QTextOption::NoWrap );
multi->setEnabled( false );
- multi->setVScrollBarMode( QScrollView::AlwaysOn );
- multi->setHScrollBarMode( QScrollView::AlwaysOn );
+ multi->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
+ multi->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
multi->hide();
connect( multi, SIGNAL( textChanged() ), this, SLOT( changed() ) );
grid->addMultiCellWidget( multi, 3, 3, 1, 3 );
@@ -324,7 +324,7 @@
if( !m_multi )
m_barcode.setValue( data->text() );
else
- m_barcode.setValue( multi->text() );
+ m_barcode.setValue( multi->toPlainText() );
m_barcode.setType( comboStandard->getEncodingType() );
m_barcode.setTextVisible( checkText->isChecked() );
Modified: trunk/src/barcodegenerator.cpp
===================================================================
--- trunk/src/barcodegenerator.cpp 2008-03-04 08:50:46 UTC (rev 30)
+++ trunk/src/barcodegenerator.cpp 2008-03-04 11:44:54 UTC (rev 31)
@@ -39,6 +39,8 @@
#include <qpainter.h>
#include <QPaintDevice>
#include <q3picture.h>
+#include <QDesktopWidget>
+#include <QScrollArea>
#include <QX11Info>
#include <QHBoxLayout>
#include <QVBoxLayout>
@@ -53,7 +55,7 @@
Layout6 = new QVBoxLayout( 0, 0, 6, "Layout2");
widget = new BarcodeWidget( this );
- m_token = new TokenProvider( KApplication::desktop() );
+ m_token = new TokenProvider( KApplication::desktop()->screen() );
widget->setTokenProvider( m_token );
buttonGenerate = new KPushButton( this );
@@ -81,10 +83,10 @@
buttonClose->setIconSet( SmallIconSet("fileclose") );
- QScrollView* sv = new QScrollView( this );
+ QScrollArea* sv = new QScrollArea( this );
- barcode = new QLabel( sv->viewport(), "barcode" );
- sv->addChild( barcode );
+ barcode = new QLabel( NULL );
+ sv->setWidget( barcode );
connect( buttonGenerate, SIGNAL( clicked() ), this, SLOT( generate() ) );
connect( buttonSave, SIGNAL( clicked() ), this, SLOT( save() ) );
connect( buttonPrint, SIGNAL( clicked() ), this, SLOT( print() ) );
@@ -139,22 +141,24 @@
if(!bc.isValid())
{
- KFileDialog fd( ":save_image", KImageIO::pattern( KImageIO::Writing ), this, true );
- fd.setMode( KFile::File );
+ KFileDialog fd( KUrl("kfiledialog:///save_image"),
+ KImageIO::pattern( KImageIO::Writing ), this );
+ fd.setMode( KFile::File | KFile::LocalOnly );
fd.setOperationMode( KFileDialog::Saving );
+
if( fd.exec() == QDialog::Accepted )
{
- QString path = fd.selectedURL().path();
- QString extension = KImageIO::type( path );
+ QString path = fd.selectedUrl().path();
+ QString extension = KImageIO::typeForMime( path ).first();
if( extension.isNull() )
- extension = KImageIO::type( fd.currentFilter() );
+ extension = KImageIO::typeForMime( fd.currentFilter() ).first();
bc.setTokenProvider( m_token );
bc.update( KApplication::desktop() );
- if(!bc.pixmap().save( path, extension, 0 ))
+ if(!bc.pixmap().save( path, extension.toLatin1().data(), 0 ))
KMessageBox::error( this, i18n("An error occurred during saving the image") );
}
}
Modified: trunk/src/documentitem.h
===================================================================
--- trunk/src/documentitem.h 2008-03-04 08:50:46 UTC (rev 30)
+++ trunk/src/documentitem.h 2008-03-04 11:44:54 UTC (rev 31)
@@ -224,7 +224,7 @@
return m_visibilityScript;
}
-typedef QList<DocumentItem> DocumentItemList;
+typedef QList<DocumentItem*> DocumentItemList;
#endif //DOCUMENTITEM_H
Modified: trunk/src/mimesources.cpp
===================================================================
--- trunk/src/mimesources.cpp 2008-03-04 08:50:46 UTC (rev 30)
+++ trunk/src/mimesources.cpp 2008-03-04 11:44:54 UTC (rev 31)
@@ -76,7 +76,7 @@
doc.save( t, 0 );
buffer.close();
- setEncodedData( data );
+ setData( data );
}
}
Modified: trunk/src/mimesources.h
===================================================================
--- trunk/src/mimesources.h 2008-03-04 08:50:46 UTC (rev 30)
+++ trunk/src/mimesources.h 2008-03-04 11:44:54 UTC (rev 31)
@@ -25,7 +25,7 @@
class TokenProvider;
class MyCanvasView;
-class DocumentItemDrag : public QStoredDrag {
+class DocumentItemDrag : public QMimeData {
Q_OBJECT
public:
DocumentItemDrag( QWidget* dragSource = NULL );
Modified: trunk/src/xmlutils.h
===================================================================
--- trunk/src/xmlutils.h 2008-03-04 08:50:46 UTC (rev 30)
+++ trunk/src/xmlutils.h 2008-03-04 11:44:54 UTC (rev 31)
@@ -34,7 +34,7 @@
class QRect;
class QString;
class QWidget;
-typedef QList<DocumentItem> DocumentItemList;
+typedef QList<DocumentItem*> DocumentItemList;
/** This class provides helper function for saving and reading to XML files.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dom...@us...> - 2008-03-04 13:33:04
|
Revision: 32
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=32&view=rev
Author: domseichter
Date: 2008-03-04 05:33:09 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
A few fixes again, not very clean right now. But right now I am trying to get everything to compile as far as possible.
Modified Paths:
--------------
trunk/src/barcodecombo.cpp
trunk/src/barcodecombo.h
trunk/src/barcodegenerator.cpp
trunk/src/barcodeitem.cpp
trunk/src/barkode.cpp
trunk/src/barkode.h
trunk/src/barkodeengine.h
trunk/src/tcanvasitem.h
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/barcodecombo.cpp 2008-03-04 13:33:09 UTC (rev 32)
@@ -101,7 +101,7 @@
{
}
-const char* BarcodeCombo::getEncodingType()
+const QString & BarcodeCombo::getEncodingType()
{
return Barkode::typeFromName( currentText() );
}
Modified: trunk/src/barcodecombo.h
===================================================================
--- trunk/src/barcodecombo.h 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/barcodecombo.h 2008-03-04 13:33:09 UTC (rev 32)
@@ -61,7 +61,7 @@
BarcodeCombo(QWidget *parent=0);
~BarcodeCombo();
- const char* getEncodingType();
+ const QString & getEncodingType();
void setEncodingType( const QString & type );
};
Modified: trunk/src/barcodegenerator.cpp
===================================================================
--- trunk/src/barcodegenerator.cpp 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/barcodegenerator.cpp 2008-03-04 13:33:09 UTC (rev 32)
@@ -172,7 +172,7 @@
if( d.isValid() )
return;
- QPrinter* printer = PrinterSettings::getInstance()->setupPrinter( "kbarcode", this );
+ QPrinter* printer = PrinterSettings::getInstance()->setupPrinter( KUrl("kfiledialog:///kbarcode"), this );
if( !printer )
return;
@@ -213,11 +213,7 @@
DocumentItemDrag* drag = new DocumentItemDrag();
drag->setDocumentItem( &list );
-#if QT_VERSION >= 0x030100
- kapp->clipboard()->setData( drag, QClipboard::Clipboard );
-#else
- kapp->clipboard()->setData( drag );
-#endif
+ kapp->clipboard()->setMimeData( drag, QClipboard::Clipboard );
}
#include "barcodegenerator.moc"
Modified: trunk/src/barcodeitem.cpp
===================================================================
--- trunk/src/barcodeitem.cpp 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/barcodeitem.cpp 2008-03-04 13:33:09 UTC (rev 32)
@@ -156,37 +156,19 @@
void BarcodeItem::draw (QPainter* painter)
{
- if( DocumentItem::paintDevice() && DocumentItem::paintDevice()->isExtDev() )
+ painter->save();
+ drawBarcode( *painter, rect().x(), rect().y() );
+ painter->restore();
+
+ TCanvasItem* citem = canvasItem();
+ if( citem )
{
- painter->save();
-
- // FIXME: What's this?
- /*
- QPaintDeviceMetrics metrics( DocumentItem::paintDevice() );
- double scalex = (double)metrics.logicalDpiX() / (double)QPaintDevice::x11AppDpiX();
- double scaley = (double)metrics.logicalDpiY() / (double)QPaintDevice::x11AppDpiY();
- painter->scale( 1.0 / scalex, 1.0 / scaley );
- */
-
- //painter->drawPixmap( rect().x(), rect().y(), m_pixmap );
- drawBarcode( *painter, rect().x(), rect().y() );
- painter->restore();
+ citem->setSize( Barkode::size().width(), Barkode::size().height() );
}
- else
- {
- painter->save();
- drawBarcode( *painter, rect().x(), rect().y() );
- painter->restore();
+ // TODO: do a bitBlt when device is screen
+ //painter->drawPixmap( rect().x(), rect().y(), m_pixmap );
+ //bitBlt( painter->device(), rect().x(), rect().y(), &m_pixmap, 0, 0, rect().width(), rect().height(), Qt::CopyROP );
- TCanvasItem* citem = canvasItem();
- if( citem )
- {
- citem->setSize( Barkode::size().width(), Barkode::size().height() );
- }
- // TODO: do a bitBlt when device is screen
- //painter->drawPixmap( rect().x(), rect().y(), m_pixmap );
- //bitBlt( painter->device(), rect().x(), rect().y(), &m_pixmap, 0, 0, rect().width(), rect().height(), Qt::CopyROP );
- }
DocumentItem::drawBorder( painter );
}
Modified: trunk/src/barkode.cpp
===================================================================
--- trunk/src/barkode.cpp 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/barkode.cpp 2008-03-04 13:33:09 UTC (rev 32)
@@ -603,7 +603,7 @@
return s_encoding;
}
-const char* Barkode::typeFromName( const QString & name )
+const QString & Barkode::typeFromName( const QString & name )
{
for( unsigned int i = 0; i < s_info.count(); i++ )
if( s_info[i].name == name )
@@ -612,7 +612,7 @@
return NULL;
}
-const char* Barkode::nameFromType( const QString & type )
+const QString & Barkode::nameFromType( const QString & type )
{
for( unsigned int i = 0; i < s_info.count(); i++ )
if( s_info[i].xml == type )
@@ -908,7 +908,7 @@
if( QFile::exists( rules ) )
path = rules;
else
- path = locate( "data", "kbarcode/rules.xml" );
+ path = KStandardDirs::locate( "data", "kbarcode/rules.xml" );
QFile xml( path );
QDomDocument doc;
@@ -920,7 +920,7 @@
if( !xml.open( QIODevice::ReadOnly ) )
{
- qDebug( "Cannot read validation rules from %s\n", path.toLatin1() );
+ qDebug( "Cannot read validation rules from %s\n", path.toLatin1().data() );
return;
}
Modified: trunk/src/barkode.h
===================================================================
--- trunk/src/barkode.h 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/barkode.h 2008-03-04 13:33:09 UTC (rev 32)
@@ -188,11 +188,11 @@
/** Convert the uservisible encoding type @p name
* to the internal identifier
*/
- static const char* typeFromName( const QString & name );
+ static const QString & typeFromName( const QString & name );
/** Convert the internal identifier @p type
* to the user visible encoding name
*/
- static const char* nameFromType( const QString & type );
+ static const QString & nameFromType( const QString & type );
static QString* validatorFromType( const QString & type );
static QString* validatorNotFromType( const QString & type );
Modified: trunk/src/barkodeengine.h
===================================================================
--- trunk/src/barkodeengine.h 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/barkodeengine.h 2008-03-04 13:33:09 UTC (rev 32)
@@ -43,6 +43,8 @@
#include <qsize.h>
+class QPaintDevice;
+
/**
* Inherit from this class if you want to create a
* (barkode engine) for use with KBarcode.
Modified: trunk/src/tcanvasitem.h
===================================================================
--- trunk/src/tcanvasitem.h 2008-03-04 11:44:54 UTC (rev 31)
+++ trunk/src/tcanvasitem.h 2008-03-04 13:33:09 UTC (rev 32)
@@ -16,7 +16,7 @@
*
* The class is also ReferenceCounted!!!
*/
-class TCanvasItem : public QCanvasRectangle, public ReferenceCounted {
+class TCanvasItem : public Q3CanvasRectangle, public ReferenceCounted {
public:
TCanvasItem ( MyCanvasView* cv );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dom...@us...> - 2008-03-04 14:00:44
|
Revision: 33
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=33&view=rev
Author: domseichter
Date: 2008-03-04 06:00:48 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Batchprinter compiles now ... well other stuff still missing. But enough work for me today. University requests some time, too
Modified Paths:
--------------
trunk/src/batchprinter.cpp
trunk/src/zplutils.h
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-03-04 13:33:09 UTC (rev 32)
+++ trunk/src/batchprinter.cpp 2008-03-04 14:00:48 UTC (rev 33)
@@ -26,9 +26,10 @@
// Qt includes
#include <qfile.h>
#include <qpainter.h>
+#include <QBuffer>
#include <QPaintDevice>
#include <QTextStream>
-#include <q3progressdialog.h>
+#include <QProgressDialog>
#include <QList>
#include <QPixmap>
@@ -132,7 +133,7 @@
// labels like article_no etc. (those who are created
// by events.
- for( unsigned int i = 0; i < m_data->count(); i++ )
+ for( int i = 0; i < m_data->count(); i++ )
{
Label l( def, buffer, m_name, printer, m_customer,
(*m_data)[i].article_no, (*m_data)[i].group );
@@ -301,7 +302,7 @@
else
name += m_image_custom_filename;
- QString filename = name + QString("_%1.").arg( i ) + KImageIO::suffix( m_image_format );
+ QString filename = name + QString("_%1.").arg( i ) + m_image_format; //KImageIO::suffix( m_image_format );
unsigned int c = 0;
while( QFile::exists( filename ) ) {
@@ -309,7 +310,7 @@
c++;
}
- pixmap.save( filename, m_image_format );
+ pixmap.save( filename, m_image_format.toLatin1().data() );
if( !checkProgressDialog( progress ) )
{
@@ -326,7 +327,7 @@
delete progress;
delete painter;
- new KRun( m_path );
+ new KRun( KUrl( m_path ), NULL );
}
void BatchPrinter::startBCP()
@@ -503,8 +504,8 @@
QProgressDialog* BatchPrinter::createProgressDialog( const QString & caption )
{
- QProgressDialog* progress = new QProgressDialog( caption, i18n("&Cancel"), m_labels+1, parent );
- progress->setProgress( 0 );
+ QProgressDialog* progress = new QProgressDialog( caption, i18n("&Cancel"), 0, m_labels+1, parent );
+ progress->setValue( 0 );
progress->show();
return progress;
}
@@ -512,8 +513,8 @@
bool BatchPrinter::checkProgressDialog( QProgressDialog* progress )
{
kapp->processEvents( 0 );
- progress->setProgress( progress->progress() + 1 );
- if( progress->wasCancelled() ) {
+ progress->setValue( progress->value() + 1 );
+ if( progress->wasCanceled() ) {
delete progress;
return false;
}
Modified: trunk/src/zplutils.h
===================================================================
--- trunk/src/zplutils.h 2008-03-04 13:33:09 UTC (rev 32)
+++ trunk/src/zplutils.h 2008-03-04 14:00:48 UTC (rev 33)
@@ -33,11 +33,14 @@
public:
BarcodePrinterDevice( double dpix, double dpiy );
- bool isExtDev() const { return true; }
bool paintingActive() const { return false; }
+ protected:
virtual int metric( int e ) const;
-
+
+ QPaintEngine* paintEngine() { return NULL; }
+ QPaintEngine* paintEngine() const { return NULL; }
+
private:
double m_resolution_x;
double m_resolution_y;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-03-04 17:34:07
|
Revision: 41
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=41&view=rev
Author: vzsolt
Date: 2008-03-04 09:34:13 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Alright, I've fixed every error and almost all the warnings.
The remaining warning is not even in barcodedialogs.cpp, but something about overloading the = operator in PixmapBarcode.
Modified Paths:
--------------
trunk/src/dialogs/barcodedialogs.cpp
trunk/src/dialogs/barcodedialogs.h
trunk/src/pixmapbarcode.cpp
trunk/src/pixmapbarcode.h
Modified: trunk/src/dialogs/barcodedialogs.cpp
===================================================================
--- trunk/src/dialogs/barcodedialogs.cpp 2008-03-04 16:23:56 UTC (rev 40)
+++ trunk/src/dialogs/barcodedialogs.cpp 2008-03-04 17:34:13 UTC (rev 41)
@@ -29,6 +29,7 @@
#include <QHBoxLayout>
#include <QVBoxLayout>
+#include <QGridLayout>
// KDE includes
#include <kcombobox.h>
@@ -93,7 +94,7 @@
void AdvancedBarcodeDialog::setData( Barkode* b )
{
- for ( unsigned int i = 0; i < list.count(); i++ )
+ for ( int i = 0; i < list.count(); i++ )
{
BarcodeDlgBase* bdb = list.at( i );
bdb->setData( b );
@@ -102,7 +103,7 @@
void AdvancedBarcodeDialog::getData( Barkode* b )
{
- for ( unsigned int i = 0; i < list.count(); i++ )
+ for ( int i = 0; i < list.count(); i++ )
{
BarcodeDlgBase* bdb = list.at( i );
bdb->getData( b );
@@ -123,7 +124,8 @@
spinHeight = new KIntNumInput( this );
spinHeight->setLabel( i18n( "Barcode Height (mm):" ), Qt::AlignLeft | Qt::AlignVCenter );
- spinHeight->setRange( 1, 1000, 10, false );
+ spinHeight->setRange( 1, 1000, 10 );
+ spinHeight->setSliderEnabled( false );
checkEscape = new QCheckBox( i18n( "&Translate escape sequences" ), this );
checkAbove = new QCheckBox( i18n( "&Text above barcode" ), this );
@@ -135,8 +137,6 @@
label->setBuddy( comboCheckSum );
QHBoxLayout * hbox = new QHBoxLayout( this );
- hbox->setSpacing( 6 );
- hbox->setMargins( 6 );
hbox->addWidget( label );
hbox->addWidget( comboCheckSum );
@@ -148,9 +148,9 @@
layout->addWidget( checkAutoCorrect );
layout->addLayout( hbox );
- QToolTip::add( spinModule, i18n( "<qt>Change the module width used by TBarcode. Take a look into the "
+ spinModule->setToolTip( "<qt>Change the module width used by TBarcode. Take a look into the "
"TBarcode documentation for details. Normally you do not want to change "
- "this value.</qt>" ) );
+ "this value.</qt>" );
setLayout( layout );
}
@@ -237,7 +237,7 @@
int currentIndex = comboCheckSum->findText( map[options->checksum()] );
- comboCheckSum->setCurrentItem( currentIndex );
+ comboCheckSum->setCurrentIndex( currentIndex );
}
}
@@ -266,16 +266,19 @@
spinRow = new KIntNumInput( this );
spinRow->setLabel( i18n( "Rows:" ), Qt::AlignLeft | Qt::AlignVCenter );
- spinRow->setRange( 0, 90, 1, true );
-
- spinCol = new KIntNumInput( spinRow, 0, this );
+ spinRow->setRange( 0, 90, 1 );
+ spinRow->setSliderEnabled( true );
+
+ spinCol = new KIntNumInput( this );
spinCol->setLabel( i18n( "Columns:" ), Qt::AlignLeft | Qt::AlignVCenter );
- spinCol->setRange( 0, 30, 1, true );
-
- spinErr = new KIntNumInput( spinCol, 0, this );
+ spinCol->setRange( 0, 30, 1 );
+ spinCol->setSliderEnabled( true );
+
+ spinErr = new KIntNumInput( this );
spinErr->setLabel( i18n( "Error correction level:" ), Qt::AlignLeft | Qt::AlignVCenter );
- spinErr->setRange( 1, 8, 1, true );
-
+ spinErr->setRange( 1, 8, 1 );
+ spinCol->setSliderEnabled( true );
+
layout->addWidget( spinRow );
layout->addWidget( spinCol );
layout->addWidget( spinErr );
@@ -355,12 +358,12 @@
void DataMatrixDlg::setData( Barkode* b )
{
- comboDataMatrix->setCurrentItem( b->datamatrixSize() );
+ comboDataMatrix->setCurrentIndex( b->datamatrixSize() );
}
void DataMatrixDlg::getData( Barkode* b ) const
{
- b->setDatamatrixSize( comboDataMatrix->currentItem() );
+ b->setDatamatrixSize( comboDataMatrix->currentIndex() );
}
SequenceDlg::SequenceDlg( QWidget *parent )
@@ -376,12 +379,14 @@
spinStep = new KIntNumInput( this );
spinStep->setLabel( i18n( "Step:" ), Qt::AlignLeft | Qt::AlignVCenter );
- spinStep->setRange( -100, 100, 1, false );
-
- spinStart = new KIntNumInput( spinStep, 1, this );
+ spinStep->setRange( -100, 100, 1 );
+ spinStep->setSliderEnabled( false );
+
+ spinStart = new KIntNumInput( 1, this );
spinStart->setLabel( i18n( "Start:" ), Qt::AlignLeft | Qt::AlignVCenter );
- spinStart->setRange( -100000, 100000, 1, false );
-
+ spinStart->setRange( -100000, 100000, 1 );
+ spinStart->setSliderEnabled( false );
+
layout->addWidget( checkSequence );
layout->addWidget( radioNumbers );
layout->addWidget( radioAlpha );
@@ -441,7 +446,7 @@
ColorDlg::ColorDlg( QWidget *parent )
: QWidget( parent )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
+ QGridLayout* layout = new QGridLayout( this );
buttonBarColor = new KColorButton( this );
buttonBackColor = new KColorButton( this );
Modified: trunk/src/dialogs/barcodedialogs.h
===================================================================
--- trunk/src/dialogs/barcodedialogs.h 2008-03-04 16:23:56 UTC (rev 40)
+++ trunk/src/dialogs/barcodedialogs.h 2008-03-04 17:34:13 UTC (rev 41)
@@ -151,7 +151,7 @@
/** A configuration widget for colors in pure postscript barcodes
* @author Dominik Seichter
*/
-class ColorDlg : public QVBox, public BarcodeDlgBase {
+class ColorDlg : public QWidget, public BarcodeDlgBase {
Q_OBJECT
public:
ColorDlg(QWidget *parent=0);
Modified: trunk/src/pixmapbarcode.cpp
===================================================================
--- trunk/src/pixmapbarcode.cpp 2008-03-04 16:23:56 UTC (rev 40)
+++ trunk/src/pixmapbarcode.cpp 2008-03-04 17:34:13 UTC (rev 41)
@@ -87,19 +87,20 @@
{
}
-const PixmapBarcode & PixmapBarcode::operator=( const BarkodeEngine & rhs )
-{
- const PixmapBarcode* pix = dynamic_cast<const PixmapBarcode*>(&rhs);
+// FIXME: do we need this one?
+// const PixmapBarcode & PixmapBarcode::operator=( const BarkodeEngine & rhs )
+// {
+// const PixmapBarcode* pix = dynamic_cast<const PixmapBarcode*>(&rhs);
+//
+// if( pix )
+// {
+// m_pdf417_options = pix->m_pdf417_options;
+// p = pix->p;
+// }
+//
+// return *this;
+// }
- if( pix )
- {
- m_pdf417_options = pix->m_pdf417_options;
- p = pix->p;
- }
-
- return *this;
-}
-
const QSize PixmapBarcode::size() const
{
return ( p.size().isNull() ? QSize( 100, 80 ) : p.size() );
Modified: trunk/src/pixmapbarcode.h
===================================================================
--- trunk/src/pixmapbarcode.h 2008-03-04 16:23:56 UTC (rev 40)
+++ trunk/src/pixmapbarcode.h 2008-03-04 17:34:13 UTC (rev 41)
@@ -63,8 +63,12 @@
PixmapBarcode();
~PixmapBarcode();
- const PixmapBarcode & operator=( const BarkodeEngine & rhs );
+ // This isn't right...
+ // warning: ‘virtual const PixmapBarcode& PixmapBarcode::operator=(const BarkodeEngine&)’ was hidden
+ // warning: by ‘PurePostscriptBarcode& PurePostscriptBarcode::operator=(const PurePostscriptBarcode&)’
+ // virtual const PixmapBarcode & operator=( const BarkodeEngine & rhs );
+
inline EEngine engine() const;
const QSize size() const;
void update( const QPaintDevice* device );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-03-04 17:35:49
|
Revision: 42
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=42&view=rev
Author: vzsolt
Date: 2008-03-04 09:35:54 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Reverted my last changes to these files. (Back to the original condition.)
Modified Paths:
--------------
trunk/src/pixmapbarcode.cpp
trunk/src/pixmapbarcode.h
Modified: trunk/src/pixmapbarcode.cpp
===================================================================
--- trunk/src/pixmapbarcode.cpp 2008-03-04 17:34:13 UTC (rev 41)
+++ trunk/src/pixmapbarcode.cpp 2008-03-04 17:35:54 UTC (rev 42)
@@ -87,20 +87,19 @@
{
}
-// FIXME: do we need this one?
-// const PixmapBarcode & PixmapBarcode::operator=( const BarkodeEngine & rhs )
-// {
-// const PixmapBarcode* pix = dynamic_cast<const PixmapBarcode*>(&rhs);
-//
-// if( pix )
-// {
-// m_pdf417_options = pix->m_pdf417_options;
-// p = pix->p;
-// }
-//
-// return *this;
-// }
+const PixmapBarcode & PixmapBarcode::operator=( const BarkodeEngine & rhs )
+{
+ const PixmapBarcode* pix = dynamic_cast<const PixmapBarcode*>(&rhs);
+ if( pix )
+ {
+ m_pdf417_options = pix->m_pdf417_options;
+ p = pix->p;
+ }
+
+ return *this;
+}
+
const QSize PixmapBarcode::size() const
{
return ( p.size().isNull() ? QSize( 100, 80 ) : p.size() );
Modified: trunk/src/pixmapbarcode.h
===================================================================
--- trunk/src/pixmapbarcode.h 2008-03-04 17:34:13 UTC (rev 41)
+++ trunk/src/pixmapbarcode.h 2008-03-04 17:35:54 UTC (rev 42)
@@ -63,12 +63,8 @@
PixmapBarcode();
~PixmapBarcode();
- // This isn't right...
- // warning: ‘virtual const PixmapBarcode& PixmapBarcode::operator=(const BarkodeEngine&)’ was hidden
- // warning: by ‘PurePostscriptBarcode& PurePostscriptBarcode::operator=(const PurePostscriptBarcode&)’
+ const PixmapBarcode & operator=( const BarkodeEngine & rhs );
- // virtual const PixmapBarcode & operator=( const BarkodeEngine & rhs );
-
inline EEngine engine() const;
const QSize size() const;
void update( const QPaintDevice* device );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-03-04 20:34:43
|
Revision: 45
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=45&view=rev
Author: vzsolt
Date: 2008-03-04 12:34:48 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Finished ConfigDialog, no more errors or warnings.
This is my last one for today, I still have to study some Java for the university :D
Modified Paths:
--------------
trunk/src/dialogs/configdialog.cpp
trunk/src/dialogs/configdialog.h
trunk/src/sqltables.h
Modified: trunk/src/dialogs/configdialog.cpp
===================================================================
--- trunk/src/dialogs/configdialog.cpp 2008-03-04 20:02:37 UTC (rev 44)
+++ trunk/src/dialogs/configdialog.cpp 2008-03-04 20:34:48 UTC (rev 45)
@@ -20,13 +20,13 @@
#include "sqltables.h"
// Qt includes
-#include <q3buttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <QCheckBox>
+#include <QLabel>
+#include <QLayout>
+#include <QRadioButton>
+#include <QGroupBox>
#include <qsqldatabase.h>
-#include <qtooltip.h>
+#include <QToolTip>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QFrame>
@@ -39,6 +39,7 @@
#include <kcolorbutton.h>
#include <kiconloader.h>
#include <kimageio.h>
+#include <kicon.h>
#include <klineedit.h>
#include <klocale.h>
#include <kcombobox.h>
@@ -46,16 +47,19 @@
#include <kmessagebox.h>
#include <kpushbutton.h>
#include <kglobal.h>
+#include <kvbox.h>
+#include <kpagewidgetmodel.h>
-const QString cached = I18N_NOOP("There are currently %1 cached barcodes.");
+const QString cached = I18N_NOOP( "There are currently %1 cached barcodes." );
+
using namespace KABC;
ConfigDialog::ConfigDialog( QWidget* parent )
- : KDialog( parent )
+ : KPageDialog( parent )
{
- setFaceType( List );
- setCaption( i18n("Configure KBarcode") );
- setButtons( KDialog::Ok|KDialog::Cancel );
+ setFaceType( KPageDialog::List );
+ setCaption( i18n( "Configure KBarcode" ) );
+ setButtons( KDialog::Ok | KDialog::Cancel );
setDefaultButton( KDialog::Ok );
setModal( true );
@@ -74,7 +78,7 @@
{
KVBox* page = new KVBox();
KPageWidgetItem* item = addPage( page, i18n( "SQL Settings" ) );
- item->setIcon( BarIcon( "connect_no" ) );
+ item->setIcon( KIcon( "connect_no" ) );
sqlwidget = new SqlWidget( false, page );
@@ -88,7 +92,7 @@
KVBox* page = new KVBox();
KPageWidgetItem* item = addPage( page, i18n( "Print Settings" ) );
- item->setIcon( BarIcon( "fileprint" ) );
+ item->setIcon( KIcon( "fileprint" ) );
QHBoxLayout* Layout0 = new QHBoxLayout( page );
QHBoxLayout* Layout1 = new QHBoxLayout( page );
@@ -136,12 +140,12 @@
QWidget* page = new QWidget( this );
KPageWidgetItem* item = addPage( page, i18n( "Import" ) );
- item->setIcon( BarIcon( "fileimport" ) );
+ item->setIcon( KIcon( "fileimport" ) );
- QGridLayout* grid = new QGridLayout( box, 2, 2 );
+ QGridLayout* grid = new QGridLayout( page );
QLabel* label = new QLabel( page );
- label->setText( i18n("Comment:") );
+ label->setText( i18n( "Comment:" ) );
grid->addWidget( label, 0, 0 );
comment = new KLineEdit( lb->comment, page );
@@ -155,47 +159,47 @@
grid->addWidget( separator, 1, 1 );
label = new QLabel( page );
- label->setText( i18n("Quote Character:") );
+ label->setText( i18n( "Quote Character:" ) );
grid->addWidget( label, 2, 0 );
quote = new KLineEdit( lb->quote, page );
grid->addWidget( quote, 2, 1 );
- checkUseCustomNo = new QCheckBox( i18n("&Use customer article no. for import"), page );
+ checkUseCustomNo = new QCheckBox( i18n( "&Use customer article no. for import" ), page );
checkUseCustomNo->setChecked( lb->useCustomNo );
-
+
grid->addWidget( checkUseCustomNo, 3, 0, 1, 2 );
-
- QHBoxLayout* Layout1 = new QHBoxLayout( 0 );
- Layout1->addWidget( new QLabel( i18n("File Format:"), page ) );
+ QHBoxLayout* Layout1 = new QHBoxLayout( page );
+ Layout1->addWidget( new QLabel( i18n( "File Format:" ), page ) );
+
combo1 = new KComboBox( page );
- combo1->addItem( i18n("Quantity") );
- combo1->addItem( i18n("Article Number") );
- combo1->addItem( i18n("Group") );
+ combo1->addItem( i18n( "Quantity" ) );
+ combo1->addItem( i18n( "Article Number" ) );
+ combo1->addItem( i18n( "Group" ) );
Layout1->addWidget( combo1 );
combo2 = new KComboBox( page );
- combo2->addItem( i18n("Quantity") );
- combo2->addItem( i18n("Article Number") );
- combo2->addItem( i18n("Group") );
+ combo2->addItem( i18n( "Quantity" ) );
+ combo2->addItem( i18n( "Article Number" ) );
+ combo2->addItem( i18n( "Group" ) );
Layout1->addWidget( combo2 );
combo3 = new KComboBox( page );
- combo3->addItem( i18n("Quantity") );
- combo3->addItem( i18n("Article Number") );
- combo3->addItem( i18n("Group") );
+ combo3->addItem( i18n( "Quantity" ) );
+ combo3->addItem( i18n( "Article Number" ) );
+ combo3->addItem( i18n( "Group" ) );
Layout1->addWidget( combo3 );
grid->addLayout( Layout1, 4, 0, 1, 2 );
QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
grid->addItem( spacer, 5, 0 );
-
- KConfigGroup config = KGlobal::config()->group("FileFormat");
- combo1->setCurrentIndex( config.readEntry("Data0", 0 ) );
- combo2->setCurrentIndex( config.readEntry("Data1", 1 ) );
- combo3->setCurrentIndex( config.readEntry("Data2", 2 ) );
+ KConfigGroup config = KGlobal::config()->group( "FileFormat" );
+ combo1->setCurrentIndex( config.readEntry( "Data0", 0 ) );
+ combo2->setCurrentIndex( config.readEntry( "Data1", 1 ) );
+ combo3->setCurrentIndex( config.readEntry( "Data2", 2 ) );
+
page->setLayout( grid );
}
@@ -203,70 +207,69 @@
{
QWidget* page = new QWidget( this );
KPageWidgetItem* item = addPage( page, i18n( "Label Editor" ) );
- item->setIcon( BarIcon( "kbarcode" ) );
+ item->setIcon( KIcon( "kbarcode" ) );
- QGridLayout* tabLayout = new QGridLayout( box, 11, 6 );
+ QGridLayout* tabLayout = new QGridLayout( page );
checkNewDlg = new QCheckBox( page );
- checkNewDlg->setText( i18n("&Create a new label on startup") );
+ checkNewDlg->setText( i18n( "&Create a new label on startup" ) );
date = new KLineEdit( page );
labelDate = new QLabel( page );
-
+
connect( date, SIGNAL( textChanged( const QString & ) ), this, SLOT( updateDatePreview() ) );
spinGrid = new KIntNumInput( 0, page );
- spinGrid->setLabel( i18n("Grid:" ), Qt::AlignLeft | Qt::AlignVCenter );
- spinGrid->setRange(2, 100, 1 );
+ spinGrid->setLabel( i18n( "Grid:" ), Qt::AlignLeft | Qt::AlignVCenter );
+ spinGrid->setRange( 2, 100, 1 );
spinGrid->setSliderEnabled( false );
-
+
colorGrid = new KColorButton( page );
tabLayout->addWidget( checkNewDlg, 0, 0 );
tabLayout->addWidget( spinGrid, 1, 0, 1, 2 );
- tabLayout->addWidget( new QLabel( i18n("Grid Color:"), page ), 2, 0 );
+ tabLayout->addWidget( new QLabel( i18n( "Grid Color:" ), page ), 2, 0 );
tabLayout->addWidget( colorGrid, 2, 1 );
- tabLayout->addWidget( new QLabel( i18n("Date Format:"), page ), 3, 0 );
+ tabLayout->addWidget( new QLabel( i18n( "Date Format:" ), page ), 3, 0 );
tabLayout->addWidget( date, 3, 1 );
tabLayout->addWidget( labelDate, 3, 2 );
-
- page.setLayout( tabLayout );
+
+ page->setLayout( tabLayout );
}
void ConfigDialog::setupTab5()
{
labelprinterdata* lb = PrinterSettings::getInstance()->getData();
-
+
KVBox* page = new KVBox();
KPageWidgetItem* item = addPage( page, i18n( "On New" ) );
- item->setIcon( BarIcon( "filenew" ) );
-
- QButtonGroup* bg = new QButtonGroup( i18n("On New Article"), page );
- bg->setColumnLayout(0, Qt::Vertical );
- QGridLayout* bgLayout = new QGridLayout( bg->layout() );
+ item->setIcon( KIcon( "filenew" ) );
QStringList alist, glist;
- alist.append( i18n("No Line Break") );
- alist.append( i18n("Line Break") );
- alist.append( i18n("Insert Label X") );
- alist.append( i18n("New Page") );
- alist.append( i18n("Article No.") );
+ alist.append( i18n( "No Line Break" ) );
+ alist.append( i18n( "Line Break" ) );
+ alist.append( i18n( "Insert Label X" ) );
+ alist.append( i18n( "New Page" ) );
+ alist.append( i18n( "Article No." ) );
- glist.append( i18n("No Line Break") );
- glist.append( i18n("Line Break") );
- glist.append( i18n("Insert Label X") );
- glist.append( i18n("New Page") );
- glist.append( i18n("Group Name") );
+ glist.append( i18n( "No Line Break" ) );
+ glist.append( i18n( "Line Break" ) );
+ glist.append( i18n( "Insert Label X" ) );
+ glist.append( i18n( "New Page" ) );
+ glist.append( i18n( "Group Name" ) );
+ QGroupBox* bg = new QGroupBox( i18n( "On New Article" ), page );
+ QGridLayout* bgLayout = new QGridLayout( bg );
+
onNewArticle1 = new KComboBox( false, bg );
onNewArticle2 = new KComboBox( false, bg );
onNewArticle3 = new KComboBox( false, bg );
onNewArticle4 = new KComboBox( false, bg );
- onNewArticle1->insertStringList( alist );
- onNewArticle2->insertStringList( alist );
- onNewArticle3->insertStringList( alist );
- onNewArticle4->insertStringList( alist );
+ onNewArticle1->insertItems( 0, alist );
+ onNewArticle2->insertItems( 0, alist );
+ onNewArticle3->insertItems( 0, alist );
+ onNewArticle4->insertItems( 0, alist );
bgLayout->setColumnStretch( 1, 3 );
@@ -280,19 +283,20 @@
bgLayout->addWidget( onNewArticle3, 2, 1 );
bgLayout->addWidget( onNewArticle4, 3, 1 );
- QButtonGroup* bg2 = new QButtonGroup( i18n("On New Group"), page );
- bg2->setColumnLayout(0, Qt::Vertical );
- QGridLayout* bg2Layout = new QGridLayout( bg2->layout() );
+ bg->setLayout( bgLayout );
+ QGroupBox* bg2 = new QGroupBox( i18n( "On New Group" ), page );
+ QGridLayout* bg2Layout = new QGridLayout( bg2 );
+
onNewGroup1 = new KComboBox( false, bg2 );
onNewGroup2 = new KComboBox( false, bg2 );
onNewGroup3 = new KComboBox( false, bg2 );
onNewGroup4 = new KComboBox( false, bg2 );
- onNewGroup1->insertStringList( glist );
- onNewGroup2->insertStringList( glist );
- onNewGroup3->insertStringList( glist );
- onNewGroup4->insertStringList( glist );
+ onNewGroup1->insertItems( 0, glist );
+ onNewGroup2->insertItems( 0, glist );
+ onNewGroup3->insertItems( 0, glist );
+ onNewGroup4->insertItems( 0, glist );
bg2Layout->setColumnStretch( 1, 3 );
@@ -306,6 +310,8 @@
bg2Layout->addWidget( onNewGroup3, 2, 1 );
bg2Layout->addWidget( onNewGroup4, 3, 1 );
+ bg2->setLayout( bg2Layout );
+
onNewArticle1->setCurrentIndex( lb->articleEvent1 );
onNewArticle2->setCurrentIndex( lb->articleEvent2 );
onNewArticle3->setCurrentIndex( lb->articleEvent3 );
@@ -319,12 +325,12 @@
void ConfigDialog::accept()
{
- KConfigGroup config = KGlobal::config()->group("FileFormat");
-
- config.writeEntry("Data0", combo1->currentIndex() );
- config.writeEntry("Data1", combo2->currentIndex() );
- config.writeEntry("Data2", combo3->currentIndex() );
+ KConfigGroup config = KGlobal::config()->group( "FileFormat" );
+ config.writeEntry( "Data0", combo1->currentIndex() );
+ config.writeEntry( "Data1", combo2->currentIndex() );
+ config.writeEntry( "Data2", combo3->currentIndex() );
+
sqlwidget->save();
labelprinterdata* lpdata = PrinterSettings::getInstance()->getData();
@@ -344,16 +350,21 @@
lpdata->groupEvent4 = onNewGroup4->currentIndex();
lpdata->useCustomNo = checkUseCustomNo->isChecked();
- switch( printerQuality->currentIndex() ) {
+ switch ( printerQuality->currentIndex() )
+ {
+
case 0:
lpdata->quality = PrinterSettings::Middle;
break;
+
case 1:
lpdata->quality = PrinterSettings::High;
break;
+
case 2:
lpdata->quality = PrinterSettings::VeryHigh;
break;
+
default:
break;
}
@@ -363,7 +374,7 @@
void ConfigDialog::updateDatePreview()
{
- labelDate->setText( i18n("Preview: ") + QDateTime::currentDateTime().toString( date->text() ) );
+ labelDate->setText( i18n( "Preview: " ) + QDateTime::currentDateTime().toString( date->text() ) );
}
#include "configdialog.moc"
Modified: trunk/src/dialogs/configdialog.h
===================================================================
--- trunk/src/dialogs/configdialog.h 2008-03-04 20:02:37 UTC (rev 44)
+++ trunk/src/dialogs/configdialog.h 2008-03-04 20:34:48 UTC (rev 45)
@@ -18,7 +18,7 @@
#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H
-#include <kdialog.h>
+#include <kpagedialog.h>
struct labelprinterdata;
struct mysqldata;
@@ -37,7 +37,7 @@
/** KBarcodes configuration dialog for advanced settings.
*/
-class ConfigDialog : public KDialog {
+class ConfigDialog : public KPageDialog {
Q_OBJECT
public:
ConfigDialog( QWidget* parent );
Modified: trunk/src/sqltables.h
===================================================================
--- trunk/src/sqltables.h 2008-03-04 20:02:37 UTC (rev 44)
+++ trunk/src/sqltables.h 2008-03-04 20:34:48 UTC (rev 45)
@@ -71,6 +71,8 @@
*/
class SqlDescription {
public:
+ virtual ~SqlDescription() {}
+
/** return the name of the database we can always
* use to connect to this database.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vz...@us...> - 2008-03-04 23:29:28
|
Revision: 46
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=46&view=rev
Author: vzsolt
Date: 2008-03-04 15:29:33 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
I've removed KActionMap as we've discussed.
Modified Paths:
--------------
trunk/src/CMakeLists.txt
trunk/src/mainwindow.cpp
Removed Paths:
-------------
trunk/src/kactionmap.cpp
trunk/src/kactionmap.h
Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt 2008-03-04 20:34:48 UTC (rev 45)
+++ trunk/src/CMakeLists.txt 2008-03-04 23:29:33 UTC (rev 46)
@@ -27,7 +27,6 @@
gnubarcode.cpp
gnubarkodeengine.cpp
imageitem.cpp
- kactionmap.cpp
kbarcode.cpp
kbarcodesettings.cpp
label.cpp
Deleted: trunk/src/kactionmap.cpp
===================================================================
--- trunk/src/kactionmap.cpp 2008-03-04 20:34:48 UTC (rev 45)
+++ trunk/src/kactionmap.cpp 2008-03-04 23:29:33 UTC (rev 46)
@@ -1,190 +0,0 @@
-/***************************************************************************
- kactionmap.cpp - description
- -------------------
- begin : Fri Mai 19 2006
- copyright : (C) 2006 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "kactionmap.h"
-
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmenubar.h>
-#include <qmenudata.h>
-#include <qpixmap.h>
-#include <q3popupmenu.h>
-#include <qregexp.h>
-#include <q3vbox.h>
-//Added by qt3to4:
-#include <QVBoxLayout>
-
-#include <kaction.h>
-#include <kapplication.h>
-#include <k3listview.h>
-#if KDE_VERSION >= 0x030500
-#include <k3listviewsearchline.h>
-#endif
-#include <klocale.h>
-
-class KListViewActionItem : public KListViewItem {
-public:
- KListViewActionItem( KListView* parent, KAction* action )
- : KListViewItem( parent ), m_action( action )
- {
- QPixmap pix;
- QSize size = QIcon::iconSize( QIcon::Large );
- QIcon iconset = m_action->iconSet( KIconLoader::Panel, KIconLoader::SizeLarge );
- QRegExp regtag( "<[^>]*>" );
-
- pix = iconset.pixmap( QIcon::Large, QIcon::Normal ); // m_action->isEnabled() ? QIconSet::Normal : QIconSet::Disabled );
- if( pix.isNull() )
- {
- pix.resize( size );
- pix.fill( backgroundColor() );
- }
- else
- {
- if( pix.size() != size )
- {
- pix = pix.convertToImage().smoothScale( size );
- }
- }
-
- setText( 0, m_action->plainText() );
- setText( 1, m_action->shortcutText() );
- // replace HTML tags in What's this help
- setText( 2, m_action->whatsThis().replace( regtag, "" ) );
- setPixmap( 0, pix );
- }
-
- void paintCell( QPainter *p, const QColorGroup &cg,
- int column, int width, int alignment )
- {
- QColorGroup _cg( cg );
- QColor c = _cg.text();
- if( m_action && !m_action->isEnabled() )
- _cg.setColor( QColorGroup::Text, Qt::gray );
-
- KListViewItem::paintCell( p, _cg, column, width, alignment );
- _cg.setColor( QColorGroup::Text, c );
- }
-
- inline KAction* action() const
- {
- return m_action;
- }
-
-private:
- KAction* m_action;
-};
-
-KActionMapDlg::KActionMapDlg( KActionCollection* actions, QWidget* parent )
- : KDialogBase( parent, false, i18n("Action Map"), KDialogBase::Close, KDialogBase::Close )
-{
- KVBox *page = makeVBoxMainWidget();
-
- new QLabel( i18n("Find and execute actions."), page );
- m_map = new KActionMap( actions, page );
-
- show();
-}
-
-void KActionMapDlg::updateEnabledState()
-{
- m_map->updateEnabledState();
-}
-
-KActionMap::KActionMap( KActionCollection* actions, QWidget* parent )
- : QWidget( parent ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false )
-{
- QVBoxLayout* layout = new QVBoxLayout( this );
-
- m_listView = new KListView( this );
-#if KDE_VERSION >= 0x030500
- m_searchLine = new KListViewSearchLineWidget( m_listView, this );
-#endif
-
- m_listView->addColumn( i18n("Action") );
- m_listView->addColumn( i18n("Shortcut") );
- m_listView->addColumn( i18n("Description") );
- m_listView->setColumnWidthMode( 0, QListView::Maximum );
- m_listView->setColumnWidthMode( 1, QListView::Maximum );
- m_listView->setColumnWidthMode( 2, QListView::Manual );
- m_listView->setSorting( 0 );
- m_listView->setAllColumnsShowFocus( true );
-
-#if KDE_VERSION >= 0x030500
- layout->addWidget( m_searchLine );
-#endif
- layout->addWidget( m_listView );
-
- connect( m_listView, SIGNAL( executed( QListViewItem* ) ), this, SLOT( slotExecuteAction( QListViewItem* ) ) );
- connect( actions, SIGNAL( inserted( KAction* ) ), this, SLOT( slotActionCollectionChanged() ) );
- connect( actions, SIGNAL( removed( KAction* ) ), this, SLOT( slotActionCollectionChanged() ) );
- slotActionCollectionChanged();
-}
-
-KActionMap::~KActionMap()
-{
-
-}
-
-void KActionMap::slotActionCollectionChanged()
-{
- KActionPtrList actions;
- KActionPtrList::const_iterator it;
-
- m_listView->clear();
-
- if( !m_actions )
- return;
-
- actions = m_actions->actions();
- it = actions.begin();
-
- while( it != actions.end() )
- {
- /*
- if( m_showMenuTree )
- {
- }
- */
-
- new KListViewActionItem( m_listView, (*it) );
-
- connect( *it, SIGNAL( enabled(bool) ), this, SLOT( updateEnabledState() ) );
-
- ++it;
- }
-
-}
-
-void KActionMap::slotExecuteAction( QListViewItem* item )
-{
- KListViewActionItem* action = dynamic_cast<KListViewActionItem*>(item);
- if( !action )
- return;
-
- if( !action->action()->isEnabled() )
- return;
-
- action->action()->activate();
-}
-
-void KActionMap::updateEnabledState()
-{
- m_listView->repaintContents();
-}
-
-#include "kactionmap.moc"
Deleted: trunk/src/kactionmap.h
===================================================================
--- trunk/src/kactionmap.h 2008-03-04 20:34:48 UTC (rev 45)
+++ trunk/src/kactionmap.h 2008-03-04 23:29:33 UTC (rev 46)
@@ -1,101 +0,0 @@
-/***************************************************************************
- kactionmap.h - description
- -------------------
- begin : Fri Mai 19 2006
- copyright : (C) 2006 by Dominik Seichter
- email : dom...@we...
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef _KACTION_MAP_H_
-#define _KACTION_MAP_H_
-
-#include <qwidget.h>
-#include <kdeversion.h>
-#include <kdialogbase.h>
-
-class KActionCollection;
-class KActionMap;
-#if KDE_VERSION >= 0x030500
-class KListViewSearchLineWidget;
-#endif
-class KListView;
-class QListViewItem;
-
-/** Open a simple dialog containing an action map.
- */
-class KActionMapDlg : public KDialogBase {
- public:
- KActionMapDlg( KActionCollection* actions, QWidget* parent = NULL );
-
- /** Call this function whenever you changed the enabled/disalbed state of an action
- * in your application.
- */
- void updateEnabledState();
-
- private:
- KActionMap* m_map;
-};
-
-/**
- *
- * This class is an implementation of an Action Map for KDE.
- *
- *
- * What is an Action Map?
- *
- * Almost every web page has a site map. According to Wikipedia,
- * a site map "helps visitors, and search engine robots, to find
- * pages on the site". Similar an Action Map should help the
- * user to find actions (i.e. functions or menu items) in an application.
- *
- * More concrete an Action Map is a dialog with a list of all
- * actions (i.e. make text bold, save file or insert image)
- * that can be performed in the application at its current state.
- * Additionally there is a search box at the top of the list so
- * that the user can search the list easily for a special action.
- * The action is executed by clicking on it. Disabled actions are
- * grayed out and cannot be clicked. The dialog is modeless so that
- * it can always be open and the normal usage of the application is not disturbed.
- */
-class KActionMap : public QWidget {
- Q_OBJECT
- public:
- /** Creates a new KActionMap widget
- * @param action all actions from this KActionCollection are displayed.
- * @param parent the parent
- * @param name the name
- */
- KActionMap( KActionCollection* actions, QWidget* parent = NULL );
- ~KActionMap();
-
- public slots:
- /** Call this function whenever you changed the enabled/disalbed state of an action
- * in your application.
- */
- void updateEnabledState();
-
- private slots:
- void slotActionCollectionChanged();
- void slotExecuteAction( QListViewItem* item );
-
- private:
- KActionCollection* m_actions;
- KListView* m_listView;
-#if KDE_VERSION >= 0x030500
- KListViewSearchLineWidget* m_searchLine;
-#endif
-
- bool m_showMenuTree;
- bool m_grayOutItems;
-};
-
-#endif // _KACTION_MAP_H_
Modified: trunk/src/mainwindow.cpp
===================================================================
--- trunk/src/mainwindow.cpp 2008-03-04 20:34:48 UTC (rev 45)
+++ trunk/src/mainwindow.cpp 2008-03-04 23:29:33 UTC (rev 46)
@@ -14,7 +14,6 @@
#include "confwizard.h"
#include "printersettings.h"
#include "kbarcodesettings.h"
-// #include "kactionmap.h" - is it neccessary?
#include "barkode.h"
// Qt includes
@@ -263,12 +262,4 @@
return text;
}
-// TODO: Do something about action maps, after porting to the new KAction API
-/*
-void MainWindow::slotFunctionMap()
-{
- new KActionMapDlg( actionCollection(), this );
-}
-*/
-
#include "mainwindow.moc"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|