2
* passphrasedlg.cpp - class to handle entering of OpenPGP passphrase
3
* Copyright (C) 2003 Justin Karneges
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include"passphrasedlg.h"
24
#include<qradiobutton.h>
25
#include<qpushbutton.h>
26
#include"iconwidget.h"
28
PassphraseDlg::PassphraseDlg(QWidget *parent, const char *name)
29
:PassphraseUI(parent, name, true, WDestructiveClose)
31
connect(pb_ok, SIGNAL(clicked()), SLOT(doOK()));
32
connect(pb_cancel, SIGNAL(clicked()), SLOT(reject()));
33
resize(minimumSize());
36
PassphraseDlg::~PassphraseDlg()
40
QString PassphraseDlg::passphrase() const
42
return le_pass->text();
45
void PassphraseDlg::reject()
51
void PassphraseDlg::doOK()
53
le_pass->setEnabled(false);
54
pb_ok->setEnabled(false);
56
submitPassphrase(le_pass->text());
59
void PassphraseDlg::unblock()
62
le_pass->setEnabled(true);
63
pb_ok->setEnabled(true);