1
/* pinentrydialog.h - A secure KDE dialog for PIN entry.
2
Copyright (C) 2002 Klar�lvdalens Datakonsult AB
3
Written by Steffen Hansen <steffen@klaralvdalens-datakonsult.se>.
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License as
7
published by the Free Software Foundation; either version 2 of the
8
License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful, but
11
WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
#ifndef __PINENTRYDIALOG_H__
21
#define __PINENTRYDIALOG_H__
32
class PinEntryDialog : public QDialog {
35
Q_PROPERTY( QString description READ description WRITE setDescription )
36
Q_PROPERTY( QString error READ error WRITE setError )
37
// Q_PROPERTY( SecQString text READ text WRITE setText )
38
Q_PROPERTY( QString prompt READ prompt WRITE setPrompt )
40
friend class PinEntryController; // TODO: remove when assuan lets me use Qt eventloop.
41
PinEntryDialog( QWidget* parent = 0, const char* name = 0,
42
bool modal = false, bool enable_quality_bar = false );
44
void setDescription( const QString& );
45
QString description() const;
47
void setError( const QString& );
48
QString error() const;
50
void setText( const SecQString& );
51
SecQString text() const;
53
void setPrompt( const QString& );
54
QString prompt() const;
56
void setOkText( const QString& );
57
void setCancelText( const QString& );
59
void setQualityBar( const QString& );
60
void setQualityBarTT( const QString& );
62
void setPinentryInfo (pinentry_t);
65
void updateQuality(const SecQString &);
72
virtual void keyPressEvent( QKeyEvent *e );
73
virtual void hideEvent( QHideEvent* );
74
virtual void paintEvent( QPaintEvent* );
81
QLabel* _quality_bar_label;
82
QProgressBar* _quality_bar;
87
bool _have_quality_bar;
88
pinentry_t _pinentry_info;
92
#endif // __PINENTRYDIALOG_H__