2024-11-05 15:17:03 +08:00
|
|
|
#ifndef DASHBOARDFRAME_H
|
|
|
|
|
#define DASHBOARDFRAME_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
#include "global.h"
|
2025-01-04 18:18:19 +08:00
|
|
|
#include "dataPanel/dpGlobals.h"
|
2024-11-05 15:17:03 +08:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class dashboardFrame;
|
|
|
|
|
}
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2024-12-13 16:41:08 +08:00
|
|
|
class QTimer;
|
2024-11-05 15:17:03 +08:00
|
|
|
class TransparentMask;
|
|
|
|
|
class MessageDialog;
|
|
|
|
|
class CustomTabBar;
|
|
|
|
|
class Dashboard;
|
|
|
|
|
class DashboardNamingDialog;
|
|
|
|
|
class PanelSelectionDialog;
|
|
|
|
|
class DateTimeWidget;
|
2024-12-06 16:58:07 +08:00
|
|
|
class TimeLineWidget;
|
2025-01-14 18:39:52 +08:00
|
|
|
class DataPanel;
|
|
|
|
|
class dpConfigurationDialog;
|
2025-09-24 12:10:51 +08:00
|
|
|
class AlarmEventRealTimeDock;
|
2025-09-19 17:45:52 +08:00
|
|
|
class AlarmEventMainDialog;
|
2024-11-05 15:17:03 +08:00
|
|
|
|
|
|
|
|
namespace dashboardFrame {
|
|
|
|
|
enum frameType
|
|
|
|
|
{
|
|
|
|
|
ft_main = 0,
|
|
|
|
|
ft_secondary
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DashboardFrame : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2024-11-14 09:19:14 +08:00
|
|
|
explicit DashboardFrame(const QString&, dashboardFrame::frameType, QWidget *parent = nullptr);
|
2024-11-05 15:17:03 +08:00
|
|
|
~DashboardFrame();
|
|
|
|
|
|
2024-11-14 09:19:14 +08:00
|
|
|
void showMessageDialog(MessageDialogType,const QString&,const QString&);
|
|
|
|
|
void addDashboard(Dashboard*);
|
2024-11-07 12:08:56 +08:00
|
|
|
void insertDashboard(int, Dashboard*);
|
2024-11-14 09:19:14 +08:00
|
|
|
int dashboardCount();
|
|
|
|
|
Dashboard* getDashboard(const QString&);
|
|
|
|
|
Dashboard* takeDashboard(const QString&);
|
|
|
|
|
DashboardFrame* getDashboardFrame(const QString&);
|
2024-11-14 12:11:49 +08:00
|
|
|
void setDashboardAreaHighlight(bool);
|
2024-11-14 09:19:14 +08:00
|
|
|
void moveDashboardToNewDVIEWindow(const QString&, QPoint);
|
2025-01-14 18:39:52 +08:00
|
|
|
void openPanelConfigurationDialog(DataPanel*);
|
2024-11-05 15:17:03 +08:00
|
|
|
|
|
|
|
|
protected:
|
2024-11-07 12:08:56 +08:00
|
|
|
bool eventFilter(QObject*, QEvent*) override;
|
2024-11-20 17:29:29 +08:00
|
|
|
void resizeEvent(QResizeEvent*) override;
|
2025-09-24 12:10:51 +08:00
|
|
|
void moveEvent(QMoveEvent*) override;
|
2024-11-07 12:08:56 +08:00
|
|
|
void dragEnterEvent(QDragEnterEvent* event) override;
|
|
|
|
|
//void dragMoveEvent(QDragMoveEvent* event) override;
|
|
|
|
|
void dragLeaveEvent(QDragLeaveEvent* event) override;
|
|
|
|
|
void dropEvent(QDropEvent* event) override;
|
2024-11-05 15:17:03 +08:00
|
|
|
|
2024-11-14 09:19:14 +08:00
|
|
|
private:
|
|
|
|
|
void showTransparentMask();
|
|
|
|
|
void hideTransparentMask();
|
|
|
|
|
|
|
|
|
|
void addDashboard(const QString&);
|
|
|
|
|
void removeDashboard(const QString&, bool);
|
|
|
|
|
void setCurrentDashboard(const QString&);
|
2024-11-05 15:17:03 +08:00
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
void onSignal_showMask();
|
|
|
|
|
void onSignal_hideMask();
|
|
|
|
|
|
|
|
|
|
void onBtnClicked_addDashboard();
|
|
|
|
|
void onBtnClicked_addDataPanel();
|
|
|
|
|
void onBtnClicked_dashboardList();
|
|
|
|
|
void onBtnClicked_dashboardTab();
|
2025-09-19 17:45:52 +08:00
|
|
|
void onBtnClicked_showRealtimeEvents();
|
|
|
|
|
void onBtnClicked_showHistoricalEvents();
|
2024-11-05 15:17:03 +08:00
|
|
|
|
|
|
|
|
void onMenuAction_dashboardList();
|
|
|
|
|
|
2024-12-13 16:41:08 +08:00
|
|
|
void onTimeout_realTime();
|
|
|
|
|
|
2024-11-05 15:17:03 +08:00
|
|
|
void onSignal_subDialogClose();
|
|
|
|
|
void onSignal_renameDashboard();
|
|
|
|
|
void onSignal_removeDashboard();
|
|
|
|
|
void onSignal_dashboardNaming(const QString&, const QString&);
|
|
|
|
|
void onSignal_dashboardTabMoved(int, int); //拖动tab引发了位置变化
|
2025-01-04 18:18:19 +08:00
|
|
|
void onSignal_panelSelectResult(DataPanelType);
|
2024-11-05 15:17:03 +08:00
|
|
|
|
2024-12-17 16:48:46 +08:00
|
|
|
void onSignal_timeRangeChanged(TimeUnit);
|
|
|
|
|
void onSignal_viewRealTimeData();
|
2024-11-05 15:17:03 +08:00
|
|
|
void onSignal_viewHistoricalData(QDateTime);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui::dashboardFrame* ui;
|
2024-11-07 12:08:56 +08:00
|
|
|
QString m_strName;
|
2024-11-05 15:17:03 +08:00
|
|
|
dashboardFrame::frameType m_type;
|
|
|
|
|
QWidget* m_pParentWindow;
|
|
|
|
|
TransparentMask* m_pTransparentMask;
|
2024-11-14 12:11:49 +08:00
|
|
|
QWidget* m_pDashboardHighlight;
|
2024-11-05 15:17:03 +08:00
|
|
|
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;
|
2024-12-06 16:58:07 +08:00
|
|
|
TimeLineWidget* m_pTimeLineWidget;
|
2024-12-13 16:41:08 +08:00
|
|
|
|
2025-01-14 18:39:52 +08:00
|
|
|
dpConfigurationDialog* m_pPanelConfigurationDialog;
|
2025-09-24 12:10:51 +08:00
|
|
|
AlarmEventRealTimeDock* m_pAlarmEventRealTimeDock;
|
2025-09-19 17:45:52 +08:00
|
|
|
AlarmEventMainDialog* m_pAlarmEventMainDialog;
|
2025-01-14 18:39:52 +08:00
|
|
|
|
2024-12-13 16:41:08 +08:00
|
|
|
QTimer* m_pTimer_RealTime;
|
2024-11-05 15:17:03 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|