00001 #include <klocale.h>
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "importz3950view.h"
00012
00013 #include <qvariant.h>
00014 #include <qmap.h>
00015 #include <yaz/zoom.h>
00016 #include <qtable.h>
00017 #include <qpushbutton.h>
00018 #include <qlabel.h>
00019 #include <qlineedit.h>
00020 #include <qcombobox.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 #include <qimage.h>
00025 #include <qpixmap.h>
00026
00027 #include "./importz3950view.ui.h"
00028
00029
00030
00031
00032
00033 ImportZ3950View::ImportZ3950View( QWidget* parent, const char* name, WFlags fl )
00034 : QWidget( parent, name, fl )
00035 {
00036 if ( !name )
00037 setName( "ImportZ3950View" );
00038 ImportZ3950ViewLayout = new QVBoxLayout( this, 11, 6, "ImportZ3950ViewLayout");
00039
00040 layout20 = new QVBoxLayout( 0, 0, 6, "layout20");
00041
00042 layout70 = new QHBoxLayout( 0, 0, 6, "layout70");
00043
00044 textLabel2 = new QLabel( this, "textLabel2" );
00045 layout70->addWidget( textLabel2 );
00046
00047 server = new QLineEdit( this, "server" );
00048 layout70->addWidget( server );
00049 layout20->addLayout( layout70 );
00050
00051 layout18 = new QHBoxLayout( 0, 0, 6, "layout18");
00052
00053 term1 = new QLineEdit( this, "term1" );
00054 layout18->addWidget( term1 );
00055
00056 textLabel1 = new QLabel( this, "textLabel1" );
00057 layout18->addWidget( textLabel1 );
00058
00059 field1 = new QComboBox( FALSE, this, "field1" );
00060 layout18->addWidget( field1 );
00061
00062 op1 = new QComboBox( FALSE, this, "op1" );
00063 layout18->addWidget( op1 );
00064 layout20->addLayout( layout18 );
00065
00066 layout19 = new QHBoxLayout( 0, 0, 6, "layout19");
00067
00068 term2 = new QLineEdit( this, "term2" );
00069 layout19->addWidget( term2 );
00070
00071 textLabel1_2 = new QLabel( this, "textLabel1_2" );
00072 layout19->addWidget( textLabel1_2 );
00073
00074 field2 = new QComboBox( FALSE, this, "field2" );
00075 layout19->addWidget( field2 );
00076
00077 op2 = new QComboBox( FALSE, this, "op2" );
00078 layout19->addWidget( op2 );
00079 layout20->addLayout( layout19 );
00080
00081 layout1_3 = new QHBoxLayout( 0, 0, 6, "layout1_3");
00082
00083 term3 = new QLineEdit( this, "term3" );
00084 layout1_3->addWidget( term3 );
00085
00086 textLabel1_3 = new QLabel( this, "textLabel1_3" );
00087 layout1_3->addWidget( textLabel1_3 );
00088
00089 field3 = new QComboBox( FALSE, this, "field3" );
00090 layout1_3->addWidget( field3 );
00091 layout20->addLayout( layout1_3 );
00092
00093 layout5 = new QHBoxLayout( 0, 0, 6, "layout5");
00094
00095 pushButton1 = new QPushButton( this, "pushButton1" );
00096 layout5->addWidget( pushButton1 );
00097 QSpacerItem* spacer = new QSpacerItem( 51, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00098 layout5->addItem( spacer );
00099 layout20->addLayout( layout5 );
00100
00101 result = new QTable( this, "result" );
00102 result->setNumCols( result->numCols() + 1 );
00103 result->horizontalHeader()->setLabel( result->numCols() - 1, tr2i18n( "Select" ) );
00104 result->setNumCols( result->numCols() + 1 );
00105 result->horizontalHeader()->setLabel( result->numCols() - 1, tr2i18n( "Publication" ) );
00106 result->setNumRows( 0 );
00107 result->setNumCols( 2 );
00108 layout20->addWidget( result );
00109 ImportZ3950ViewLayout->addLayout( layout20 );
00110 languageChange();
00111 resize( QSize(754, 660).expandedTo(minimumSizeHint()) );
00112 clearWState( WState_Polished );
00113
00114
00115 connect( pushButton1, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
00116 init();
00117 }
00118
00119
00120
00121
00122 ImportZ3950View::~ImportZ3950View()
00123 {
00124
00125 }
00126
00127
00128
00129
00130
00131 void ImportZ3950View::languageChange()
00132 {
00133 setCaption( tr2i18n( "Form1" ) );
00134 textLabel2->setText( tr2i18n( "Server" ) );
00135 server->setText( tr2i18n( "localhost:9999" ) );
00136 textLabel1->setText( tr2i18n( "in" ) );
00137 field1->clear();
00138 field1->insertItem( tr2i18n( "Title" ) );
00139 field1->insertItem( tr2i18n( "Author" ) );
00140 op1->clear();
00141 op1->insertItem( tr2i18n( "And" ) );
00142 op1->insertItem( tr2i18n( "Or" ) );
00143 textLabel1_2->setText( tr2i18n( "in" ) );
00144 field2->clear();
00145 field2->insertItem( tr2i18n( "Title" ) );
00146 field2->insertItem( tr2i18n( "Author" ) );
00147 op2->clear();
00148 op2->insertItem( tr2i18n( "And" ) );
00149 op2->insertItem( tr2i18n( "Or" ) );
00150 textLabel1_3->setText( tr2i18n( "in" ) );
00151 field3->clear();
00152 field3->insertItem( tr2i18n( "Title" ) );
00153 field3->insertItem( tr2i18n( "Author" ) );
00154 pushButton1->setText( tr2i18n( "Search" ) );
00155 result->horizontalHeader()->setLabel( 0, tr2i18n( "Select" ) );
00156 result->horizontalHeader()->setLabel( 1, tr2i18n( "Publication" ) );
00157 }
00158
00159 #include "importz3950view.moc"