增加dashboFrame类,优化程序结构
This commit is contained in:
parent
3c818a3e14
commit
c9b8f01ad2
|
|
@ -32,6 +32,7 @@ set(H_HEADER_FILES
|
|||
include/transparentMask.h
|
||||
include/messageDialog.h
|
||||
include/dashboard.h
|
||||
include/dashboardFrame.h
|
||||
include/dashboardNamingDialog.h
|
||||
include/dataPanel.h
|
||||
include/panelSelectionDialog.h
|
||||
|
|
@ -56,6 +57,7 @@ set(CPP_SOURCE_FILES
|
|||
source/transparentMask.cpp
|
||||
source/messageDialog.cpp
|
||||
source/dashboard.cpp
|
||||
source/dashboardFrame.cpp
|
||||
source/dashboardNamingDialog.cpp
|
||||
source/dataPanel.cpp
|
||||
source/panelSelectionDialog.cpp
|
||||
|
|
@ -72,6 +74,7 @@ set(UI_FILES
|
|||
ui/tccToolBox.ui
|
||||
ui/transparentMask.ui
|
||||
ui/messageDialog.ui
|
||||
ui/dashboardFrame.ui
|
||||
ui/dashboardNamingDialog.ui
|
||||
ui/panelSelectionDialog.ui
|
||||
ui/panelConfigurationWidget.ui
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
#ifndef DASHBOARDFRAME_H
|
||||
#define DASHBOARDFRAME_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "global.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class dashboardFrame;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class TransparentMask;
|
||||
class MessageDialog;
|
||||
class CustomTabBar;
|
||||
class Dashboard;
|
||||
class DashboardNamingDialog;
|
||||
class PanelSelectionDialog;
|
||||
class DateTimeWidget;
|
||||
|
||||
namespace dashboardFrame {
|
||||
enum frameType
|
||||
{
|
||||
ft_main = 0,
|
||||
ft_secondary
|
||||
};
|
||||
}
|
||||
|
||||
class DashboardFrame : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DashboardFrame(QWidget *parent = nullptr);
|
||||
~DashboardFrame();
|
||||
|
||||
void setType(dashboardFrame::frameType);
|
||||
void addDashboard(const QString&);
|
||||
void removeDashboard(const QString&, bool);
|
||||
|
||||
private:
|
||||
void showTransparentMask();
|
||||
void hideTransparentMask();
|
||||
|
||||
void setCurrentDashboard(const QString&);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject*, QEvent*);
|
||||
|
||||
public:
|
||||
void showMessageDialog(MessageDialogType,const QString&,const QString&);
|
||||
|
||||
public slots:
|
||||
void onSignal_showMask();
|
||||
void onSignal_hideMask();
|
||||
|
||||
void onBtnClicked_addDashboard();
|
||||
void onBtnClicked_addDataPanel();
|
||||
void onBtnClicked_dashboardList();
|
||||
void onBtnClicked_dashboardTab();
|
||||
|
||||
void onMenuAction_dashboardList();
|
||||
|
||||
void onSignal_subDialogClose();
|
||||
void onSignal_renameDashboard();
|
||||
void onSignal_removeDashboard();
|
||||
void onSignal_dashboardNaming(const QString&, const QString&);
|
||||
void onSignal_dashboardTabMoved(int, int); //拖动tab引发了位置变化
|
||||
void onSignal_panelSelectResult(const QString&);
|
||||
|
||||
void onSignal_viewHistoricalData(QDateTime);
|
||||
|
||||
private:
|
||||
Ui::dashboardFrame* ui;
|
||||
dashboardFrame::frameType m_type;
|
||||
QWidget* m_pParentWindow;
|
||||
TransparentMask* m_pTransparentMask;
|
||||
MessageDialog* m_pMessageDialog;
|
||||
CustomTabBar* m_pDashboardTabBar;
|
||||
|
||||
QList<Dashboard*> m_listDashboard;
|
||||
Dashboard* m_curActiveDashboard;
|
||||
Dashboard* m_curOperationDashboard;
|
||||
|
||||
DashboardNamingDialog* m_pDashboardNamingDialog;
|
||||
PanelSelectionDialog* m_pPanelSelectionDialog;
|
||||
DateTimeWidget* m_pDateTimeWidget;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
#define DVIEMAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include "global.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
|
|
@ -10,13 +9,7 @@ class dvieMainWindow;
|
|||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class TransparentMask;
|
||||
class MessageDialog;
|
||||
class CustomTabBar;
|
||||
class Dashboard;
|
||||
class DashboardNamingDialog;
|
||||
class PanelSelectionDialog;
|
||||
class DateTimeWidget;
|
||||
class DashboardFrame;
|
||||
|
||||
class DvieMainWindow : public QMainWindow
|
||||
{
|
||||
|
|
@ -26,53 +19,10 @@ public:
|
|||
DvieMainWindow(QWidget *parent = nullptr);
|
||||
~DvieMainWindow();
|
||||
|
||||
private:
|
||||
void showTransparentMask();
|
||||
void hideTransparentMask();
|
||||
|
||||
void addDashboard(const QString&);
|
||||
void removeDashboard(const QString&, bool);
|
||||
void setCurrentDashboard(const QString&);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject*, QEvent*);
|
||||
|
||||
public:
|
||||
void showMessageDialog(MessageDialogType,const QString&,const QString&);
|
||||
|
||||
public slots:
|
||||
void onSignal_showMask();
|
||||
void onSignal_hideMask();
|
||||
|
||||
void onBtnClicked_addDashboard();
|
||||
void onBtnClicked_addDataPanel();
|
||||
void onBtnClicked_dashboardList();
|
||||
void onBtnClicked_dashboardTab();
|
||||
|
||||
void onMenuAction_dashboardList();
|
||||
|
||||
void onSignal_subDialogClose();
|
||||
void onSignal_renameDashboard();
|
||||
void onSignal_removeDashboard();
|
||||
void onSignal_dashboardNaming(const QString&, const QString&);
|
||||
void onSignal_dashboardTabMoved(int, int); //拖动tab引发了位置变化
|
||||
void onSignal_panelSelectResult(const QString&);
|
||||
|
||||
void onSignal_viewHistoricalData(QDateTime);
|
||||
|
||||
private:
|
||||
Ui::dvieMainWindow* ui;
|
||||
TransparentMask* m_pTransparentMask;
|
||||
MessageDialog* m_pMessageDialog;
|
||||
CustomTabBar* m_pDashboardTabBar;
|
||||
|
||||
QList<Dashboard*> m_listDashboard;
|
||||
Dashboard* m_curActiveDashboard;
|
||||
Dashboard* m_curOperationDashboard;
|
||||
|
||||
DashboardNamingDialog* m_pDashboardNamingDialog;
|
||||
PanelSelectionDialog* m_pPanelSelectionDialog;
|
||||
DateTimeWidget* m_pDateTimeWidget;
|
||||
DashboardFrame* m_pDashboardFrame;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,389 @@
|
|||
#include "dashboardFrame.h"
|
||||
#include "./ui_dashboardFrame.h"
|
||||
#include "transparentMask.h"
|
||||
#include "messageDialog.h"
|
||||
#include "customTabBar.h"
|
||||
#include "dashboard.h"
|
||||
#include "customTab.h"
|
||||
#include "dashboardNamingDialog.h"
|
||||
#include "panelSelectionDialog.h"
|
||||
#include "dateTimeWidget.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QDateTime>
|
||||
|
||||
DashboardFrame::DashboardFrame(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::dashboardFrame)
|
||||
, m_pParentWindow(nullptr)
|
||||
, m_pTransparentMask(nullptr)
|
||||
, m_pMessageDialog(nullptr)
|
||||
, m_pDashboardTabBar(nullptr)
|
||||
, m_pDashboardNamingDialog(nullptr)
|
||||
, m_curActiveDashboard(nullptr)
|
||||
, m_curOperationDashboard(nullptr)
|
||||
, m_pPanelSelectionDialog(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_pParentWindow = parent;
|
||||
m_type = dashboardFrame::ft_main;
|
||||
|
||||
m_pDateTimeWidget = new DateTimeWidget(this);
|
||||
ui->layout_dateTime->addWidget(m_pDateTimeWidget);
|
||||
connect(m_pDateTimeWidget, SIGNAL(showMask()), this, SLOT(onSignal_showMask()));
|
||||
connect(m_pDateTimeWidget, SIGNAL(hideMask()), this, SLOT(onSignal_hideMask()));
|
||||
connect(m_pDateTimeWidget, SIGNAL(viewHistoricalData(QDateTime)), this, SLOT(onSignal_viewHistoricalData(QDateTime)));
|
||||
|
||||
m_pDashboardTabBar = new CustomTabBar(this);
|
||||
m_pDashboardTabBar->setObjectName("mainWindow_Bar");
|
||||
ui->hLayout_dashboardTabBar->addWidget(m_pDashboardTabBar);
|
||||
connect(m_pDashboardTabBar, SIGNAL(tabMoved(int, int)), this, SLOT(onSignal_dashboardTabMoved(int, int)));
|
||||
|
||||
connect(ui->btnAddDashboard, SIGNAL(clicked()), this, SLOT(onBtnClicked_addDashboard()));
|
||||
connect(ui->btnAddPanel, SIGNAL(clicked()), this, SLOT(onBtnClicked_addDataPanel()));
|
||||
//connect(ui->btnDashboradList1, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList()));
|
||||
connect(ui->btnDashboradList2, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList()));
|
||||
}
|
||||
|
||||
DashboardFrame::~DashboardFrame()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DashboardFrame::setType(dashboardFrame::frameType type)
|
||||
{
|
||||
if(type == dashboardFrame::ft_secondary) //只有主window具有报警提示
|
||||
{
|
||||
ui->btnEventNotication->setVisible(false);
|
||||
ui->btnAlarmNoticatio->setVisible(false);
|
||||
}
|
||||
|
||||
m_type = type;
|
||||
}
|
||||
|
||||
bool DashboardFrame::eventFilter(QObject* obj, QEvent* event)
|
||||
{
|
||||
QDialog *pDialog = qobject_cast<QDialog*>(obj);
|
||||
if(pDialog)
|
||||
{
|
||||
if(event->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent* pKeyEvent = static_cast<QKeyEvent*>(event);
|
||||
if (pKeyEvent->key() == Qt::Key_Escape)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
void DashboardFrame::showTransparentMask()
|
||||
{
|
||||
if(m_pTransparentMask == nullptr)
|
||||
m_pTransparentMask = new TransparentMask(this);
|
||||
|
||||
QPoint originPoint = QPoint(0, 0);
|
||||
if(m_pParentWindow)
|
||||
originPoint = m_pParentWindow->mapToGlobal(QPoint(0, 0));
|
||||
else
|
||||
originPoint = this->mapToGlobal(QPoint(0, 0));
|
||||
|
||||
m_pTransparentMask->setGeometry(originPoint.x(), originPoint.y(), this->width(), this->height());
|
||||
m_pTransparentMask->show();
|
||||
}
|
||||
void DashboardFrame::hideTransparentMask()
|
||||
{
|
||||
if(m_pTransparentMask != nullptr && m_pTransparentMask->isVisible())
|
||||
m_pTransparentMask->hide();
|
||||
}
|
||||
|
||||
void DashboardFrame::showMessageDialog(MessageDialogType type,const QString& strTitle,const QString& strContent)
|
||||
{
|
||||
if(m_pMessageDialog == nullptr)
|
||||
{
|
||||
m_pMessageDialog = new MessageDialog(this);
|
||||
m_pMessageDialog->installEventFilter(this);
|
||||
connect(m_pMessageDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
|
||||
}
|
||||
|
||||
m_pMessageDialog->setMessage(type, strTitle, strContent);
|
||||
// QPoint originPoint = this->mapToGlobal(QPoint(0, 0));
|
||||
// int nX = originPoint.x() + (this->width() - m_pMessageDialog->width()) * 0.5;
|
||||
// int nY = originPoint.y() + (this->height() - m_pMessageDialog->height()) * 0.5;
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pMessageDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pMessageDialog->setGeometry(nX, nY, m_pMessageDialog->width(), m_pMessageDialog->height());
|
||||
if(type == type_question)
|
||||
m_pMessageDialog->exec();
|
||||
else
|
||||
m_pMessageDialog->show();
|
||||
}
|
||||
|
||||
void DashboardFrame::addDashboard(const QString& strName)
|
||||
{
|
||||
Dashboard* dashboard = new Dashboard(strName, this);
|
||||
connect(dashboard, SIGNAL(sgl_rename()), this, SLOT(onSignal_renameDashboard()));
|
||||
connect(dashboard, SIGNAL(sgl_remove()), this, SLOT(onSignal_removeDashboard()));
|
||||
dashboard->setDisplayAreaLayout(ui->hLayout_dashboardDisplayArea);
|
||||
|
||||
//添加tab
|
||||
CustomTab* tab = dashboard->tab();
|
||||
m_pDashboardTabBar->addTab(tab);
|
||||
connect(tab, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardTab()));
|
||||
|
||||
m_listDashboard.push_back(dashboard);
|
||||
if(m_curActiveDashboard)
|
||||
m_curActiveDashboard->setActive(false);
|
||||
dashboard->setActive(true);
|
||||
m_curActiveDashboard = dashboard;
|
||||
}
|
||||
|
||||
void DashboardFrame::removeDashboard(const QString& strName, bool bDelete) //右键删除和移动到别的frame下均会调用该函数,只有删除时才会delete
|
||||
{
|
||||
int nIndex = 0;
|
||||
Dashboard* dashboard = nullptr;
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
if(m_listDashboard.at(n)->getName() == strName)
|
||||
{
|
||||
nIndex = n;
|
||||
dashboard = m_listDashboard.at(n);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !dashboard )
|
||||
return;
|
||||
|
||||
if(dashboard == m_curActiveDashboard) //删除的是当前所选
|
||||
{
|
||||
dashboard->setActive(false);
|
||||
if(m_listDashboard.count() == 1) //唯一一个
|
||||
m_curActiveDashboard = nullptr;
|
||||
else
|
||||
{
|
||||
if(nIndex != 0) //不是第一个,将其前一个置为选中状态
|
||||
{
|
||||
m_listDashboard.at(nIndex - 1)->setActive(true);
|
||||
m_curActiveDashboard = m_listDashboard.at(nIndex - 1);
|
||||
}
|
||||
else //是第一个,将下一个置为选中状态
|
||||
{
|
||||
m_listDashboard.at(nIndex + 1)->setActive(true);
|
||||
m_curActiveDashboard = m_listDashboard.at(nIndex + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomTab* tab = dashboard->tab();
|
||||
if(tab)
|
||||
m_pDashboardTabBar->removeTab(tab);
|
||||
m_listDashboard.removeAt(nIndex);
|
||||
if(bDelete)
|
||||
{
|
||||
dashboard->deleteSubWidgets();
|
||||
delete dashboard;
|
||||
}
|
||||
}
|
||||
|
||||
void DashboardFrame::setCurrentDashboard(const QString& strName)
|
||||
{
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
if(m_listDashboard.at(n)->getName() == strName)
|
||||
{
|
||||
if(m_listDashboard.at(n) == m_curActiveDashboard)
|
||||
return;
|
||||
|
||||
m_curActiveDashboard->setActive(false);
|
||||
m_listDashboard.at(n)->setActive(true);
|
||||
CustomTab* tab = m_listDashboard.at(n)->tab();
|
||||
m_pDashboardTabBar->ensureWidgetVisible(tab);
|
||||
m_curActiveDashboard = m_listDashboard.at(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_showMask()
|
||||
{
|
||||
showTransparentMask();
|
||||
}
|
||||
void DashboardFrame::onSignal_hideMask()
|
||||
{
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
||||
void DashboardFrame::onBtnClicked_addDashboard()
|
||||
{
|
||||
if(m_pDashboardNamingDialog == nullptr)
|
||||
{
|
||||
m_pDashboardNamingDialog = new DashboardNamingDialog(this);
|
||||
m_pDashboardNamingDialog->installEventFilter(this);
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(dashboardName(const QString&, const QString&)), this, SLOT(onSignal_dashboardNaming(const QString&, const QString&)));
|
||||
}
|
||||
|
||||
showTransparentMask();
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pDashboardNamingDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pDashboardNamingDialog->setGeometry(nX, nY, m_pDashboardNamingDialog->width(), m_pDashboardNamingDialog->height());
|
||||
m_pDashboardNamingDialog->showUsedForCreat();
|
||||
}
|
||||
|
||||
void DashboardFrame::onBtnClicked_addDataPanel()
|
||||
{
|
||||
if(m_listDashboard.count() == 0)
|
||||
{
|
||||
showTransparentMask();
|
||||
showMessageDialog(type_warning, QString::fromWCharArray(L"错误"), QString::fromWCharArray(L"只能在数据看板内创建展项,请先创建一个数据看板"));
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_pPanelSelectionDialog == nullptr)
|
||||
{
|
||||
m_pPanelSelectionDialog = new PanelSelectionDialog(this);
|
||||
m_pPanelSelectionDialog->installEventFilter(this);
|
||||
connect(m_pPanelSelectionDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
|
||||
connect(m_pPanelSelectionDialog, SIGNAL(panelType(const QString&)), this, SLOT(onSignal_panelSelectResult(const QString&)));
|
||||
}
|
||||
|
||||
showTransparentMask();
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pPanelSelectionDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pPanelSelectionDialog->setGeometry(nX, nY, m_pPanelSelectionDialog->width(), m_pPanelSelectionDialog->height());
|
||||
m_pPanelSelectionDialog->show();
|
||||
}
|
||||
|
||||
void DashboardFrame::onBtnClicked_dashboardList()
|
||||
{
|
||||
if(m_listDashboard.count() ==0 )
|
||||
return;
|
||||
|
||||
QMenu menu;
|
||||
menu.setStyleSheet("QMenu{\n"
|
||||
" background-color:rgb(36,43,50);\n"
|
||||
" border:1px solid rgb(6, 6, 6);\n"
|
||||
"}\n"
|
||||
"QMenu:scroller{\n"
|
||||
" show-arrows:true;\n"
|
||||
"}\n"
|
||||
"QMenu:item{\n"
|
||||
" padding-left:15px;\n"
|
||||
" padding-right:15px;\n"
|
||||
" font:9pt \"微软雅黑\";\n"
|
||||
" color:rgb(220,220,220);\n"
|
||||
" height:26px;\n"
|
||||
"}\n"
|
||||
"QMenu:item:selected{\n"
|
||||
" background-color: rgba(67,160,249, 80);\n"
|
||||
"}\n");
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
menu.addAction(m_listDashboard.at(n)->getName(), this, SLOT(onMenuAction_dashboardList()));
|
||||
}
|
||||
|
||||
QPoint originPoint = ui->btnDashboradList2->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x();
|
||||
originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nY = originPoint.y() + ui->navigationPanel->height();
|
||||
menu.exec(QPoint(nX, nY));
|
||||
}
|
||||
|
||||
void DashboardFrame::onBtnClicked_dashboardTab()
|
||||
{
|
||||
CustomTab* pBtn = qobject_cast<CustomTab*>(sender());
|
||||
QString strName = pBtn->text();
|
||||
setCurrentDashboard(strName);
|
||||
}
|
||||
|
||||
void DashboardFrame::onMenuAction_dashboardList()
|
||||
{
|
||||
QAction* action = qobject_cast<QAction*>(sender());
|
||||
QString strName = action->text();
|
||||
setCurrentDashboard(strName);
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_subDialogClose()
|
||||
{
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_dashboardNaming(const QString& strName, const QString& strUsedFor)
|
||||
{
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
if(m_listDashboard.at(n)->getName() == strName)
|
||||
{
|
||||
QString strError = QString::fromStdWString(L"已存在同名看板");
|
||||
m_pDashboardNamingDialog->showErrorInfo(strError);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(strUsedFor == "create")
|
||||
addDashboard(strName);
|
||||
else if(strUsedFor == "rename" && m_curOperationDashboard)
|
||||
m_curOperationDashboard->setName(strName);
|
||||
m_pDashboardNamingDialog->hide();
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_dashboardTabMoved(int nFromIndex, int nToIndex)
|
||||
{
|
||||
//同步相应数据在其存储接结构中的位置
|
||||
Dashboard* movingDashboard = m_listDashboard.takeAt(nFromIndex);
|
||||
m_listDashboard.insert(nToIndex, movingDashboard);
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_removeDashboard()
|
||||
{
|
||||
Dashboard* dashboard = qobject_cast<Dashboard*>(sender());
|
||||
if(dashboard)
|
||||
{
|
||||
showTransparentMask();
|
||||
QString strName = dashboard->getName();
|
||||
QString strMsg = QString::fromStdWString(L"确认删除名为 \"") + strName + QString::fromStdWString(L"\" 的数据看板吗?");
|
||||
showMessageDialog(type_question, QString::fromStdWString(L"删除看板"), strMsg);
|
||||
if(g_msgDlgBtn == btn_No)
|
||||
return;
|
||||
|
||||
removeDashboard(strName, true);
|
||||
}
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_renameDashboard()
|
||||
{
|
||||
m_curOperationDashboard = qobject_cast<Dashboard*>(sender());
|
||||
|
||||
if(m_pDashboardNamingDialog == nullptr)
|
||||
{
|
||||
m_pDashboardNamingDialog = new DashboardNamingDialog(this);
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(dlgHide()), this, SLOT(onSignal_subDialogClose()));
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(dashboardName(const QString&, const QString&)), this, SLOT(onSignal_dashboardNaming(const QString&, const QString&)));
|
||||
}
|
||||
|
||||
showTransparentMask();
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pDashboardNamingDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pDashboardNamingDialog->setGeometry(nX, nY, m_pDashboardNamingDialog->width(), m_pDashboardNamingDialog->height());
|
||||
m_pDashboardNamingDialog->showUsedForRename();
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_panelSelectResult(const QString& strType)
|
||||
{
|
||||
//m_pPanelSelectionDialog->hide();
|
||||
hideTransparentMask();
|
||||
m_curActiveDashboard->addPanel(strType);
|
||||
}
|
||||
|
||||
void DashboardFrame::onSignal_viewHistoricalData(QDateTime dateTime)
|
||||
{
|
||||
qDebug() << "viewHistoricalData: " + dateTime.date().toString("yyyy/MM/dd");
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
|
@ -1,48 +1,17 @@
|
|||
#include "dvieMainWindow.h"
|
||||
#include "./ui_dvieMainWindow.h"
|
||||
#include "transparentMask.h"
|
||||
#include "messageDialog.h"
|
||||
#include "customTabBar.h"
|
||||
#include "dashboard.h"
|
||||
#include "customTab.h"
|
||||
#include "dashboardNamingDialog.h"
|
||||
#include "panelSelectionDialog.h"
|
||||
#include "dateTimeWidget.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QDateTime>
|
||||
#include <QDrag>
|
||||
#include <QMimeData>
|
||||
#include "dashboardFrame.h"
|
||||
|
||||
DvieMainWindow::DvieMainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::dvieMainWindow)
|
||||
, m_pTransparentMask(nullptr)
|
||||
, m_pMessageDialog(nullptr)
|
||||
, m_pDashboardTabBar(nullptr)
|
||||
, m_pDashboardNamingDialog(nullptr)
|
||||
, m_curActiveDashboard(nullptr)
|
||||
, m_curOperationDashboard(nullptr)
|
||||
, m_pPanelSelectionDialog(nullptr)
|
||||
, m_pDashboardFrame(nullptr)
|
||||
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_pDateTimeWidget = new DateTimeWidget(this);
|
||||
ui->layout_dateTime->addWidget(m_pDateTimeWidget);
|
||||
connect(m_pDateTimeWidget, SIGNAL(showMask()), this, SLOT(onSignal_showMask()));
|
||||
connect(m_pDateTimeWidget, SIGNAL(hideMask()), this, SLOT(onSignal_hideMask()));
|
||||
connect(m_pDateTimeWidget, SIGNAL(viewHistoricalData(QDateTime)), this, SLOT(onSignal_viewHistoricalData(QDateTime)));
|
||||
|
||||
m_pDashboardTabBar = new CustomTabBar(this);
|
||||
m_pDashboardTabBar->setObjectName("mainWindow_Bar");
|
||||
ui->hLayout_dashboardTabBar->addWidget(m_pDashboardTabBar);
|
||||
connect(m_pDashboardTabBar, SIGNAL(tabMoved(int, int)), this, SLOT(onSignal_dashboardTabMoved(int, int)));
|
||||
|
||||
connect(ui->btnAddDashboard, SIGNAL(clicked()), this, SLOT(onBtnClicked_addDashboard()));
|
||||
connect(ui->btnAddPanel, SIGNAL(clicked()), this, SLOT(onBtnClicked_addDataPanel()));
|
||||
//connect(ui->btnDashboradList1, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList()));
|
||||
connect(ui->btnDashboradList2, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardList()));
|
||||
m_pDashboardFrame = new DashboardFrame(this);
|
||||
ui->centralLayout->addWidget(m_pDashboardFrame);
|
||||
}
|
||||
|
||||
DvieMainWindow::~DvieMainWindow()
|
||||
|
|
@ -50,322 +19,3 @@ DvieMainWindow::~DvieMainWindow()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
bool DvieMainWindow::eventFilter(QObject* obj, QEvent* event)
|
||||
{
|
||||
QDialog *pDialog = qobject_cast<QDialog*>(obj);
|
||||
if(pDialog)
|
||||
{
|
||||
if(event->type() == QEvent::KeyPress)
|
||||
{
|
||||
QKeyEvent* pKeyEvent = static_cast<QKeyEvent*>(event);
|
||||
if (pKeyEvent->key() == Qt::Key_Escape)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
void DvieMainWindow::showTransparentMask()
|
||||
{
|
||||
if(m_pTransparentMask == nullptr)
|
||||
m_pTransparentMask = new TransparentMask(this);
|
||||
|
||||
QPoint originPoint = this->mapToGlobal(QPoint(0, 0));
|
||||
m_pTransparentMask->setGeometry(originPoint.x(), originPoint.y(), this->width(), this->height());
|
||||
m_pTransparentMask->show();
|
||||
}
|
||||
void DvieMainWindow::hideTransparentMask()
|
||||
{
|
||||
if(m_pTransparentMask != nullptr && m_pTransparentMask->isVisible())
|
||||
m_pTransparentMask->hide();
|
||||
}
|
||||
|
||||
void DvieMainWindow::showMessageDialog(MessageDialogType type,const QString& strTitle,const QString& strContent)
|
||||
{
|
||||
if(m_pMessageDialog == nullptr)
|
||||
{
|
||||
m_pMessageDialog = new MessageDialog(this);
|
||||
m_pMessageDialog->installEventFilter(this);
|
||||
connect(m_pMessageDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
|
||||
}
|
||||
|
||||
m_pMessageDialog->setMessage(type, strTitle, strContent);
|
||||
// QPoint originPoint = this->mapToGlobal(QPoint(0, 0));
|
||||
// int nX = originPoint.x() + (this->width() - m_pMessageDialog->width()) * 0.5;
|
||||
// int nY = originPoint.y() + (this->height() - m_pMessageDialog->height()) * 0.5;
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pMessageDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pMessageDialog->setGeometry(nX, nY, m_pMessageDialog->width(), m_pMessageDialog->height());
|
||||
if(type == type_question)
|
||||
m_pMessageDialog->exec();
|
||||
else
|
||||
m_pMessageDialog->show();
|
||||
}
|
||||
|
||||
void DvieMainWindow::addDashboard(const QString& strName)
|
||||
{
|
||||
Dashboard* dashboard = new Dashboard(strName, this);
|
||||
connect(dashboard, SIGNAL(sgl_rename()), this, SLOT(onSignal_renameDashboard()));
|
||||
connect(dashboard, SIGNAL(sgl_remove()), this, SLOT(onSignal_removeDashboard()));
|
||||
dashboard->setDisplayAreaLayout(ui->hLayout_dashboardDisplayArea);
|
||||
|
||||
//添加tab
|
||||
CustomTab* tab = dashboard->tab();
|
||||
m_pDashboardTabBar->addTab(tab);
|
||||
connect(tab, SIGNAL(clicked()), this, SLOT(onBtnClicked_dashboardTab()));
|
||||
|
||||
m_listDashboard.push_back(dashboard);
|
||||
if(m_curActiveDashboard)
|
||||
m_curActiveDashboard->setActive(false);
|
||||
dashboard->setActive(true);
|
||||
m_curActiveDashboard = dashboard;
|
||||
}
|
||||
|
||||
void DvieMainWindow::removeDashboard(const QString& strName, bool bDelete) //右键删除和移动到别的frame下均会调用该函数,只有删除时才会delete
|
||||
{
|
||||
int nIndex = 0;
|
||||
Dashboard* dashboard = nullptr;
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
if(m_listDashboard.at(n)->getName() == strName)
|
||||
{
|
||||
nIndex = n;
|
||||
dashboard = m_listDashboard.at(n);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !dashboard )
|
||||
return;
|
||||
|
||||
if(dashboard == m_curActiveDashboard) //删除的是当前所选
|
||||
{
|
||||
dashboard->setActive(false);
|
||||
if(m_listDashboard.count() == 1) //唯一一个
|
||||
m_curActiveDashboard = nullptr;
|
||||
else
|
||||
{
|
||||
if(nIndex != 0) //不是第一个,将其前一个置为选中状态
|
||||
{
|
||||
m_listDashboard.at(nIndex - 1)->setActive(true);
|
||||
m_curActiveDashboard = m_listDashboard.at(nIndex - 1);
|
||||
}
|
||||
else //是第一个,将下一个置为选中状态
|
||||
{
|
||||
m_listDashboard.at(nIndex + 1)->setActive(true);
|
||||
m_curActiveDashboard = m_listDashboard.at(nIndex + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomTab* tab = dashboard->tab();
|
||||
if(tab)
|
||||
m_pDashboardTabBar->removeTab(tab);
|
||||
m_listDashboard.removeAt(nIndex);
|
||||
if(bDelete)
|
||||
{
|
||||
dashboard->deleteSubWidgets();
|
||||
delete dashboard;
|
||||
}
|
||||
}
|
||||
|
||||
void DvieMainWindow::setCurrentDashboard(const QString& strName)
|
||||
{
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
if(m_listDashboard.at(n)->getName() == strName)
|
||||
{
|
||||
if(m_listDashboard.at(n) == m_curActiveDashboard)
|
||||
return;
|
||||
|
||||
m_curActiveDashboard->setActive(false);
|
||||
m_listDashboard.at(n)->setActive(true);
|
||||
CustomTab* tab = m_listDashboard.at(n)->tab();
|
||||
m_pDashboardTabBar->ensureWidgetVisible(tab);
|
||||
m_curActiveDashboard = m_listDashboard.at(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_showMask()
|
||||
{
|
||||
showTransparentMask();
|
||||
}
|
||||
void DvieMainWindow::onSignal_hideMask()
|
||||
{
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
||||
void DvieMainWindow::onBtnClicked_addDashboard()
|
||||
{
|
||||
if(m_pDashboardNamingDialog == nullptr)
|
||||
{
|
||||
m_pDashboardNamingDialog = new DashboardNamingDialog(this);
|
||||
m_pDashboardNamingDialog->installEventFilter(this);
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(dashboardName(const QString&, const QString&)), this, SLOT(onSignal_dashboardNaming(const QString&, const QString&)));
|
||||
}
|
||||
|
||||
showTransparentMask();
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pDashboardNamingDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pDashboardNamingDialog->setGeometry(nX, nY, m_pDashboardNamingDialog->width(), m_pDashboardNamingDialog->height());
|
||||
m_pDashboardNamingDialog->showUsedForCreat();
|
||||
}
|
||||
|
||||
void DvieMainWindow::onBtnClicked_addDataPanel()
|
||||
{
|
||||
if(m_listDashboard.count() == 0)
|
||||
{
|
||||
showTransparentMask();
|
||||
showMessageDialog(type_warning, QString::fromWCharArray(L"错误"), QString::fromWCharArray(L"只能在数据看板内创建展项,请先创建一个数据看板"));
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_pPanelSelectionDialog == nullptr)
|
||||
{
|
||||
m_pPanelSelectionDialog = new PanelSelectionDialog(this);
|
||||
m_pPanelSelectionDialog->installEventFilter(this);
|
||||
connect(m_pPanelSelectionDialog, SIGNAL(sgl_hide()), this, SLOT(onSignal_subDialogClose()));
|
||||
connect(m_pPanelSelectionDialog, SIGNAL(panelType(const QString&)), this, SLOT(onSignal_panelSelectResult(const QString&)));
|
||||
}
|
||||
|
||||
showTransparentMask();
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pPanelSelectionDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pPanelSelectionDialog->setGeometry(nX, nY, m_pPanelSelectionDialog->width(), m_pPanelSelectionDialog->height());
|
||||
m_pPanelSelectionDialog->show();
|
||||
}
|
||||
|
||||
void DvieMainWindow::onBtnClicked_dashboardList()
|
||||
{
|
||||
if(m_listDashboard.count() ==0 )
|
||||
return;
|
||||
|
||||
QMenu menu;
|
||||
menu.setStyleSheet("QMenu{\n"
|
||||
" background-color:rgb(36,43,50);\n"
|
||||
" border:1px solid rgb(6, 6, 6);\n"
|
||||
"}\n"
|
||||
"QMenu:scroller{\n"
|
||||
" show-arrows:true;\n"
|
||||
"}\n"
|
||||
"QMenu:item{\n"
|
||||
" padding-left:15px;\n"
|
||||
" padding-right:15px;\n"
|
||||
" font:9pt \"微软雅黑\";\n"
|
||||
" color:rgb(220,220,220);\n"
|
||||
" height:26px;\n"
|
||||
"}\n"
|
||||
"QMenu:item:selected{\n"
|
||||
" background-color: rgba(67,160,249, 80);\n"
|
||||
"}\n");
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
menu.addAction(m_listDashboard.at(n)->getName(), this, SLOT(onMenuAction_dashboardList()));
|
||||
}
|
||||
|
||||
QPoint originPoint = ui->btnDashboradList2->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x();
|
||||
originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nY = originPoint.y() + ui->navigationPanel->height();
|
||||
menu.exec(QPoint(nX, nY));
|
||||
}
|
||||
|
||||
void DvieMainWindow::onBtnClicked_dashboardTab()
|
||||
{
|
||||
CustomTab* pBtn = qobject_cast<CustomTab*>(sender());
|
||||
QString strName = pBtn->text();
|
||||
setCurrentDashboard(strName);
|
||||
}
|
||||
|
||||
void DvieMainWindow::onMenuAction_dashboardList()
|
||||
{
|
||||
QAction* action = qobject_cast<QAction*>(sender());
|
||||
QString strName = action->text();
|
||||
setCurrentDashboard(strName);
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_subDialogClose()
|
||||
{
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_dashboardNaming(const QString& strName, const QString& strUsedFor)
|
||||
{
|
||||
for(int n=0; n<m_listDashboard.count(); n++)
|
||||
{
|
||||
if(m_listDashboard.at(n)->getName() == strName)
|
||||
{
|
||||
QString strError = QString::fromStdWString(L"已存在同名看板");
|
||||
m_pDashboardNamingDialog->showErrorInfo(strError);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(strUsedFor == "create")
|
||||
addDashboard(strName);
|
||||
else if(strUsedFor == "rename" && m_curOperationDashboard)
|
||||
m_curOperationDashboard->setName(strName);
|
||||
m_pDashboardNamingDialog->hide();
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_dashboardTabMoved(int nFromIndex, int nToIndex)
|
||||
{
|
||||
//同步相应数据在其存储接结构中的位置
|
||||
Dashboard* movingDashboard = m_listDashboard.takeAt(nFromIndex);
|
||||
m_listDashboard.insert(nToIndex, movingDashboard);
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_removeDashboard()
|
||||
{
|
||||
Dashboard* dashboard = qobject_cast<Dashboard*>(sender());
|
||||
if(dashboard)
|
||||
{
|
||||
showTransparentMask();
|
||||
QString strName = dashboard->getName();
|
||||
QString strMsg = QString::fromStdWString(L"确认删除名为 \"") + strName + QString::fromStdWString(L"\" 的数据看板吗?");
|
||||
showMessageDialog(type_question, QString::fromStdWString(L"删除看板"), strMsg);
|
||||
if(g_msgDlgBtn == btn_No)
|
||||
return;
|
||||
|
||||
removeDashboard(strName, true);
|
||||
}
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_renameDashboard()
|
||||
{
|
||||
m_curOperationDashboard = qobject_cast<Dashboard*>(sender());
|
||||
|
||||
if(m_pDashboardNamingDialog == nullptr)
|
||||
{
|
||||
m_pDashboardNamingDialog = new DashboardNamingDialog(this);
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(dlgHide()), this, SLOT(onSignal_subDialogClose()));
|
||||
connect(m_pDashboardNamingDialog, SIGNAL(dashboardName(const QString&, const QString&)), this, SLOT(onSignal_dashboardNaming(const QString&, const QString&)));
|
||||
}
|
||||
|
||||
showTransparentMask();
|
||||
QPoint originPoint = ui->navigationPanel->mapToGlobal(QPoint(0, 0));
|
||||
int nX = originPoint.x() + (ui->navigationPanel->width() - m_pDashboardNamingDialog->width()) * 0.5;
|
||||
int nY = originPoint.y() + ui->navigationPanel->height() * 0.5;
|
||||
m_pDashboardNamingDialog->setGeometry(nX, nY, m_pDashboardNamingDialog->width(), m_pDashboardNamingDialog->height());
|
||||
m_pDashboardNamingDialog->showUsedForRename();
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_panelSelectResult(const QString& strType)
|
||||
{
|
||||
//m_pPanelSelectionDialog->hide();
|
||||
hideTransparentMask();
|
||||
m_curActiveDashboard->addPanel(strType);
|
||||
}
|
||||
|
||||
void DvieMainWindow::onSignal_viewHistoricalData(QDateTime dateTime)
|
||||
{
|
||||
qDebug() << "viewHistoricalData: " + dateTime.date().toString("yyyy/MM/dd");
|
||||
hideTransparentMask();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,557 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>dashboardFrame</class>
|
||||
<widget class="QWidget" name="dashboardFrame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1448</width>
|
||||
<height>867</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hLayoutToolBar">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="timeLineWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(0, 141, 212, 80);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="timeControlWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>185</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>185</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="layout_dateTime">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="funBtnWidget" native="true">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="btnEventNotication">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:40px;
|
||||
background-color: rgb(200, 68, 56);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_event.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(166, 56, 46);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(128, 43, 36);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>事件(0)</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="btnAddDashboard">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:35px;
|
||||
background-color: rgb(64, 182, 113);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_add.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(52, 145, 94);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(39, 102, 59);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据看板</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="btnAlarmNoticatio">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:20px;
|
||||
background-color: rgb(200, 68, 56);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_alarm.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(166, 56, 46);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(128, 43, 36);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>报警(10+)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="btnAddPanel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:35px;
|
||||
background-color: rgb(64, 182, 113);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_add.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(52, 145, 94);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(39, 102, 59);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据展项</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="navigationPanel" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget #navigationPanel
|
||||
{
|
||||
border-top:1px solid rgb(76,88,105);
|
||||
border-bottom:1px solid rgb(76,88,105);
|
||||
background-color:rgb(36,43,50);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hLagout_navigation_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="navtgationTitle">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(250, 250, 250);
|
||||
font: 700 11pt "微软雅黑";
|
||||
border:1px solid rgb(200,200,200);
|
||||
border-left:0px;
|
||||
border-top:0px;
|
||||
border-bottom:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>实时数据监控</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="navigationStack">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_dashboard">
|
||||
<layout class="QHBoxLayout" name="hLayout_dashboardTabBar">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hLayout_dashboardTabs">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDashboradList1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>ArrowCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:2px;
|
||||
image: url(:/images/icon_dashboards2.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDashboradList2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:2px;
|
||||
image: url(:/images/icon_greater-than.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
padding:0px;
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
padding:2px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_notification"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnShowDashboards">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:1px;
|
||||
image: url(:/images/icon_dashboards_selected.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
padding:0px;
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
padding:1px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnShowNotifications">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:1px;
|
||||
image: url(:/images/icon_notifications.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
padding:0px;
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
padding:1px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="mainStack">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_dashboards">
|
||||
<layout class="QHBoxLayout" name="hLayout_dashboardDisplayArea">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_notifications"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resource/PowerMaster.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -314,526 +314,6 @@ QPushButton:pressed
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hLayoutToolBar">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="timeLineWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgba(0, 141, 212, 80);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="timeControlWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>185</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>185</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="layout_dateTime">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="funBtnWidget" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QPushButton" name="btnEventNotication">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:40px;
|
||||
background-color: rgb(200, 68, 56);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_event.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(166, 56, 46);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(128, 43, 36);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>事件(0)</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btnAlarmNoticatio">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>70</y>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:20px;
|
||||
background-color: rgb(200, 68, 56);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_alarm.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(166, 56, 46);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(128, 43, 36);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>报警(10+)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btnAddPanel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>70</y>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:35px;
|
||||
background-color: rgb(64, 182, 113);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_add.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(52, 145, 94);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(39, 102, 59);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据展项</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btnAddDashboard">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>10</y>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>55</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
font: 700 12pt "微软雅黑";
|
||||
color:rgb(250,250,250);
|
||||
text-align:right;
|
||||
padding-right:35px;
|
||||
background-color: rgb(64, 182, 113);
|
||||
icon-size:20px;
|
||||
icon: url(:/images/icon_add.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: rgb(52, 145, 94);
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: rgb(39, 102, 59);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据看板</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="navigationPanel" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget #navigationPanel
|
||||
{
|
||||
border-top:1px solid rgb(76,88,105);
|
||||
border-bottom:1px solid rgb(76,88,105);
|
||||
background-color:rgb(36,43,50);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hLagout_navigation">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="navtgationTitle">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(250, 250, 250);
|
||||
font: 700 11pt "微软雅黑";
|
||||
border:1px solid rgb(200,200,200);
|
||||
border-left:0px;
|
||||
border-top:0px;
|
||||
border-bottom:0px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>实时数据监控</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="navigationStack">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:transparent;</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_dashboard">
|
||||
<layout class="QHBoxLayout" name="hLayout_dashboardTabBar">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hLayout_dashboardTabs">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDashboradList1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>ArrowCursor</cursorShape>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:2px;
|
||||
image: url(:/images/icon_dashboards2.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDashboradList2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:2px;
|
||||
image: url(:/images/icon_greater-than.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
padding:0px;
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
padding:2px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_notification"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnShowDashboards">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:1px;
|
||||
image: url(:/images/icon_dashboards_selected.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
padding:0px;
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
padding:1px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnShowNotifications">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
padding:1px;
|
||||
image: url(:/images/icon_notifications.png);
|
||||
}
|
||||
QPushButton:hover
|
||||
{
|
||||
padding:0px;
|
||||
}
|
||||
QPushButton:pressed
|
||||
{
|
||||
padding:1px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="mainStack">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_dashboards">
|
||||
<layout class="QHBoxLayout" name="hLayout_dashboardDisplayArea">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_notifications"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
|||
Loading…
Reference in New Issue