~ubuntu-branches/ubuntu/hardy/nuapplet/hardy

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
62
63
/*
 ** Copyright 2004-2007 - INL
 ** Written by Eric Leblond <eric.leblond@inl.fr>
 **            Vincent Deffontaines <vincent@inl.fr>
 ** INL http://www.inl.fr/
 **
 ** 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, version 2 of the License.
 **
 ** This program is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
 **
 ** You should have received a copy of the GNU General Public License
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __PREFERENCES__
#define __PREFERENCES__

#include <QMainWindow>
#include <QtGui>

#include <QSystemTrayIcon>
//#include <QPushButton>

class NuAppPreferences : public QDialog {
	Q_OBJECT

	QSettings settings;
	QLineEdit *hostname;
	QLineEdit *port;

	QLabel *current_key;
	QPushButton *key_open;
	QLabel *current_cert;
	QPushButton *cert_open;
	QLabel *current_ca;
	QPushButton *ca_open;

	QCheckBox *use_certs;
public:
	NuAppPreferences ();

public slots:
	void save_preferences();
	void show();

	void switch_use_certs(int state);
	void popup_open_key();
	void popup_open_cert();
	void popup_open_ca();

private:
	void load_preferences();
	void createDialog();
	void setCertificateButtons();
};

#endif /* __PREFERENCES__ */