@ -20,17 +20,17 @@
# include "purepostscript.h"
# include "tbarcode2.h"
// Qt includes
# include < qbuttongroup.h>
# include < qcheckbox.h>
# include < qgroupbox.h>
# include < qlabel.h>
# include < qlayout.h>
# include < qmap.h>
# include < qradiobutton.h>
# include < qtooltip.h>
# include < qvbox.h>
# include < qvgroupbox.h>
// T Qt includes
# include < t qbuttongroup.h>
# include < t qcheckbox.h>
# include < t qgroupbox.h>
# include < t qlabel.h>
# include < t qlayout.h>
# include < t qmap.h>
# include < t qradiobutton.h>
# include < t qtooltip.h>
# include < t qvbox.h>
# include < t qvgroupbox.h>
// KDE includes
# include <kcombobox.h>
@ -39,43 +39,43 @@
# include <kcolorbutton.h>
AdvancedBarcodeDialog : : AdvancedBarcodeDialog ( QString type , QWidget* parent, const char * name )
AdvancedBarcodeDialog : : AdvancedBarcodeDialog ( T QString type , T QWidget* tq parent, const char * name )
: KDialogBase ( KDialogBase : : Tabbed , i18n ( " Barcode Settings " ) ,
KDialogBase : : Ok | KDialogBase : : Cancel , KDialogBase : : Ok , parent, name )
KDialogBase : : Ok | KDialogBase : : Cancel , KDialogBase : : Ok , tq parent, name )
{
list . setAutoDelete ( false ) ;
if ( Barkode : : hasFeature ( type , PDF417BARCODE ) ) {
QVBox* box = addVBoxPage ( i18n ( " PDF417 " ) ) ;
T QVBox* box = addVBoxPage ( i18n ( " PDF417 " ) ) ;
PDF417BarcodeDlg * dlg = new PDF417BarcodeDlg ( box ) ;
list . append ( ( BarcodeDlgBase * ) dlg ) ;
}
if ( Barkode : : hasFeature ( type , DATAMATRIX ) ) {
QVBox* box = addVBoxPage ( i18n ( " DataMatrix " ) ) ;
T QVBox* box = addVBoxPage ( i18n ( " DataMatrix " ) ) ;
DataMatrixDlg * dlg = new DataMatrixDlg ( box ) ;
list . append ( ( BarcodeDlgBase * ) dlg ) ;
}
if ( Barkode : : hasFeature ( type , TBARCODEADV ) ) {
QVBox* box = addVBoxPage ( i18n ( " TBarcode " ) ) ;
T QVBox* box = addVBoxPage ( i18n ( " TBarcode " ) ) ;
TBarcodeDlg * dlg = new TBarcodeDlg ( box ) ;
list . append ( ( BarcodeDlgBase * ) dlg ) ;
}
if ( Barkode : : hasFeature ( type , PUREADV ) ) {
QVBox* box = addVBoxPage ( i18n ( " Barcode Writer in Pure Postscript " ) ) ;
T QVBox* box = addVBoxPage ( i18n ( " Barcode Writer in Pure Postscript " ) ) ;
PurePostscriptDlg * dlg = new PurePostscriptDlg ( box ) ;
list . append ( ( BarcodeDlgBase * ) dlg ) ;
}
if ( Barkode : : hasFeature ( type , COLORED ) ) {
QVBox* box = addVBoxPage ( i18n ( " Colors " ) ) ;
T QVBox* box = addVBoxPage ( i18n ( " Colors " ) ) ;
ColorDlg * dlg = new ColorDlg ( box ) ;
list . append ( ( BarcodeDlgBase * ) dlg ) ;
}
QVBox* box = addVBoxPage ( i18n ( " Sequence " ) ) ;
T QVBox* box = addVBoxPage ( i18n ( " Sequence " ) ) ;
SequenceDlg * dlg = new SequenceDlg ( box ) ;
list . append ( ( BarcodeDlgBase * ) dlg ) ;
}
@ -100,17 +100,17 @@ void AdvancedBarcodeDialog::getData( Barkode* b )
}
}
TBarcodeDlg : : TBarcodeDlg ( QWidget * parent, const char * name )
: QWidget( parent, name )
TBarcodeDlg : : TBarcodeDlg ( T QWidget * tq parent, const char * name )
: T QWidget( tq parent, name )
{
QVBoxLayout* layout = new QVBoxLayout( this , 6 , 6 ) ;
T QVBoxLayout* tq layout = new T QVBoxLayout( this , 6 , 6 ) ;
QGroupBox* gb = new QGroupBox( i18n ( " TBarcode " ) , this ) ;
T QGroupBox* gb = new T QGroupBox( i18n ( " TBarcode " ) , this ) ;
gb - > setColumnLayout ( 0 , Qt : : Vertical ) ;
gb - > layout( ) - > setSpacing ( 6 ) ;
gb - > layout( ) - > setMargin ( 11 ) ;
gb - > tq layout( ) - > setSpacing ( 6 ) ;
gb - > tq layout( ) - > setMargin ( 11 ) ;
gb - > setEnabled ( Barkode : : haveTBarcode ( ) | | Barkode : : haveTBarcode2 ( ) ) ;
QVBoxLayout* gbLayout = new QVBoxLayout( gb - > layout( ) ) ;
T QVBoxLayout* gbLayout = new T QVBoxLayout( gb - > tq layout( ) ) ;
spinModule = new KDoubleNumInput ( gb ) ;
spinModule - > setLabel ( i18n ( " Module width (mm): " ) , AlignLeft | AlignVCenter ) ;
@ -120,16 +120,16 @@ TBarcodeDlg::TBarcodeDlg(QWidget *parent, const char *name )
spinHeight - > setLabel ( i18n ( " Barcode Height (mm): " ) , AlignLeft | 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 ) ;
checkEscape = new T QCheckBox( i18n ( " &Translate escape sequences " ) , gb ) ;
checkAbove = new T QCheckBox( i18n ( " &Text above barcode " ) , gb ) ;
checkAutoCorrect = new T QCheckBox( i18n ( " &Auto correction " ) , gb ) ;
comboCheckSum = new KComboBox ( false , gb ) ;
QLabel* label = new QLabel( i18n ( " &Checksum calculation method: " ) , gb ) ;
T QLabel* label = new T QLabel( i18n ( " &Checksum calculation method: " ) , gb ) ;
label - > setBuddy ( comboCheckSum ) ;
QHBoxLayout * hbox = new QHBoxLayout( 0 , 6 , 6 ) ;
T QHBoxLayout * hbox = new T QHBoxLayout( 0 , 6 , 6 ) ;
hbox - > addWidget ( label ) ;
hbox - > addWidget ( comboCheckSum ) ;
@ -140,11 +140,11 @@ TBarcodeDlg::TBarcodeDlg(QWidget *parent, const char *name )
gbLayout - > addWidget ( checkAutoCorrect ) ;
gbLayout - > addLayout ( hbox ) ;
QToolTip: : add ( spinModule , i18n ( " <qt>Change the module with used by tbarcode. Take a look into the "
T 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 ) ;
tq layout- > addWidget ( gb ) ;
}
void TBarcodeDlg : : setData ( Barkode * b )
@ -221,7 +221,7 @@ void TBarcodeDlg::setData( Barkode* b )
comboCheckSum - > insertStringList ( map . keys ( ) ) ;
QMap< QString, int > : : Iterator it ;
T QMap< T 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 + + )
@ -250,17 +250,17 @@ void TBarcodeDlg::getData( Barkode* b ) const
}
}
PDF417BarcodeDlg : : PDF417BarcodeDlg ( QWidget * parent, const char * name )
: QWidget( parent, name )
PDF417BarcodeDlg : : PDF417BarcodeDlg ( T QWidget * tq parent, const char * name )
: T QWidget( tq parent, name )
{
QVBoxLayout* layout = new QVBoxLayout( this , 6 , 6 ) ;
T QVBoxLayout* tq layout = new T QVBoxLayout( this , 6 , 6 ) ;
QGroupBox* gpdf = new QGroupBox( i18n ( " PDF417 " ) , this ) ;
T QGroupBox* gpdf = new T QGroupBox( i18n ( " PDF417 " ) , this ) ;
gpdf - > setColumnLayout ( 0 , Qt : : Vertical ) ;
gpdf - > layout( ) - > setSpacing ( 6 ) ;
gpdf - > layout( ) - > setMargin ( 11 ) ;
gpdf - > tq layout( ) - > setSpacing ( 6 ) ;
gpdf - > tq layout( ) - > setMargin ( 11 ) ;
gpdf - > setEnabled ( Barkode : : haveTBarcode ( ) | | Barkode : : havePDFBarcode ( ) ) ;
QVBoxLayout* gpdfLayout = new QVBoxLayout( gpdf - > layout( ) ) ;
T QVBoxLayout* gpdfLayout = new T QVBoxLayout( gpdf - > tq layout( ) ) ;
spinRow = new KIntNumInput ( gpdf ) ;
spinRow - > setLabel ( i18n ( " Rows: " ) , AlignLeft | AlignVCenter ) ;
@ -277,7 +277,7 @@ PDF417BarcodeDlg::PDF417BarcodeDlg(QWidget *parent, const char *name )
gpdfLayout - > addWidget ( spinRow ) ;
gpdfLayout - > addWidget ( spinCol ) ;
gpdfLayout - > addWidget ( spinErr ) ;
layout- > addWidget ( gpdf ) ;
tq layout- > addWidget ( gpdf ) ;
}
void PDF417BarcodeDlg : : setData ( Barkode * b )
@ -304,16 +304,16 @@ void PDF417BarcodeDlg::getData( Barkode* b ) const
}
}
DataMatrixDlg : : DataMatrixDlg ( QWidget * parent, const char * name )
: QWidget( parent, name )
DataMatrixDlg : : DataMatrixDlg ( T QWidget * tq parent, const char * name )
: T QWidget( tq parent, name )
{
QHBoxLayout* datamLayout = new QHBoxLayout( this , 6 , 6 ) ;
T QHBoxLayout* datamLayout = new T QHBoxLayout( this , 6 , 6 ) ;
comboDataMatrix = new KComboBox ( false , this ) ;
datamLayout - > addWidget ( new QLabel( i18n ( " Data Matrix symbol sizes (rows x cols): " ) , this ) ) ;
datamLayout - > addWidget ( new T QLabel( i18n ( " Data Matrix symbol sizes (rows x cols): " ) , this ) ) ;
datamLayout - > addWidget ( comboDataMatrix ) ;
datamLayout - > addItem ( new QSpacerItem( 0 , 0 , QSizePolicy: : Minimum , QSizePolicy: : Minimum ) ) ;
datamLayout - > addItem ( new T QSpacerItem( 0 , 0 , T QSizePolicy: : Minimum , T QSizePolicy: : Minimum ) ) ;
comboDataMatrix - > insertItem ( i18n ( " Automatic calculation " ) ) ;
comboDataMatrix - > insertItem ( " 10 x 10 " ) ;
@ -358,22 +358,22 @@ void DataMatrixDlg::getData( Barkode* b ) const
b - > setDatamatrixSize ( comboDataMatrix - > currentItem ( ) ) ;
}
SequenceDlg : : SequenceDlg ( QWidget * parent, const char * name )
: QWidget( parent, name )
SequenceDlg : : SequenceDlg ( T QWidget * tq parent, const char * name )
: T QWidget( tq parent, name )
{
QVBoxLayout* main = new QVBoxLayout( this , 6 , 6 ) ;
T QVBoxLayout* main = new T QVBoxLayout( this , 6 , 6 ) ;
QButtonGroup* group = new QButtonGroup( i18n ( " Sequence " ) , this ) ;
T QButtonGroup* group = new T QButtonGroup( i18n ( " Sequence " ) , this ) ;
group - > setColumnLayout ( 0 , Qt : : Vertical ) ;
group - > layout( ) - > setSpacing ( 6 ) ;
group - > layout( ) - > setMargin ( 11 ) ;
QVBoxLayout* layout = new QVBoxLayout( group - > layout( ) ) ;
group - > tq layout( ) - > setSpacing ( 6 ) ;
group - > tq layout( ) - > setMargin ( 11 ) ;
T QVBoxLayout* tq layout = new T QVBoxLayout( group - > tq layout( ) ) ;
checkSequence = new QCheckBox( i18n ( " &Enable sequence " ) , group ) ;
checkSequence = new T 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 ) ;
radioNumbers = new T QRadioButton( i18n ( " Iterate over numbers 0-9 " ) , group ) ;
radioAlpha = new T QRadioButton( i18n ( " Iterate over characters A-Z " ) , group ) ;
radioAlphaNum = new T QRadioButton( i18n ( " Iterate over A-Z, 0-9 " ) , group ) ;
spinStep = new KIntNumInput ( group ) ;
spinStep - > setLabel ( i18n ( " Step: " ) , AlignLeft | AlignVCenter ) ;
@ -383,19 +383,19 @@ SequenceDlg::SequenceDlg( QWidget *parent, const char *name )
spinStart - > setLabel ( i18n ( " Start: " ) , AlignLeft | 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 ) ;
tq layout- > addWidget ( checkSequence ) ;
tq layout- > addWidget ( radioNumbers ) ;
tq layout- > addWidget ( radioAlpha ) ;
tq layout- > addWidget ( radioAlphaNum ) ;
tq layout- > addWidget ( spinStep ) ;
tq 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 ( ) ) ) ;
connect ( checkSequence , TQT_ SIGNAL( clicked ( ) ) , this , TQT_ SLOT( enableControls ( ) ) ) ;
connect ( radioNumbers , TQT_ SIGNAL( clicked ( ) ) , this , TQT_ SLOT( enableControls ( ) ) ) ;
connect ( radioAlpha , TQT_ SIGNAL( clicked ( ) ) , this , TQT_ SLOT( enableControls ( ) ) ) ;
connect ( radioAlphaNum , TQT_ SIGNAL( clicked ( ) ) , this , TQT_ SLOT( enableControls ( ) ) ) ;
}
void SequenceDlg : : setData ( Barkode * b )
@ -438,23 +438,23 @@ void SequenceDlg::enableControls()
spinStart - > setEnabled ( checkSequence - > isChecked ( ) & & radioNumbers - > isChecked ( ) ) ;
}
ColorDlg : : ColorDlg ( QWidget * parent, const char * name )
: QVBox( parent, name )
ColorDlg : : ColorDlg ( T QWidget * tq parent, const char * name )
: T QVBox( tq parent, name )
{
QGroupBox* gb = new QGroupBox( i18n ( " Colors " ) , this ) ;
T QGroupBox* gb = new T QGroupBox( i18n ( " Colors " ) , this ) ;
gb - > setColumnLayout ( 0 , Qt : : Vertical ) ;
gb - > layout( ) - > setSpacing ( 6 ) ;
gb - > layout( ) - > setMargin ( 11 ) ;
gb - > tq layout( ) - > setSpacing ( 6 ) ;
gb - > tq layout( ) - > setMargin ( 11 ) ;
gb - > setEnabled ( Barkode : : havePurePostscriptBarcode ( ) ) ;
QGridLayout* gbLayout = new QGridLayout( gb - > layout( ) ) ;
T QGridLayout* gbLayout = new T QGridLayout( gb - > tq 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 ( new T QLabel( i18n ( " Bar Color: " ) , gb ) , 0 , 0 ) ;
gbLayout - > addWidget ( new T QLabel( i18n ( " Background Color: " ) , gb ) , 1 , 0 ) ;
gbLayout - > addWidget ( new T QLabel( i18n ( " Text Color: " ) , gb ) , 2 , 0 ) ;
gbLayout - > addWidget ( buttonBarColor , 0 , 1 ) ;
gbLayout - > addWidget ( buttonBackColor , 1 , 1 ) ;
gbLayout - > addWidget ( buttonTextColor , 2 , 1 ) ;
@ -474,13 +474,13 @@ void ColorDlg::getData( Barkode* b ) const
b - > setTextColor ( buttonTextColor - > color ( ) ) ;
}
PurePostscriptDlg : : PurePostscriptDlg ( QWidget * parent, const char * name )
: QVBox( parent, name )
PurePostscriptDlg : : PurePostscriptDlg ( T QWidget * tq parent, const char * name )
: T QVBox( tq parent, name )
{
QVGroupBox* gb = new QVGroupBox( i18n ( " Barcode Writer in Pure Postscript " ) , this ) ;
T QVGroupBox* gb = new T QVGroupBox( i18n ( " Barcode Writer in Pure Postscript " ) , this ) ;
gb - > setEnabled ( Barkode : : havePurePostscriptBarcode ( ) ) ;
checkChecksum = new QCheckBox( i18n ( " Enable &Checksum " ) , gb ) ;
checkChecksum = new T QCheckBox( i18n ( " Enable &Checksum " ) , gb ) ;
}
void PurePostscriptDlg : : setData ( Barkode * b )