Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

selectitem.cpp

Go to the documentation of this file.
00001 #include <klocale.h>
00002 /****************************************************************************
00003 ** Form implementation generated from reading ui file './selectitem.ui'
00004 **
00005 ** Created: Sa Mär 27 00:55:52 2004
00006 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.2.3   edited May 19 14:22 $)
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "selectitem.h"
00012 
00013 #include <qvariant.h>
00014 #include <qsqlquery.h>
00015 #include <qsqldatabase.h>
00016 #include <qsqlrecord.h>
00017 #include <qpushbutton.h>
00018 #include <qlabel.h>
00019 #include <qlineedit.h>
00020 #include <qheader.h>
00021 #include <qlistview.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 #include <qimage.h>
00026 #include <qpixmap.h>
00027 
00028 #include "linklistboxitem.h"
00029 #include "./selectitem.ui.h"
00030 /*
00031  *  Constructs a SelectItem as a child of 'parent', with the
00032  *  name 'name' and widget flags set to 'f'.
00033  *
00034  *  The dialog will by default be modeless, unless you set 'modal' to
00035  *  TRUE to construct a modal dialog.
00036  */
00037 SelectItem::SelectItem( QWidget* parent, const char* name, bool modal, WFlags fl )
00038     : QDialog( parent, name, modal, fl )
00039 {
00040     if ( !name )
00041         setName( "SelectItem" );
00042     setSizeGripEnabled( TRUE );
00043     SelectItemLayout = new QVBoxLayout( this, 11, 6, "SelectItemLayout"); 
00044 
00045     layout10 = new QVBoxLayout( 0, 0, 6, "layout10"); 
00046 
00047     layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); 
00048 
00049     textLabel1 = new QLabel( this, "textLabel1" );
00050     layout7->addWidget( textLabel1 );
00051 
00052     search = new QLineEdit( this, "search" );
00053     layout7->addWidget( search );
00054     layout10->addLayout( layout7 );
00055 
00056     items = new QListView( this, "items" );
00057     layout10->addWidget( items );
00058 
00059     Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 
00060     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00061     Layout1->addItem( spacer );
00062 
00063     buttonOk = new QPushButton( this, "buttonOk" );
00064     buttonOk->setAutoDefault( TRUE );
00065     buttonOk->setDefault( TRUE );
00066     Layout1->addWidget( buttonOk );
00067 
00068     buttonCancel = new QPushButton( this, "buttonCancel" );
00069     buttonCancel->setAutoDefault( TRUE );
00070     Layout1->addWidget( buttonCancel );
00071     layout10->addLayout( Layout1 );
00072     SelectItemLayout->addLayout( layout10 );
00073     languageChange();
00074     resize( QSize(547, 582).expandedTo(minimumSizeHint()) );
00075     clearWState( WState_Polished );
00076 
00077     // signals and slots connections
00078     connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00079     connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00080     connect( search, SIGNAL( textChanged(const QString&) ), this, SLOT( incrementalSearch(const QString&) ) );
00081 }
00082 
00083 /*
00084  *  Destroys the object and frees any allocated resources
00085  */
00086 SelectItem::~SelectItem()
00087 {
00088     // no need to delete child widgets, Qt does it all for us
00089 }
00090 
00091 /*
00092  *  Sets the strings of the subwidgets using the current
00093  *  language.
00094  */
00095 void SelectItem::languageChange()
00096 {
00097     setCaption( tr2i18n( "MyDialog" ) );
00098     textLabel1->setText( tr2i18n( "Search " ) );
00099     buttonOk->setText( tr2i18n( "&OK" ) );
00100     buttonOk->setAccel( QKeySequence( QString::null ) );
00101     buttonCancel->setText( tr2i18n( "&Cancel" ) );
00102     buttonCancel->setAccel( QKeySequence( QString::null ) );
00103 }
00104 
00105 #include "selectitem.moc"

Generated on Sat Mar 27 19:20:44 2004 for Literature by doxygen 1.3.6-20040222