kandy

mobilegui_base.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './mobilegui_base.ui'
00005 **
00006 ** Created: Thu Mar 29 06:01:05 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 "mobilegui_base.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qlabel.h>
00018 #include <qtabwidget.h>
00019 #include <qheader.h>
00020 #include <qlistview.h>
00021 #include <qtextedit.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 
00026 /*
00027  *  Constructs a MobileGui_base as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 MobileGui_base::MobileGui_base( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "MobileGui_base" );
00035     MobileGui_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "MobileGui_baseLayout"); 
00036 
00037     GroupBox2 = new QGroupBox( this, "GroupBox2" );
00038     GroupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, 0, 0, GroupBox2->sizePolicy().hasHeightForWidth() ) );
00039     GroupBox2->setColumnLayout(0, Qt::Vertical );
00040     GroupBox2->layout()->setSpacing( 6 );
00041     GroupBox2->layout()->setMargin( 11 );
00042     GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
00043     GroupBox2Layout->setAlignment( Qt::AlignTop );
00044 
00045     TextLabel1 = new QLabel( GroupBox2, "TextLabel1" );
00046 
00047     GroupBox2Layout->addWidget( TextLabel1, 1, 0 );
00048 
00049     TextLabel3_2 = new QLabel( GroupBox2, "TextLabel3_2" );
00050 
00051     GroupBox2Layout->addWidget( TextLabel3_2, 3, 0 );
00052 
00053     mManufacturerLabel = new QLabel( GroupBox2, "mManufacturerLabel" );
00054 
00055     GroupBox2Layout->addWidget( mManufacturerLabel, 0, 1 );
00056 
00057     mGSMVersionLabel = new QLabel( GroupBox2, "mGSMVersionLabel" );
00058 
00059     GroupBox2Layout->addWidget( mGSMVersionLabel, 2, 1 );
00060 
00061     mSerialNumberLabel = new QLabel( GroupBox2, "mSerialNumberLabel" );
00062 
00063     GroupBox2Layout->addWidget( mSerialNumberLabel, 3, 1 );
00064 
00065     mModelLabel = new QLabel( GroupBox2, "mModelLabel" );
00066 
00067     GroupBox2Layout->addWidget( mModelLabel, 1, 1 );
00068 
00069     TextLabel3 = new QLabel( GroupBox2, "TextLabel3" );
00070 
00071     GroupBox2Layout->addWidget( TextLabel3, 0, 0 );
00072 
00073     TextLabel2 = new QLabel( GroupBox2, "TextLabel2" );
00074 
00075     GroupBox2Layout->addWidget( TextLabel2, 2, 0 );
00076     spacer42 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00077     GroupBox2Layout->addItem( spacer42, 0, 2 );
00078 
00079     MobileGui_baseLayout->addWidget( GroupBox2, 0, 0 );
00080 
00081     mTabWidget = new QTabWidget( this, "mTabWidget" );
00082 
00083     mABTab = new QWidget( mTabWidget, "mABTab" );
00084     mABTab->setEnabled( FALSE );
00085     mABTabLayout = new QGridLayout( mABTab, 1, 1, 11, 6, "mABTabLayout"); 
00086 
00087     groupBox3 = new QGroupBox( mABTab, "groupBox3" );
00088     groupBox3->setColumnLayout(0, Qt::Vertical );
00089     groupBox3->layout()->setSpacing( 6 );
00090     groupBox3->layout()->setMargin( 11 );
00091     groupBox3Layout = new QGridLayout( groupBox3->layout() );
00092     groupBox3Layout->setAlignment( Qt::AlignTop );
00093 
00094     mKabBook = new QListView( groupBox3, "mKabBook" );
00095     mKabBook->addColumn( tr2i18n( "Name" ) );
00096     mKabBook->addColumn( tr2i18n( "Phone" ) );
00097     mKabBook->setResizeMode( QListView::AllColumns );
00098 
00099     groupBox3Layout->addMultiCellWidget( mKabBook, 0, 2, 0, 0 );
00100 
00101     mReadKabButton = new QPushButton( groupBox3, "mReadKabButton" );
00102 
00103     groupBox3Layout->addWidget( mReadKabButton, 0, 1 );
00104     spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00105     groupBox3Layout->addItem( spacer4, 2, 1 );
00106 
00107     PushButton8 = new QPushButton( groupBox3, "PushButton8" );
00108 
00109     groupBox3Layout->addWidget( PushButton8, 1, 1 );
00110 
00111     mABTabLayout->addWidget( groupBox3, 0, 0 );
00112 
00113     groupBox4 = new QGroupBox( mABTab, "groupBox4" );
00114     groupBox4->setColumnLayout(0, Qt::Vertical );
00115     groupBox4->layout()->setSpacing( 6 );
00116     groupBox4->layout()->setMargin( 11 );
00117     groupBox4Layout = new QGridLayout( groupBox4->layout() );
00118     groupBox4Layout->setAlignment( Qt::AlignTop );
00119 
00120     PushButton3 = new QPushButton( groupBox4, "PushButton3" );
00121 
00122     groupBox4Layout->addWidget( PushButton3, 0, 1 );
00123 
00124     PushButton12 = new QPushButton( groupBox4, "PushButton12" );
00125 
00126     groupBox4Layout->addWidget( PushButton12, 1, 1 );
00127     spacer5 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00128     groupBox4Layout->addItem( spacer5, 3, 1 );
00129 
00130     PushButton4_2 = new QPushButton( groupBox4, "PushButton4_2" );
00131 
00132     groupBox4Layout->addWidget( PushButton4_2, 2, 1 );
00133 
00134     MobDeleteButton = new QPushButton( groupBox4, "MobDeleteButton" );
00135 
00136     groupBox4Layout->addWidget( MobDeleteButton, 4, 1 );
00137 
00138     mMobileBook = new QListView( groupBox4, "mMobileBook" );
00139     mMobileBook->addColumn( tr2i18n( "Name" ) );
00140     mMobileBook->addColumn( tr2i18n( "Phone" ) );
00141     mMobileBook->setResizeMode( QListView::AllColumns );
00142 
00143     groupBox4Layout->addMultiCellWidget( mMobileBook, 0, 4, 0, 0 );
00144 
00145     mABTabLayout->addWidget( groupBox4, 0, 1 );
00146 
00147     layout21 = new QHBoxLayout( 0, 0, 6, "layout21"); 
00148 
00149     PushButton8_3 = new QPushButton( mABTab, "PushButton8_3" );
00150     layout21->addWidget( PushButton8_3 );
00151     spacer6 = new QSpacerItem( 321, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00152     layout21->addItem( spacer6 );
00153 
00154     mABTabLayout->addMultiCellLayout( layout21, 1, 1, 0, 1 );
00155     mTabWidget->insertTab( mABTab, QString::fromLatin1("") );
00156 
00157     mTerminalTab = new QWidget( mTabWidget, "mTerminalTab" );
00158     mTerminalTabLayout = new QGridLayout( mTerminalTab, 1, 1, 11, 6, "mTerminalTabLayout"); 
00159 
00160     mTermIO = new QTextEdit( mTerminalTab, "mTermIO" );
00161     mTermIO->setReadOnly( TRUE );
00162 
00163     mTerminalTabLayout->addWidget( mTermIO, 0, 0 );
00164     mTabWidget->insertTab( mTerminalTab, QString::fromLatin1("") );
00165 
00166     MobileGui_baseLayout->addMultiCellWidget( mTabWidget, 1, 1, 0, 1 );
00167 
00168     GroupBox1 = new QGroupBox( this, "GroupBox1" );
00169     GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
00170     GroupBox1->setColumnLayout(0, Qt::Vertical );
00171     GroupBox1->layout()->setSpacing( 6 );
00172     GroupBox1->layout()->setMargin( 11 );
00173     GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
00174     GroupBox1Layout->setAlignment( Qt::AlignTop );
00175 
00176     mStatus = new QLabel( GroupBox1, "mStatus" );
00177 
00178     GroupBox1Layout->addWidget( mStatus, 0, 0 );
00179 
00180     TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
00181 
00182     GroupBox1Layout->addWidget( TextLabel5, 1, 0 );
00183 
00184     mSignalQualityLabel = new QLabel( GroupBox1, "mSignalQualityLabel" );
00185 
00186     GroupBox1Layout->addWidget( mSignalQualityLabel, 1, 1 );
00187 
00188     mBatteryChargeLabel = new QLabel( GroupBox1, "mBatteryChargeLabel" );
00189 
00190     GroupBox1Layout->addWidget( mBatteryChargeLabel, 0, 1 );
00191     Spacer1 = new QSpacerItem( 0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00192     GroupBox1Layout->addMultiCell( Spacer1, 2, 2, 0, 4 );
00193 
00194     mConnectButton = new QPushButton( GroupBox1, "mConnectButton" );
00195 
00196     GroupBox1Layout->addWidget( mConnectButton, 3, 0 );
00197     spacer9 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00198     GroupBox1Layout->addItem( spacer9, 3, 2 );
00199 
00200     PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
00201     PushButton1->setEnabled( FALSE );
00202 
00203     GroupBox1Layout->addWidget( PushButton1, 3, 3 );
00204 
00205     PushButton5_3 = new QPushButton( GroupBox1, "PushButton5_3" );
00206     PushButton5_3->setEnabled( FALSE );
00207 
00208     GroupBox1Layout->addWidget( PushButton5_3, 3, 4 );
00209 
00210     MobileGui_baseLayout->addWidget( GroupBox1, 0, 1 );
00211     languageChange();
00212     resize( QSize(865, 473).expandedTo(minimumSizeHint()) );
00213     clearWState( WState_Polished );
00214 
00215     // signals and slots connections
00216     connect( mReadKabButton, SIGNAL( clicked() ), this, SLOT( readKabc() ) );
00217     connect( PushButton8, SIGNAL( clicked() ), this, SLOT( writeKabc() ) );
00218     connect( PushButton3, SIGNAL( clicked() ), this, SLOT( readPhonebook() ) );
00219     connect( PushButton12, SIGNAL( clicked() ), this, SLOT( writePhonebook() ) );
00220     connect( PushButton4_2, SIGNAL( clicked() ), this, SLOT( savePhonebook() ) );
00221     connect( PushButton5_3, SIGNAL( clicked() ), this, SLOT( setClock() ) );
00222     connect( PushButton8_3, SIGNAL( clicked() ), this, SLOT( syncPhonebooks() ) );
00223     connect( PushButton1, SIGNAL( clicked() ), this, SLOT( refreshStatus() ) );
00224     connect( mConnectButton, SIGNAL( clicked() ), this, SLOT( toggleConnection() ) );
00225     connect( MobDeleteButton, SIGNAL( clicked() ), this, SLOT( deleteMobPhonebook() ) );
00226 
00227     // tab order
00228     setTabOrder( mKabBook, mReadKabButton );
00229     setTabOrder( mReadKabButton, PushButton8 );
00230     setTabOrder( PushButton8, mMobileBook );
00231     setTabOrder( mMobileBook, PushButton3 );
00232     setTabOrder( PushButton3, PushButton12 );
00233     setTabOrder( PushButton12, PushButton4_2 );
00234     setTabOrder( PushButton4_2, MobDeleteButton );
00235     setTabOrder( MobDeleteButton, PushButton5_3 );
00236     setTabOrder( PushButton5_3, PushButton1 );
00237     setTabOrder( PushButton1, PushButton8_3 );
00238 }
00239 
00240 /*
00241  *  Destroys the object and frees any allocated resources
00242  */
00243 MobileGui_base::~MobileGui_base()
00244 {
00245     // no need to delete child widgets, Qt does it all for us
00246 }
00247 
00248 /*
00249  *  Sets the strings of the subwidgets using the current
00250  *  language.
00251  */
00252 void MobileGui_base::languageChange()
00253 {
00254     setCaption( tr2i18n( "Mobile Device" ) );
00255     GroupBox2->setTitle( tr2i18n( "Model Information" ) );
00256     TextLabel1->setText( tr2i18n( "Model:" ) );
00257     TextLabel3_2->setText( tr2i18n( "Serial number:" ) );
00258     mManufacturerLabel->setText( tr2i18n( "x" ) );
00259     mGSMVersionLabel->setText( tr2i18n( "x" ) );
00260     mSerialNumberLabel->setText( tr2i18n( "x" ) );
00261     mModelLabel->setText( tr2i18n( "x" ) );
00262     TextLabel3->setText( tr2i18n( "Manufacturer:" ) );
00263     TextLabel2->setText( tr2i18n( "GSM version:" ) );
00264     groupBox3->setTitle( tr2i18n( "KDE Address Book" ) );
00265     mKabBook->header()->setLabel( 0, tr2i18n( "Name" ) );
00266     mKabBook->header()->setLabel( 1, tr2i18n( "Phone" ) );
00267     mReadKabButton->setText( tr2i18n( "Read" ) );
00268     PushButton8->setText( tr2i18n( "Write" ) );
00269     groupBox4->setTitle( tr2i18n( "Mobile Phone Book" ) );
00270     PushButton3->setText( tr2i18n( "Read" ) );
00271     PushButton12->setText( tr2i18n( "Write" ) );
00272     PushButton4_2->setText( tr2i18n( "Save to File..." ) );
00273     MobDeleteButton->setText( tr2i18n( "Delete" ) );
00274     mMobileBook->header()->setLabel( 0, tr2i18n( "Name" ) );
00275     mMobileBook->header()->setLabel( 1, tr2i18n( "Phone" ) );
00276     PushButton8_3->setText( tr2i18n( "Sync" ) );
00277     mTabWidget->changeTab( mABTab, tr2i18n( "Address Books" ) );
00278     mTabWidget->changeTab( mTerminalTab, tr2i18n( "Terminal" ) );
00279     GroupBox1->setTitle( tr2i18n( "Status" ) );
00280     mStatus->setText( tr2i18n( "Battery charge:" ) );
00281     TextLabel5->setText( tr2i18n( "Signal quality:" ) );
00282     mSignalQualityLabel->setText( tr2i18n( "x" ) );
00283     mBatteryChargeLabel->setText( tr2i18n( "xx %" ) );
00284     mConnectButton->setText( tr2i18n( "Connect" ) );
00285     PushButton1->setText( tr2i18n( "Refresh" ) );
00286     PushButton5_3->setText( tr2i18n( "Set Clock" ) );
00287 }
00288 
00289 void MobileGui_base::readKabc()
00290 {
00291     qWarning( "MobileGui_base::readKabc(): Not implemented yet" );
00292 }
00293 
00294 void MobileGui_base::readModelInformation()
00295 {
00296     qWarning( "MobileGui_base::readModelInformation(): Not implemented yet" );
00297 }
00298 
00299 void MobileGui_base::readPhonebook()
00300 {
00301     qWarning( "MobileGui_base::readPhonebook(): Not implemented yet" );
00302 }
00303 
00304 void MobileGui_base::refreshStatus()
00305 {
00306     qWarning( "MobileGui_base::refreshStatus(): Not implemented yet" );
00307 }
00308 
00309 void MobileGui_base::savePhonebook()
00310 {
00311     qWarning( "MobileGui_base::savePhonebook(): Not implemented yet" );
00312 }
00313 
00314 void MobileGui_base::setClock()
00315 {
00316     qWarning( "MobileGui_base::setClock(): Not implemented yet" );
00317 }
00318 
00319 void MobileGui_base::syncPhonebooks()
00320 {
00321     qWarning( "MobileGui_base::syncPhonebooks(): Not implemented yet" );
00322 }
00323 
00324 void MobileGui_base::writeKabc()
00325 {
00326     qWarning( "MobileGui_base::writeKabc(): Not implemented yet" );
00327 }
00328 
00329 void MobileGui_base::writePhonebook()
00330 {
00331     qWarning( "MobileGui_base::writePhonebook(): Not implemented yet" );
00332 }
00333 
00334 void MobileGui_base::termAddOutput(const char*)
00335 {
00336     qWarning( "MobileGui_base::termAddOutput(const char*): Not implemented yet" );
00337 }
00338 
00339 void MobileGui_base::toggleConnection()
00340 {
00341     qWarning( "MobileGui_base::toggleConnection(): Not implemented yet" );
00342 }
00343 
00344 void MobileGui_base::deleteMobPhonebook()
00345 {
00346     qWarning( "MobileGui_base::deleteMobPhonebook(): Not implemented yet" );
00347 }
00348 
00349 #include "mobilegui_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys