This class is used in ConfigAccounts to show the available accounts in the list view and to store an account setup. More...
#include <accountsetupitem.h>
Public Member Functions | |
AccountSetupItem (QTreeWidget *parent) | |
Constructor. | |
AccountSetupItem (QTreeWidget *parent, const QString &name) | |
Constructor. | |
~AccountSetupItem () | |
Destructor. | |
void | setAccountName (const QString &name) |
Sets account name. | |
QString | getAccountName () const |
Returns the account name. | |
void | setServer (const QString &server) |
Sets the server. | |
QString | getServer () const |
Returns the server. | |
void | setProtocol (const QString &protocol) |
Sets the protocol. | |
QString | getProtocol () const |
Returns the protocol. | |
void | setPort (int port) |
Sets the port number. | |
int | getPort () const |
Returns the port number. | |
void | setUser (const QString &user) |
Sets the user name. | |
QString | getUser () const |
Returns the user name. | |
void | setPassword (const QString &password) |
Sets the password. | |
QString | getPassword () const |
Returns the password. | |
void | setPasswordStorageType (int type) |
Sets the password storage type. | |
int | getPasswordStorageType () const |
Returns the password storage type. | |
void | setActive (bool active) |
Sets whether the account is active. | |
bool | getActive () const |
Returns whether the account is active. | |
void | setTransferSecurity (int type) |
Sets the transfer security. | |
int | getTransferSecurity () const |
Returns the transfer security. | |
void | save () const |
Saves this account into applications config. | |
void | load () |
Loads the options of this account from the application config. | |
void | print () |
Prints the account settings to stdout. | |
void | setUnsecureLoginAllowed (bool allowed) |
Sets whether an unsecure login is allowed. | |
bool | getUnsecureLoginAllowed () const |
Return whether an unsecure login is allowed. | |
Protected Member Functions | |
void | init () |
Initializes the object. | |
Private Attributes | |
KSharedConfigPtr | config |
Connector to the configuration file. | |
QString | _account |
Account name. | |
QString | _server |
Server. | |
QString | _protocol |
Protocol. | |
int | _port |
Port. | |
QString | _user |
User Name. | |
QString | _password |
Password. | |
bool | _active |
TRUE - account is active. | |
int | _passwordStorage |
password storage type | |
int | _transferSecurity |
transfer security | |
bool | _allowUnsecureLogin |
TRUE - unsafe login is allowed if a secure login failed. |
This class is used in ConfigAccounts to show the available accounts in the list view and to store an account setup.
Definition at line 43 of file accountsetupitem.h.
AccountSetupItem::AccountSetupItem | ( | QTreeWidget * | parent | ) |
AccountSetupItem::AccountSetupItem | ( | QTreeWidget * | parent, | |
const QString & | name | |||
) |
Constructor.
parent | the list view
|
Definition at line 27 of file accountsetupitem.cpp.
AccountSetupItem::~AccountSetupItem | ( | ) |
Destructor.
Definition at line 40 of file accountsetupitem.cpp.
QString AccountSetupItem::getAccountName | ( | ) | const |
bool AccountSetupItem::getActive | ( | ) | const |
Returns whether the account is active.
Definition at line 146 of file accountsetupitem.cpp.
QString AccountSetupItem::getPassword | ( | ) | const |
int AccountSetupItem::getPasswordStorageType | ( | ) | const |
Returns the password storage type.
See constants.h for valid values (CONFIG_VALUE_ACCOUNT_PASSWORD_...)
Definition at line 136 of file accountsetupitem.cpp.
int AccountSetupItem::getPort | ( | ) | const |
Returns the port number.
Definition at line 103 of file accountsetupitem.cpp.
QString AccountSetupItem::getProtocol | ( | ) | const |
QString AccountSetupItem::getServer | ( | ) | const |
int AccountSetupItem::getTransferSecurity | ( | ) | const |
Returns the transfer security.
seee constants.h for valid values (CONFIG_VALUE_ACCOUNT_SECTRANSFER_...)
Definition at line 213 of file accountsetupitem.cpp.
bool AccountSetupItem::getUnsecureLoginAllowed | ( | ) | const |
Return whether an unsecure login is allowed.
Definition at line 266 of file accountsetupitem.cpp.
QString AccountSetupItem::getUser | ( | ) | const |
void AccountSetupItem::init | ( | ) | [protected] |
Initializes the object.
Definition at line 44 of file accountsetupitem.cpp.
void AccountSetupItem::load | ( | ) |
Loads the options of this account from the application config.
Definition at line 183 of file accountsetupitem.cpp.
void AccountSetupItem::print | ( | ) |
Prints the account settings to stdout.
Definition at line 218 of file accountsetupitem.cpp.
void AccountSetupItem::save | ( | ) | const |
Saves this account into applications config.
All values are placed in a group called like the account name.
Definition at line 151 of file accountsetupitem.cpp.
void AccountSetupItem::setAccountName | ( | const QString & | name | ) |
Sets account name.
name | account name |
Definition at line 65 of file accountsetupitem.cpp.
void AccountSetupItem::setActive | ( | bool | active | ) |
Sets whether the account is active.
active | TRUE - account is active; FALSE - account is not active |
Definition at line 141 of file accountsetupitem.cpp.
void AccountSetupItem::setPassword | ( | const QString & | password | ) |
Sets the password.
password | password |
Definition at line 118 of file accountsetupitem.cpp.
void AccountSetupItem::setPasswordStorageType | ( | int | type | ) |
Sets the password storage type.
See constants.h for valid values
type | password storage type (CONFIG_VALUE_ACCOUNT_PASSWORD_DONT_SAVE, CONFIG_VALUE_ACCOUNT_PASSWORD_SAVE_FILE or CONFIG_VALUE_ACCOUNT_PASSWORD_SAVE_KWALLET) |
Definition at line 128 of file accountsetupitem.cpp.
void AccountSetupItem::setPort | ( | int | port | ) |
Sets the port number.
port | port number |
Definition at line 95 of file accountsetupitem.cpp.
void AccountSetupItem::setProtocol | ( | const QString & | protocol | ) |
Sets the protocol.
protocol | protocol |
Definition at line 85 of file accountsetupitem.cpp.
void AccountSetupItem::setServer | ( | const QString & | server | ) |
void AccountSetupItem::setTransferSecurity | ( | int | type | ) |
Sets the transfer security.
See constants.h for valid values.
type | transfer security type (CONFIG_VALUE_ACCOUNT_SECTRANSFER_NONE, CONFIG_VALUE_ACCOUNT_SECTRANSFER_SSL, CONFIG_VALUE_ACCOUNT_SECTRANSFER_TLS) |
Definition at line 205 of file accountsetupitem.cpp.
void AccountSetupItem::setUnsecureLoginAllowed | ( | bool | allowed | ) |
Sets whether an unsecure login is allowed.
allowed | TRUE - unsecure login is allowd |
Definition at line 261 of file accountsetupitem.cpp.
void AccountSetupItem::setUser | ( | const QString & | user | ) |
QString AccountSetupItem::_account [private] |
Account name.
Definition at line 223 of file accountsetupitem.h.
bool AccountSetupItem::_active [private] |
TRUE - account is active.
Definition at line 253 of file accountsetupitem.h.
bool AccountSetupItem::_allowUnsecureLogin [private] |
TRUE - unsafe login is allowed if a secure login failed.
Definition at line 272 of file accountsetupitem.h.
QString AccountSetupItem::_password [private] |
Password.
Definition at line 248 of file accountsetupitem.h.
int AccountSetupItem::_passwordStorage [private] |
password storage type
Values are defined in constants.h (CONFIG_VALUE_ACCOUNT_PASSWORD_...)
Definition at line 260 of file accountsetupitem.h.
int AccountSetupItem::_port [private] |
Port.
Definition at line 238 of file accountsetupitem.h.
QString AccountSetupItem::_protocol [private] |
Protocol.
Definition at line 233 of file accountsetupitem.h.
QString AccountSetupItem::_server [private] |
Server.
Definition at line 228 of file accountsetupitem.h.
int AccountSetupItem::_transferSecurity [private] |
transfer security
Values are defined in constants.h (CONFIG_VALUE_ACCOUNT_SECTRANSFER_...)
Definition at line 267 of file accountsetupitem.h.
QString AccountSetupItem::_user [private] |
User Name.
Definition at line 243 of file accountsetupitem.h.
KSharedConfigPtr AccountSetupItem::config [private] |
Connector to the configuration file.
Definition at line 218 of file accountsetupitem.h.