diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-01 06:52:42 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-01 06:52:42 +0800 |
commit | d82340151ce274930f42701f5a9a0c4db702cba4 (patch) | |
tree | ccae79c6970d5650768b22b88a37aa18510e4805 /user.cxx | |
parent | 451437641aee7771b97ac5e54e1543a2510ce17a (diff) | |
parent | 0f63d288930a71e9705ce1b48a5e0036a9161b52 (diff) |
Merge branch 'master' into cmake
Diffstat (limited to 'user.cxx')
-rw-r--r-- | user.cxx | 235 |
1 files changed, 235 insertions, 0 deletions
diff --git a/user.cxx b/user.cxx new file mode 100644 index 0000000..2834744 --- /dev/null +++ b/user.cxx @@ -0,0 +1,235 @@ +#include <cstddef> +#include <icclient/client.h> +#include "qicclient/user.hxx" + +namespace ICClient { + + void User::setUserName(QString const& UserName) + { + if (m_userName != UserName) { + m_userName = UserName; + emit userNameChanged(); + } + } + + void User::setUserNick(QString const& UserNick) + { + if (m_userNick != UserNick) { + m_userNick = UserNick; + emit userNickChanged(); + } + } + + void User::setPassword(QString const& password) + { + if (m_password != password) { + m_password = password; + emit passwordChanged(); + } + } + + void User::setExpiration(QString const& expiration) + { + if (m_expiration != expiration) { + m_expiration = expiration; + emit expirationChanged(); + } + } + + void User::setAcl(QString const& acl) + { + if (m_acl != acl) { + m_acl = acl; + emit aclChanged(); + } + } + + void User::setModTime(QString const& modTime) + { + if (m_modTime != modTime) { + m_modTime = modTime; + emit modTimeChanged(); + } + } + + void User::setSNickName(QString const& sNickName) + { + if (m_sNickName != sNickName) { + m_sNickName = sNickName; + emit sNickNameChanged(); + } + } + + void User::setCompany(QString const& company) + { + if (m_company != company) { + m_company = company; + emit companyChanged(); + } + } + + void User::setFName(QString const& fName) + { + if (m_fName != fName) { + m_fName = fName; + emit fNameChanged(); + } + } + + void User::setLName(QString const& lName) + { + if (m_lName != lName) { + m_lName = lName; + emit lNameChanged(); + } + } + + void User::setAddress1(QString const& address1) + { + if (m_address1 != address1) { + m_address1 = address1; + emit address1Changed(); + } + } + + void User::setAddress2(QString const& address2) + { + if (m_address2 != address2) { + m_address2 = address2; + emit address2Changed(); + } + } + + void User::setAddress3(QString const& address3) + { + if (m_address3 != address3) { + m_address3 = address3; + emit address3Changed(); + } + } + + void User::setCity(QString const& city) + { + if (m_city != city) { + m_city = city; + emit cityChanged(); + } + } + + void User::setState(QString const& state) + { + if (m_state != state) { + m_state = state; + emit stateChanged(); + } + } + + void User::setZip(QString const& zip) + { + if (m_zip != zip) { + m_zip = zip; + emit zipChanged(); + } + } + + void User::setCountry(QString const& country) + { + if (m_country != country) { + m_country = country; + emit countryChanged(); + } + } + + void User::setPhoneDay(QString const& phoneDay) + { + if (m_phoneDay != phoneDay) { + m_phoneDay = phoneDay; + emit phoneDayChanged(); + } + } + + void User::setEmail(QString const& email) + { + if (m_email != email) { + m_email = email; + emit emailChanged(); + } + } + + void User::update(icclient_user* user) + { + if (user->username) + m_userName = user->username; + else + m_userName = ""; + if (user->usernick) + m_userNick = user->usernick; + else + m_userNick = ""; + if (user->fname) + m_fName = user->fname; + else + m_fName = ""; + if (user->lname) + m_lName = user->lname; + else + m_lName = ""; + if (user->address1) + m_address1 = user->address1; + else + m_address1 = ""; + if (user->address2) + m_address2 = user->address2; + else + m_address2 = ""; + if (user->address3) + m_address3 = user->address3; + else + m_address3 = ""; + if (user->city) + m_city = user->city; + else + m_city = ""; + if (user->state) + m_state = user->state; + else + m_state = ""; + if (user->zip) + m_zip = user->zip; + else + m_zip = ""; + if (user->country) + m_country = user->country; + else + m_country = ""; + if (user->phone_day) + m_phoneDay = user->phone_day; + else + m_phoneDay = ""; + if (user->email) + m_email = user->email; + else + m_email = ""; + + emit userNameChanged(); + emit userNickChanged(); + emit passwordChanged(); + emit expirationChanged(); + emit aclChanged(); + emit modTimeChanged(); + emit sNickNameChanged(); + emit companyChanged(); + emit fNameChanged(); + emit lNameChanged(); + emit address1Changed(); + emit address2Changed(); + emit address3Changed(); + emit cityChanged(); + emit stateChanged(); + emit zipChanged(); + emit countryChanged(); + emit phoneDayChanged(); + emit emailChanged(); + } + +} |