|
|
|
@ -91,7 +91,7 @@ CSVImportDlg::~CSVImportDlg()
|
|
|
|
|
void CSVImportDlg::createPage1()
|
|
|
|
|
{
|
|
|
|
|
TQFrame* box = addPage( i18n("&Import Data") );
|
|
|
|
|
TQVBoxLayout* tqlayout = new TQVBoxLayout( box, 6, 6 );
|
|
|
|
|
TQVBoxLayout* layout = new TQVBoxLayout( box, 6, 6 );
|
|
|
|
|
TQGridLayout* grid = new TQGridLayout( 2 );
|
|
|
|
|
|
|
|
|
|
requester = new KURLRequester( box );
|
|
|
|
@ -114,7 +114,7 @@ void CSVImportDlg::createPage1()
|
|
|
|
|
table->setReadOnly( true );
|
|
|
|
|
|
|
|
|
|
frame = new TQFrame( box );
|
|
|
|
|
TQHBoxLayout* tqlayout2 = new TQHBoxLayout( frame, 6, 6 );
|
|
|
|
|
TQHBoxLayout* layout2 = new TQHBoxLayout( frame, 6, 6 );
|
|
|
|
|
|
|
|
|
|
spinCol = new KIntNumInput( frame );
|
|
|
|
|
spinCol->setLabel( i18n("Column:"), AlignLeft | AlignVCenter );
|
|
|
|
@ -123,10 +123,10 @@ void CSVImportDlg::createPage1()
|
|
|
|
|
comboField = new KComboBox( false, frame );
|
|
|
|
|
buttonSet = new KPushButton( i18n("Set"), frame );
|
|
|
|
|
|
|
|
|
|
tqlayout2->addWidget( spinCol );
|
|
|
|
|
tqlayout2->addWidget( new TQLabel( i18n("Database field to use for this column:"), frame ) );
|
|
|
|
|
tqlayout2->addWidget( comboField );
|
|
|
|
|
tqlayout2->addWidget( buttonSet );
|
|
|
|
|
layout2->addWidget( spinCol );
|
|
|
|
|
layout2->addWidget( new TQLabel( i18n("Database field to use for this column:"), frame ) );
|
|
|
|
|
layout2->addWidget( comboField );
|
|
|
|
|
layout2->addWidget( buttonSet );
|
|
|
|
|
|
|
|
|
|
grid->addWidget( new TQLabel( i18n("File to import:"), box ), 0, 0 );
|
|
|
|
|
grid->addWidget( requester, 0, 1 );
|
|
|
|
@ -139,17 +139,17 @@ void CSVImportDlg::createPage1()
|
|
|
|
|
grid->addWidget( checkLoadAll, 4, 0 );
|
|
|
|
|
grid->addWidget( spinLoadOnly, 4, 1 );
|
|
|
|
|
|
|
|
|
|
tqlayout->addLayout( grid );
|
|
|
|
|
tqlayout->addWidget( table );
|
|
|
|
|
tqlayout->setStretchFactor( table, 2 );
|
|
|
|
|
tqlayout->addWidget( frame );
|
|
|
|
|
layout->addLayout( grid );
|
|
|
|
|
layout->addWidget( table );
|
|
|
|
|
layout->setStretchFactor( table, 2 );
|
|
|
|
|
layout->addWidget( frame );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVImportDlg::createPage2()
|
|
|
|
|
{
|
|
|
|
|
labelprinterdata* lb = PrinterSettings::getInstance()->getData();
|
|
|
|
|
TQFrame* mainBox = addPage( i18n("&Import Settings") );
|
|
|
|
|
TQVBoxLayout* tqlayout = new TQVBoxLayout( mainBox, 6, 6 );
|
|
|
|
|
TQVBoxLayout* layout = new TQVBoxLayout( mainBox, 6, 6 );
|
|
|
|
|
TQSpacerItem* spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
|
|
|
|
|
TQSpacerItem* spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
|
|
|
|
|
|
|
|
|
@ -163,10 +163,10 @@ void CSVImportDlg::createPage2()
|
|
|
|
|
groupFixed = new TQGroupBox( i18n("Fixed Field Width File"), hboxFrame );
|
|
|
|
|
|
|
|
|
|
groupCSV->setColumnLayout(0, Qt::Vertical );
|
|
|
|
|
groupCSV->tqlayout()->setSpacing( 6 );
|
|
|
|
|
groupCSV->tqlayout()->setMargin( 11 );
|
|
|
|
|
groupCSV->layout()->setSpacing( 6 );
|
|
|
|
|
groupCSV->layout()->setMargin( 11 );
|
|
|
|
|
|
|
|
|
|
TQVBoxLayout* vbox = new TQVBoxLayout( groupCSV->tqlayout() );
|
|
|
|
|
TQVBoxLayout* vbox = new TQVBoxLayout( groupCSV->layout() );
|
|
|
|
|
TQGridLayout* grid = new TQGridLayout( 2, 2 );
|
|
|
|
|
grid->setSpacing( 6 );
|
|
|
|
|
grid->setMargin( 11 );
|
|
|
|
@ -196,9 +196,9 @@ void CSVImportDlg::createPage2()
|
|
|
|
|
vbox->addItem( spacer1 );
|
|
|
|
|
|
|
|
|
|
groupFixed->setColumnLayout(0, Qt::Horizontal );
|
|
|
|
|
groupFixed->tqlayout()->setSpacing( 6 );
|
|
|
|
|
groupFixed->tqlayout()->setMargin( 11 );
|
|
|
|
|
TQHBoxLayout* groupFixedLayout = new TQHBoxLayout( groupFixed->tqlayout() );
|
|
|
|
|
groupFixed->layout()->setSpacing( 6 );
|
|
|
|
|
groupFixed->layout()->setMargin( 11 );
|
|
|
|
|
TQHBoxLayout* groupFixedLayout = new TQHBoxLayout( groupFixed->layout() );
|
|
|
|
|
groupFixedLayout->setAlignment( TQt::AlignTop );
|
|
|
|
|
|
|
|
|
|
listWidth = new KListBox( groupFixed );
|
|
|
|
@ -214,17 +214,17 @@ void CSVImportDlg::createPage2()
|
|
|
|
|
spinNumber->setValue( 1 );
|
|
|
|
|
spinNumber->setFocus();
|
|
|
|
|
|
|
|
|
|
TQVBoxLayout* tqlayout2 = new TQVBoxLayout( 0, 6, 6 );
|
|
|
|
|
tqlayout2->addWidget( buttonAdd );
|
|
|
|
|
tqlayout2->addWidget( buttonRemove );
|
|
|
|
|
tqlayout2->addWidget( spinNumber );
|
|
|
|
|
tqlayout2->addItem( spacer2 );
|
|
|
|
|
TQVBoxLayout* layout2 = new TQVBoxLayout( 0, 6, 6 );
|
|
|
|
|
layout2->addWidget( buttonAdd );
|
|
|
|
|
layout2->addWidget( buttonRemove );
|
|
|
|
|
layout2->addWidget( spinNumber );
|
|
|
|
|
layout2->addItem( spacer2 );
|
|
|
|
|
|
|
|
|
|
groupFixedLayout->addWidget( listWidth );
|
|
|
|
|
groupFixedLayout->addLayout( tqlayout2 );
|
|
|
|
|
groupFixedLayout->addLayout( layout2 );
|
|
|
|
|
|
|
|
|
|
tqlayout->addWidget( buttonGroup );
|
|
|
|
|
tqlayout->addWidget( hboxFrame );
|
|
|
|
|
layout->addWidget( buttonGroup );
|
|
|
|
|
layout->addWidget( hboxFrame );
|
|
|
|
|
|
|
|
|
|
radioCSVFile->setChecked( true );
|
|
|
|
|
}
|
|
|
|
|