mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add test project including cvf and fix compile issues
This commit is contained in:
@@ -14,22 +14,10 @@ set( QRC_FILES
|
||||
textedit.qrc
|
||||
)
|
||||
|
||||
# Qt
|
||||
option(CEE_USE_QT5 "Use Qt5" OFF)
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
qt5_add_resources( QRC_FILES_CPP ${QRC_FILES} )
|
||||
else()
|
||||
find_package(Qt4 COMPONENTS REQUIRED QtCore QtGui QtMain QtOpenGl)
|
||||
include(${QT_USE_FILE})
|
||||
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
qt4_add_resources( QRC_FILES_CPP ${QRC_FILES} )
|
||||
endif(CEE_USE_QT5)
|
||||
|
||||
|
||||
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
||||
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
||||
qt5_add_resources( QRC_FILES_CPP ${QRC_FILES} )
|
||||
|
||||
|
||||
option(USE_COMMAND_FRAMEWORK "Use Caf Command Framework" ON)
|
||||
@@ -99,21 +87,8 @@ target_link_libraries ( ${PROJECT_NAME}
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
||||
if (CEE_USE_QT5)
|
||||
foreach (qtlib ${QT_LIBRARIES})
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
else()
|
||||
# Copy Qt Dlls
|
||||
if (MSVC)
|
||||
set (QTLIBLIST QtCore QtGui QtOpenGl)
|
||||
foreach (qtlib ${QTLIBLIST})
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT_BINARY_DIR}/$<IF:$<CONFIG:Debug>,${qtlib}d4.dll,${qtlib}4.dll> $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach( qtlib )
|
||||
endif(MSVC)
|
||||
endif(CEE_USE_QT5)
|
||||
|
||||
foreach (qtlib ${QT_LIBRARIES})
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
)
|
||||
endforeach(qtlib)
|
||||
|
||||
@@ -102,8 +102,6 @@ void MainWindow::createDockPanels()
|
||||
dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||
|
||||
m_pdmUiTableView = new caf::PdmUiTableView(dockWidget);
|
||||
m_pdmUiTableView->setSelectionRole(caf::SelectionManager::CURRENT);
|
||||
m_pdmUiTableView->enableDefaultContextMenu(true);
|
||||
|
||||
dockWidget->setWidget(m_pdmUiTableView);
|
||||
|
||||
@@ -175,7 +173,7 @@ MainWindow::~MainWindow()
|
||||
m_pdmUiTreeView->setPdmItem(NULL);
|
||||
m_pdmUiTreeView2->setPdmItem(NULL);
|
||||
m_pdmUiPropertyView->showProperties(NULL);
|
||||
m_pdmUiTableView->setListField(NULL);
|
||||
m_pdmUiTableView->setChildArrayField(NULL);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -233,7 +231,8 @@ void MainWindow::slotInsert()
|
||||
caf::PdmChildArrayField< caf::PdmObjectHandle*> * field = NULL;
|
||||
|
||||
if (uiFh) field = dynamic_cast<caf::PdmChildArrayField< caf::PdmObjectHandle*> *>(uiFh->fieldHandle());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -338,7 +337,7 @@ void MainWindow::slotShowTableView()
|
||||
{
|
||||
listField = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
m_pdmUiTableView->setChildArrayField(listField);
|
||||
|
||||
Reference in New Issue
Block a user