Changeset View
Changeset View
Standalone View
Standalone View
src/accountinfo.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | 42 | | |||
43 | AccountInfo::AccountInfo(AccountModel* model, QWidget* parent, Qt::WindowFlags f) | 43 | AccountInfo::AccountInfo(AccountModel* model, QWidget* parent, Qt::WindowFlags f) | ||
44 | : QWidget(parent, f) | 44 | : QWidget(parent, f) | ||
45 | , m_info(new Ui::AccountInfo()) | 45 | , m_info(new Ui::AccountInfo()) | ||
46 | , m_model(model) | 46 | , m_model(model) | ||
47 | { | 47 | { | ||
48 | m_info->setupUi(this); | 48 | m_info->setupUi(this); | ||
49 | 49 | | |||
50 | // ensure avatar user icon use correct device pixel ratio | ||||
51 | const qreal dpr = qApp->devicePixelRatio(); | ||||
52 | m_model->setDpr(dpr); | ||||
53 | | ||||
50 | connect(m_info->username, &QLineEdit::textEdited, this, &AccountInfo::hasChanged); | 54 | connect(m_info->username, &QLineEdit::textEdited, this, &AccountInfo::hasChanged); | ||
51 | connect(m_info->realName, &QLineEdit::textEdited, this, &AccountInfo::hasChanged); | 55 | connect(m_info->realName, &QLineEdit::textEdited, this, &AccountInfo::hasChanged); | ||
52 | connect(m_info->email, &QLineEdit::textEdited, this, &AccountInfo::hasChanged); | 56 | connect(m_info->email, &QLineEdit::textEdited, this, &AccountInfo::hasChanged); | ||
53 | connect(m_info->administrator, &QAbstractButton::clicked, this, &AccountInfo::hasChanged); | 57 | connect(m_info->administrator, &QAbstractButton::clicked, this, &AccountInfo::hasChanged); | ||
54 | connect(m_info->automaticLogin, &QAbstractButton::clicked, this, &AccountInfo::hasChanged); | 58 | connect(m_info->automaticLogin, &QAbstractButton::clicked, this, &AccountInfo::hasChanged); | ||
55 | connect(m_info->changePasswordButton, &QPushButton::clicked, this, &AccountInfo::changePassword); | 59 | connect(m_info->changePasswordButton, &QPushButton::clicked, this, &AccountInfo::changePassword); | ||
56 | 60 | | |||
57 | connect(m_model, &QAbstractItemModel::dataChanged, this, &AccountInfo::dataChanged); | 61 | connect(m_model, &QAbstractItemModel::dataChanged, this, &AccountInfo::dataChanged); | ||
▲ Show 20 Lines • Show All 412 Lines • Show Last 20 Lines |