You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.3 KiB
C++
76 lines
2.3 KiB
C++
#ifndef NMWXPEBIGRIDVIEWWIDGET_H
|
|
#define NMWXPEBIGRIDVIEWWIDGET_H
|
|
|
|
#include "nmSubWxs_global.h"
|
|
|
|
#include <QWidget>
|
|
|
|
class QButtonGroup;
|
|
class QCheckBox;
|
|
class QComboBox;
|
|
class QLabel;
|
|
class QSlider;
|
|
class QToolButton;
|
|
|
|
class nmPebiGridSceneController;
|
|
class nmPebiGridViewData;
|
|
class nmWxVTKRenderContainerWidget;
|
|
|
|
/**
|
|
* @brief 二维 PEBI 网格预览业务控件。
|
|
*
|
|
* 本类通过组合使用 nmRender 容器,不继承旧网格视图或通用渲染容器。
|
|
* Qt 子控件由父子关系拥有,场景控制器由本类显式创建和销毁。
|
|
*/
|
|
class NM_SUB_WXS_EXPORT nmWxPebiGridViewWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit nmWxPebiGridViewWidget(QWidget* pParent = NULL);
|
|
virtual ~nmWxPebiGridViewWidget();
|
|
|
|
/** @brief 装入完整数据并复用现有 Renderer、Scene 和业务图层。 */
|
|
bool setViewData(const nmPebiGridViewData& oViewData,
|
|
QString* pError = NULL);
|
|
/** @brief 保留当前成功数据,只切换到渲染中状态页。 */
|
|
void showLoading();
|
|
/** @brief 有旧数据时恢复画面并显示提示,否则显示错误状态页。 */
|
|
void showFailure(const QString& sMessage);
|
|
/** @brief 清除旧分析数据、井图元和属性选择。 */
|
|
void clearView();
|
|
|
|
bool hasViewData() const;
|
|
|
|
private slots:
|
|
void onPropertyChanged(int nIndex);
|
|
void onDisplayModeChanged(int nMode);
|
|
void onOpacityChanged(int nValue);
|
|
void onWellVisibleChanged(bool bVisible);
|
|
void onWellNameVisibleChanged(bool bVisible);
|
|
|
|
private:
|
|
Q_DISABLE_COPY(nmWxPebiGridViewWidget)
|
|
|
|
void createUi();
|
|
void resetControls();
|
|
void setControlsEnabled(bool bEnabled);
|
|
QString gridTypeText(int nGridType) const;
|
|
|
|
nmWxVTKRenderContainerWidget* m_pRenderContainer; ///< Qt 父对象拥有。
|
|
nmPebiGridSceneController* m_pSceneController; ///< 本类独占并先于容器销毁。
|
|
QComboBox* m_pPropertyComboBox;
|
|
QButtonGroup* m_pDisplayModeGroup;
|
|
QToolButton* m_pSurfaceButton;
|
|
QToolButton* m_pSurfaceEdgesButton;
|
|
QSlider* m_pOpacitySlider;
|
|
QLabel* m_pOpacityValueLabel;
|
|
QCheckBox* m_pWellCheckBox;
|
|
QCheckBox* m_pWellNameCheckBox;
|
|
QLabel* m_pGridInfoLabel;
|
|
QLabel* m_pStatusLabel;
|
|
bool m_bHasViewData;
|
|
};
|
|
|
|
#endif // NMWXPEBIGRIDVIEWWIDGET_H
|