~ubuntu-branches/ubuntu/saucy/plasma-nm/saucy-proposed

« back to all changes in this revision

Viewing changes to vpn/openvpn/openvpnwidget.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-08-16 19:07:09 UTC
  • Revision ID: package-import@ubuntu.com-20130816190709-ef9ydm9skigmg15l
Tags: upstream-0.0~git20130816
Import upstream version 0.0~git20130816

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright 2008 Will Stephenson <wstephenson@kde.org>
 
3
    Copyright 2013 Lukáš Tinkl <ltinkl@redhat.com>
 
4
 
 
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
 
8
    the License or (at your option) version 3 or any later version
 
9
    accepted by the membership of KDE e.V. (or its successor approved
 
10
    by the membership of KDE e.V.), which shall act as a proxy
 
11
    defined in Section 14 of version 3 of the license.
 
12
 
 
13
    This program is distributed in the hope that it will be useful,
 
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
    GNU General Public License for more details.
 
17
 
 
18
    You should have received a copy of the GNU General Public License
 
19
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
*/
 
21
 
 
22
#ifndef OPENVPNWIDGET_H
 
23
#define OPENVPNWIDGET_H
 
24
 
 
25
#include "settingwidget.h"
 
26
 
 
27
#include <QProcess>
 
28
 
 
29
#include "ui_openvpn.h"
 
30
 
 
31
#include <NetworkManagerQt/VpnSetting>
 
32
 
 
33
class KUrl;
 
34
class KLineEdit;
 
35
class KComboBox;
 
36
 
 
37
class OpenVpnSettingWidget : public SettingWidget
 
38
{
 
39
    Q_OBJECT
 
40
public:
 
41
    explicit OpenVpnSettingWidget(const NetworkManager::VpnSetting::Ptr &setting, QWidget * parent = 0);
 
42
    ~OpenVpnSettingWidget();
 
43
 
 
44
    void loadConfig(const NetworkManager::Setting::Ptr &setting);
 
45
    QVariantMap setting(bool agentOwned = false) const;
 
46
 
 
47
    virtual bool isValid() const;
 
48
 
 
49
private slots:
 
50
    void updateStartDir(const KUrl &);
 
51
    void x509KeyPasswordStorageChanged(int);
 
52
    void passPasswordStorageChanged(int);
 
53
    void x509PassKeyPasswordStorageChanged(int);
 
54
    void x509PassPasswordStorageChanged(int);
 
55
    void showPasswordsToggled(bool);
 
56
    void showAdvanced();
 
57
 
 
58
private:
 
59
    class Private;
 
60
    Private * d;
 
61
    void setPasswordType(KLineEdit *, int);
 
62
    void fillOnePasswordCombo(KComboBox *, NetworkManager::Setting::SecretFlags);
 
63
    uint handleOnePasswordType(const KComboBox *, const QString &, NMStringMap &, bool agentOwned) const;
 
64
};
 
65
 
 
66
#endif // OPENVPNWIDGET_H