1 /*
2  * This file is part of telepathy-accounts-kcm
3  *
4  * Copyright (C) 2011 Lasse Liehu <lliehu@kolumbus.fi>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20 
21 #include "idle-account-ui.h"
22 #include "main-options-widget.h"
23 #include "advanced-options-widget.h"
24 
25 #include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
26 
IdleAccountUi(QObject * parent)27 IdleAccountUi::IdleAccountUi(QObject *parent)
28  : AbstractAccountUi(parent)
29 {
30     // Register supported parameters
31     registerSupportedParameter(QLatin1String("account"), QVariant::String);
32     registerSupportedParameter(QLatin1String("server"), QVariant::String);
33     registerSupportedParameter(QLatin1String("port"), QVariant::UInt);
34     registerSupportedParameter(QLatin1String("username"), QVariant::String);
35     registerSupportedParameter(QLatin1String("password"), QVariant::String);
36     registerSupportedParameter(QLatin1String("fullname"), QVariant::String);
37     registerSupportedParameter(QLatin1String("use-ssl"), QVariant::Bool);
38     registerSupportedParameter(QLatin1String("charset"), QVariant::String);
39 //     registerSupportedParameter(QLatin1String("quit-message"), QVariant::String);
40 }
41 
~IdleAccountUi()42 IdleAccountUi::~IdleAccountUi()
43 {
44 }
45 
mainOptionsWidget(ParameterEditModel * model,QWidget * parent) const46 AbstractAccountParametersWidget *IdleAccountUi::mainOptionsWidget(
47         ParameterEditModel *model,
48         QWidget *parent) const
49 {
50     return new MainOptionsWidget(model, parent);
51 }
52 
hasAdvancedOptionsWidget() const53 bool IdleAccountUi::hasAdvancedOptionsWidget() const
54 {
55     return true;
56 }
57 
advancedOptionsWidget(ParameterEditModel * model,QWidget * parent) const58 AbstractAccountParametersWidget *IdleAccountUi::advancedOptionsWidget(
59         ParameterEditModel *model,
60         QWidget *parent) const
61 {
62     return new AdvancedOptionsWidget(model, parent);
63 }
64 
65 #include "idle-account-ui.moc"
66