You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
509 B
C++
27 lines
509 B
C++
#include "users.h"
|
|
#include <QFile>
|
|
#include <QJsonDocument>
|
|
|
|
Users::Users()
|
|
{
|
|
Q_INIT_RESOURCE(rc);
|
|
|
|
QFile f (":/users/metaData.json");
|
|
f.open(QIODevice::ReadOnly | QIODevice::Text);
|
|
QJsonDocument d = QJsonDocument::fromJson(f.readAll());
|
|
init(d.object());
|
|
f.close();
|
|
}
|
|
|
|
void Users::initServiceUi()
|
|
{
|
|
m_service = new Service<User>;
|
|
m_ui = new UsersUi;
|
|
((UsersUi *) m_ui)->setForm(new UserForm);
|
|
}
|
|
|
|
QIcon Users::pluginIcon()
|
|
{
|
|
return QIcon(":/icons/usersPlugin.svg");
|
|
}
|