ResInsight: Integrated from Caf trunc. Multi variable fields (multiselect) with option values now handled. Improved PdmUi layout. Improved Viewer widget size behaviour, Xml keyword check.

p4#: 18777
This commit is contained in:
Jacob Støren
2012-09-18 15:21:04 +02:00
parent 01ee943155
commit e679ba07a5
23 changed files with 546 additions and 767 deletions

View File

@@ -11,7 +11,9 @@ set( QOBJECT_HEADERS
cafViewer.h
)
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
if ( (${CMAKE_VERSION} VERSION_LESS 2.8.6) OR (NOT CMAKE_AUTOMOC) )
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
endif()
add_library( ${PROJECT_NAME}

View File

@@ -69,7 +69,7 @@ caf::Viewer::Viewer(const QGLFormat& format, QWidget* parent)
QHBoxLayout* layout = new QHBoxLayout(m_layoutWidget);
layout->addWidget(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
setAutoFillBackground(false);
setMouseTracking(true);
@@ -378,6 +378,7 @@ void caf::Viewer::paintEvent(QPaintEvent* event)
cvf::ref<cvf::OpenGLContext> myOglContext = cvfOpenGLContext();
CVF_CHECK_OGL(myOglContext.p());
CVF_ASSERT(myOglContext->isContextValid());
QPainter painter(this);
@@ -662,6 +663,23 @@ void caf::Viewer::debugShowRenderingSequencePartNames()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void caf::Viewer::enableNavigationPolicy(bool enable)
{
m_navigationPolicyEnabled = enable;
if (enable && m_navigationPolicy.notNull()) m_navigationPolicy->init();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize caf::Viewer::sizeHint() const
{
return QSize(500, 400);
}
void caf::Viewer::enableForcedImmediateMode(bool enable)
{
m_mainRendering->renderEngine()->enableForcedImmediateMode(enable);

View File

@@ -88,7 +88,7 @@ public:
// Set the navigation policy
void setNavigationPolicy(caf::NavigationPolicy* navigationPolicy);
void enableNavigationPolicy(bool enable) { m_navigationPolicyEnabled = enable; }
void enableNavigationPolicy(bool enable);
void setView( const cvf::Vec3d& alongDirection, const cvf::Vec3d& upDirection );
void zoomAll();
@@ -114,6 +114,9 @@ public slots:
virtual void slotEndAnimation();
int currentFrameIndex();
public:
virtual QSize sizeHint() const;
protected:
// Method to override if painting directly on the OpenGl Canvas is needed.
virtual void paintOverlayItems(QPainter* painter) {};