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

newcontactdlg.cpp

00001 #include <klocale.h> 00002 /**************************************************************************** 00003 ** Form implementation generated from reading ui file '/home/noopy/bluephone/src/newcontactdlg.ui' 00004 ** 00005 ** Created: Mon Aug 16 21:35:54 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 "newcontactdlg.h" 00012 00013 #include <qvariant.h> 00014 #include <qpushbutton.h> 00015 #include <qgroupbox.h> 00016 #include <qlabel.h> 00017 #include <qlineedit.h> 00018 #include <qcombobox.h> 00019 #include <qlayout.h> 00020 #include <qtooltip.h> 00021 #include <qwhatsthis.h> 00022 00023 /* 00024 * Constructs a FormNewContactDlg as a child of 'parent', with the 00025 * name 'name' and widget flags set to 'f'. 00026 * 00027 * The dialog will by default be modeless, unless you set 'modal' to 00028 * TRUE to construct a modal dialog. 00029 */ 00030 FormNewContactDlg::FormNewContactDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) 00031 : QDialog( parent, name, modal, fl ) 00032 { 00033 if ( !name ) 00034 setName( "FormNewContactDlg" ); 00035 FormNewContactDlgLayout = new QVBoxLayout( this, 11, 6, "FormNewContactDlgLayout"); 00036 00037 layout3 = new QVBoxLayout( 0, 0, 6, "layout3"); 00038 00039 groupBoxNewContact = new QGroupBox( this, "groupBoxNewContact" ); 00040 groupBoxNewContact->setColumnLayout(0, Qt::Vertical ); 00041 groupBoxNewContact->layout()->setSpacing( 6 ); 00042 groupBoxNewContact->layout()->setMargin( 11 ); 00043 groupBoxNewContactLayout = new QVBoxLayout( groupBoxNewContact->layout() ); 00044 groupBoxNewContactLayout->setAlignment( Qt::AlignTop ); 00045 00046 layout1 = new QGridLayout( 0, 1, 1, 0, 6, "layout1"); 00047 00048 textLabelNewContactNumber = new QLabel( groupBoxNewContact, "textLabelNewContactNumber" ); 00049 00050 layout1->addWidget( textLabelNewContactNumber, 1, 0 ); 00051 00052 lineEditNewContactNumber = new QLineEdit( groupBoxNewContact, "lineEditNewContactNumber" ); 00053 00054 layout1->addWidget( lineEditNewContactNumber, 1, 1 ); 00055 00056 textLabelNewContactName = new QLabel( groupBoxNewContact, "textLabelNewContactName" ); 00057 00058 layout1->addWidget( textLabelNewContactName, 0, 0 ); 00059 00060 comboBoxNewContactType = new QComboBox( FALSE, groupBoxNewContact, "comboBoxNewContactType" ); 00061 00062 layout1->addWidget( comboBoxNewContactType, 2, 1 ); 00063 00064 textLabelNewContactType = new QLabel( groupBoxNewContact, "textLabelNewContactType" ); 00065 00066 layout1->addWidget( textLabelNewContactType, 2, 0 ); 00067 00068 lineEditNewContactName = new QLineEdit( groupBoxNewContact, "lineEditNewContactName" ); 00069 00070 layout1->addWidget( lineEditNewContactName, 0, 1 ); 00071 groupBoxNewContactLayout->addLayout( layout1 ); 00072 layout3->addWidget( groupBoxNewContact ); 00073 00074 layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 00075 QSpacerItem* spacer = new QSpacerItem( 60, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00076 layout2->addItem( spacer ); 00077 00078 pushButtonNewContactCancel = new QPushButton( this, "pushButtonNewContactCancel" ); 00079 layout2->addWidget( pushButtonNewContactCancel ); 00080 00081 pushButtonNewContactOk = new QPushButton( this, "pushButtonNewContactOk" ); 00082 layout2->addWidget( pushButtonNewContactOk ); 00083 layout3->addLayout( layout2 ); 00084 FormNewContactDlgLayout->addLayout( layout3 ); 00085 languageChange(); 00086 resize( QSize(282, 198).expandedTo(minimumSizeHint()) ); 00087 clearWState( WState_Polished ); 00088 00089 // signals and slots connections 00090 connect( pushButtonNewContactCancel, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); 00091 connect( pushButtonNewContactOk, SIGNAL( clicked() ), this, SLOT( readContact() ) ); 00092 00093 // tab order 00094 setTabOrder( lineEditNewContactName, lineEditNewContactNumber ); 00095 setTabOrder( lineEditNewContactNumber, comboBoxNewContactType ); 00096 setTabOrder( comboBoxNewContactType, pushButtonNewContactOk ); 00097 setTabOrder( pushButtonNewContactOk, pushButtonNewContactCancel ); 00098 00099 // buddies 00100 textLabelNewContactNumber->setBuddy( lineEditNewContactNumber ); 00101 textLabelNewContactName->setBuddy( lineEditNewContactName ); 00102 textLabelNewContactType->setBuddy( comboBoxNewContactType ); 00103 } 00104 00105 /* 00106 * Destroys the object and frees any allocated resources 00107 */ 00108 FormNewContactDlg::~FormNewContactDlg() 00109 { 00110 // no need to delete child widgets, Qt does it all for us 00111 } 00112 00113 /* 00114 * Sets the strings of the subwidgets using the current 00115 * language. 00116 */ 00117 void FormNewContactDlg::languageChange() 00118 { 00119 setCaption( tr2i18n( "FormNewContactDlg" ) ); 00120 groupBoxNewContact->setTitle( tr2i18n( "Contact Properties" ) ); 00121 textLabelNewContactNumber->setText( tr2i18n( "Number" ) ); 00122 lineEditNewContactNumber->setInputMask( tr2i18n( "#00000000000000000000; " ) ); 00123 QToolTip::add( lineEditNewContactNumber, tr2i18n( "Only digits are allowed, a leading + is also valid" ) ); 00124 textLabelNewContactName->setText( tr2i18n( "Name" ) ); 00125 comboBoxNewContactType->clear(); 00126 comboBoxNewContactType->insertItem( tr2i18n( "Home" ) ); 00127 comboBoxNewContactType->insertItem( tr2i18n( "Work" ) ); 00128 comboBoxNewContactType->insertItem( tr2i18n( "Mobile" ) ); 00129 comboBoxNewContactType->insertItem( tr2i18n( "Fax" ) ); 00130 comboBoxNewContactType->insertItem( tr2i18n( "Other" ) ); 00131 textLabelNewContactType->setText( tr2i18n( "Type" ) ); 00132 pushButtonNewContactCancel->setText( tr2i18n( "Cancel" ) ); 00133 pushButtonNewContactOk->setText( tr2i18n( "Ok" ) ); 00134 } 00135 00136 void FormNewContactDlg::readContact() 00137 { 00138 qWarning( "FormNewContactDlg::readContact(): Not implemented yet" ); 00139 } 00140 00141 void FormNewContactDlg::closeDialog() 00142 { 00143 qWarning( "FormNewContactDlg::closeDialog(): Not implemented yet" ); 00144 } 00145 00146 #include "newcontactdlg.moc"

Generated on Tue Aug 17 14:42:27 2004 for BluePhone by doxygen 1.3.7