KDevelop API Documentation

vcs/cvsservice/releaseinputdialogbase.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 './releaseinputdialogbase.ui' 00005 ** 00006 ** Created: Wed Oct 6 17:37:28 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 "releaseinputdialogbase.h" 00013 00014 #include <qvariant.h> 00015 #include <qpushbutton.h> 00016 #include <qbuttongroup.h> 00017 #include <qradiobutton.h> 00018 #include <qlineedit.h> 00019 #include <qgroupbox.h> 00020 #include <qcheckbox.h> 00021 #include <qframe.h> 00022 #include <qlayout.h> 00023 #include <qtooltip.h> 00024 #include <qwhatsthis.h> 00025 00026 /* 00027 * Constructs a ReleaseInputDialogBase as a child of 'parent', with the 00028 * name 'name' and widget flags set to 'f'. 00029 * 00030 * The dialog will by default be modeless, unless you set 'modal' to 00031 * TRUE to construct a modal dialog. 00032 */ 00033 ReleaseInputDialogBase::ReleaseInputDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 00034 : QDialog( parent, name, modal, fl ) 00035 { 00036 if ( !name ) 00037 setName( "ReleaseInputDialogBase" ); 00038 setSizeGripEnabled( TRUE ); 00039 ReleaseInputDialogBaseLayout = new QVBoxLayout( this, 11, 6, "ReleaseInputDialogBaseLayout"); 00040 00041 buttonGroup1 = new QButtonGroup( this, "buttonGroup1" ); 00042 buttonGroup1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) ); 00043 buttonGroup1->setAlignment( int( QButtonGroup::AlignVCenter | QButtonGroup::AlignLeft ) ); 00044 buttonGroup1->setColumnLayout(0, Qt::Vertical ); 00045 buttonGroup1->layout()->setSpacing( 6 ); 00046 buttonGroup1->layout()->setMargin( 11 ); 00047 buttonGroup1Layout = new QVBoxLayout( buttonGroup1->layout() ); 00048 buttonGroup1Layout->setAlignment( Qt::AlignTop ); 00049 00050 headRadio = new QRadioButton( buttonGroup1, "headRadio" ); 00051 headRadio->setChecked( TRUE ); 00052 buttonGroup1Layout->addWidget( headRadio ); 00053 00054 layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); 00055 00056 revisionRadio = new QRadioButton( buttonGroup1, "revisionRadio" ); 00057 revisionRadio->setChecked( FALSE ); 00058 layout3->addWidget( revisionRadio ); 00059 00060 revisionEdit = new QLineEdit( buttonGroup1, "revisionEdit" ); 00061 revisionEdit->setEnabled( FALSE ); 00062 layout3->addWidget( revisionEdit ); 00063 buttonGroup1Layout->addLayout( layout3 ); 00064 00065 layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 00066 00067 dateRadio = new QRadioButton( buttonGroup1, "dateRadio" ); 00068 layout2->addWidget( dateRadio ); 00069 00070 dateEdit = new QLineEdit( buttonGroup1, "dateEdit" ); 00071 dateEdit->setEnabled( FALSE ); 00072 layout2->addWidget( dateEdit ); 00073 buttonGroup1Layout->addLayout( layout2 ); 00074 ReleaseInputDialogBaseLayout->addWidget( buttonGroup1 ); 00075 00076 groupBox1 = new QGroupBox( this, "groupBox1" ); 00077 groupBox1->setColumnLayout(0, Qt::Vertical ); 00078 groupBox1->layout()->setSpacing( 6 ); 00079 groupBox1->layout()->setMargin( 11 ); 00080 groupBox1Layout = new QGridLayout( groupBox1->layout() ); 00081 groupBox1Layout->setAlignment( Qt::AlignTop ); 00082 00083 revertCheck = new QCheckBox( groupBox1, "revertCheck" ); 00084 00085 groupBox1Layout->addWidget( revertCheck, 0, 0 ); 00086 ReleaseInputDialogBaseLayout->addWidget( groupBox1 ); 00087 00088 line1 = new QFrame( this, "line1" ); 00089 line1->setFrameShape( QFrame::HLine ); 00090 line1->setFrameShadow( QFrame::Sunken ); 00091 line1->setFrameShape( QFrame::HLine ); 00092 ReleaseInputDialogBaseLayout->addWidget( line1 ); 00093 00094 layout2_2 = new QHBoxLayout( 0, 0, 6, "layout2_2"); 00095 Horizontal_Spacing2 = new QSpacerItem( 140, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00096 layout2_2->addItem( Horizontal_Spacing2 ); 00097 00098 buttonOk = new QPushButton( this, "buttonOk" ); 00099 buttonOk->setAutoDefault( TRUE ); 00100 buttonOk->setDefault( TRUE ); 00101 layout2_2->addWidget( buttonOk ); 00102 00103 buttonCancel = new QPushButton( this, "buttonCancel" ); 00104 buttonCancel->setAutoDefault( TRUE ); 00105 layout2_2->addWidget( buttonCancel ); 00106 ReleaseInputDialogBaseLayout->addLayout( layout2_2 ); 00107 languageChange(); 00108 resize( QSize(626, 239).expandedTo(minimumSizeHint()) ); 00109 clearWState( WState_Polished ); 00110 00111 // signals and slots connections 00112 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); 00113 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); 00114 connect( dateRadio, SIGNAL( toggled(bool) ), dateEdit, SLOT( setEnabled(bool) ) ); 00115 connect( revisionRadio, SIGNAL( toggled(bool) ), revisionEdit, SLOT( setEnabled(bool) ) ); 00116 } 00117 00118 /* 00119 * Destroys the object and frees any allocated resources 00120 */ 00121 ReleaseInputDialogBase::~ReleaseInputDialogBase() 00122 { 00123 // no need to delete child widgets, Qt does it all for us 00124 } 00125 00126 /* 00127 * Sets the strings of the subwidgets using the current 00128 * language. 00129 */ 00130 void ReleaseInputDialogBase::languageChange() 00131 { 00132 setCaption( tr2i18n( "Update/Revert to Release/Branch/Date" ) ); 00133 buttonGroup1->setTitle( tr2i18n( "Revision" ) ); 00134 headRadio->setText( tr2i18n( "&Most recent from HEAD" ) ); 00135 revisionRadio->setText( tr2i18n( "An arbitrary &revision/tag/branch:" ) ); 00136 QToolTip::add( revisionEdit, tr2i18n( "Type your release name here (leave empty for HEAD)" ) ); 00137 QWhatsThis::add( revisionEdit, tr2i18n( "Fill the field with the release or branch name (i.e. <i>make_it_cool, kdevelop_alpha5, ...</i>)" ) ); 00138 dateRadio->setText( tr2i18n( "An arbitrary &date:" ) ); 00139 QWhatsThis::add( dateEdit, tr2i18n( "FIll the field with a date (i.e. <i>20030204</i>)" ) ); 00140 groupBox1->setTitle( tr2i18n( "Additional Options" ) ); 00141 revertCheck->setText( tr2i18n( "&Enforce even if the file has been locally modified (revert)" ) ); 00142 buttonOk->setText( tr2i18n( "&OK" ) ); 00143 buttonOk->setAccel( QKeySequence( QString::null ) ); 00144 buttonCancel->setText( tr2i18n( "&Cancel" ) ); 00145 buttonCancel->setAccel( QKeySequence( QString::null ) ); 00146 } 00147 00148 #include "releaseinputdialogbase.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 Wed Oct 6 17:39:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003