OPTIONAL SALOME_USE_PYCONSOLE)
ADD_DEFINITIONS(${GUI_DEFINITIONS})
# Various
- # Qt4
- FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ # Qt
+ IF (NOT SALOME_GUI_BUILD_WITH_QT5)
+ FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ ELSE()
+ FIND_PACKAGE(SalomeQt5 REQUIRED)
+ ENDIF()
ELSE(EXISTS ${GUI_ROOT_DIR})
MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
ENDIF(EXISTS ${GUI_ROOT_DIR})
ADD_SUBDIRECTORY(MyDlgRef)
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
# --- options ---
# additional include directories
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
# sources / static
SET(_other_SOURCES
)
# scripts / pyuic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_pyuic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_pyuic_files})
# sources / to compile
SET(HEXABLOCK_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_uic_HEADERS})
ADD_LIBRARY(HEXABLOCK ${HEXABLOCK_SOURCES})
TARGET_LINK_LIBRARIES(HEXABLOCK ${_link_LIBRARIES} )
+SET_TARGET_PROPERTIES(HEXABLOCK PROPERTIES COMPILE_DEFINITIONS QT_DISABLE_DEPRECATED_BEFORE=0 )
INSTALL(TARGETS HEXABLOCK EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
INSTALL(FILES ${HEXABLOCK_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_HEXABLOCK_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_HEXABLOCK_INSTALL_RES_DATA}")
INSTALL(FILES ${_other_RESOURCES}
DESTINATION ${SALOME_HEXABLOCK_INSTALL_RES_DATA})
#include <QInputDialog>
#include <QIcon>
#include <QStackedWidget>
+#include <QMenu>
+#include <QSplitter>
#include <QtxTreeView.h>
#include <SUIT_MessageBox.h>
{
setText(m_DocElt->getName());
if ( m_DocElt->isAssociated() )
- setData(Qt::darkGreen, Qt::ForegroundRole);
+ setData(QColor(Qt::darkGreen), Qt::ForegroundRole);
}
setData( treeRole, HEXA_TREE_ROLE );
setData( entry, HEXA_DOC_ENTRY_ROLE);
#include <iostream>
#include <QtGui>
#include <QFlags>
+#include <QStyledItemDelegate>
#include <SalomeApp_Application.h>
#include <SalomeApp_Study.h>
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole);
- theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole);
currentHighlightedItems << anItemIndex;
}
}
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole);
- theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole);
}
}
currentHighlightedItems.clear();
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole);
- theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole);
currentHighlightedItems << anItemIndex;
}
}
{
if (anItemIndex.isValid())
{
- theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole);
- theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole);
+ theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole);
}
}
currentHighlightedItems.clear();
#include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
#include "HEXABLOCKGUI.hxx"
+#include <QScrollBar>
+
#ifndef M_PI
#define M_PI 3.1415927
#endif
}
}
else if (id == GEOM_POINT_SURF) {
- GroupOnSurface->TextLabel2->setShown(isParam);
- GroupOnSurface->TextLabel3->setShown(isParam);
- GroupOnSurface->SpinBox_DX->setShown(isParam);
- GroupOnSurface->SpinBox_DY->setShown(isParam);
+ GroupOnSurface->TextLabel2->setVisible(isParam);
+ GroupOnSurface->TextLabel3->setVisible(isParam);
+ GroupOnSurface->SpinBox_DX->setVisible(isParam);
+ GroupOnSurface->SpinBox_DY->setVisible(isParam);
}
- GroupXYZ->setShown(!isParam && !isLength);
+ GroupXYZ->setVisible(!isParam && !isLength);
}
//=================================================================================
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(UseQtExt)
+
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
# --- sources ---
# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${MyDlgRef_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${MyDlgRef_HEADERS})
# sources / static
SET(_other_SOURCES
)
# scripts / pyuic wrappings
-QT4_WRAP_UI(_uic_HEADERS ${_pyuic_files})
+QT_WRAP_UIC(_uic_HEADERS ${_pyuic_files})
# sources / to compile
SET(MyDlgRef_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_uic_HEADERS})