|
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.
|