KDevelop API Documentation

vcs/clearcase/commentdlg.cpp

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Ajay Guleria * 00003 * ajay_guleria at yahoo dot com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #include "commentdlg.h" 00013 00014 #include <qlayout.h> 00015 #include <qlabel.h> 00016 #include <qpushbutton.h> 00017 #include <kapplication.h> 00018 #include <kbuttonbox.h> 00019 #include <klocale.h> 00020 #include <kmessagebox.h> 00021 00022 CcaseCommentDlg::CcaseCommentDlg(bool bCheckin) 00023 : QDialog(0, "", true) 00024 { 00025 setCaption( i18n("Clearcase Comment") ); 00026 00027 QBoxLayout *layout = new QVBoxLayout(this, 10); 00028 00029 QLabel *messagelabel = new QLabel(i18n("Enter log message:"), this); 00030 messagelabel->setMinimumSize(messagelabel->sizeHint()); 00031 layout->addWidget(messagelabel, 0); 00032 00033 _edit = new QMultiLineEdit(this); 00034 QFontMetrics fm(_edit->fontMetrics()); 00035 _edit->setMinimumSize(fm.width("0")*40, fm.lineSpacing()*3); 00036 layout->addWidget(_edit, 10); 00037 00038 QBoxLayout *layout2 = new QHBoxLayout(layout); 00039 if(bCheckin) { 00040 _check = new QCheckBox("Reserve", this); 00041 layout2->addWidget(_check); 00042 } 00043 00044 KButtonBox *buttonbox = new KButtonBox(this); 00045 buttonbox->addStretch(); 00046 QPushButton *ok = buttonbox->addButton(i18n("OK")); 00047 QPushButton *cancel = buttonbox->addButton(i18n("Cancel")); 00048 connect(ok, SIGNAL(clicked()), SLOT(accept()) ); 00049 connect(cancel, SIGNAL(clicked()), SLOT(reject()) ); 00050 ok->setDefault(true); 00051 buttonbox->layout(); 00052 layout2->addWidget(buttonbox, 0); 00053 00054 layout->activate(); 00055 adjustSize(); 00056 } 00057 00058 00059 00060 #include "commentdlg.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:53 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003