summaryrefslogtreecommitdiffstats
path: root/vcs/clearcase/commentdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcs/clearcase/commentdlg.cpp')
-rw-r--r--vcs/clearcase/commentdlg.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/vcs/clearcase/commentdlg.cpp b/vcs/clearcase/commentdlg.cpp
new file mode 100644
index 00000000..36b3bc6f
--- /dev/null
+++ b/vcs/clearcase/commentdlg.cpp
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * Copyright (C) 2003 by Ajay Guleria *
+ * ajay_guleria at yahoo dot com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "commentdlg.h"
+
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <kapplication.h>
+#include <kbuttonbox.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstdguiitem.h>
+
+CcaseCommentDlg::CcaseCommentDlg(bool bCheckin)
+ : QDialog(0, "", true)
+{
+ setCaption( i18n("Clearcase Comment") );
+
+ QBoxLayout *layout = new QVBoxLayout(this, 10);
+
+ QLabel *messagelabel = new QLabel(i18n("Enter log message:"), this);
+ messagelabel->setMinimumSize(messagelabel->sizeHint());
+ layout->addWidget(messagelabel, 0);
+
+ _edit = new QMultiLineEdit(this);
+ QFontMetrics fm(_edit->fontMetrics());
+ _edit->setMinimumSize(fm.width("0")*40, fm.lineSpacing()*3);
+ layout->addWidget(_edit, 10);
+
+ QBoxLayout *layout2 = new QHBoxLayout(layout);
+ if(bCheckin) {
+ _check = new QCheckBox(i18n("Reserve"), this);
+ layout2->addWidget(_check);
+ }
+
+ KButtonBox *buttonbox = new KButtonBox(this);
+ buttonbox->addStretch();
+ QPushButton *ok = buttonbox->addButton(KStdGuiItem::ok());
+ QPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel());
+ connect(ok, SIGNAL(clicked()), SLOT(accept()) );
+ connect(cancel, SIGNAL(clicked()), SLOT(reject()) );
+ ok->setDefault(true);
+ buttonbox->layout();
+ layout2->addWidget(buttonbox, 0);
+
+ layout->activate();
+ adjustSize();
+}
+
+
+
+#include "commentdlg.moc"