Refactor forms/settings/ package.
This commit is contained in:
174
src/forms/settings/AboutWidget.cpp
Normal file
174
src/forms/settings/AboutWidget.cpp
Normal file
@@ -0,0 +1,174 @@
|
||||
#include "AboutWidget.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QStringList>
|
||||
#include <QThread>
|
||||
|
||||
#include "event/EventCenter.h"
|
||||
#include "json/cmdhelper.h"
|
||||
#include "AppVersion.h"
|
||||
#include "device/DeviceManager.h"
|
||||
|
||||
AboutWidget::AboutWidget(QWidget* aParent)
|
||||
: QWidget(aParent)
|
||||
{
|
||||
initUiWidget();
|
||||
}
|
||||
|
||||
AboutWidget::~AboutWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void AboutWidget::initUiWidget()
|
||||
{
|
||||
const int subContentMargin = 10;
|
||||
const int subContentSpacing = 20;
|
||||
|
||||
QVBoxLayout* pMainLayout;
|
||||
QHBoxLayout* pProductVerLayout;
|
||||
QLabel* pProductVer;
|
||||
QPushButton* pBtnHelp;
|
||||
QLabel* pCompanyCopyRight;
|
||||
QLabel* pGuiVer;
|
||||
QLabel* pEmbededSoftVer;
|
||||
QLabel* pReconSotfVer;
|
||||
QLabel* pFEBVer;
|
||||
QLabel* pQtVer;
|
||||
QLabel* pQtCopyright;
|
||||
QLabel* pJsoncppVer;
|
||||
QLabel* pJsoncppCopyright;
|
||||
QLabel* pDcmtkVer;
|
||||
QLabel* pDcmtkCopyright;
|
||||
|
||||
QLabel* pSUSEVer;
|
||||
|
||||
this->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
|
||||
pMainLayout = new QVBoxLayout(this);
|
||||
pMainLayout->setAlignment(Qt::AlignLeft);
|
||||
pMainLayout->setSpacing(10);
|
||||
|
||||
pProductVerLayout = new QHBoxLayout(this);
|
||||
pMainLayout->addLayout(pProductVerLayout);
|
||||
|
||||
pProductVer = new QLabel(this);
|
||||
pProductVer->setText(tr("HJ-USCT-01 V1.0"));
|
||||
pProductVerLayout->addWidget(pProductVer);
|
||||
|
||||
pBtnHelp = new QPushButton(this);
|
||||
pBtnHelp->setText(tr("?"));
|
||||
pBtnHelp->setFixedWidth(50);
|
||||
pProductVerLayout->addWidget(pBtnHelp);
|
||||
|
||||
pCompanyCopyRight = new QLabel(this);
|
||||
pCompanyCopyRight->setObjectName("normal");
|
||||
pCompanyCopyRight->setText(tr("Copyright © 2017-2022 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
||||
pCompanyCopyRight->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pCompanyCopyRight);
|
||||
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pGuiVer = new QLabel(this);
|
||||
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||
pGuiVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pGuiVer);
|
||||
|
||||
pEmbededSoftVer = new QLabel(this);
|
||||
pEmbededSoftVer->setText(tr("Embedded Software %1, Data store Path:%2").arg(getEmbVersion(), getDataStorePath()));
|
||||
pEmbededSoftVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pEmbededSoftVer);
|
||||
|
||||
pReconSotfVer = new QLabel(this);
|
||||
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
||||
pReconSotfVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pReconSotfVer);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pFEBVer = new QLabel(this);
|
||||
pFEBVer->setText(tr("FEB Information"));
|
||||
pFEBVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pFEBVer);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pQtVer = new QLabel(tr("Qt 5.12.0"), this);
|
||||
pMainLayout->addWidget(pQtVer);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pSUSEVer = new QLabel(this);
|
||||
pSUSEVer->setText(tr("Loading..."));
|
||||
pMainLayout->addWidget(pSUSEVer);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pDcmtkVer = new QLabel(this);
|
||||
pDcmtkVer->setText(tr("Loading..."));
|
||||
pMainLayout->addWidget(pDcmtkVer);
|
||||
pDcmtkCopyright = new QLabel(this);
|
||||
pDcmtkCopyright->setObjectName("normal");
|
||||
pDcmtkCopyright->setText(tr("Copyright (c) 1994-2021, OFFIS e.V."));
|
||||
pDcmtkCopyright->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pDcmtkCopyright);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pJsoncppVer = new QLabel(this);
|
||||
pJsoncppVer->setText(tr("cJSON"));
|
||||
pMainLayout->addWidget(pJsoncppVer);
|
||||
pJsoncppCopyright = new QLabel(this);
|
||||
pJsoncppCopyright->setObjectName("normal");
|
||||
pJsoncppCopyright->setText(tr("Copyright (c) 2009-2017 Dave Gamble"));
|
||||
pJsoncppCopyright->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pJsoncppCopyright);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
pMainLayout->addStretch();
|
||||
|
||||
QThread* t = QThread::create([=]() {
|
||||
pSUSEVer->setText(cmdHelper::Instance()->getLinuxVersion());
|
||||
pDcmtkVer->setText(cmdHelper::Instance()->getDCMTKVersion());
|
||||
});
|
||||
t->start();
|
||||
connect(t, SIGNAL(finished()), t, SLOT(deleteLater()));
|
||||
|
||||
|
||||
connect(pBtnHelp, SIGNAL(clicked()), this, SLOT(openHelpFile()));
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
pProductVer->setText(tr("HJ-USCT-01 V1.0"));
|
||||
pBtnHelp->setText(tr("?"));
|
||||
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
||||
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||
pEmbededSoftVer->setText(tr("Embedded Software %1, Data store Path:%2").arg(getEmbVersion(), getDataStorePath()));
|
||||
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
||||
pFEBVer->setText(tr("FEB Information"));
|
||||
});
|
||||
}
|
||||
|
||||
void AboutWidget::openHelpFile()
|
||||
{
|
||||
QString userManulFile = QCoreApplication::applicationDirPath() + "/userManual.pdf";
|
||||
|
||||
QFileInfo file(userManulFile);
|
||||
if (file.exists())
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(userManulFile));
|
||||
}
|
||||
}
|
||||
|
||||
QString AboutWidget::getGUIVersion()
|
||||
{
|
||||
if (GUI_VERSION_BETA)
|
||||
{
|
||||
return QString("%1.%2.%3 beta").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
|
||||
}
|
||||
return QString("%1.%2.%3").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
|
||||
}
|
||||
|
||||
QString AboutWidget::getEmbVersion()
|
||||
{
|
||||
return DeviceManager::Default()->getSoftwareVersion();
|
||||
}
|
||||
|
||||
QString AboutWidget::getDataStorePath()
|
||||
{
|
||||
return DeviceManager::Default()->getScanOutputPath();;
|
||||
}
|
||||
32
src/forms/settings/AboutWidget.h
Normal file
32
src/forms/settings/AboutWidget.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef ABOUTWIDGET_H_
|
||||
#define ABOUTWIDGET_H_
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QFileInfo>
|
||||
#include <QCoreApplication>
|
||||
|
||||
class AboutWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AboutWidget(QWidget* aParent = nullptr);
|
||||
~AboutWidget();
|
||||
|
||||
QString getGUIVersion();
|
||||
QString getEmbVersion();
|
||||
QString getDataStorePath();
|
||||
|
||||
private slots:
|
||||
void openHelpFile();
|
||||
|
||||
private:
|
||||
void initUiWidget();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // ABOUTWIDGET_H_
|
||||
@@ -3,141 +3,155 @@
|
||||
//
|
||||
|
||||
#include "AccountTableForm.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QToolButton>
|
||||
#include <QHeaderView>
|
||||
#include <QSqlRecord>
|
||||
|
||||
#include "components/AccountRoleComboDelegate.h"
|
||||
#include "guimacros.h"
|
||||
#include "src/dialogs/AlertDialog.h"
|
||||
#include "dialogs/AlertDialog.h"
|
||||
#include "db/SQLHelper.h"
|
||||
#include "models/User.h"
|
||||
#include <QSqlRecord>
|
||||
#include "components/SlideTableView.h"
|
||||
#include "src/dialogs/AccountFormDialog.h"
|
||||
#include "dialogs/AccountFormDialog.h"
|
||||
#include "event/EventCenter.h"
|
||||
AccountTableForm::AccountTableForm(QWidget* parent) {
|
||||
layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
QTableView* table = new SlideTableView(this);
|
||||
layout->addWidget(table);
|
||||
// TableView for patient
|
||||
table->setAlternatingRowColors(true);
|
||||
table->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
table->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
table->verticalHeader()->setDefaultSectionSize(38);
|
||||
table->horizontalHeader()->setStretchLastSection(true);
|
||||
//data from SQLITE
|
||||
#include "guimacros.h"
|
||||
|
||||
auto model = SQLHelper::getTable("Account");
|
||||
model->sort(5, Qt::DescendingOrder);
|
||||
model->select();
|
||||
model->setHeaderData(1, Qt::Horizontal, tr("ID"));
|
||||
model->setHeaderData(2, Qt::Horizontal, tr("Name"));
|
||||
model->setHeaderData(4, Qt::Horizontal, tr("Role"));
|
||||
model->setHeaderData(5, Qt::Horizontal, tr("Comment"));
|
||||
table->setModel((QAbstractItemModel*)model);
|
||||
table->hideColumn(0);
|
||||
table->hideColumn(3);
|
||||
AccountRoleComboDelegate* comboDelegate = new AccountRoleComboDelegate(this);
|
||||
table->setItemDelegateForColumn(4, comboDelegate);
|
||||
table->show();
|
||||
AccountTableForm::AccountTableForm(QWidget* aParent)
|
||||
: QWidget(aParent)
|
||||
, mLayout(new QVBoxLayout(this))
|
||||
, mCurrentRow(-1)
|
||||
{
|
||||
mLayout->setMargin(0);
|
||||
QTableView* table = new SlideTableView(this);
|
||||
mLayout->addWidget(table);
|
||||
|
||||
// table->setSortingEnabled(true);
|
||||
table->setColumnWidth(1, 250);
|
||||
table->setColumnWidth(2, 250);
|
||||
table->setColumnWidth(4, 150);
|
||||
// TableView for patient
|
||||
table->setAlternatingRowColors(true);
|
||||
table->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
table->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
table->verticalHeader()->setDefaultSectionSize(38);
|
||||
table->horizontalHeader()->setStretchLastSection(true);
|
||||
|
||||
QWidget* cmdPanel = new QWidget(this);
|
||||
cmdPanel->setObjectName("commandWidgetnoBBorder");
|
||||
QHBoxLayout* cmdLayout = new QHBoxLayout(cmdPanel);
|
||||
//data from SQLITE
|
||||
auto model = SQLHelper::getTable("Account");
|
||||
model->sort(5, Qt::DescendingOrder);
|
||||
model->select();
|
||||
model->setHeaderData(1, Qt::Horizontal, tr("ID"));
|
||||
model->setHeaderData(2, Qt::Horizontal, tr("Name"));
|
||||
model->setHeaderData(4, Qt::Horizontal, tr("Role"));
|
||||
model->setHeaderData(5, Qt::Horizontal, tr("Comment"));
|
||||
table->setModel((QAbstractItemModel*)model);
|
||||
table->hideColumn(0);
|
||||
table->hideColumn(3);
|
||||
AccountRoleComboDelegate* comboDelegate = new AccountRoleComboDelegate(this);
|
||||
table->setItemDelegateForColumn(4, comboDelegate);
|
||||
table->show();
|
||||
|
||||
cmdLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||
QWidget* spacerLine = new QWidget(this);
|
||||
spacerLine->setFixedWidth(2);
|
||||
spacerLine->setObjectName("verSpaceLine");
|
||||
cmdLayout->addWidget(spacerLine);
|
||||
ADD_TOOL_BTN_TO_LAYOUT(Add, ":/icons/add.png", cmdLayout);
|
||||
ADD_TOOL_BTN_TO_LAYOUT(Edit, ":/icons/details.png", cmdLayout);
|
||||
ADD_TOOL_BTN_TO_LAYOUT(Delete, ":/icons/close_circle.png", cmdLayout);
|
||||
btnAdd->setText(tr("Add"));
|
||||
btnEdit->setText(tr("Edit"));
|
||||
btnDelete->setText(tr("Delete"));
|
||||
layout->addWidget(cmdPanel);
|
||||
//index change
|
||||
connect(table, &QTableView::clicked, [=](const QModelIndex& modelIndex) {
|
||||
if (currentRow != modelIndex.row())
|
||||
{
|
||||
currentRow = modelIndex.row();
|
||||
}
|
||||
});
|
||||
//add new account
|
||||
connect(btnAdd, &QToolButton::clicked, [=]() {
|
||||
AccountFormDialog dialog(this, New);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setReferenceModel(model);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
table->selectRow(0);
|
||||
}
|
||||
});
|
||||
connect(btnEdit, &QToolButton::clicked, [=]() {
|
||||
if (currentRow < 0)return;
|
||||
QMap<QString, QVariant> map;
|
||||
auto record = model->record(currentRow);
|
||||
for (int i = 0; i < model->columnCount(); i++)
|
||||
{
|
||||
map[record.fieldName(i)] = record.value(i);
|
||||
}
|
||||
auto mode = map["UserID"] == User::Current()->getUserID() ? Self : Admin;
|
||||
AccountFormDialog dialog(this, mode);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
if (mode == Admin)dialog.setAccountInformation(map);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
model->select();
|
||||
table->selectRow(currentRow);
|
||||
}
|
||||
});
|
||||
connect(btnDelete, &QToolButton::clicked, [=]() {
|
||||
if (currentRow < 0)return;
|
||||
QString id = model->data(model->index(currentRow, 1)).toString();
|
||||
if (User::Current()->getUserID() == id)
|
||||
{
|
||||
//尝试删除自己
|
||||
AlertDialog dialog(this);
|
||||
dialog.setButtonMode(OkOnly);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setAlertMessage(tr("Can't delete current log in account!"));
|
||||
dialog.exec();
|
||||
return;
|
||||
}
|
||||
AlertDialog dialog(this);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
// table->setSortingEnabled(true);
|
||||
table->setColumnWidth(1, 250);
|
||||
table->setColumnWidth(2, 250);
|
||||
table->setColumnWidth(4, 150);
|
||||
|
||||
dialog.setAlertMessage(QString(tr("Delete account with ID:\"%1\"!")).arg(id));
|
||||
if (dialog.exec() != QDialog::Accepted) return;
|
||||
model->removeRow(currentRow);
|
||||
model->select();
|
||||
table->selectRow(model->rowCount() > currentRow + 1 ? currentRow : currentRow - 1);
|
||||
});
|
||||
QWidget* cmdPanel = new QWidget(this);
|
||||
cmdPanel->setObjectName("commandWidgetnoBBorder");
|
||||
QHBoxLayout* cmdLayout = new QHBoxLayout(cmdPanel);
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
cmdLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||
QWidget* spacerLine = new QWidget(this);
|
||||
spacerLine->setFixedWidth(2);
|
||||
spacerLine->setObjectName("verSpaceLine");
|
||||
cmdLayout->addWidget(spacerLine);
|
||||
ADD_TOOL_BTN_TO_LAYOUT(Add, ":/icons/add.png", cmdLayout);
|
||||
ADD_TOOL_BTN_TO_LAYOUT(Edit, ":/icons/details.png", cmdLayout);
|
||||
ADD_TOOL_BTN_TO_LAYOUT(Delete, ":/icons/close_circle.png", cmdLayout);
|
||||
btnAdd->setText(tr("Add"));
|
||||
btnEdit->setText(tr("Edit"));
|
||||
btnDelete->setText(tr("Delete"));
|
||||
mLayout->addWidget(cmdPanel);
|
||||
|
||||
//model->setHeaderData(1, Qt::Horizontal, tr("ID"));
|
||||
model->setHeaderData(2, Qt::Horizontal, tr("Name"));
|
||||
model->setHeaderData(4, Qt::Horizontal, tr("Role"));
|
||||
model->setHeaderData(5, Qt::Horizontal, tr("Comment"));
|
||||
//index change
|
||||
connect(table, &QTableView::clicked, [=](const QModelIndex& aModelIndex) {
|
||||
if (mCurrentRow != aModelIndex.row())
|
||||
{
|
||||
mCurrentRow = aModelIndex.row();
|
||||
}
|
||||
});
|
||||
|
||||
btnAdd->setText(tr("Add"));
|
||||
btnEdit->setText(tr("Edit"));
|
||||
btnDelete->setText(tr("Delete"));
|
||||
});
|
||||
//add new account
|
||||
connect(btnAdd, &QToolButton::clicked, [=]() {
|
||||
AccountFormDialog dialog(this, New);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setReferenceModel(model);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
table->selectRow(0);
|
||||
}
|
||||
});
|
||||
|
||||
connect(btnEdit, &QToolButton::clicked, [=]() {
|
||||
if (mCurrentRow < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
QMap<QString, QVariant> map;
|
||||
auto record = model->record(mCurrentRow);
|
||||
for (int i = 0; i < model->columnCount(); i++)
|
||||
{
|
||||
map[record.fieldName(i)] = record.value(i);
|
||||
}
|
||||
auto mode = map["UserID"] == User::Current()->getUserID() ? Self : Admin;
|
||||
AccountFormDialog dialog(this, mode);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
if (mode == Admin)dialog.setAccountInformation(map);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
model->select();
|
||||
table->selectRow(mCurrentRow);
|
||||
}
|
||||
});
|
||||
|
||||
connect(btnDelete, &QToolButton::clicked, [=]() {
|
||||
if (mCurrentRow < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
QString id = model->data(model->index(mCurrentRow, 1)).toString();
|
||||
if (User::Current()->getUserID() == id)
|
||||
{
|
||||
//尝试删除自己
|
||||
AlertDialog dialog(this);
|
||||
dialog.setButtonMode(OkOnly);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setAlertMessage(tr("Can't delete current log in account!"));
|
||||
dialog.exec();
|
||||
return;
|
||||
}
|
||||
AlertDialog dialog(this);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
|
||||
dialog.setAlertMessage(QString(tr("Delete account with ID:\"%1\"!")).arg(id));
|
||||
if (dialog.exec() != QDialog::Accepted) return;
|
||||
model->removeRow(mCurrentRow);
|
||||
model->select();
|
||||
table->selectRow(model->rowCount() > mCurrentRow + 1 ? mCurrentRow : mCurrentRow - 1);
|
||||
});
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
model->setHeaderData(2, Qt::Horizontal, tr("Name"));
|
||||
model->setHeaderData(4, Qt::Horizontal, tr("Role"));
|
||||
model->setHeaderData(5, Qt::Horizontal, tr("Comment"));
|
||||
|
||||
btnAdd->setText(tr("Add"));
|
||||
btnEdit->setText(tr("Edit"));
|
||||
btnDelete->setText(tr("Delete"));
|
||||
});
|
||||
}
|
||||
|
||||
AccountTableForm::~AccountTableForm() {
|
||||
AccountTableForm::~AccountTableForm()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -2,22 +2,24 @@
|
||||
// Created by Krad on 2021/12/8.
|
||||
//
|
||||
|
||||
#ifndef GUI_ACCOUNTTABLEFORM_H
|
||||
#define GUI_ACCOUNTTABLEFORM_H
|
||||
#ifndef ACCOUNTTABLEFORM_H
|
||||
#define ACCOUNTTABLEFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
class QTableView;
|
||||
class QPushButton;
|
||||
|
||||
class QVBoxLayout;
|
||||
class SelectDialog;
|
||||
class AccountTableForm: public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
class AccountTableForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AccountTableForm(QWidget* parent = nullptr);
|
||||
explicit AccountTableForm(QWidget* aParent = nullptr);
|
||||
~AccountTableForm();
|
||||
|
||||
private:
|
||||
QVBoxLayout* layout = nullptr;
|
||||
int currentRow = -1;
|
||||
QVBoxLayout* mLayout;
|
||||
int mCurrentRow;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3,71 +3,78 @@
|
||||
//
|
||||
|
||||
#include "AdminSettingForm.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QStackedWidget>
|
||||
#include <QStringListModel>
|
||||
#include <QListWidget>
|
||||
|
||||
#include "ui_tabformwidget.h"
|
||||
#include "UserOperationLogForm.h"
|
||||
#include "generalform.h"
|
||||
#include "systemsettingform.h"
|
||||
#include "SystemSettingform.h"
|
||||
#include "AccountTableForm.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include "aboutwidget.h"
|
||||
#include "AboutWidget.h"
|
||||
|
||||
AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabFormWidget(parent) {
|
||||
AdminSettingForm::AdminSettingForm(QWidget* aParent, Qt::WindowFlags f)
|
||||
: TabFormWidget(aParent)
|
||||
{
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 8, 0, 1);
|
||||
ui->contentWidget->setLayout(layout);
|
||||
ui->contentWidget->setObjectName("contentWidgetWithBBorder");
|
||||
QListWidget* widget = new QListWidget(this);
|
||||
widget->setFixedWidth(250);
|
||||
QStringList menus;
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("About");
|
||||
widget->addItems(menus);
|
||||
widget->setSpacing(3);
|
||||
for (int i = 0; i < menus.count(); ++i)
|
||||
{
|
||||
widget->item(i)->setTextAlignment(Qt::AlignCenter);
|
||||
}
|
||||
layout->addWidget(widget);
|
||||
QStackedWidget* stackedWidget = new QStackedWidget(this);
|
||||
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 8, 0, 8);
|
||||
this->ui->contentWidget->setLayout(layout);
|
||||
this->ui->contentWidget->setObjectName("contentWidgetWithBBorder");
|
||||
QListWidget* widget = new QListWidget(this);
|
||||
widget->setFixedWidth(250);
|
||||
QStringList menus;
|
||||
//menus << tr("General") << tr("Account") << tr("System") << tr("Information") << tr("Log") << tr("About");
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("About");
|
||||
widget->addItems(menus);
|
||||
widget->setSpacing(3);
|
||||
for (int i = 0; i < menus.count(); ++i) {
|
||||
widget->item(i)->setTextAlignment(Qt::AlignCenter);
|
||||
}
|
||||
layout->addWidget(widget);
|
||||
QStackedWidget* stackedWidget = new QStackedWidget(this);
|
||||
QWidget* spacerLine = new QWidget(this);
|
||||
spacerLine->setFixedWidth(2);
|
||||
spacerLine->setObjectName("verSpaceLine");
|
||||
spacerLine->setStyleSheet("margin-bottom:8px");
|
||||
layout->addWidget(spacerLine);
|
||||
layout->addWidget(stackedWidget);
|
||||
ui->commandWidget->hide();
|
||||
|
||||
addVerticalLine(layout);
|
||||
layout->addWidget(stackedWidget);
|
||||
this->ui->commandWidget->hide();
|
||||
GeneralForm* generalForm = new GeneralForm(this);
|
||||
stackedWidget->addWidget(generalForm);
|
||||
|
||||
GeneralForm* generalForm = new GeneralForm(this);
|
||||
stackedWidget->addWidget(generalForm);
|
||||
AccountTableForm* acc = new AccountTableForm(this);
|
||||
stackedWidget->addWidget(acc);
|
||||
|
||||
AccountTableForm* acc = new AccountTableForm(this);
|
||||
SystemSettingForm* systemSetting = new SystemSettingForm(this);
|
||||
stackedWidget->addWidget(systemSetting);
|
||||
|
||||
stackedWidget->addWidget(acc);
|
||||
AboutWidget* about = new AboutWidget(this);
|
||||
stackedWidget->addWidget(about);
|
||||
|
||||
systemSettingForm* systemSetting = new systemSettingForm(this);
|
||||
stackedWidget->addWidget(systemSetting);
|
||||
|
||||
AboutWidget* about = new AboutWidget(this);
|
||||
stackedWidget->addWidget(about);
|
||||
|
||||
|
||||
widget->setCurrentRow(0);
|
||||
connect(widget, &QListWidget::currentRowChanged, [=](int rowindex) {
|
||||
stackedWidget->setCurrentIndex(rowindex);
|
||||
});
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
QStringList menus2;
|
||||
menus2 << tr("General") << tr("Account") << tr("System") << tr("About");
|
||||
widget->clear();
|
||||
widget->addItems(menus2);
|
||||
for (int i = 0; i < menus.count(); ++i) {
|
||||
widget->item(i)->setTextAlignment(Qt::AlignCenter);
|
||||
}
|
||||
});
|
||||
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");
|
||||
widget->clear();
|
||||
widget->addItems(menus);
|
||||
for (int i = 0; i < menus.count(); ++i)
|
||||
{
|
||||
widget->item(i)->setTextAlignment(Qt::AlignCenter);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
AdminSettingForm::~AdminSettingForm() {
|
||||
AdminSettingForm::~AdminSettingForm()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -2,17 +2,19 @@
|
||||
// Created by Krad on 2021/11/22.
|
||||
//
|
||||
|
||||
#ifndef GUI_ADMINSETTINGFORM_H
|
||||
#define GUI_ADMINSETTINGFORM_H
|
||||
#ifndef ADMINSETTINGFORM_H
|
||||
#define ADMINSETTINGFORM_H
|
||||
|
||||
#include "src/forms/tabformwidget.h"
|
||||
#include "forms/tabformwidget.h"
|
||||
|
||||
class AdminSettingForm:public TabFormWidget {
|
||||
class AdminSettingForm :public TabFormWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AdminSettingForm(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~AdminSettingForm() ;
|
||||
explicit AdminSettingForm(QWidget* aParent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~AdminSettingForm();
|
||||
};
|
||||
|
||||
|
||||
#endif //GUI_ADMINSETTINGFORM_H
|
||||
#endif //ADMINSETTINGFORM_H
|
||||
|
||||
@@ -7,50 +7,54 @@
|
||||
#include <QDebug>
|
||||
#include <QLabel>
|
||||
#include <QEvent>
|
||||
|
||||
#include "event/EventCenter.h"
|
||||
#include "json/jsonobject.h"
|
||||
#include "src/dialogs/SelectDialog.h"
|
||||
#include "src/utilities/locker.h"
|
||||
#include "src/utilities/languageswitcher.h"
|
||||
#include "dialogs/SelectDialog.h"
|
||||
#include "utilities/Locker.h"
|
||||
#include "utilities/Languageswitcher.h"
|
||||
#include "components/ULineEdit.h"
|
||||
|
||||
GeneralForm::GeneralForm(QWidget* parent) : QWidget(parent)
|
||||
GeneralForm::GeneralForm(QWidget* aParent)
|
||||
: QWidget(aParent)
|
||||
, mLayout(new QVBoxLayout(this))
|
||||
, mSelectDialog(new SelectDialog(this))
|
||||
{
|
||||
layout = new QVBoxLayout(this);
|
||||
QWidget* lanHeader = new QWidget(this);
|
||||
layout->addWidget(lanHeader);
|
||||
mLayout->addWidget(lanHeader);
|
||||
mSelectDialog->setWindowModality(Qt::WindowModal);
|
||||
|
||||
QHBoxLayout* lanHeaderLayout = new QHBoxLayout(lanHeader);
|
||||
QLabel* lbl_lan = new QLabel(tr("Language"));
|
||||
lanHeaderLayout->addWidget(lbl_lan);
|
||||
QLabel* languageLabel = new QLabel(tr("Language"));
|
||||
lanHeaderLayout->addWidget(languageLabel);
|
||||
|
||||
QPushButton* btnLan = new QPushButton(lanHeader);
|
||||
lanHeaderLayout->addWidget(btnLan);
|
||||
lanHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||
|
||||
QWidget* instHeader = new QWidget(this);
|
||||
layout->addWidget(instHeader);
|
||||
mLayout->addWidget(instHeader);
|
||||
QHBoxLayout* instHeaderLayout = new QHBoxLayout(instHeader);
|
||||
QLabel* lbl_ins = new QLabel(tr("Institution Name"));
|
||||
instHeaderLayout->addWidget(lbl_ins);
|
||||
QLabel* institutionNameLabel = new QLabel(tr("Institution Name"));
|
||||
instHeaderLayout->addWidget(institutionNameLabel);
|
||||
QLineEdit* instName = new ULineEdit(instHeader);
|
||||
instName->setMaximumSize(QSize(300, 32768));
|
||||
instHeaderLayout->addWidget(instName);
|
||||
instHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Fixed));
|
||||
|
||||
QLabel* lbl_insaddr = new QLabel(tr("Institution Addr"));
|
||||
instHeaderLayout->addWidget(lbl_insaddr);
|
||||
QLabel* institutionAddressLabel = new QLabel(tr("Institution Addr"));
|
||||
instHeaderLayout->addWidget(institutionAddressLabel);
|
||||
QLineEdit* instAddr = new ULineEdit(instHeader);
|
||||
instHeaderLayout->addWidget(instAddr);
|
||||
instAddr->setMaximumSize(QSize(300, 32768));
|
||||
instHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||
|
||||
QWidget* lockHeader = new QWidget(this);
|
||||
layout->addWidget(lockHeader);
|
||||
mLayout->addWidget(lockHeader);
|
||||
QHBoxLayout* lockHeaderLayout = new QHBoxLayout(lockHeader);
|
||||
|
||||
QLabel* lbl_lock = new QLabel(tr("Lock Screen"));
|
||||
lockHeaderLayout->addWidget(lbl_lock);
|
||||
QLabel* lockScreenLabel = new QLabel(tr("Lock Screen"));
|
||||
lockHeaderLayout->addWidget(lockScreenLabel);
|
||||
|
||||
QLineEdit* lockTime = new ULineEdit(lockHeader);
|
||||
lockTime->setMaximumSize(QSize(300, 32768));
|
||||
@@ -61,7 +65,7 @@ GeneralForm::GeneralForm(QWidget* parent) : QWidget(parent)
|
||||
lockHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||
|
||||
//...
|
||||
layout->addSpacerItem(new QSpacerItem(20, 300, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
||||
mLayout->addSpacerItem(new QSpacerItem(20, 300, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
||||
|
||||
//init
|
||||
btnLan->setText(JsonObject::Instance()->defaultLanguage());
|
||||
@@ -87,29 +91,26 @@ GeneralForm::GeneralForm(QWidget* parent) : QWidget(parent)
|
||||
|
||||
});
|
||||
|
||||
connect(btnLan, &QPushButton::clicked, [=]() {
|
||||
if (!dialog)
|
||||
connect(btnLan, &QPushButton::clicked, [=]()
|
||||
{
|
||||
dialog = new SelectDialog(this);
|
||||
dialog->setWindowModality(Qt::WindowModal);
|
||||
}
|
||||
dialog->setValues(JsonObject::Instance()->language());
|
||||
dialog->setSelectedValue(JsonObject::Instance()->defaultLanguage());
|
||||
if (dialog->exec() == QDialog::Accepted)
|
||||
{
|
||||
QString lan = dialog->getSelectedValue();
|
||||
mSelectDialog->setValues(JsonObject::Instance()->language());
|
||||
mSelectDialog->setSelectedValue(JsonObject::Instance()->defaultLanguage());
|
||||
if (mSelectDialog->exec() == QDialog::Accepted)
|
||||
{
|
||||
QString language = mSelectDialog->getSelectedValue();
|
||||
|
||||
//take effect
|
||||
JsonObject::Instance()->setDefaultLanguage(lan);
|
||||
LanguageSwitcher::getInstance()->setDefaultLanguage(lan);
|
||||
btnLan->setText(JsonObject::Instance()->defaultLanguage());
|
||||
}
|
||||
//take effect
|
||||
JsonObject::Instance()->setDefaultLanguage(language);
|
||||
LanguageSwitcher::getInstance()->setDefaultLanguage(language);
|
||||
btnLan->setText(JsonObject::Instance()->defaultLanguage());
|
||||
}
|
||||
});
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
lbl_lan->setText(tr("Language"));
|
||||
lbl_ins->setText(tr("Institution Addr"));
|
||||
lbl_insaddr->setText(tr("Institution Addr"));
|
||||
lbl_lock->setText(tr("Lock Screen"));
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]()
|
||||
{
|
||||
languageLabel->setText(tr("Language"));
|
||||
institutionNameLabel->setText(tr("Institution Addr"));
|
||||
institutionAddressLabel->setText(tr("Institution Addr"));
|
||||
lockScreenLabel->setText(tr("Lock Screen"));
|
||||
});
|
||||
}
|
||||
21
src/forms/settings/GeneralForm.h
Normal file
21
src/forms/settings/GeneralForm.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef GENERALFORM_H
|
||||
#define GENERALFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QVBoxLayout;
|
||||
class SelectDialog;
|
||||
|
||||
class GeneralForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GeneralForm(QWidget* aParent = nullptr);
|
||||
|
||||
private:
|
||||
QVBoxLayout* mLayout;
|
||||
SelectDialog* mSelectDialog;
|
||||
};
|
||||
|
||||
#endif // GENERALFORM_H
|
||||
194
src/forms/settings/SystemSettingForm.cpp
Normal file
194
src/forms/settings/SystemSettingForm.cpp
Normal file
@@ -0,0 +1,194 @@
|
||||
#include "SystemSettingForm.h"
|
||||
#include "ui_SystemSettingForm.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QToolButton>
|
||||
#include <QGridLayout>
|
||||
|
||||
#include "dialogs/SelectDialog.h"
|
||||
#include "network/NetworkCfgDialog.h"
|
||||
#include "network/DicomCfgDialog.h"
|
||||
#include "network/GetAdminPsw.h"
|
||||
#include "json/jsonobject.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include "device/DeviceManager.h"
|
||||
#include "json/cmdhelper.h"
|
||||
#include "components/ImageSwitch.h"
|
||||
|
||||
SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, mUI(new Ui::SystemSettingForm)
|
||||
, mProtocalSelectDialog(new SelectDialog(this))
|
||||
, mFilterSelectDialog(new SelectDialog(this))
|
||||
, mDiskInfoCaller(nullptr)
|
||||
, mDiskSize(0)
|
||||
, mDiskUsedSize(0)
|
||||
, mDiskSizeFlag(false)
|
||||
, mDiskUsedSizeFlag(false)
|
||||
{
|
||||
mUI->setupUi(this);
|
||||
mProtocalSelectDialog->setWindowModality(Qt::WindowModal);
|
||||
mFilterSelectDialog->setWindowModality(Qt::WindowModal);
|
||||
|
||||
mUI->lbl_size->setText(tr("Loading..."));
|
||||
mUI->lbl_used->setText(tr("Loading..."));
|
||||
|
||||
//style init
|
||||
mUI->btn_dicom->setIcon(QIcon(":/icons/dicomsettings.png"));
|
||||
mUI->btn_dicom->setIconSize(QSize(80, 80));
|
||||
mUI->btn_network->setIcon(QIcon(":/icons/networksettings.png"));
|
||||
mUI->btn_network->setIconSize(QSize(80, 80));
|
||||
mUI->swt_verify->setChecked(true);
|
||||
mUI->lbl_verify->setFixedWidth(100);
|
||||
|
||||
//data init
|
||||
mUI->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
mUI->btnPro->setObjectName("BigBtn");
|
||||
mUI->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
mUI->btnFlt->setObjectName("BigBtn");
|
||||
|
||||
QGridLayout* gridLayout = (QGridLayout*)mUI->block10->layout();
|
||||
auto scanConfirmButton = new ImageSwitch(this);
|
||||
auto scanConfirmLabel = new QLabel(this);
|
||||
scanConfirmLabel->setText("Scan Confirm");
|
||||
gridLayout->addWidget(scanConfirmButton, 4, 2, 1, 1);
|
||||
gridLayout->addWidget(scanConfirmLabel, 4, 0, 1, 1);
|
||||
scanConfirmButton->setChecked(JsonObject::Instance()->getScanConfirm());
|
||||
QFrame* line5 = new QFrame(this);
|
||||
line5->setFrameShape(QFrame::HLine);
|
||||
line5->setFrameShadow(QFrame::Sunken);
|
||||
gridLayout->addWidget(line5, 5, 0);
|
||||
|
||||
auto scanCompleteButton = new ImageSwitch(this);
|
||||
auto scanCompleteLabel = new QLabel(this);
|
||||
scanCompleteLabel->setText("Complete Notify");
|
||||
gridLayout->addWidget(scanCompleteButton, 6, 2, 1, 1);
|
||||
gridLayout->addWidget(scanCompleteLabel, 6, 0, 1, 1);
|
||||
scanCompleteButton->setChecked(JsonObject::Instance()->getCompleteNotify());
|
||||
QFrame* line6 = new QFrame(this);
|
||||
line6->setFrameShape(QFrame::HLine);
|
||||
line6->setFrameShadow(QFrame::Sunken);
|
||||
gridLayout->addWidget(line6, 7, 0);
|
||||
|
||||
mDiskInfoCaller = QThread::create([=]()
|
||||
{
|
||||
double disksize = 0;
|
||||
mDiskSizeFlag = cmdHelper::Instance()->getDiskSize(disksize);
|
||||
mDiskSize = disksize;
|
||||
updateStorageSize();
|
||||
while (true)
|
||||
{
|
||||
double duse = 0;
|
||||
mDiskUsedSizeFlag = cmdHelper::Instance()->getDiskUsed(duse);
|
||||
mDiskUsedSize = duse;
|
||||
updateStorageUsed();
|
||||
QMetaObject::invokeMethod(mUI->batIcon, "startAnimation", Qt::QueuedConnection);
|
||||
QThread::msleep(30000);
|
||||
}
|
||||
});
|
||||
mDiskInfoCaller->start();
|
||||
|
||||
//connection
|
||||
connect(mUI->swt_verify, &ImageSwitch::clicked, [=]() {
|
||||
if (mUI->swt_verify->getChecked())
|
||||
{
|
||||
////
|
||||
}
|
||||
});
|
||||
connect(scanConfirmButton, &ImageSwitch::clicked, [=]() {
|
||||
JsonObject::Instance()->setScanConfirm(scanConfirmButton->getChecked());
|
||||
});
|
||||
connect(scanCompleteButton, &ImageSwitch::clicked, [=]() {
|
||||
JsonObject::Instance()->setCompleteNotify(scanCompleteButton->getChecked());
|
||||
});
|
||||
connect(mUI->btn_network, &QToolButton::clicked, [=]() {
|
||||
GetAdminPsw dialog(this);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
JsonObject::Instance()->setPassword(dialog.getPsw());
|
||||
NetworkCfgDialog dia(this);
|
||||
dia.setWindowModality(Qt::WindowModal);
|
||||
dia.exec();
|
||||
}
|
||||
});
|
||||
|
||||
connect(mUI->btn_dicom, &QToolButton::clicked, [=]() {
|
||||
DicomCfgDialog dia(this);
|
||||
dia.setWindowModality(Qt::WindowModal);
|
||||
dia.exec();
|
||||
});
|
||||
|
||||
|
||||
|
||||
connect(mUI->btnPro, &QPushButton::clicked, [=]()
|
||||
{
|
||||
mProtocalSelectDialog->setValues(JsonObject::Instance()->protocals());
|
||||
mProtocalSelectDialog->setSelectedValue(JsonObject::Instance()->defaultProtocal());
|
||||
if (mProtocalSelectDialog->exec() == QDialog::Accepted)
|
||||
{
|
||||
QString pro = mProtocalSelectDialog->getSelectedValue();
|
||||
//take effect
|
||||
JsonObject::Instance()->setDefaultProtocal(pro);
|
||||
mUI->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
}
|
||||
});
|
||||
|
||||
connect(mUI->btnFlt, &QPushButton::clicked, [=]()
|
||||
{
|
||||
mFilterSelectDialog->setValues(JsonObject::Instance()->worklistFilters());
|
||||
mFilterSelectDialog->setSelectedValue(JsonObject::Instance()->defaultFilter());
|
||||
if (mFilterSelectDialog->exec() == QDialog::Accepted)
|
||||
{
|
||||
QString flt = mFilterSelectDialog->getSelectedValue();
|
||||
//take effect
|
||||
JsonObject::Instance()->setDefaultFilter(flt);
|
||||
mUI->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
}
|
||||
});
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]()
|
||||
{
|
||||
mUI->retranslateUi(this);
|
||||
mUI->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
mUI->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
mUI->swt_verify->setChecked(true);
|
||||
updateStorageSize();
|
||||
updateStorageUsed();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
SystemSettingForm::~SystemSettingForm()
|
||||
{
|
||||
mDiskInfoCaller->terminate();
|
||||
delete mDiskInfoCaller;
|
||||
}
|
||||
|
||||
void SystemSettingForm::updateStorageUsed()
|
||||
{
|
||||
if (mDiskUsedSizeFlag)
|
||||
{
|
||||
mUI->batIcon->setValue(mDiskUsedSize);
|
||||
mUI->lbl_used->setText(tr("used:\t%1G").arg(mDiskUsedSize));
|
||||
}
|
||||
else
|
||||
{
|
||||
mUI->lbl_used->setText(tr("Get disk used size fail!"));
|
||||
}
|
||||
}
|
||||
void SystemSettingForm::updateStorageSize()
|
||||
{
|
||||
//bool flag = AppGlobalValues::StorageFlag();
|
||||
if (mDiskSizeFlag)
|
||||
{
|
||||
//double total_size = AppGlobalValues::StorageSize();
|
||||
mUI->batIcon->setMaxValue(mDiskSize);
|
||||
double aValue = (mDiskSize - JsonObject::Instance()->storageAlarmSize().toDouble()) / mDiskSize;
|
||||
mUI->batIcon->setAlarmValue(aValue);
|
||||
mUI->lbl_size->setText(tr("total:\t%1G").arg(mDiskSize));
|
||||
}
|
||||
else
|
||||
{
|
||||
mUI->lbl_size->setText(tr("Get disk total size fail!"));
|
||||
}
|
||||
}
|
||||
37
src/forms/settings/SystemSettingForm.h
Normal file
37
src/forms/settings/SystemSettingForm.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef SYSTEMSETTINGFORM_H
|
||||
#define SYSTEMSETTINGFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class SelectDialog;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class SystemSettingForm;
|
||||
}
|
||||
|
||||
class SystemSettingForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SystemSettingForm(QWidget* aParent = nullptr);
|
||||
~SystemSettingForm();
|
||||
|
||||
private:
|
||||
void updateStorageSize();
|
||||
void updateStorageUsed();
|
||||
|
||||
Ui::SystemSettingForm* mUI;
|
||||
|
||||
SelectDialog* mProtocalSelectDialog;
|
||||
SelectDialog* mFilterSelectDialog;
|
||||
QThread* mDiskInfoCaller;
|
||||
|
||||
double mDiskSize;
|
||||
double mDiskUsedSize;
|
||||
bool mDiskSizeFlag;
|
||||
bool mDiskUsedSizeFlag;
|
||||
};
|
||||
|
||||
#endif // SYSTEMSETTINGFORM_H
|
||||
347
src/forms/settings/SystemSettingForm.ui
Normal file
347
src/forms/settings/SystemSettingForm.ui
Normal file
@@ -0,0 +1,347 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SystemSettingForm</class>
|
||||
<widget class="QWidget" name="SystemSettingForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>681</width>
|
||||
<height>678</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="block10" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_protocal">
|
||||
<property name="text">
|
||||
<string>Protocal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="btnPro">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_verify">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Verify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="ImageSwitch" name="swt_verify" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_4" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QToolButton" name="btn_network">
|
||||
<property name="text">
|
||||
<string>IP</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_filter">
|
||||
<property name="text">
|
||||
<string>Worklist Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFlt">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btn_dicom">
|
||||
<property name="text">
|
||||
<string>DICOM</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Disk Storage</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_5" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="BatteryWidget" name="batIcon" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_6" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_size">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_used">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ImageSwitch</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">components/ImageSwitch.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BatteryWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">components/BatteryWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -1,199 +0,0 @@
|
||||
#include "aboutwidget.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include "event/EventCenter.h"
|
||||
#include <QStringList>
|
||||
#include "json/cmdhelper.h"
|
||||
#include <QThread>
|
||||
#include "AppVersion.h"
|
||||
#include "device/DeviceManager.h"
|
||||
|
||||
AboutWidget::AboutWidget(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
initUi();
|
||||
}
|
||||
|
||||
AboutWidget::~AboutWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void AboutWidget::initUi()
|
||||
{
|
||||
const int subContentMargin = 10;
|
||||
const int subContentSpacing = 20;
|
||||
|
||||
QVBoxLayout* pMainLayout;
|
||||
QHBoxLayout* pProductVerLayout;
|
||||
QLabel* pProductVer;
|
||||
QPushButton* pBtnHelp;
|
||||
QLabel* pCompanyCopyRight;
|
||||
QLabel* pGuiVer;
|
||||
QLabel* pEmbededSoftVer;
|
||||
QLabel* pReconSotfVer;
|
||||
QLabel* pFEBVer;
|
||||
QLabel* pQtVer;
|
||||
QLabel* pQtCopyright;
|
||||
//QLabel* pLogVer;
|
||||
//QLabel* pLogCopyright;
|
||||
QLabel* pJsoncppVer;
|
||||
QLabel* pJsoncppCopyright;
|
||||
QLabel* pDcmtkVer;
|
||||
QLabel* pDcmtkCopyright;
|
||||
|
||||
QLabel* pSUSEVer;
|
||||
|
||||
this->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
|
||||
pMainLayout = new QVBoxLayout(this);
|
||||
pMainLayout->setAlignment(Qt::AlignLeft);
|
||||
pMainLayout->setSpacing(10);
|
||||
|
||||
pProductVerLayout = new QHBoxLayout(this);
|
||||
pMainLayout->addLayout(pProductVerLayout);
|
||||
|
||||
pProductVer = new QLabel(this);
|
||||
pProductVer->setText(tr("HJ-USCT-01 V1.0"));
|
||||
pProductVerLayout->addWidget(pProductVer);
|
||||
|
||||
pBtnHelp = new QPushButton(this);
|
||||
pBtnHelp->setText(tr("?"));
|
||||
pBtnHelp->setFixedWidth(50);
|
||||
pProductVerLayout->addWidget(pBtnHelp);
|
||||
|
||||
pCompanyCopyRight = new QLabel(this);
|
||||
pCompanyCopyRight->setObjectName("normal");
|
||||
pCompanyCopyRight->setText(tr("Copyright © 2017-2022 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
||||
pCompanyCopyRight->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pCompanyCopyRight);
|
||||
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pGuiVer = new QLabel(this);
|
||||
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||
pGuiVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pGuiVer);
|
||||
|
||||
pEmbededSoftVer = new QLabel(this);
|
||||
// pEmbededSoftVer->setText(tr("Embedded Software %1").arg(getEmbVersion()));
|
||||
pEmbededSoftVer->setText(tr("Embedded Software %1, Data store Path:%2").arg(getEmbVersion(), getDataStorePath()));
|
||||
pEmbededSoftVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pEmbededSoftVer);
|
||||
|
||||
pReconSotfVer = new QLabel(this);
|
||||
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
||||
pReconSotfVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pReconSotfVer);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pFEBVer = new QLabel(this);
|
||||
pFEBVer->setText(tr("FEB Information"));
|
||||
pFEBVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pFEBVer);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
|
||||
pQtVer = new QLabel(tr("Qt 5.12.0"), this);
|
||||
pMainLayout->addWidget(pQtVer);
|
||||
//pQtCopyright = new QLabel(tr("Copyright (c) 2017 The Qt Company Ltd."), this);
|
||||
//pQtCopyright->setObjectName("normal");
|
||||
//pQtCopyright->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
//pMainLayout->addWidget(pQtCopyright);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
//pLogVer = new QLabel(this);
|
||||
//pLogVer->setText(tr("spdlog 1.8.2"));
|
||||
//pLogVer->setObjectName("lbl_aboutwidget_log4cxx");
|
||||
//pMainLayout->addWidget(pLogVer);
|
||||
//pLogCopyright = new QLabel(this);
|
||||
//pLogCopyright->setText(tr("Copyright (c) 2016 Gabi Melman."));
|
||||
//pLogCopyright->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
//pMainLayout->addWidget(pLogCopyright);
|
||||
|
||||
|
||||
|
||||
|
||||
pSUSEVer = new QLabel(this);
|
||||
pSUSEVer->setText(tr("Loading..."));
|
||||
pMainLayout->addWidget(pSUSEVer);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pDcmtkVer = new QLabel(this);
|
||||
pDcmtkVer->setText(tr("Loading..."));
|
||||
pMainLayout->addWidget(pDcmtkVer);
|
||||
pDcmtkCopyright = new QLabel(this);
|
||||
pDcmtkCopyright->setObjectName("normal");
|
||||
pDcmtkCopyright->setText(tr("Copyright (c) 1994-2021, OFFIS e.V."));
|
||||
pDcmtkCopyright->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pDcmtkCopyright);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
|
||||
pJsoncppVer = new QLabel(this);
|
||||
pJsoncppVer->setText(tr("cJSON"));
|
||||
pMainLayout->addWidget(pJsoncppVer);
|
||||
pJsoncppCopyright = new QLabel(this);
|
||||
pJsoncppCopyright->setObjectName("normal");
|
||||
pJsoncppCopyright->setText(tr("Copyright (c) 2009-2017 Dave Gamble"));
|
||||
pJsoncppCopyright->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||
pMainLayout->addWidget(pJsoncppCopyright);
|
||||
pMainLayout->addSpacing(subContentSpacing);
|
||||
|
||||
pMainLayout->addStretch();
|
||||
|
||||
|
||||
QThread* t = QThread::create([=]() {
|
||||
pSUSEVer->setText(cmdHelper::Instance()->getLinuxVersion());
|
||||
pDcmtkVer->setText(cmdHelper::Instance()->getDCMTKVersion());
|
||||
});
|
||||
t->start();
|
||||
connect(t, SIGNAL(finished()), t, SLOT(deleteLater()));
|
||||
|
||||
|
||||
connect(pBtnHelp, SIGNAL(clicked()), this, SLOT(openHelpFile()));
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
pProductVer->setText(tr("HJ-USCT-01 V1.0"));
|
||||
pBtnHelp->setText(tr("?"));
|
||||
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
||||
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||
// pEmbededSoftVer->setText(tr("Embedded Software %1").arg(getEmbVersion()));
|
||||
pEmbededSoftVer->setText(tr("Embedded Software %1, Data store Path:%2").arg(getEmbVersion(), getDataStorePath()));
|
||||
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
||||
pFEBVer->setText(tr("FEB Information"));
|
||||
});
|
||||
}
|
||||
|
||||
void AboutWidget::openHelpFile()
|
||||
{
|
||||
QString userManulFile = QCoreApplication::applicationDirPath() + "/userManual.pdf";
|
||||
|
||||
QFileInfo file(userManulFile);
|
||||
if (file.exists())
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(userManulFile));
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// EQ9MessageBox box;
|
||||
// box.setMessage(tr("can't find the user manual file!"));
|
||||
// box.exec();
|
||||
//}
|
||||
}
|
||||
|
||||
QString AboutWidget::getGUIVersion() {
|
||||
|
||||
if (GUI_VERSION_BETA){
|
||||
return QString("%1.%2.%3 beta").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
|
||||
}
|
||||
return QString("%1.%2.%3").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
|
||||
}
|
||||
|
||||
QString AboutWidget::getEmbVersion() {
|
||||
return DeviceManager::Default()->getSoftwareVersion();
|
||||
}
|
||||
|
||||
QString AboutWidget::getDataStorePath() {
|
||||
return DeviceManager::Default()->getScanOutputPath();;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#ifndef _ABOUTWIDGET_H_
|
||||
#define _ABOUTWIDGET_H_
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QFileInfo>
|
||||
#include <QCoreApplication>
|
||||
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
|
||||
class AboutWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AboutWidget(QWidget* parent = nullptr);
|
||||
~AboutWidget();
|
||||
|
||||
QString getGUIVersion();
|
||||
QString getEmbVersion();
|
||||
QString getDataStorePath();
|
||||
|
||||
private slots:
|
||||
void openHelpFile();
|
||||
|
||||
private:
|
||||
void initUi();
|
||||
//QString queryVersion(const QString& packName);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // !_ABOUTWIDGET_H_
|
||||
@@ -1,21 +0,0 @@
|
||||
#ifndef GENERALFORM_H
|
||||
#define GENERALFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
class QPushButton;
|
||||
class QVBoxLayout;
|
||||
class SelectDialog;
|
||||
|
||||
|
||||
class GeneralForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GeneralForm(QWidget* parent = nullptr);
|
||||
|
||||
private:
|
||||
QVBoxLayout* layout = nullptr;
|
||||
SelectDialog* dialog = nullptr;
|
||||
};
|
||||
|
||||
#endif // GENERALFORM_H
|
||||
@@ -1,221 +0,0 @@
|
||||
#include "systemsettingform.h"
|
||||
#include "ui_systemsettingform.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QDebug>
|
||||
#include <QToolButton>
|
||||
#include <QGridLayout>
|
||||
|
||||
|
||||
#include "src/dialogs/SelectDialog.h"
|
||||
#include "network/NetworkCfgDialog.h"
|
||||
#include "network/DicomCfgDialog.h"
|
||||
#include "network/GetAdminPsw.h"
|
||||
|
||||
#include "json/jsonobject.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include "device/DeviceManager.h"
|
||||
#include "json/cmdhelper.h"
|
||||
|
||||
systemSettingForm::systemSettingForm(QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::systemSettingForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->lbl_size->setText(tr("Loading..."));
|
||||
ui->lbl_used->setText(tr("Loading..."));
|
||||
|
||||
//style init
|
||||
//ui->btn_dicom->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
ui->btn_dicom->setIcon(QIcon(":/icons/dicomsettings.png"));
|
||||
//ui->btn_dicom->setText(tr("DICOM"));
|
||||
ui->btn_dicom->setIconSize(QSize(80, 80));
|
||||
|
||||
//ui->btn_network->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
ui->btn_network->setIcon(QIcon(":/icons/networksettings.png"));
|
||||
//ui->btn_network->setText(tr("IP"));
|
||||
ui->btn_network->setIconSize(QSize(80, 80));
|
||||
|
||||
ui->swt_verify->setChecked(true);
|
||||
//ui->btnFlt->setFixedWidth(200);
|
||||
//ui->btnPro->setFixedWidth(200);
|
||||
//ui->lbl_protocal->setFixedWidth(100);
|
||||
ui->lbl_verify->setFixedWidth(100);
|
||||
|
||||
//data init
|
||||
ui->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
ui->btnPro->setObjectName("BigBtn");
|
||||
ui->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
ui->btnFlt->setObjectName("BigBtn");
|
||||
|
||||
QGridLayout* gridLayout = (QGridLayout*)ui->block10->layout();
|
||||
auto btn_scanConfirm = new ImageSwitch(this);
|
||||
auto lbl_scanConfirm = new QLabel(this);
|
||||
lbl_scanConfirm->setText("Scan Confirm");
|
||||
gridLayout->addWidget(btn_scanConfirm, 4, 2, 1, 1);
|
||||
gridLayout->addWidget(lbl_scanConfirm, 4, 0, 1, 1);
|
||||
btn_scanConfirm->setChecked(JsonObject::Instance()->getScanConfirm());
|
||||
QFrame* line5 = new QFrame(this);
|
||||
line5->setFrameShape(QFrame::HLine);
|
||||
line5->setFrameShadow(QFrame::Sunken);
|
||||
gridLayout->addWidget(line5, 5, 0);
|
||||
|
||||
auto btn_scanComplete = new ImageSwitch(this);
|
||||
auto lbl_scanComplete = new QLabel(this);
|
||||
lbl_scanComplete->setText("Complete Notify");
|
||||
gridLayout->addWidget(btn_scanComplete, 6, 2, 1, 1);
|
||||
gridLayout->addWidget(lbl_scanComplete, 6, 0, 1, 1);
|
||||
btn_scanComplete->setChecked(JsonObject::Instance()->getCompleteNotify());
|
||||
QFrame* line6 = new QFrame(this);
|
||||
line6->setFrameShape(QFrame::HLine);
|
||||
line6->setFrameShadow(QFrame::Sunken);
|
||||
gridLayout->addWidget(line6, 7, 0);
|
||||
|
||||
////test begin
|
||||
//flag_disksize = true;
|
||||
//m_disksize = 75.0;
|
||||
////test end
|
||||
//updateStorageSize();
|
||||
////test begin
|
||||
//flag_diskuse = true;
|
||||
//m_diskuse = 23.0;
|
||||
////test end
|
||||
//updateStorageUsed();
|
||||
|
||||
|
||||
diskInfoCaller = QThread::create([=]() {
|
||||
|
||||
double disksize = 0;
|
||||
flag_disksize = cmdHelper::Instance()->getDiskSize(disksize);
|
||||
m_disksize = disksize;
|
||||
updateStorageSize();
|
||||
|
||||
while (true)
|
||||
{
|
||||
double duse = 0;
|
||||
flag_diskuse = cmdHelper::Instance()->getDiskUsed(duse);
|
||||
m_diskuse = duse;
|
||||
updateStorageUsed();
|
||||
QMetaObject::invokeMethod(ui->batIcon, "startAnimation", Qt::QueuedConnection);
|
||||
QThread::msleep(30000);
|
||||
}
|
||||
});
|
||||
diskInfoCaller->start();
|
||||
|
||||
//connection
|
||||
connect(ui->swt_verify, &ImageSwitch::clicked, [=]() {
|
||||
if (ui->swt_verify->getChecked())
|
||||
{
|
||||
////
|
||||
}
|
||||
});
|
||||
connect(btn_scanConfirm, &ImageSwitch::clicked, [=]() {
|
||||
JsonObject::Instance()->setScanConfirm(btn_scanConfirm->getChecked());
|
||||
});
|
||||
connect(btn_scanComplete, &ImageSwitch::clicked, [=]() {
|
||||
JsonObject::Instance()->setCompleteNotify(btn_scanComplete->getChecked());
|
||||
});
|
||||
connect(ui->btn_network, &QToolButton::clicked, [=]() {
|
||||
GetAdminPsw dialog(this);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
JsonObject::Instance()->setPassword(dialog.getPsw());
|
||||
NetworkCfgDialog dia(this);
|
||||
dia.setWindowModality(Qt::WindowModal);
|
||||
dia.exec();
|
||||
}
|
||||
});
|
||||
|
||||
connect(ui->btn_dicom, &QToolButton::clicked, [=]() {
|
||||
DicomCfgDialog dia(this);
|
||||
dia.setWindowModality(Qt::WindowModal);
|
||||
dia.exec();
|
||||
});
|
||||
|
||||
|
||||
|
||||
connect(ui->btnPro, &QPushButton::clicked, [=]() {
|
||||
if (!sd_protocal)
|
||||
{
|
||||
sd_protocal = new SelectDialog(this);
|
||||
sd_protocal->setWindowModality(Qt::WindowModal);
|
||||
}
|
||||
sd_protocal->setValues(JsonObject::Instance()->protocals());
|
||||
sd_protocal->setSelectedValue(JsonObject::Instance()->defaultProtocal());
|
||||
if (sd_protocal->exec() == QDialog::Accepted)
|
||||
{
|
||||
QString pro = sd_protocal->getSelectedValue();
|
||||
//take effect
|
||||
JsonObject::Instance()->setDefaultProtocal(pro);
|
||||
ui->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
}
|
||||
});
|
||||
|
||||
connect(ui->btnFlt, &QPushButton::clicked, [=]() {
|
||||
if (!sd_filter)
|
||||
{
|
||||
sd_filter = new SelectDialog(this);
|
||||
sd_filter->setWindowModality(Qt::WindowModal);
|
||||
}
|
||||
sd_filter->setValues(JsonObject::Instance()->worklistFilters());
|
||||
sd_filter->setSelectedValue(JsonObject::Instance()->defaultFilter());
|
||||
if (sd_filter->exec() == QDialog::Accepted)
|
||||
{
|
||||
QString flt = sd_filter->getSelectedValue();
|
||||
//take effect
|
||||
JsonObject::Instance()->setDefaultFilter(flt);
|
||||
ui->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
}
|
||||
});
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
ui->retranslateUi(this);
|
||||
ui->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
ui->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
ui->swt_verify->setChecked(true);
|
||||
updateStorageSize();
|
||||
updateStorageUsed();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
systemSettingForm::~systemSettingForm()
|
||||
{
|
||||
diskInfoCaller->terminate();
|
||||
// diskInfoCaller->quit();
|
||||
// diskInfoCaller->wait();
|
||||
delete diskInfoCaller;
|
||||
}
|
||||
|
||||
void systemSettingForm::updateStorageUsed()
|
||||
{
|
||||
|
||||
if (flag_diskuse)
|
||||
{
|
||||
ui->batIcon->setValue(m_diskuse);
|
||||
ui->lbl_used->setText(tr("used:\t%1G").arg(m_diskuse));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lbl_used->setText(tr("Get disk used size fail!"));
|
||||
}
|
||||
|
||||
}
|
||||
void systemSettingForm::updateStorageSize()
|
||||
{
|
||||
//bool flag = AppGlobalValues::StorageFlag();
|
||||
if (flag_disksize)
|
||||
{
|
||||
//double total_size = AppGlobalValues::StorageSize();
|
||||
ui->batIcon->setMaxValue(m_disksize);
|
||||
double aValue = (m_disksize - JsonObject::Instance()->storageAlarmSize().toDouble()) / m_disksize;
|
||||
ui->batIcon->setAlarmValue(aValue);
|
||||
ui->lbl_size->setText(tr("total:\t%1G").arg(m_disksize));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lbl_size->setText(tr("Get disk total size fail!"));
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
#ifndef SYSTEMSETTINGFORM_H
|
||||
#define SYSTEMSETTINGFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
class QPushButton;
|
||||
class QVBoxLayout;
|
||||
class SelectDialog;
|
||||
class ImageSwitch;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class systemSettingForm;
|
||||
}
|
||||
|
||||
class systemSettingForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit systemSettingForm(QWidget* parent = nullptr);
|
||||
~systemSettingForm();
|
||||
//protected:
|
||||
// void changeEvent(QEvent* event);
|
||||
|
||||
private:
|
||||
void updateStorageSize();
|
||||
void updateStorageUsed();
|
||||
|
||||
Ui::systemSettingForm* ui;
|
||||
|
||||
SelectDialog* sd_protocal = nullptr;
|
||||
SelectDialog* sd_filter = nullptr;
|
||||
|
||||
QThread* diskInfoCaller = nullptr;
|
||||
|
||||
double m_disksize;
|
||||
double m_diskuse;
|
||||
bool flag_disksize = false;
|
||||
bool flag_diskuse = false;
|
||||
};
|
||||
|
||||
#endif // SYSTEMSETTINGFORM_H
|
||||
@@ -1,347 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>systemSettingForm</class>
|
||||
<widget class="QWidget" name="systemSettingForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>681</width>
|
||||
<height>678</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="block10" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_protocal">
|
||||
<property name="text">
|
||||
<string>Protocal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="btnPro">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_verify">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Verify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="ImageSwitch" name="swt_verify" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_4" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QToolButton" name="btn_network">
|
||||
<property name="text">
|
||||
<string>IP</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_filter">
|
||||
<property name="text">
|
||||
<string>Worklist Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFlt">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btn_dicom">
|
||||
<property name="text">
|
||||
<string>DICOM</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Disk Storage</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_5" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="BatteryWidget" name="batIcon" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_6" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_size">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_used">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ImageSwitch</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">components/ImageSwitch.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BatteryWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">components/BatteryWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user