|
|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
#include "nmWxPropertyInterpolationPreviewDlg.h"
|
|
|
|
|
#include "nmWxPropertyInterpolationPreviewDlg.h"
|
|
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
|
#include <QDesktopWidget>
|
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
#include <QSizePolicy>
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
#include <QVTKWidget.h>
|
|
|
|
|
|
|
|
|
|
@ -96,15 +99,14 @@ nmWxPropertyInterpolationPreviewDlg::nmWxPropertyInterpolationPreviewDlg(
|
|
|
|
|
{
|
|
|
|
|
setWindowModality(Qt::NonModal);
|
|
|
|
|
setModal(false);
|
|
|
|
|
setMinimumSize(900, 700);
|
|
|
|
|
resize(1200, 850);
|
|
|
|
|
|
|
|
|
|
QVBoxLayout* mainLayout = new QVBoxLayout(this);
|
|
|
|
|
mainLayout->setContentsMargins(8, 8, 8, 8);
|
|
|
|
|
mainLayout->setSpacing(8);
|
|
|
|
|
|
|
|
|
|
m_pVtkWidget = new QVTKWidget(this);
|
|
|
|
|
m_pVtkWidget->setMinimumSize(860, 640);
|
|
|
|
|
m_pVtkWidget->setSizePolicy(QSizePolicy::Expanding,
|
|
|
|
|
QSizePolicy::Expanding);
|
|
|
|
|
mainLayout->addWidget(m_pVtkWidget, 1);
|
|
|
|
|
|
|
|
|
|
QHBoxLayout* buttonLayout = new QHBoxLayout;
|
|
|
|
|
@ -120,6 +122,19 @@ nmWxPropertyInterpolationPreviewDlg::nmWxPropertyInterpolationPreviewDlg(
|
|
|
|
|
showMeasurementPoints, showMeasurementLabels);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QSize nmWxPropertyInterpolationPreviewDlg::sizeHint() const
|
|
|
|
|
{
|
|
|
|
|
QDesktopWidget* desktop = QApplication::desktop();
|
|
|
|
|
if(desktop == NULL) {
|
|
|
|
|
return iDlgBase::sizeHint();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 预览窗口随当前屏幕可用区域调整,避免固定像素尺寸在不同分辨率下失衡.
|
|
|
|
|
const QRect availableRect = desktop->availableGeometry(this);
|
|
|
|
|
return QSize(availableRect.width() * 1 / 2,
|
|
|
|
|
availableRect.height() * 4 / 5);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void nmWxPropertyInterpolationPreviewDlg::updatePreview(
|
|
|
|
|
const QString& dataSetName,
|
|
|
|
|
const QString& scalarTitle,
|
|
|
|
|
|