92 lines
1.8 KiB
C++
92 lines
1.8 KiB
C++
#pragma once
|
|
#include <QWidget>
|
|
|
|
#include "ui/Dialog.h"
|
|
|
|
#include "ui_targetlistwgt.h"
|
|
|
|
#include <QHeaderView>
|
|
#include <QMouseEvent>
|
|
|
|
class QCheckBox;
|
|
|
|
class TargetListWgt : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
TargetListWgt( QWidget * parent = NULL);
|
|
~TargetListWgt();
|
|
|
|
void AttachDock(class DockWidget* dockWidget);
|
|
|
|
void SetHeader(const QStringList& headerLabels);
|
|
void AddRowData(QVariant &var);
|
|
|
|
void InitFile(const QString& strFile, int iBatchCount);
|
|
|
|
QString GetFile()
|
|
{
|
|
return m_strFile;
|
|
}
|
|
|
|
int GetBatch()
|
|
{
|
|
return m_iBatchCount;
|
|
}
|
|
|
|
protected:
|
|
void InitWgt();
|
|
|
|
void ParseReport(const QString& strFile, std::vector<std::vector<std::vector<float>>>& vecReportPoint, int iRowCount = 50);
|
|
|
|
void UpdatePageNum();
|
|
void UpdateButtonEnable(); // 更新按钮状态
|
|
void UpdatePageData(int iPageNum);
|
|
|
|
void timerEvent(QTimerEvent *event);
|
|
|
|
void mousePressEvent(QMouseEvent *event);
|
|
void mouseMoveEvent(QMouseEvent *event);
|
|
void mouseReleaseEvent(QMouseEvent *event);
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
void UpdateTable(int iTime);
|
|
|
|
protected slots:
|
|
|
|
|
|
void slotSortTabCol(int nCol);
|
|
void slotTimeChanged(double dTime);
|
|
|
|
void slotDoubleClickedItem(QTableWidgetItem *pItem); // 双击行
|
|
void slotClickedItem(QTableWidgetItem *pItem);
|
|
|
|
void slotForwardPage(); // 前一页
|
|
void slotNextPage(); // 下一页
|
|
|
|
void OnWorkSpaceChanged(class WorkSpace*);
|
|
void OnTimestepChanged(class Timestep*);
|
|
|
|
signals:
|
|
|
|
|
|
private:
|
|
Ui::TargetListWgt ui;
|
|
|
|
|
|
int m_nCurTabPage; // 当前tab页
|
|
int m_nPageShowLineNum; // 页显示的行数
|
|
|
|
int m_nBoundaryWth;
|
|
|
|
bool m_bMoveWgt; // 是否移动窗口
|
|
QPoint m_pStartPos; // 初始位置
|
|
|
|
QVariantList m_varRowDataList;
|
|
|
|
QString m_strFile;
|
|
|
|
std::vector<std::vector<std::vector<float>>> m_vecReportPoint;
|
|
int m_iBatchCount;
|
|
};
|