KDevelop API Documentation

commitdialogbase.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 './commitdialogbase.ui'
00005 **
00006 ** Created: Tue Mar 22 23:59:19 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "commitdialogbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qtextedit.h>
00018 #include <qcheckbox.h>
00019 #include <qlineedit.h>
00020 #include <qframe.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 
00025 /*
00026  *  Constructs a CommitDialogBase as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  *
00029  *  The dialog will by default be modeless, unless you set 'modal' to
00030  *  TRUE to construct a modal dialog.
00031  */
00032 CommitDialogBase::CommitDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00033     : QDialog( parent, name, modal, fl )
00034 {
00035     if ( !name )
00036     setName( "CommitDialogBase" );
00037     setSizeGripEnabled( TRUE );
00038     CommitDialogBaseLayout = new QVBoxLayout( this, 11, 6, "CommitDialogBaseLayout"); 
00039 
00040     groupBox1 = new QGroupBox( this, "groupBox1" );
00041     groupBox1->setColumnLayout(0, Qt::Vertical );
00042     groupBox1->layout()->setSpacing( 6 );
00043     groupBox1->layout()->setMargin( 11 );
00044     groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
00045     groupBox1Layout->setAlignment( Qt::AlignTop );
00046 
00047     textEdit = new QTextEdit( groupBox1, "textEdit" );
00048     groupBox1Layout->addWidget( textEdit );
00049     CommitDialogBaseLayout->addWidget( groupBox1 );
00050 
00051     layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 
00052 
00053     checkAddToChangelog = new QCheckBox( this, "checkAddToChangelog" );
00054     layout2->addWidget( checkAddToChangelog );
00055 
00056     changeLogNameEdit = new QLineEdit( this, "changeLogNameEdit" );
00057     changeLogNameEdit->setEnabled( FALSE );
00058     layout2->addWidget( changeLogNameEdit );
00059     CommitDialogBaseLayout->addLayout( layout2 );
00060 
00061     line1 = new QFrame( this, "line1" );
00062     line1->setFrameShape( QFrame::HLine );
00063     line1->setFrameShadow( QFrame::Sunken );
00064     line1->setFrameShape( QFrame::HLine );
00065     CommitDialogBaseLayout->addWidget( line1 );
00066 
00067     layout5 = new QHBoxLayout( 0, 0, 6, "layout5"); 
00068     Horizontal_Spacing2 = new QSpacerItem( 350, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00069     layout5->addItem( Horizontal_Spacing2 );
00070 
00071     buttonOk = new QPushButton( this, "buttonOk" );
00072     buttonOk->setAutoDefault( TRUE );
00073     buttonOk->setDefault( TRUE );
00074     layout5->addWidget( buttonOk );
00075 
00076     buttonCancel = new QPushButton( this, "buttonCancel" );
00077     buttonCancel->setAutoDefault( TRUE );
00078     layout5->addWidget( buttonCancel );
00079     CommitDialogBaseLayout->addLayout( layout5 );
00080     languageChange();
00081     resize( QSize(531, 385).expandedTo(minimumSizeHint()) );
00082     clearWState( WState_Polished );
00083 
00084     // signals and slots connections
00085     connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00086     connect( checkAddToChangelog, SIGNAL( toggled(bool) ), changeLogNameEdit, SLOT( setEnabled(bool) ) );
00087 }
00088 
00089 /*
00090  *  Destroys the object and frees any allocated resources
00091  */
00092 CommitDialogBase::~CommitDialogBase()
00093 {
00094     // no need to delete child widgets, Qt does it all for us
00095 }
00096 
00097 /*
00098  *  Sets the strings of the subwidgets using the current
00099  *  language.
00100  */
00101 void CommitDialogBase::languageChange()
00102 {
00103     setCaption( tr2i18n( "Commit to Repository" ) );
00104     groupBox1->setTitle( tr2i18n( "&Message" ) );
00105     checkAddToChangelog->setText( tr2i18n( "&Add to changelog:" ) );
00106     QToolTip::add( changeLogNameEdit, tr2i18n( "Change log filename path (relative to project directory)" ) );
00107     QWhatsThis::add( changeLogNameEdit, tr2i18n( "<b>Changelog filename path</b><br/>Insert here the Changelog filename you wish to use so that the message is appended" ) );
00108     buttonOk->setText( tr2i18n( "&OK" ) );
00109     buttonCancel->setText( tr2i18n( "&Cancel" ) );
00110     buttonCancel->setAccel( QKeySequence( QString::null ) );
00111 }
00112 
00113 #include "commitdialogbase.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:59 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003