Add UserOperationLog.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "AccountTableForm.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include "AboutForm.h"
|
||||
#include "UserOperationLogForm.h"
|
||||
|
||||
SettingFormWidget::SettingFormWidget(QWidget* aParent, Qt::WindowFlags f)
|
||||
: TabFormWidget(aParent)
|
||||
@@ -27,7 +28,7 @@ SettingFormWidget::SettingFormWidget(QWidget* aParent, Qt::WindowFlags f)
|
||||
QListWidget* widget = new QListWidget(ui->contentWidget);
|
||||
widget->setFixedWidth(250);
|
||||
QStringList menus;
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("About");
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("About") << tr("Operation Log");
|
||||
widget->addItems(menus);
|
||||
widget->setSpacing(3);
|
||||
for (int i = 0; i < menus.count(); ++i)
|
||||
@@ -55,13 +56,16 @@ SettingFormWidget::SettingFormWidget(QWidget* aParent, Qt::WindowFlags f)
|
||||
AboutForm* about = new AboutForm(ui->commandWidget);
|
||||
stackedWidget->addWidget(about);
|
||||
|
||||
UserOperationLogForm* operationLog = new UserOperationLogForm(ui->commandWidget);
|
||||
stackedWidget->addWidget(operationLog);
|
||||
|
||||
widget->setCurrentRow(0);
|
||||
connect(widget, &QListWidget::currentRowChanged, [=](int rowindex) {
|
||||
stackedWidget->setCurrentIndex(rowindex);
|
||||
});
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
QStringList menus;
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("About");
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("About") << tr("Operation Log");
|
||||
widget->clear();
|
||||
widget->addItems(menus);
|
||||
for (int i = 0; i < menus.count(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user