diff --git a/CMakeLists.txt b/CMakeLists.txt index 436036e07..7e615b002 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,8 @@ ELSE(NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") ENDIF(NOT WIN32) +add_definitions(-DQT_NO_KEYWORDS) + set(IFCPP_CONFIG_DIR "share/IFCPP/cmake") ADD_SUBDIRECTORY (IfcPlusPlus) diff --git a/IfcPlusPlus/CMakeLists.txt b/IfcPlusPlus/CMakeLists.txt index f4b1e054f..b6e8473a2 100644 --- a/IfcPlusPlus/CMakeLists.txt +++ b/IfcPlusPlus/CMakeLists.txt @@ -92,6 +92,10 @@ TARGET_INCLUDE_DIRECTORIES(IfcPlusPlus ${IFCPP_SOURCE_DIR}/IfcPlusPlus/src/external/glm ) +if (UNIX) + find_package(TBB REQUIRED) + target_link_libraries(IfcPlusPlus PRIVATE TBB::tbb) +endif() set_target_properties(IfcPlusPlus PROPERTIES DEBUG_POSTFIX "d") set_target_properties(IfcPlusPlus PROPERTIES CXX_STANDARD 17) diff --git a/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.cpp b/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.cpp index 48f17162a..f51b6052b 100644 --- a/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.cpp +++ b/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.cpp @@ -244,7 +244,7 @@ void IfcPlusPlusSystem::setObjectSelected( shared_ptr ifc_object std::unordered_map > map_objects; map_objects[guid] = ifc_object; - emit( signalObjectsSelected( map_objects ) ); + Q_EMIT( signalObjectsSelected( map_objects ) ); } } else @@ -275,7 +275,7 @@ void IfcPlusPlusSystem::setObjectSelected( shared_ptr ifc_object } std::unordered_map > map_objects; map_objects[guid] = ifc_object; - emit( signalObjectsUnselected( map_objects ) ); + Q_EMIT( signalObjectsUnselected( map_objects ) ); } } @@ -334,17 +334,17 @@ void IfcPlusPlusSystem::clearSelection() void IfcPlusPlusSystem::notifyModelCleared() { - emit( signalModelCleared() ); + Q_EMIT( signalModelCleared() ); } void IfcPlusPlusSystem::notifyModelLoadingStart() { - emit( signalModelLoadingStart() ); + Q_EMIT( signalModelLoadingStart() ); } void IfcPlusPlusSystem::notifyModelLoadingDone() { - emit( signalModelLoadingDone() ); + Q_EMIT( signalModelLoadingDone() ); } void IfcPlusPlusSystem::toggleSceneLight() diff --git a/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.h b/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.h index 65d1ce70c..68456117d 100644 --- a/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.h +++ b/examples/SimpleViewerExampleQt/src/IfcPlusPlusSystem.h @@ -79,7 +79,7 @@ class IfcPlusPlusSystem : public QObject, public osgGA::GUIEventHandler bool m_light_on; bool m_show_curve_representation; -signals: +Q_SIGNALS: void signalObjectsSelected( std::unordered_map >& map_objects ); void signalObjectsUnselected( std::unordered_map >& map_objects ); void signalModelCleared(); diff --git a/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.cpp b/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.cpp index a8ff9cb9c..bf4a0f382 100644 --- a/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.cpp +++ b/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -889,7 +890,7 @@ void EntityAttributeWidget::slotObjectsSelected( std::unordered_mapsetText( 0, "Surface area" ); item->setText( 1, QString::number( surface_area ) ); - item->setText( 2, QStringLiteral("m²") ); + item->setText( 2, QLatin1Literal("m²") ); ScopedBlockSignals block( m_computed_property_tree, m_block_counter ); m_computed_property_tree->addTopLevelItem( item ); } @@ -898,7 +899,7 @@ void EntityAttributeWidget::slotObjectsSelected( std::unordered_mapsetText( 0, "Volume" ); item->setText( 1, QString::number( volume ) ); - item->setText( 2, QStringLiteral("m³") ); + item->setText( 2, QLatin1Literal("m³") ); ScopedBlockSignals block( m_computed_property_tree, m_block_counter ); m_computed_property_tree->addTopLevelItem( item ); } diff --git a/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.h b/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.h index 58643a5ed..b8e127e34 100644 --- a/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.h +++ b/examples/SimpleViewerExampleQt/src/gui/EntityAttributeWidget.h @@ -24,7 +24,7 @@ class EntityAttributeWidget : public QWidget void clearAttributeTree(); void expandToLevel( QTreeWidgetItem* item, int& current_level, int max_level ); -public slots: +public Q_SLOTS: void slotObjectsSelected( std::unordered_map >& map ); void slotObjectsUnselected( std::unordered_map >& map ); void slotTreewidgetSelectionChanged( QTreeWidgetItem* current, QTreeWidgetItem* previous ); diff --git a/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.h b/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.h index 3cb3f6c7a..02b45c41f 100644 --- a/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.h +++ b/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.h @@ -34,7 +34,7 @@ class IfcTreeWidget : public QTreeWidget QModelIndex indexFromItem( QTreeWidgetItem * item, int column = 0 ) const { return QTreeWidget::indexFromItem( item, column ); } QTreeWidgetItem* itemFromIndex( const QModelIndex & index ) const { return QTreeWidget::itemFromIndex( index ); } -public slots: +public Q_SLOTS: void slotObjectsSelected( std::unordered_map >& map ); void slotTreewidgetSelectionChanged( QTreeWidgetItem* current, QTreeWidgetItem* previous ); void slotTreewidgetSelectionChanged(); diff --git a/examples/SimpleViewerExampleQt/src/gui/MainWindow.cpp b/examples/SimpleViewerExampleQt/src/gui/MainWindow.cpp index 7dd17e26d..2054a567a 100644 --- a/examples/SimpleViewerExampleQt/src/gui/MainWindow.cpp +++ b/examples/SimpleViewerExampleQt/src/gui/MainWindow.cpp @@ -158,7 +158,7 @@ void MainWindow::closeEvent( QCloseEvent *event ) m_tab_read_write->closeEvent( event ); QMainWindow::closeEvent( event ); - emit( signalMainWindowClosed() ); + Q_EMIT( signalMainWindowClosed() ); } void MainWindow::createTabWidget() diff --git a/examples/SimpleViewerExampleQt/src/gui/MainWindow.h b/examples/SimpleViewerExampleQt/src/gui/MainWindow.h index 95f2ccfa3..03b4cde18 100644 --- a/examples/SimpleViewerExampleQt/src/gui/MainWindow.h +++ b/examples/SimpleViewerExampleQt/src/gui/MainWindow.h @@ -55,10 +55,10 @@ class MainWindow : public QMainWindow void createTabWidget(); -signals: +Q_SIGNALS: void signalMainWindowClosed(); -private slots: +private Q_SLOTS: void slotBtnZoomBoundingsClicked(); void slotBtnRemoveSelectedObjectsClicked(); void slotProgressValue(double progress_value, const std::string& progress_type); diff --git a/examples/SimpleViewerExampleQt/src/gui/StoreyShiftWidget.h b/examples/SimpleViewerExampleQt/src/gui/StoreyShiftWidget.h index b4aed30fe..68e720037 100644 --- a/examples/SimpleViewerExampleQt/src/gui/StoreyShiftWidget.h +++ b/examples/SimpleViewerExampleQt/src/gui/StoreyShiftWidget.h @@ -37,7 +37,7 @@ class StoreyShiftWidget : public QWidget QSlider* m_slide_z; ScopedBlockCount m_block_counter; -public slots: +public Q_SLOTS: void slotModelLoadingDone(); void slotResetSliders(); void slotSlideX(int); diff --git a/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp b/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp index b37182788..83e4873a6 100644 --- a/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp +++ b/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp @@ -393,7 +393,7 @@ void TabReadWrite::txtOutError( QString txt ) void TabReadWrite::progressValue(double progress_value_in, const std::string& progress_type) { - emit(signalProgressValue(progress_value_in, progress_type)); + Q_EMIT(signalProgressValue(progress_value_in, progress_type)); } void TabReadWrite::clearTxtOut() diff --git a/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.h b/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.h index 0db47e91f..d9b7a3a96 100644 --- a/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.h +++ b/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.h @@ -71,10 +71,10 @@ class TabReadWrite : public QWidget QSplitter* m_io_splitter; std::mutex m_mutex_messages; -signals: +Q_SIGNALS: void signalProgressValue(double progress_value, const std::string& progress_type); -private slots: +private Q_SLOTS: void slotAddOtherIfcFileClicked(); void slotLoadRecentIfcFileClicked(); void slotSetWritePathClicked(); diff --git a/examples/SimpleViewerExampleQt/src/gui/TabView.h b/examples/SimpleViewerExampleQt/src/gui/TabView.h index b0f35fafb..30b1859e7 100644 --- a/examples/SimpleViewerExampleQt/src/gui/TabView.h +++ b/examples/SimpleViewerExampleQt/src/gui/TabView.h @@ -37,7 +37,7 @@ class TabView : public QWidget bool m_cull_front; bool m_cull_back; -private slots: +private Q_SLOTS: void slotCullFrontFaces( int state ); void slotCullBackFaces( int state ); void slotSetNumVertices(int); diff --git a/examples/SimpleViewerExampleQt/src/viewer/ViewerWidget.h b/examples/SimpleViewerExampleQt/src/viewer/ViewerWidget.h index 9ff5cba55..fd2aba5ea 100644 --- a/examples/SimpleViewerExampleQt/src/viewer/ViewerWidget.h +++ b/examples/SimpleViewerExampleQt/src/viewer/ViewerWidget.h @@ -53,7 +53,7 @@ class ViewerWidget : public QWidget virtual void paintEvent( QPaintEvent* event ); virtual void resizeEvent( QResizeEvent * ); -public slots: +public Q_SLOTS: void slotAnimationFrame(); protected: