summaryrefslogtreecommitdiffstats
path: root/vcs/clearcase/commentdlg.cpp
blob: df9fc10b464270b1c76465217fd927f7531599f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 <tqlayout.h>
#include <tqlabel.h>
#include <tqpushbutton.h>
#include <kapplication.h>
#include <kbuttonbox.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kstdguiitem.h>

CcaseCommentDlg::CcaseCommentDlg(bool bCheckin)
  : TQDialog(0, "", true)
{
  setCaption( i18n("Clearcase Comment") );

  TQBoxLayout *layout = new TQVBoxLayout(this, 10);

  TQLabel *messagelabel = new TQLabel(i18n("Enter log message:"), this);
  messagelabel->setMinimumSize(messagelabel->sizeHint());
  layout->addWidget(messagelabel, 0);

  _edit = new TQMultiLineEdit(this);
  TQFontMetrics fm(_edit->fontMetrics());
  _edit->setMinimumSize(fm.width("0")*40, fm.lineSpacing()*3);
  layout->addWidget(_edit, 10);

  TQBoxLayout *layout2 = new TQHBoxLayout(layout);
  if(bCheckin) {
    _check = new TQCheckBox(i18n("Reserve"), this);
    layout2->addWidget(_check);
  }

  KButtonBox *buttonbox = new KButtonBox(this);
  buttonbox->addStretch();
  TQPushButton *ok = buttonbox->addButton(KStdGuiItem::ok());
  TQPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel());
  connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) );
  connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
  ok->setDefault(true);
  buttonbox->layout();
  layout2->addWidget(buttonbox, 0);

  layout->activate();
  adjustSize();
}



#include "commentdlg.moc"