2
This file is part of choqoK, the KDE mono-blogging client
4
Copyright (C) 2008-2009 Mehrdad Momeny <mehrdad.momeny@gmail.com>
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License as
8
published by the Free Software Foundation; either version 2 of
9
the License or (at your option) version 3 or any later version
10
accepted by the membership of KDE e.V. (or its successor approved
11
by the membership of KDE e.V.), which shall act as a proxy
12
defined in Section 14 of version 3 of the license.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, see http://www.gnu.org/licenses/
26
Account::Account( Service type )
39
Account::Account( const Account & account )
41
mUserId = account.userId();
42
mUsername = account.username();
43
mPassword = account.password();
44
mServiceName = account.serviceName();
45
mAlias = account.alias();
46
mDirection = account.direction();
47
mApiPath = account.apiPath();
48
mIsError = account.isError();
49
mServiceType = account.serviceType();
52
uint Account::userId() const
57
void Account::setUserId( uint id )
62
QString Account::username() const
67
void Account::setUsername( const QString & name )
72
QString Account::password() const
77
void Account::setPassword( const QString & pass )
82
QString Account::serviceName() const
87
// void Account::setServiceName( const QString & servicename )
89
// mServiceName = servicename;
92
QString Account::alias() const
97
void Account::setAlias( const QString & alias )
102
Qt::LayoutDirection Account::direction() const
107
void Account::setDirection( const Qt::LayoutDirection & dir )
112
QString Account::apiPath() const
117
// void Account::setApiPath( const QString & apiPath )
119
// mApiPath = apiPath;
122
void Account::setError( bool isError )
127
bool Account::isError() const
132
Account::Service Account::serviceType() const
137
void Account::setServiceType( Service type )
140
if ( type == Identica){
141
mServiceName = "Identi.ca";
142
mApiPath = "http://identi.ca/api/";
143
} else if (type == Twitter) {
144
mServiceName = "Twitter.com";
145
mApiPath = "http://twitter.com/";