From 54db60474ebd96e6821dea193397e0c96406d114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Wed, 16 Jun 2021 23:23:57 +0800 Subject: Create admin wrapper --- admin.cxx | 7 +++++++ qicclient/admin.hxx | 2 ++ 2 files changed, 9 insertions(+) diff --git a/admin.cxx b/admin.cxx index 1e575df..ed26562 100644 --- a/admin.cxx +++ b/admin.cxx @@ -72,6 +72,13 @@ namespace QICClient { if (m_data != data) m_data = data; } + void Admin::newAdmin(QString const& userName, QString const& password, QString const& name, bool super, + enum icclient_admin_group group) + { + icclient_admin_new_admin(userName.toLatin1().constData(), password.toLatin1().constData(), + name.toLatin1().constData(), super, group, nullptr); + } + void Admin::newItem(QString const& description, QString const& comment, QString const& price, QString const& imagePath) { diff --git a/qicclient/admin.hxx b/qicclient/admin.hxx index faf0608..52920e4 100644 --- a/qicclient/admin.hxx +++ b/qicclient/admin.hxx @@ -45,6 +45,8 @@ namespace QICClient { void setSuper(bool super); public slots: + void newAdmin(QString const& userName, QString const& password, QString const& name, bool super, + enum icclient_admin_group group); void newItem(QString const& description, QString const& comment, QString const& price, QString const& imagePath); void logOut(); -- cgit v1.2.3