commentdlg.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
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 #include <kstdguiitem.h>
00022
00023 CcaseCommentDlg::CcaseCommentDlg(bool bCheckin)
00024 : QDialog(0, "", true)
00025 {
00026 setCaption( i18n("Clearcase Comment") );
00027
00028 QBoxLayout *layout = new QVBoxLayout(this, 10);
00029
00030 QLabel *messagelabel = new QLabel(i18n("Enter log message:"), this);
00031 messagelabel->setMinimumSize(messagelabel->sizeHint());
00032 layout->addWidget(messagelabel, 0);
00033
00034 _edit = new QMultiLineEdit(this);
00035 QFontMetrics fm(_edit->fontMetrics());
00036 _edit->setMinimumSize(fm.width("0")*40, fm.lineSpacing()*3);
00037 layout->addWidget(_edit, 10);
00038
00039 QBoxLayout *layout2 = new QHBoxLayout(layout);
00040 if(bCheckin) {
00041 _check = new QCheckBox("Reserve", this);
00042 layout2->addWidget(_check);
00043 }
00044
00045 KButtonBox *buttonbox = new KButtonBox(this);
00046 buttonbox->addStretch();
00047 #if KDE_IS_VERSION( 3, 2, 90 )
00048 QPushButton *ok = buttonbox->addButton(KStdGuiItem::ok());
00049 QPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel());
00050 #else
00051 QPushButton *ok = buttonbox->addButton(i18n("OK"));
00052 QPushButton *cancel = buttonbox->addButton(i18n("Cancel"));
00053 #endif
00054 connect(ok, SIGNAL(clicked()), SLOT(accept()) );
00055 connect(cancel, SIGNAL(clicked()), SLOT(reject()) );
00056 ok->setDefault(true);
00057 buttonbox->layout();
00058 layout2->addWidget(buttonbox, 0);
00059
00060 layout->activate();
00061 adjustSize();
00062 }
00063
00064
00065
00066 #include "commentdlg.moc"
This file is part of the documentation for KDevelop Version 3.1.2.