summaryrefslogtreecommitdiff
path: root/qicclient/admin.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'qicclient/admin.hxx')
-rw-r--r--qicclient/admin.hxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/qicclient/admin.hxx b/qicclient/admin.hxx
index 1e728cb..f19f167 100644
--- a/qicclient/admin.hxx
+++ b/qicclient/admin.hxx
@@ -22,9 +22,17 @@ namespace QICClient {
m_userName{""},
m_password{""},
m_name{""},
- m_super{false}
+ m_super{false},
+ m_data{nullptr}
{}
~Admin() {}
+ static std::shared_ptr<Admin> logIn(QString const& username,
+ QString const& password,
+ QString const& successPage = nullptr,
+ QString const& nextPage = nullptr,
+ QString const& failPage = nullptr,
+ size_t (*handler)(void*, size_t, size_t,
+ void*) = nullptr);
QString const& userName() const { return m_userName; }
QString const& password() const { return m_password; }
@@ -36,13 +44,6 @@ namespace QICClient {
void setName(QString const& name);
void setSuper(bool super);
- void logIn(QString const& username, QString const& password,
- QString const& successPage = nullptr,
- QString const& nextPage = nullptr,
- QString const& failPage = nullptr,
- size_t (*handler)(void*, size_t, size_t,
- void*) = nullptr);
-
public slots:
void newItem(QString const& description, QString const& comment,
QString const& price, QString const& imagePath);
@@ -60,7 +61,7 @@ namespace QICClient {
QString m_name;
bool m_super;
icclient_admin* m_data;
- void setData(icclient_admin* data);
+ inline void setData(icclient_admin* data);
};
}