summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/rencatwnd.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/rencatwnd.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/rencatwnd.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/rencatwnd.cpp b/pwmanager/pwmanager/rencatwnd.cpp
new file mode 100644
index 0000000..1e8f9e9
--- a/dev/null
+++ b/pwmanager/pwmanager/rencatwnd.cpp
@@ -0,0 +1,70 @@
1/***************************************************************************
2 * *
3 * copyright (C) 2003 by Michael Buesch *
4 * email: mbuesch@freenet.de *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. *
9 * *
10 ***************************************************************************/
11
12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde
16 *
17 * $Id$
18 **************************************************************************/
19
20#include "rencatwnd.h"
21
22#include <klocale.h>
23
24
25RenCatWnd::RenCatWnd(QWidget *parent,
26 const char *name, bool modal, WFlags f)
27 : QDialog(parent, name, modal, f)
28{
29 vbox1 = new QVBox(this);
30 label = new QLabel(vbox1);
31 newName = new QLineEdit(vbox1);
32 hbox1 = new QHBox(vbox1);
33 okButton = new QPushButton(i18n("&Ok"), hbox1);
34 cancelButton = new QPushButton(i18n("&Cancel"), hbox1);
35
36 vbox1->setSpacing(10);
37 vbox1->setMargin(10);
38 hbox1->setSpacing(10);
39
40 resize(400, 100);
41
42 setCaption(i18n("rename category"));
43 label->setText(i18n("New category name:"));
44
45 connect(okButton, SIGNAL(clicked()), this, SLOT(okButton_slot()));
46 connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelButton_slot()));
47}
48
49RenCatWnd::~RenCatWnd()
50{
51}
52
53void RenCatWnd::resizeEvent(QResizeEvent *)
54{
55 vbox1->resize(size());
56}
57
58void RenCatWnd::okButton_slot()
59{
60 done(1);
61}
62
63void RenCatWnd::cancelButton_slot()
64{
65 done(2);
66}
67
68#ifndef PWM_EMBEDDED
69#include "rencatwnd.moc"
70#endif