KDevelop API Documentation

parts/appwizard/appwizarddlgbase.cpp

Go to the documentation of this file.
00001 #include <kdialog.h> 00002 #include <klocale.h> 00003 /**************************************************************************** 00004 ** Form implementation generated from reading ui file './appwizarddlgbase.ui' 00005 ** 00006 ** Created: Tue Oct 19 07:48:56 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 "appwizarddlgbase.h" 00013 00014 #include <qvariant.h> 00015 #include <kdialog.h> 00016 #include <qpushbutton.h> 00017 #include <qwidget.h> 00018 #include <qheader.h> 00019 #include <qlistview.h> 00020 #include <qlabel.h> 00021 #include <qmultilineedit.h> 00022 #include <qgroupbox.h> 00023 #include <kurlrequester.h> 00024 #include <qlineedit.h> 00025 #include <qcombobox.h> 00026 #include <qlayout.h> 00027 #include <qtooltip.h> 00028 #include <qwhatsthis.h> 00029 00030 /* 00031 * Constructs a AppWizardDialogBase as a child of 'parent', with the 00032 * name 'name' and widget flags set to 'f'. 00033 * 00034 * The wizard will by default be modeless, unless you set 'modal' to 00035 * TRUE to construct a modal wizard. 00036 */ 00037 AppWizardDialogBase::AppWizardDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 00038 : QWizard( parent, name, modal, fl ) 00039 { 00040 if ( !name ) 00041 setName( "AppWizardDlgBase" ); 00042 00043 generalPage = new QWidget( this, "generalPage" ); 00044 generalPageLayout = new QGridLayout( generalPage, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "generalPageLayout"); 00045 00046 templates_listview = new QListView( generalPage, "templates_listview" ); 00047 templates_listview->addColumn( QString::null ); 00048 templates_listview->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 1, 1, templates_listview->sizePolicy().hasHeightForWidth() ) ); 00049 templates_listview->setRootIsDecorated( TRUE ); 00050 templates_listview->setResizeMode( QListView::LastColumn ); 00051 00052 generalPageLayout->addMultiCellWidget( templates_listview, 0, 1, 0, 0 ); 00053 00054 icon_label = new QLabel( generalPage, "icon_label" ); 00055 icon_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, icon_label->sizePolicy().hasHeightForWidth() ) ); 00056 icon_label->setMinimumSize( QSize( 250, 180 ) ); 00057 icon_label->setMaximumSize( QSize( 250, 180 ) ); 00058 icon_label->setFrameShape( QLabel::WinPanel ); 00059 icon_label->setFrameShadow( QLabel::Sunken ); 00060 icon_label->setScaledContents( FALSE ); 00061 icon_label->setAlignment( int( QLabel::AlignCenter ) ); 00062 00063 generalPageLayout->addWidget( icon_label, 0, 1 ); 00064 00065 desc_textview = new QMultiLineEdit( generalPage, "desc_textview" ); 00066 desc_textview->setEnabled( TRUE ); 00067 desc_textview->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, desc_textview->sizePolicy().hasHeightForWidth() ) ); 00068 desc_textview->setMinimumSize( QSize( 250, 0 ) ); 00069 desc_textview->setMaximumSize( QSize( 250, 32767 ) ); 00070 desc_textview->setFocusPolicy( QMultiLineEdit::NoFocus ); 00071 desc_textview->setWordWrap( QMultiLineEdit::WidgetWidth ); 00072 desc_textview->setReadOnly( TRUE ); 00073 00074 generalPageLayout->addWidget( desc_textview, 1, 1 ); 00075 00076 GroupBox1 = new QGroupBox( generalPage, "GroupBox1" ); 00077 GroupBox1->setColumnLayout(0, Qt::Vertical ); 00078 GroupBox1->layout()->setSpacing( KDialog::spacingHint() ); 00079 GroupBox1->layout()->setMargin( KDialog::marginHint() ); 00080 GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); 00081 GroupBox1Layout->setAlignment( Qt::AlignTop ); 00082 00083 location_label = new QLabel( GroupBox1, "location_label" ); 00084 00085 GroupBox1Layout->addWidget( location_label, 1, 0 ); 00086 00087 author_label = new QLabel( GroupBox1, "author_label" ); 00088 00089 GroupBox1Layout->addWidget( author_label, 2, 0 ); 00090 00091 dest_edit = new KURLRequester( GroupBox1, "dest_edit" ); 00092 00093 GroupBox1Layout->addMultiCellWidget( dest_edit, 1, 1, 1, 3 ); 00094 00095 appname_edit = new QLineEdit( GroupBox1, "appname_edit" ); 00096 00097 GroupBox1Layout->addMultiCellWidget( appname_edit, 0, 0, 1, 3 ); 00098 00099 version_label = new QLabel( GroupBox1, "version_label" ); 00100 00101 GroupBox1Layout->addWidget( version_label, 3, 0 ); 00102 00103 appname_label = new QLabel( GroupBox1, "appname_label" ); 00104 00105 GroupBox1Layout->addWidget( appname_label, 0, 0 ); 00106 00107 version_edit = new QLineEdit( GroupBox1, "version_edit" ); 00108 00109 GroupBox1Layout->addWidget( version_edit, 3, 1 ); 00110 00111 license_label = new QLabel( GroupBox1, "license_label" ); 00112 00113 GroupBox1Layout->addWidget( license_label, 3, 2 ); 00114 00115 license_combo = new QComboBox( FALSE, GroupBox1, "license_combo" ); 00116 00117 GroupBox1Layout->addWidget( license_combo, 3, 3 ); 00118 00119 author_edit = new QLineEdit( GroupBox1, "author_edit" ); 00120 00121 GroupBox1Layout->addWidget( author_edit, 2, 1 ); 00122 00123 email_label = new QLabel( GroupBox1, "email_label" ); 00124 00125 GroupBox1Layout->addWidget( email_label, 2, 2 ); 00126 00127 email_edit = new QLineEdit( GroupBox1, "email_edit" ); 00128 00129 GroupBox1Layout->addWidget( email_edit, 2, 3 ); 00130 00131 finalLoc_label = new QLabel( GroupBox1, "finalLoc_label" ); 00132 00133 GroupBox1Layout->addMultiCellWidget( finalLoc_label, 4, 4, 1, 4 ); 00134 00135 TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); 00136 00137 GroupBox1Layout->addWidget( TextLabel3, 4, 0 ); 00138 00139 generalPageLayout->addMultiCellWidget( GroupBox1, 2, 2, 0, 1 ); 00140 addPage( generalPage, QString("") ); 00141 languageChange(); 00142 resize( QSize(563, 585).expandedTo(minimumSizeHint()) ); 00143 clearWState( WState_Polished ); 00144 00145 // signals and slots connections 00146 connect( templates_listview, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( templatesTreeViewClicked(QListViewItem*) ) ); 00147 connect( author_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( textChanged() ) ); 00148 connect( version_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( textChanged() ) ); 00149 connect( dest_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( projectLocationChanged() ) ); 00150 connect( dest_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( textChanged() ) ); 00151 connect( dest_edit, SIGNAL( urlSelected(const QString&) ), this, SLOT( destButtonClicked(const QString&) ) ); 00152 connect( license_combo, SIGNAL( activated(int) ), this, SLOT( licenseChanged() ) ); 00153 connect( email_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( textChanged() ) ); 00154 connect( appname_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( textChanged() ) ); 00155 connect( appname_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( projectLocationChanged() ) ); 00156 00157 // tab order 00158 setTabOrder( templates_listview, appname_edit ); 00159 setTabOrder( appname_edit, dest_edit ); 00160 setTabOrder( dest_edit, author_edit ); 00161 setTabOrder( author_edit, email_edit ); 00162 setTabOrder( email_edit, version_edit ); 00163 setTabOrder( version_edit, license_combo ); 00164 00165 // buddies 00166 location_label->setBuddy( dest_edit ); 00167 author_label->setBuddy( author_edit ); 00168 version_label->setBuddy( version_edit ); 00169 appname_label->setBuddy( appname_edit ); 00170 license_label->setBuddy( license_combo ); 00171 email_label->setBuddy( email_edit ); 00172 } 00173 00174 /* 00175 * Destroys the object and frees any allocated resources 00176 */ 00177 AppWizardDialogBase::~AppWizardDialogBase() 00178 { 00179 // no need to delete child widgets, Qt does it all for us 00180 } 00181 00182 /* 00183 * Sets the strings of the subwidgets using the current 00184 * language. 00185 */ 00186 void AppWizardDialogBase::languageChange() 00187 { 00188 setCaption( tr2i18n( "Create New Project" ) ); 00189 templates_listview->header()->setLabel( 0, QString::null ); 00190 desc_textview->setText( QString::null ); 00191 GroupBox1->setTitle( tr2i18n( "Properties" ) ); 00192 location_label->setText( tr2i18n( "&Location:" ) ); 00193 author_label->setText( tr2i18n( "&Author:" ) ); 00194 version_label->setText( tr2i18n( "&Version:" ) ); 00195 appname_label->setText( tr2i18n( "Application &name:" ) ); 00196 version_edit->setText( tr2i18n( "0.1" ) ); 00197 license_label->setText( tr2i18n( "L&icense:" ) ); 00198 license_combo->clear(); 00199 license_combo->insertItem( tr2i18n( "GPL" ) ); 00200 license_combo->insertItem( tr2i18n( "BSD" ) ); 00201 license_combo->insertItem( tr2i18n( "QPL" ) ); 00202 license_combo->insertItem( tr2i18n( "LGPL" ) ); 00203 license_combo->insertItem( tr2i18n( "Custom" ) ); 00204 email_label->setText( tr2i18n( "&Email:" ) ); 00205 finalLoc_label->setText( tr2i18n( "TextLabel4" ) ); 00206 TextLabel3->setText( tr2i18n( "Final location:" ) ); 00207 setTitle( generalPage, tr2i18n( "General" ) ); 00208 } 00209 00210 void AppWizardDialogBase::licenseChanged() 00211 { 00212 qWarning( "AppWizardDialogBase::licenseChanged(): Not implemented yet" ); 00213 } 00214 00215 void AppWizardDialogBase::destButtonClicked(const QString&) 00216 { 00217 qWarning( "AppWizardDialogBase::destButtonClicked(const QString&): Not implemented yet" ); 00218 } 00219 00220 void AppWizardDialogBase::projectLocationChanged() 00221 { 00222 qWarning( "AppWizardDialogBase::projectLocationChanged(): Not implemented yet" ); 00223 } 00224 00225 void AppWizardDialogBase::projectNameChanged() 00226 { 00227 qWarning( "AppWizardDialogBase::projectNameChanged(): Not implemented yet" ); 00228 } 00229 00230 void AppWizardDialogBase::templatesTreeViewClicked(QListViewItem*) 00231 { 00232 qWarning( "AppWizardDialogBase::templatesTreeViewClicked(QListViewItem*): Not implemented yet" ); 00233 } 00234 00235 void AppWizardDialogBase::textChanged() 00236 { 00237 qWarning( "AppWizardDialogBase::textChanged(): Not implemented yet" ); 00238 } 00239 00240 #include "appwizarddlgbase.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:49 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003