kandy Library API Documentation

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 Oct 21 19:34:09 2004 00007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) 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 <qheader.h> 00019 #include <qlistview.h> 00020 #include <qframe.h> 00021 #include <qlayout.h> 00022 #include <qtooltip.h> 00023 #include <qwhatsthis.h> 00024 00025 /* 00026 * Constructs a MobileGui_base as a child of 'parent', with the 00027 * name 'name' and widget flags set to 'f'. 00028 */ 00029 MobileGui_base::MobileGui_base( QWidget* parent, const char* name, WFlags fl ) 00030 : QWidget( parent, name, fl ) 00031 { 00032 if ( !name ) 00033 setName( "MobileGui_base" ); 00034 MobileGui_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "MobileGui_baseLayout"); 00035 00036 GroupBox2 = new QGroupBox( this, "GroupBox2" ); 00037 GroupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, 0, 0, GroupBox2->sizePolicy().hasHeightForWidth() ) ); 00038 00039 TextLabel1 = new QLabel( GroupBox2, "TextLabel1" ); 00040 TextLabel1->setGeometry( QRect( 11, 42, 88, 16 ) ); 00041 00042 TextLabel3_2 = new QLabel( GroupBox2, "TextLabel3_2" ); 00043 TextLabel3_2->setGeometry( QRect( 11, 84, 88, 16 ) ); 00044 00045 mManufacturerLabel = new QLabel( GroupBox2, "mManufacturerLabel" ); 00046 mManufacturerLabel->setGeometry( QRect( 105, 21, 16, 16 ) ); 00047 00048 mGSMVersionLabel = new QLabel( GroupBox2, "mGSMVersionLabel" ); 00049 mGSMVersionLabel->setGeometry( QRect( 105, 63, 16, 16 ) ); 00050 00051 mSerialNumberLabel = new QLabel( GroupBox2, "mSerialNumberLabel" ); 00052 mSerialNumberLabel->setGeometry( QRect( 105, 84, 16, 16 ) ); 00053 00054 mModelLabel = new QLabel( GroupBox2, "mModelLabel" ); 00055 mModelLabel->setGeometry( QRect( 105, 42, 16, 16 ) ); 00056 00057 TextLabel3 = new QLabel( GroupBox2, "TextLabel3" ); 00058 TextLabel3->setGeometry( QRect( 11, 21, 88, 16 ) ); 00059 00060 TextLabel2 = new QLabel( GroupBox2, "TextLabel2" ); 00061 TextLabel2->setGeometry( QRect( 11, 63, 88, 16 ) ); 00062 00063 MobileGui_baseLayout->addWidget( GroupBox2, 0, 0 ); 00064 00065 layout21 = new QHBoxLayout( 0, 0, 6, "layout21"); 00066 00067 PushButton8_2 = new QPushButton( this, "PushButton8_2" ); 00068 layout21->addWidget( PushButton8_2 ); 00069 00070 PushButton8_3 = new QPushButton( this, "PushButton8_3" ); 00071 layout21->addWidget( PushButton8_3 ); 00072 spacer6 = new QSpacerItem( 321, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00073 layout21->addItem( spacer6 ); 00074 00075 MobileGui_baseLayout->addMultiCellLayout( layout21, 3, 3, 0, 1 ); 00076 00077 groupBox4 = new QGroupBox( this, "groupBox4" ); 00078 groupBox4->setColumnLayout(0, Qt::Vertical ); 00079 groupBox4->layout()->setSpacing( 6 ); 00080 groupBox4->layout()->setMargin( 11 ); 00081 groupBox4Layout = new QGridLayout( groupBox4->layout() ); 00082 groupBox4Layout->setAlignment( Qt::AlignTop ); 00083 00084 PushButton3 = new QPushButton( groupBox4, "PushButton3" ); 00085 00086 groupBox4Layout->addWidget( PushButton3, 0, 1 ); 00087 00088 PushButton12 = new QPushButton( groupBox4, "PushButton12" ); 00089 00090 groupBox4Layout->addWidget( PushButton12, 1, 1 ); 00091 spacer5 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); 00092 groupBox4Layout->addItem( spacer5, 3, 1 ); 00093 00094 PushButton4_2 = new QPushButton( groupBox4, "PushButton4_2" ); 00095 00096 groupBox4Layout->addWidget( PushButton4_2, 2, 1 ); 00097 00098 mMobileBook = new QListView( groupBox4, "mMobileBook" ); 00099 mMobileBook->addColumn( tr2i18n( "#" ) ); 00100 mMobileBook->addColumn( tr2i18n( "Phone" ) ); 00101 mMobileBook->addColumn( tr2i18n( "Type" ) ); 00102 mMobileBook->addColumn( tr2i18n( "Name" ) ); 00103 mMobileBook->setResizeMode( QListView::AllColumns ); 00104 00105 groupBox4Layout->addMultiCellWidget( mMobileBook, 0, 3, 0, 0 ); 00106 00107 MobileGui_baseLayout->addWidget( groupBox4, 2, 1 ); 00108 00109 groupBox3 = new QGroupBox( this, "groupBox3" ); 00110 groupBox3->setColumnLayout(0, Qt::Vertical ); 00111 groupBox3->layout()->setSpacing( 6 ); 00112 groupBox3->layout()->setMargin( 11 ); 00113 groupBox3Layout = new QGridLayout( groupBox3->layout() ); 00114 groupBox3Layout->setAlignment( Qt::AlignTop ); 00115 00116 mKabBook = new QListView( groupBox3, "mKabBook" ); 00117 mKabBook->addColumn( tr2i18n( "#" ) ); 00118 mKabBook->addColumn( tr2i18n( "Phone" ) ); 00119 mKabBook->addColumn( tr2i18n( "Type" ) ); 00120 mKabBook->addColumn( tr2i18n( "Name" ) ); 00121 mKabBook->setResizeMode( QListView::AllColumns ); 00122 00123 groupBox3Layout->addMultiCellWidget( mKabBook, 0, 2, 0, 0 ); 00124 00125 mReadKabButton = new QPushButton( groupBox3, "mReadKabButton" ); 00126 00127 groupBox3Layout->addWidget( mReadKabButton, 0, 1 ); 00128 spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 00129 groupBox3Layout->addItem( spacer4, 2, 1 ); 00130 00131 PushButton8 = new QPushButton( groupBox3, "PushButton8" ); 00132 00133 groupBox3Layout->addWidget( PushButton8, 1, 1 ); 00134 00135 MobileGui_baseLayout->addWidget( groupBox3, 2, 0 ); 00136 00137 layout24 = new QGridLayout( 0, 1, 1, 0, 6, "layout24"); 00138 00139 line1 = new QFrame( this, "line1" ); 00140 line1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, 0, 0, line1->sizePolicy().hasHeightForWidth() ) ); 00141 line1->setFrameShape( QFrame::HLine ); 00142 line1->setFrameShadow( QFrame::Sunken ); 00143 line1->setFrameShape( QFrame::HLine ); 00144 00145 layout24->addWidget( line1, 1, 1 ); 00146 00147 textLabel1 = new QLabel( this, "textLabel1" ); 00148 00149 layout24->addWidget( textLabel1, 1, 0 ); 00150 spacer8 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); 00151 layout24->addItem( spacer8, 0, 0 ); 00152 00153 MobileGui_baseLayout->addMultiCellLayout( layout24, 1, 1, 0, 1 ); 00154 00155 GroupBox1 = new QGroupBox( this, "GroupBox1" ); 00156 GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); 00157 GroupBox1->setColumnLayout(0, Qt::Vertical ); 00158 GroupBox1->layout()->setSpacing( 6 ); 00159 GroupBox1->layout()->setMargin( 11 ); 00160 GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); 00161 GroupBox1Layout->setAlignment( Qt::AlignTop ); 00162 00163 mStatus = new QLabel( GroupBox1, "mStatus" ); 00164 00165 GroupBox1Layout->addWidget( mStatus, 0, 0 ); 00166 00167 TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); 00168 00169 GroupBox1Layout->addWidget( TextLabel5, 1, 0 ); 00170 Spacer1 = new QSpacerItem( 77, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00171 GroupBox1Layout->addItem( Spacer1, 2, 0 ); 00172 00173 PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); 00174 00175 GroupBox1Layout->addWidget( PushButton1, 2, 1 ); 00176 00177 mSignalQualityLabel = new QLabel( GroupBox1, "mSignalQualityLabel" ); 00178 00179 GroupBox1Layout->addWidget( mSignalQualityLabel, 1, 1 ); 00180 00181 mBatteryChargeLabel = new QLabel( GroupBox1, "mBatteryChargeLabel" ); 00182 00183 GroupBox1Layout->addWidget( mBatteryChargeLabel, 0, 1 ); 00184 spacer9 = new QSpacerItem( 51, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00185 GroupBox1Layout->addItem( spacer9, 0, 2 ); 00186 00187 MobileGui_baseLayout->addWidget( GroupBox1, 0, 1 ); 00188 languageChange(); 00189 resize( QSize(865, 473).expandedTo(minimumSizeHint()) ); 00190 clearWState( WState_Polished ); 00191 00192 // signals and slots connections 00193 connect( mReadKabButton, SIGNAL( clicked() ), this, SLOT( readKabc() ) ); 00194 connect( PushButton8, SIGNAL( clicked() ), this, SLOT( writeKabc() ) ); 00195 connect( PushButton3, SIGNAL( clicked() ), this, SLOT( readPhonebook() ) ); 00196 connect( PushButton12, SIGNAL( clicked() ), this, SLOT( writePhonebook() ) ); 00197 connect( PushButton4_2, SIGNAL( clicked() ), this, SLOT( savePhonebook() ) ); 00198 connect( PushButton8_2, SIGNAL( clicked() ), this, SLOT( mergePhonebooks() ) ); 00199 connect( PushButton8_3, SIGNAL( clicked() ), this, SLOT( syncPhonebooks() ) ); 00200 connect( PushButton1, SIGNAL( clicked() ), this, SLOT( refreshStatus() ) ); 00201 00202 // tab order 00203 setTabOrder( mKabBook, mReadKabButton ); 00204 setTabOrder( mReadKabButton, PushButton8 ); 00205 setTabOrder( PushButton8, mMobileBook ); 00206 setTabOrder( mMobileBook, PushButton3 ); 00207 setTabOrder( PushButton3, PushButton12 ); 00208 setTabOrder( PushButton12, PushButton4_2 ); 00209 setTabOrder( PushButton4_2, PushButton1 ); 00210 setTabOrder( PushButton1, PushButton8_2 ); 00211 setTabOrder( PushButton8_2, PushButton8_3 ); 00212 } 00213 00214 /* 00215 * Destroys the object and frees any allocated resources 00216 */ 00217 MobileGui_base::~MobileGui_base() 00218 { 00219 // no need to delete child widgets, Qt does it all for us 00220 } 00221 00222 /* 00223 * Sets the strings of the subwidgets using the current 00224 * language. 00225 */ 00226 void MobileGui_base::languageChange() 00227 { 00228 setCaption( tr2i18n( "Mobile Device" ) ); 00229 GroupBox2->setTitle( tr2i18n( "Model Information" ) ); 00230 TextLabel1->setText( tr2i18n( "Model:" ) ); 00231 TextLabel3_2->setText( tr2i18n( "Serial number:" ) ); 00232 mManufacturerLabel->setText( tr2i18n( "x" ) ); 00233 mGSMVersionLabel->setText( tr2i18n( "x" ) ); 00234 mSerialNumberLabel->setText( tr2i18n( "x" ) ); 00235 mModelLabel->setText( tr2i18n( "x" ) ); 00236 TextLabel3->setText( tr2i18n( "Manufacturer:" ) ); 00237 TextLabel2->setText( tr2i18n( "GSM version:" ) ); 00238 PushButton8_2->setText( tr2i18n( "Merge" ) ); 00239 PushButton8_3->setText( tr2i18n( "Sync" ) ); 00240 groupBox4->setTitle( tr2i18n( "Mobile Phone Book" ) ); 00241 PushButton3->setText( tr2i18n( "Read" ) ); 00242 PushButton12->setText( tr2i18n( "Write" ) ); 00243 PushButton4_2->setText( tr2i18n( "Save to File..." ) ); 00244 mMobileBook->header()->setLabel( 0, tr2i18n( "#" ) ); 00245 mMobileBook->header()->setLabel( 1, tr2i18n( "Phone" ) ); 00246 mMobileBook->header()->setLabel( 2, tr2i18n( "Type" ) ); 00247 mMobileBook->header()->setLabel( 3, tr2i18n( "Name" ) ); 00248 groupBox3->setTitle( tr2i18n( "KDE Address Book" ) ); 00249 mKabBook->header()->setLabel( 0, tr2i18n( "#" ) ); 00250 mKabBook->header()->setLabel( 1, tr2i18n( "Phone" ) ); 00251 mKabBook->header()->setLabel( 2, tr2i18n( "Type" ) ); 00252 mKabBook->header()->setLabel( 3, tr2i18n( "Name" ) ); 00253 mReadKabButton->setText( tr2i18n( "Read" ) ); 00254 PushButton8->setText( tr2i18n( "Write" ) ); 00255 textLabel1->setText( tr2i18n( "Address Books" ) ); 00256 GroupBox1->setTitle( tr2i18n( "Status" ) ); 00257 mStatus->setText( tr2i18n( "Battery charge:" ) ); 00258 TextLabel5->setText( tr2i18n( "Signal quality:" ) ); 00259 PushButton1->setText( tr2i18n( "Refresh" ) ); 00260 mSignalQualityLabel->setText( tr2i18n( "x" ) ); 00261 mBatteryChargeLabel->setText( tr2i18n( "xx %" ) ); 00262 } 00263 00264 void MobileGui_base::mergePhonebooks() 00265 { 00266 qWarning( "MobileGui_base::mergePhonebooks(): Not implemented yet" ); 00267 } 00268 00269 void MobileGui_base::readKabc() 00270 { 00271 qWarning( "MobileGui_base::readKabc(): Not implemented yet" ); 00272 } 00273 00274 void MobileGui_base::readModelInformation() 00275 { 00276 qWarning( "MobileGui_base::readModelInformation(): Not implemented yet" ); 00277 } 00278 00279 void MobileGui_base::readPhonebook() 00280 { 00281 qWarning( "MobileGui_base::readPhonebook(): Not implemented yet" ); 00282 } 00283 00284 void MobileGui_base::refreshStatus() 00285 { 00286 qWarning( "MobileGui_base::refreshStatus(): Not implemented yet" ); 00287 } 00288 00289 void MobileGui_base::savePhonebook() 00290 { 00291 qWarning( "MobileGui_base::savePhonebook(): Not implemented yet" ); 00292 } 00293 00294 void MobileGui_base::syncPhonebooks() 00295 { 00296 qWarning( "MobileGui_base::syncPhonebooks(): Not implemented yet" ); 00297 } 00298 00299 void MobileGui_base::writeKabc() 00300 { 00301 qWarning( "MobileGui_base::writeKabc(): Not implemented yet" ); 00302 } 00303 00304 void MobileGui_base::writePhonebook() 00305 { 00306 qWarning( "MobileGui_base::writePhonebook(): Not implemented yet" ); 00307 } 00308 00309 #include "mobilegui_base.moc"
KDE Logo
This file is part of the documentation for kandy Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:34 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003