kpilot/kpilot

dbSelection_base.cc

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './dbSelection_base.ui'
00005 **
00006 ** Created: Thu Mar 29 05:52:08 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "dbSelection_base.h"
00013 
00014 #include <qvariant.h>
00015 #include <klistview.h>
00016 #include <kpushbutton.h>
00017 #include <klineedit.h>
00018 #include <qheader.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a KPilotDBSelectionWidget as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  */
00027 KPilotDBSelectionWidget::KPilotDBSelectionWidget( QWidget* parent, const char* name, WFlags fl )
00028     : QWidget( parent, name, fl )
00029 {
00030     if ( !name )
00031     setName( "DBSelectionWidgetForm" );
00032     DBSelectionWidgetFormLayout = new QGridLayout( this, 1, 1, 11, 6, "DBSelectionWidgetFormLayout"); 
00033 
00034     fDatabaseList = new KListView( this, "fDatabaseList" );
00035     fDatabaseList->addColumn( tr2i18n( "Database" ) );
00036     fDatabaseList->setResizeMode( KListView::LastColumn );
00037     fDatabaseList->setItemsRenameable( TRUE );
00038 
00039     DBSelectionWidgetFormLayout->addMultiCellWidget( fDatabaseList, 0, 0, 0, 2 );
00040 
00041     fRemoveButton = new KPushButton( this, "fRemoveButton" );
00042 
00043     DBSelectionWidgetFormLayout->addWidget( fRemoveButton, 1, 2 );
00044 
00045     fNameEdit = new KLineEdit( this, "fNameEdit" );
00046 
00047     DBSelectionWidgetFormLayout->addWidget( fNameEdit, 1, 0 );
00048 
00049     fAddButton = new KPushButton( this, "fAddButton" );
00050 
00051     DBSelectionWidgetFormLayout->addWidget( fAddButton, 1, 1 );
00052     languageChange();
00053     resize( QSize(318, 218).expandedTo(minimumSizeHint()) );
00054     clearWState( WState_Polished );
00055 
00056     // signals and slots connections
00057     connect( fNameEdit, SIGNAL( returnPressed() ), fAddButton, SLOT( animateClick() ) );
00058 }
00059 
00060 /*
00061  *  Destroys the object and frees any allocated resources
00062  */
00063 KPilotDBSelectionWidget::~KPilotDBSelectionWidget()
00064 {
00065     // no need to delete child widgets, Qt does it all for us
00066 }
00067 
00068 /*
00069  *  Sets the strings of the subwidgets using the current
00070  *  language.
00071  */
00072 void KPilotDBSelectionWidget::languageChange()
00073 {
00074     fDatabaseList->header()->setLabel( 0, tr2i18n( "Database" ) );
00075     fRemoveButton->setText( tr2i18n( "&Remove" ) );
00076     fAddButton->setText( tr2i18n( "&Add" ) );
00077 }
00078 
00079 #include "dbSelection_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys