KDevelop API Documentation

vcs/cvsservice/diffdialogbase.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 './diffdialogbase.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 "diffdialogbase.h" 00013 00014 #include <qvariant.h> 00015 #include <qpushbutton.h> 00016 #include <qbuttongroup.h> 00017 #include <qradiobutton.h> 00018 #include <qlineedit.h> 00019 #include <qlabel.h> 00020 #include <qframe.h> 00021 #include <qlayout.h> 00022 #include <qtooltip.h> 00023 #include <qwhatsthis.h> 00024 00025 /* 00026 * Constructs a DiffDialogBase 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 DiffDialogBase::DiffDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 00033 : QDialog( parent, name, modal, fl ) 00034 { 00035 if ( !name ) 00036 setName( "DiffDialog" ); 00037 setSizeGripEnabled( TRUE ); 00038 DiffDialogLayout = new QVBoxLayout( this, 11, 6, "DiffDialogLayout"); 00039 00040 buttonGroup1 = new QButtonGroup( this, "buttonGroup1" ); 00041 buttonGroup1->setColumnLayout(0, Qt::Vertical ); 00042 buttonGroup1->layout()->setSpacing( 6 ); 00043 buttonGroup1->layout()->setMargin( 11 ); 00044 buttonGroup1Layout = new QVBoxLayout( buttonGroup1->layout() ); 00045 buttonGroup1Layout->setAlignment( Qt::AlignTop ); 00046 00047 diffLocalHeadRadio = new QRadioButton( buttonGroup1, "diffLocalHeadRadio" ); 00048 diffLocalHeadRadio->setChecked( TRUE ); 00049 buttonGroup1Layout->addWidget( diffLocalHeadRadio ); 00050 00051 layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); 00052 00053 diffLocalOtherRadio = new QRadioButton( buttonGroup1, "diffLocalOtherRadio" ); 00054 layout3->addWidget( diffLocalOtherRadio ); 00055 00056 revOtherEdit = new QLineEdit( buttonGroup1, "revOtherEdit" ); 00057 revOtherEdit->setEnabled( FALSE ); 00058 layout3->addWidget( revOtherEdit ); 00059 buttonGroup1Layout->addLayout( layout3 ); 00060 00061 diffArbitraryRevRadio = new QRadioButton( buttonGroup1, "diffArbitraryRevRadio" ); 00062 buttonGroup1Layout->addWidget( diffArbitraryRevRadio ); 00063 00064 layout3_2 = new QGridLayout( 0, 1, 1, 0, 6, "layout3_2"); 00065 00066 textLabel1 = new QLabel( buttonGroup1, "textLabel1" ); 00067 textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) ); 00068 00069 layout3_2->addWidget( textLabel1, 0, 0 ); 00070 00071 revbEdit = new QLineEdit( buttonGroup1, "revbEdit" ); 00072 revbEdit->setEnabled( FALSE ); 00073 00074 layout3_2->addWidget( revbEdit, 1, 1 ); 00075 00076 revaEdit = new QLineEdit( buttonGroup1, "revaEdit" ); 00077 revaEdit->setEnabled( FALSE ); 00078 00079 layout3_2->addWidget( revaEdit, 1, 0 ); 00080 00081 textLabel2 = new QLabel( buttonGroup1, "textLabel2" ); 00082 textLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) ); 00083 00084 layout3_2->addWidget( textLabel2, 0, 1 ); 00085 buttonGroup1Layout->addLayout( layout3_2 ); 00086 DiffDialogLayout->addWidget( buttonGroup1 ); 00087 00088 line1 = new QFrame( this, "line1" ); 00089 line1->setFrameShape( QFrame::HLine ); 00090 line1->setFrameShadow( QFrame::Sunken ); 00091 line1->setFrameShape( QFrame::HLine ); 00092 DiffDialogLayout->addWidget( line1 ); 00093 00094 layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 00095 Horizontal_Spacing2 = new QSpacerItem( 130, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00096 layout2->addItem( Horizontal_Spacing2 ); 00097 00098 buttonOk = new QPushButton( this, "buttonOk" ); 00099 buttonOk->setAutoDefault( TRUE ); 00100 buttonOk->setDefault( TRUE ); 00101 layout2->addWidget( buttonOk ); 00102 00103 buttonCancel = new QPushButton( this, "buttonCancel" ); 00104 buttonCancel->setAutoDefault( TRUE ); 00105 layout2->addWidget( buttonCancel ); 00106 DiffDialogLayout->addLayout( layout2 ); 00107 languageChange(); 00108 resize( QSize(519, 221).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( diffArbitraryRevRadio, SIGNAL( toggled(bool) ), revaEdit, SLOT( setEnabled(bool) ) ); 00115 connect( diffArbitraryRevRadio, SIGNAL( toggled(bool) ), revbEdit, SLOT( setEnabled(bool) ) ); 00116 connect( diffLocalOtherRadio, SIGNAL( toggled(bool) ), revOtherEdit, SLOT( setEnabled(bool) ) ); 00117 00118 // tab order 00119 setTabOrder( diffLocalHeadRadio, diffLocalOtherRadio ); 00120 setTabOrder( diffLocalOtherRadio, revOtherEdit ); 00121 setTabOrder( revOtherEdit, revaEdit ); 00122 setTabOrder( revaEdit, revbEdit ); 00123 setTabOrder( revbEdit, buttonOk ); 00124 setTabOrder( buttonOk, buttonCancel ); 00125 } 00126 00127 /* 00128 * Destroys the object and frees any allocated resources 00129 */ 00130 DiffDialogBase::~DiffDialogBase() 00131 { 00132 // no need to delete child widgets, Qt does it all for us 00133 } 00134 00135 /* 00136 * Sets the strings of the subwidgets using the current 00137 * language. 00138 */ 00139 void DiffDialogBase::languageChange() 00140 { 00141 setCaption( tr2i18n( "Choose Revisions to Diff" ) ); 00142 buttonGroup1->setTitle( tr2i18n( "Build Difference Between" ) ); 00143 diffLocalHeadRadio->setText( tr2i18n( "&Local copy and HEAD" ) ); 00144 diffLocalOtherRadio->setText( tr2i18n( "Local copy and an arbitrary &revision:" ) ); 00145 diffArbitraryRevRadio->setText( tr2i18n( "&Two arbitrary revisions/tags:" ) ); 00146 textLabel1->setText( tr2i18n( "Revision A:" ) ); 00147 revbEdit->setText( QString::null ); 00148 QToolTip::add( revbEdit, tr2i18n( "Second revision to compare (leave empty to diff against HEAD)" ) ); 00149 QToolTip::add( revaEdit, tr2i18n( "First revision to compare" ) ); 00150 textLabel2->setText( tr2i18n( "Revision B:" ) ); 00151 buttonOk->setText( tr2i18n( "&OK" ) ); 00152 buttonOk->setAccel( QKeySequence( QString::null ) ); 00153 buttonCancel->setText( tr2i18n( "&Cancel" ) ); 00154 buttonCancel->setAccel( QKeySequence( QString::null ) ); 00155 } 00156 00157 #include "diffdialogbase.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