summaryrefslogtreecommitdiff
path: root/user.cxx
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2019-08-31 09:47:21 +0700
committerAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2019-08-31 09:47:21 +0700
commit525b3eaf3a55ea4acf1d41189a573a54901b4426 (patch)
treebccfa78937b0cd1bbc93bedcb3c168ce95dba471 /user.cxx
parent4fb624054cfe1813b4e56423c27056cd80c7c120 (diff)
parent19ebf9e75257adc89a3d43076f8404c87b1d0c60 (diff)
Merge branch 'development' of ssh://darapsa.co.id/usr/local/git/kelakon into development
* 'development' of ssh://darapsa.co.id/usr/local/git/kelakon: Renamed the rtclient project to librtclient Managed to post login credentials to the RT server Made user name editable User password member Affirming the previous commit Revert "Made the user class members more straightforward" Made the user class members more straightforward
Diffstat (limited to 'user.cxx')
-rw-r--r--user.cxx50
1 files changed, 8 insertions, 42 deletions
diff --git a/user.cxx b/user.cxx
index 0983874..3762f81 100644
--- a/user.cxx
+++ b/user.cxx
@@ -1,47 +1,5 @@
-#include "rtuser.h"
#include "user.hxx"
-void User::update(rt_user* user)
-{
- if (m_isLoggedIn) {
- setName(QString{user->name});
- setEmailAddress(QString{user->emailaddress});
- setOrganization(QString{user->organization});
- setRealName(QString{user->realname});
- setNickName(QString{user->nickname});
- setLang(QString{user->lang});
- setHomePhone(QString{user->homephone});
- setWorkPhone(QString{user->workphone});
- setMobilePhone(QString{user->mobilephone});
- setPagerPhone(QString{user->pagerphone});
- setAddress1(QString{user->address1});
- setAddress2(QString{user->address2});
- setCity(QString{user->city});
- setState(QString{user->state});
- setZip(QString{user->zip});
- setCountry(QString{user->country});
- setTimeZone(QString{user->timezone});
- } else {
- setName("");
- setEmailAddress("");
- setOrganization("");
- setRealName("");
- setNickName("");
- setLang("");
- setHomePhone("");
- setWorkPhone("");
- setMobilePhone("");
- setPagerPhone("");
- setAddress1("");
- setAddress2("");
- setCity("");
- setState("");
- setZip("");
- setCountry("");
- setTimeZone("");
- }
-}
-
void User::setName(QString const& name)
{
if (m_name != name) {
@@ -50,6 +8,14 @@ void User::setName(QString const& name)
}
}
+void User::setPassword(QString const& password)
+{
+ if (m_password != password) {
+ m_password = password;
+ emit passwordChanged();
+ }
+}
+
void User::setEmailAddress(QString const& emailAddress)
{
if (m_emailAddress != emailAddress) {