125 lines
3.2 KiB
C++
125 lines
3.2 KiB
C++
#pragma once
|
||
#include <QtWidgets/QMainWindow>
|
||
#include "ui_QDicomViewer.h"
|
||
#include "importwidget.h"
|
||
#include <QSettings>
|
||
#include "exportdialog.h"
|
||
#include "Customwindow.h"
|
||
#include "pqFontPropertyWidget.h"
|
||
|
||
/**
|
||
* @brief 主窗口Class
|
||
* 继承自QMainWindow,主要用于显示整个界面
|
||
*/
|
||
class QDicomViewer : public QMainWindow
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
|
||
explicit QDicomViewer(QWidget *parent = Q_NULLPTR);
|
||
~QDicomViewer();
|
||
|
||
|
||
public slots:
|
||
void Slot_ToolbarVisibilityChanged(bool);
|
||
void openDICOMFromPACS(int,std::string);
|
||
private:
|
||
Ui::QDicomViewerClass *ui;
|
||
|
||
/**
|
||
* 从qrc中读取指定抿成的StyleSheet文件
|
||
* @param sheetName StyleSheet文件名
|
||
*/
|
||
void loadStyleSheet(const QString &sheetName);
|
||
/**
|
||
* 初始化函数,主要实现了Button的构建和槽函数绑定
|
||
*/
|
||
void Initial();
|
||
void createToolButton();
|
||
|
||
/**
|
||
* 用于设置ToolButton相关的属性(文字、图标、槽等)的一组函数
|
||
* @{
|
||
*/
|
||
void SetupFileTool(QToolButton* fileBtn);
|
||
void SetupImportTool(QToolButton* importBtn);
|
||
void SetupExportTool(QToolButton *saveBtn);
|
||
|
||
void SetupGridTool(QToolButton *gridBtn);
|
||
void SetupSyncTool(QToolButton *syncBtn);
|
||
void SetupAnnoTool(QToolButton *annoBtn);
|
||
|
||
void SetupSliceTool(QToolButton* sliceBtn);
|
||
void SetupAdjustTool(QToolButton *winlevelBtn);
|
||
void SetupPanTool(QToolButton* panBtn);
|
||
void SetupZoomTool(QToolButton* zoomBtn);
|
||
void SetupMeasureTool(QToolButton *measureBtn);
|
||
|
||
void SetupFlipTool(QToolButton *flipBtn);
|
||
void SetupFusionTool(QToolButton* fusionBtn);
|
||
void SetupCineTool(QToolButton* cineBtn);
|
||
void SetupEmptyTool(QToolButton* emptyBtn);
|
||
|
||
|
||
void SetupFullScreenTool(QToolButton *btnfullscreen);
|
||
void SetupMaximizeTool(QToolButton *btnmaximize);
|
||
void SetupMinimizeTool(QToolButton *btnminimize);
|
||
void SetupCloseTool(QToolButton *btnclose);
|
||
//@}
|
||
|
||
/**
|
||
* 设置是否显示缩略图栏
|
||
* TODO:考虑改名为setThumbnailBarDisplay
|
||
* @param value
|
||
*/
|
||
void displayThumbnailBar(bool value);
|
||
|
||
/**
|
||
* 打开DICOM,并在界面上绘制出显示效果
|
||
* @param dicomName DICOM文件路径
|
||
* @param openMode 文件打开方式,文件方式或文件夹方式
|
||
*/
|
||
void drawDICOM(const std::string &dicomName, SeriesOpenMode openMode);
|
||
|
||
/**
|
||
* 设置部分空间的槽函数连接
|
||
*/
|
||
void SetupConnections();
|
||
|
||
/**
|
||
* 按照annType的类型,在Container中执行对应的Measurement操作
|
||
* @param Container 包含RenderWindow的QTWidget容器
|
||
* @param annType 需要执行操作的AnnotationActorType
|
||
*/
|
||
void executeActiveMeasure(ViewContainerWidget *Container, AnnotationActorType annType);
|
||
|
||
/**
|
||
* 为对应的DicomImageView构建对应的播放控件
|
||
* @param v
|
||
*/
|
||
void createVCRToolbar(DicomImageView *v);
|
||
|
||
QIcon icon_manual;
|
||
QIcon icon_auto;
|
||
QIcon icon_dis;
|
||
QAction *m_sync_item_action[SYNC_ITEM_NUM];
|
||
QAction* m_sync_state_action;
|
||
QAction* m_measure_hidden_action;
|
||
QAction* m_patient_hidden_action;
|
||
QAction* m_preview_display_action;
|
||
|
||
int act_num_of_close;
|
||
int act_num_of_maximize;
|
||
int act_num_of_fullscreen;
|
||
int act_num_of_minimize;
|
||
|
||
ExportDialog *exportDialog = nullptr;
|
||
ImportWidget *m_import =nullptr;
|
||
QSettings m_qs;
|
||
Customwindow *m_customwin =nullptr;
|
||
|
||
AnnotationActorType m_cur_measure = AnnotationActorType::RulerAnn;
|
||
|
||
};
|