00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "cvsformbase.h"
00013
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qlabel.h>
00017 #include <qlineedit.h>
00018 #include <qcombobox.h>
00019 #include <qcheckbox.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028 CvsFormBase::CvsFormBase( QWidget* parent, const char* name, WFlags fl )
00029 : QWidget( parent, name, fl )
00030 {
00031 if ( !name )
00032 setName( "CvsFormBase" );
00033 CvsFormBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "CvsFormBaseLayout");
00034
00035 TextLabel5 = new QLabel( this, "TextLabel5" );
00036 TextLabel5->setFrameShape( QLabel::NoFrame );
00037 TextLabel5->setFrameShadow( QLabel::Plain );
00038
00039 CvsFormBaseLayout->addWidget( TextLabel5, 5, 0 );
00040
00041 module_edit = new QLineEdit( this, "module_edit" );
00042
00043 CvsFormBaseLayout->addMultiCellWidget( module_edit, 2, 2, 1, 3 );
00044
00045 vendor_edit = new QLineEdit( this, "vendor_edit" );
00046
00047 CvsFormBaseLayout->addMultiCellWidget( vendor_edit, 3, 3, 1, 3 );
00048
00049 TextLabel3 = new QLabel( this, "TextLabel3" );
00050
00051 CvsFormBaseLayout->addWidget( TextLabel3, 4, 0 );
00052
00053 TextLabel2 = new QLabel( this, "TextLabel2" );
00054
00055 CvsFormBaseLayout->addWidget( TextLabel2, 2, 0 );
00056
00057 TextLabel4 = new QLabel( this, "TextLabel4" );
00058
00059 CvsFormBaseLayout->addWidget( TextLabel4, 3, 0 );
00060
00061 message_edit = new QLineEdit( this, "message_edit" );
00062
00063 CvsFormBaseLayout->addMultiCellWidget( message_edit, 4, 4, 1, 3 );
00064
00065 release_edit = new QLineEdit( this, "release_edit" );
00066
00067 CvsFormBaseLayout->addMultiCellWidget( release_edit, 5, 5, 1, 3 );
00068
00069 TextLabel1 = new QLabel( this, "TextLabel1" );
00070 TextLabel1->setFrameShape( QLabel::NoFrame );
00071 TextLabel1->setFrameShadow( QLabel::Plain );
00072
00073 CvsFormBaseLayout->addWidget( TextLabel1, 0, 0 );
00074
00075 serverPathEdit = new QLineEdit( this, "serverPathEdit" );
00076
00077 CvsFormBaseLayout->addMultiCellWidget( serverPathEdit, 0, 0, 1, 3 );
00078
00079 TextLabel1_2 = new QLabel( this, "TextLabel1_2" );
00080 TextLabel1_2->setFrameShape( QLabel::NoFrame );
00081 TextLabel1_2->setFrameShadow( QLabel::Plain );
00082
00083 CvsFormBaseLayout->addWidget( TextLabel1_2, 1, 0 );
00084
00085 cvsRshComboBox = new QComboBox( FALSE, this, "cvsRshComboBox" );
00086
00087 CvsFormBaseLayout->addWidget( cvsRshComboBox, 1, 1 );
00088
00089 init_check = new QCheckBox( this, "init_check" );
00090
00091 CvsFormBaseLayout->addWidget( init_check, 1, 3 );
00092 spacer1 = new QSpacerItem( 51, 20, QSizePolicy::Preferred, QSizePolicy::Minimum );
00093 CvsFormBaseLayout->addItem( spacer1, 1, 2 );
00094 languageChange();
00095 resize( QSize(603, 625).expandedTo(minimumSizeHint()) );
00096 clearWState( WState_Polished );
00097
00098
00099 setTabOrder( serverPathEdit, cvsRshComboBox );
00100 setTabOrder( cvsRshComboBox, init_check );
00101 setTabOrder( init_check, module_edit );
00102 setTabOrder( module_edit, vendor_edit );
00103 setTabOrder( vendor_edit, message_edit );
00104 setTabOrder( message_edit, release_edit );
00105
00106
00107 TextLabel5->setBuddy( release_edit );
00108 TextLabel3->setBuddy( message_edit );
00109 TextLabel2->setBuddy( module_edit );
00110 TextLabel4->setBuddy( vendor_edit );
00111 TextLabel1->setBuddy( serverPathEdit );
00112 TextLabel1_2->setBuddy( cvsRshComboBox );
00113 }
00114
00115
00116
00117
00118 CvsFormBase::~CvsFormBase()
00119 {
00120
00121 }
00122
00123
00124
00125
00126
00127 void CvsFormBase::languageChange()
00128 {
00129 QWhatsThis::add( this, tr2i18n( "This form allows you to create a CVS repository for your new project" ) );
00130 TextLabel5->setText( tr2i18n( "Release &tag:" ) );
00131 QToolTip::add( module_edit, tr2i18n( "Enter the name of the repository" ) );
00132 QWhatsThis::add( module_edit, tr2i18n( "CVS Repository name goes here.\n"
00133 "Most of the thime you'll just reuse the project name" ) );
00134 vendor_edit->setText( tr2i18n( "vendor" ) );
00135 QToolTip::add( vendor_edit, tr2i18n( "Enter the vendor name" ) );
00136 TextLabel3->setText( tr2i18n( "&Message:" ) );
00137 TextLabel2->setText( tr2i18n( "&Module:" ) );
00138 TextLabel4->setText( tr2i18n( "&Vendor tag:" ) );
00139 message_edit->setText( tr2i18n( "new project" ) );
00140 QToolTip::add( message_edit, tr2i18n( "Repository creation message" ) );
00141 release_edit->setText( tr2i18n( "start" ) );
00142 QToolTip::add( release_edit, tr2i18n( "Tag that will be associated with initial state" ) );
00143 TextLabel1->setText( tr2i18n( "&Server path:" ) );
00144 QToolTip::add( serverPathEdit, tr2i18n( "Enter your CVS Root location" ) );
00145 QWhatsThis::add( serverPathEdit, tr2i18n( "CVS Root location goes here, for example:<ul>\n"
00146 "<li>/home/cvsroot or</li><li>:pserver:me@localhost:/home/cvs</li></ul>" ) );
00147 TextLabel1_2->setText( tr2i18n( "CVS_&RSH:" ) );
00148 cvsRshComboBox->clear();
00149 cvsRshComboBox->insertItem( QString::null );
00150 cvsRshComboBox->insertItem( tr2i18n( "ssh" ) );
00151 init_check->setText( tr2i18n( "Init &root" ) );
00152 QToolTip::add( init_check, tr2i18n( "Check if you defined a new CVS Root" ) );
00153 }
00154
00155 #include "cvsformbase.moc"