Astyle kdelibs
[kdepim.git] / sieveeditor / serversievesettings.h
blobaf480933262ea77069ab8bcfe460c07d159467db
1 /*
2 Copyright (c) 2013-2016 Montel Laurent <montel@kde.org>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
21 #ifndef SERVERSIEVESETTINGS_H
22 #define SERVERSIEVESETTINGS_H
24 #include <QWidget>
25 #include "sieveeditorutil.h"
27 namespace Ui
29 class ServerSieveSettings;
32 class ServerSieveSettings : public QWidget
34 Q_OBJECT
36 public:
37 explicit ServerSieveSettings(QWidget *parent = Q_NULLPTR);
38 ~ServerSieveSettings();
40 QString serverName() const;
41 void setServerName(const QString &name);
43 int port() const;
44 void setPort(int value);
46 QString userName() const;
47 void setUserName(const QString &name);
49 QString password() const;
50 void setPassword(const QString &pass);
52 void setServerSieveConfig(const SieveEditorUtil::SieveServerConfig &conf);
53 SieveEditorUtil::SieveServerConfig serverSieveConfig() const;
55 Q_SIGNALS:
56 void enableOkButton(bool enabled);
58 private Q_SLOTS:
59 void slotUserServerNameChanged();
61 private:
62 void populateDefaultAuthenticationOptions();
63 Ui::ServerSieveSettings *ui;
66 #endif // SERVERSIEVESETTINGS_H