From 6901533368e7598eed363343af2150317f713177 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 15 May 2026 07:22:31 +1000 Subject: [PATCH] Clean up IfcViewerFull naming Rename leftover interface-era namespaces, settings, and resource identifiers inside the IfcViewerFull source tree without changing the public target name. Generated with the assistance of an AI coding tool. --- src/ifcviewer-full/CMakeLists.txt | 6 +- src/ifcviewer-full/ElementRegistry.cpp | 4 +- src/ifcviewer-full/ElementRegistry.h | 4 +- src/ifcviewer-full/MainWindow.cpp | 18 ++--- src/ifcviewer-full/MainWindow.h | 56 ++++++------- src/ifcviewer-full/SessionState.cpp | 4 +- src/ifcviewer-full/SessionState.h | 4 +- ...terfaceSettings.cpp => ViewerSettings.cpp} | 78 +++++++++---------- .../{InterfaceSettings.h => ViewerSettings.h} | 10 +-- src/ifcviewer-full/components/Buttons.cpp | 4 +- src/ifcviewer-full/components/Buttons.h | 4 +- src/ifcviewer-full/components/Dialog.cpp | 4 +- src/ifcviewer-full/components/Dialog.h | 4 +- .../components/KeyValueTable.cpp | 4 +- src/ifcviewer-full/components/KeyValueTable.h | 4 +- src/ifcviewer-full/components/Panel.cpp | 4 +- src/ifcviewer-full/components/Panel.h | 4 +- src/ifcviewer-full/components/Section.cpp | 4 +- src/ifcviewer-full/components/Section.h | 4 +- src/ifcviewer-full/components/Style.cpp | 8 +- src/ifcviewer-full/components/Style.h | 16 ++-- src/ifcviewer-full/components/SvgIcon.cpp | 12 +-- src/ifcviewer-full/components/SvgIcon.h | 4 +- src/ifcviewer-full/components/Tabs.cpp | 4 +- src/ifcviewer-full/components/Tabs.h | 4 +- ...urces.qrc => ifcviewer_full_resources.qrc} | 0 src/ifcviewer-full/main.cpp | 10 +-- .../modules/models/AddModelDialog.cpp | 4 +- .../modules/models/AddModelDialog.h | 4 +- .../modules/models/Controller.cpp | 6 +- .../modules/models/Controller.h | 10 +-- src/ifcviewer-full/modules/models/Panel.cpp | 10 +-- src/ifcviewer-full/modules/models/Panel.h | 4 +- .../modules/models/SettingsDialog.cpp | 6 +- .../modules/models/SettingsDialog.h | 10 +-- .../modules/models/SettingsView.cpp | 6 +- .../modules/models/SettingsView.h | 10 +-- src/ifcviewer-full/modules/models/Types.h | 4 +- src/ifcviewer-full/modules/models/View.cpp | 22 +++--- src/ifcviewer-full/modules/models/View.h | 10 +-- .../modules/project/Controller.cpp | 12 +-- .../modules/project/Controller.h | 28 +++---- .../modules/properties/Panel.cpp | 32 ++++---- src/ifcviewer-full/modules/properties/Panel.h | 4 +- src/ifcviewer-full/modules/properties/Types.h | 4 +- .../modules/properties/View.cpp | 10 +-- src/ifcviewer-full/modules/properties/View.h | 10 +-- .../modules/settings/Dialog.cpp | 24 +++--- src/ifcviewer-full/modules/settings/Dialog.h | 4 +- .../modules/spatial_hierarchy/Panel.cpp | 4 +- .../modules/spatial_hierarchy/Panel.h | 4 +- .../modules/spatial_hierarchy/Types.h | 4 +- .../modules/spatial_hierarchy/View.cpp | 6 +- .../modules/spatial_hierarchy/View.h | 10 +-- src/ifcviewer-full/modules/todo/Panel.cpp | 4 +- src/ifcviewer-full/modules/todo/Panel.h | 4 +- .../modules/viewport/Controller.cpp | 16 ++-- .../modules/viewport/Controller.h | 10 +-- src/ifcviewer-full/modules/viewport/Panel.cpp | 4 +- src/ifcviewer-full/modules/viewport/Panel.h | 4 +- 60 files changed, 293 insertions(+), 293 deletions(-) rename src/ifcviewer-full/{InterfaceSettings.cpp => ViewerSettings.cpp} (62%) rename src/ifcviewer-full/{InterfaceSettings.h => ViewerSettings.h} (93%) rename src/ifcviewer-full/{interface_resources.qrc => ifcviewer_full_resources.qrc} (100%) diff --git a/src/ifcviewer-full/CMakeLists.txt b/src/ifcviewer-full/CMakeLists.txt index 22ad90c3b6..a4d0f0a247 100644 --- a/src/ifcviewer-full/CMakeLists.txt +++ b/src/ifcviewer-full/CMakeLists.txt @@ -27,8 +27,8 @@ set(IFCVIEWER_FULL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ElementRegistry.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ElementRegistry.h - ${CMAKE_CURRENT_SOURCE_DIR}/InterfaceSettings.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/InterfaceSettings.h + ${CMAKE_CURRENT_SOURCE_DIR}/ViewerSettings.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ViewerSettings.h ${CMAKE_CURRENT_SOURCE_DIR}/SessionState.cpp ${CMAKE_CURRENT_SOURCE_DIR}/SessionState.h ${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.cpp @@ -84,7 +84,7 @@ set(IFCVIEWER_FULL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/modules/viewport/Panel.h ${CMAKE_CURRENT_SOURCE_DIR}/modules/viewport/Controller.cpp ${CMAKE_CURRENT_SOURCE_DIR}/modules/viewport/Controller.h - ${CMAKE_CURRENT_SOURCE_DIR}/interface_resources.qrc + ${CMAKE_CURRENT_SOURCE_DIR}/ifcviewer_full_resources.qrc ) add_executable(IfcViewerFull ${IFCVIEWER_FULL_FILES}) diff --git a/src/ifcviewer-full/ElementRegistry.cpp b/src/ifcviewer-full/ElementRegistry.cpp index 79502d0004..295c286e65 100644 --- a/src/ifcviewer-full/ElementRegistry.cpp +++ b/src/ifcviewer-full/ElementRegistry.cpp @@ -24,7 +24,7 @@ #include "../ifcviewer/SceneLoader.h" #include "../ifcviewer/SidecarCache.h" -namespace ifcinterface { +namespace ifcviewerfull { ElementRegistry::ElementRegistry(QObject* parent) : QObject(parent) @@ -123,4 +123,4 @@ void ElementRegistry::onStreamedElementsReady(uint32_t /*mid*/, std::vector elements_; }; -} // namespace ifcinterface +} // namespace ifcviewerfull #endif diff --git a/src/ifcviewer-full/MainWindow.cpp b/src/ifcviewer-full/MainWindow.cpp index a85a6197df..d1874da44d 100644 --- a/src/ifcviewer-full/MainWindow.cpp +++ b/src/ifcviewer-full/MainWindow.cpp @@ -57,27 +57,27 @@ #include #include -namespace ifcinterface::shell { +namespace ifcviewerfull::shell { MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) { federation_ = new Federation(this); - element_registry_ = new ifcinterface::ElementRegistry(this); - session_state_ = new ifcinterface::SessionState(this); + element_registry_ = new ifcviewerfull::ElementRegistry(this); + session_state_ = new ifcviewerfull::SessionState(this); session_state_->bindFederation(federation_); session_state_->bindElementRegistry(element_registry_); connect(federation_, &Federation::dirtyChanged, this, [this](bool dirty) { setWindowModified(dirty); updateWindowTitle(); }); - connect(session_state_, &ifcinterface::SessionState::modelsChanged, + connect(session_state_, &ifcviewerfull::SessionState::modelsChanged, this, &MainWindow::updateWindowTitle); - connect(session_state_, &ifcinterface::SessionState::projectOpened, + connect(session_state_, &ifcviewerfull::SessionState::projectOpened, this, [this](const QString&) { updateWindowTitle(); }); - connect(session_state_, &ifcinterface::SessionState::projectSaved, + connect(session_state_, &ifcviewerfull::SessionState::projectSaved, this, [this](const QString&) { updateWindowTitle(); }); - connect(session_state_, &ifcinterface::SessionState::projectReset, + connect(session_state_, &ifcviewerfull::SessionState::projectReset, this, &MainWindow::updateWindowTitle); setupChrome(); setupViewport(); @@ -448,7 +448,7 @@ void MainWindow::setupStatus() { status_perf_label_->setVisible(show); if (!show) status_perf_label_->clear(); }); - connect(session_state_, &ifcinterface::SessionState::statusMessageChanged, + connect(session_state_, &ifcviewerfull::SessionState::statusMessageChanged, this, [this](const QString& mode, const QString& detail) { status_mode_label_->setText(mode); status_selection_label_->setText(detail); @@ -528,4 +528,4 @@ void MainWindow::updateWindowTitle() { } } -} // namespace ifcinterface::shell +} // namespace ifcviewerfull::shell diff --git a/src/ifcviewer-full/MainWindow.h b/src/ifcviewer-full/MainWindow.h index 1439d8bf91..3adb7d4a5b 100644 --- a/src/ifcviewer-full/MainWindow.h +++ b/src/ifcviewer-full/MainWindow.h @@ -32,21 +32,21 @@ class QStackedWidget; class QToolButton; class Federation; class SceneLoader; -namespace ifcinterface { class ElementRegistry; } -namespace ifcinterface { class SessionState; } -namespace ifcinterface::components { class TabBar; } -namespace ifcinterface::modules::models { class ModelsPanelController; } -namespace ifcinterface::modules::models { class ModelsPanel; } -namespace ifcinterface::modules::models { class ModelsPanelView; } -namespace ifcinterface::modules::project { class ProjectController; } -namespace ifcinterface::modules::spatial_hierarchy { class SpatialHierarchyPanel; } -namespace ifcinterface::modules::spatial_hierarchy { class SpatialHierarchyPanelView; } -namespace ifcinterface::modules::properties { class PropertiesPanel; } -namespace ifcinterface::modules::properties { class PropertiesPanelView; } -namespace ifcinterface::modules::viewport { class ViewportController; } -namespace ifcinterface::modules::viewport { class ViewportPanel; } +namespace ifcviewerfull { class ElementRegistry; } +namespace ifcviewerfull { class SessionState; } +namespace ifcviewerfull::components { class TabBar; } +namespace ifcviewerfull::modules::models { class ModelsPanelController; } +namespace ifcviewerfull::modules::models { class ModelsPanel; } +namespace ifcviewerfull::modules::models { class ModelsPanelView; } +namespace ifcviewerfull::modules::project { class ProjectController; } +namespace ifcviewerfull::modules::spatial_hierarchy { class SpatialHierarchyPanel; } +namespace ifcviewerfull::modules::spatial_hierarchy { class SpatialHierarchyPanelView; } +namespace ifcviewerfull::modules::properties { class PropertiesPanel; } +namespace ifcviewerfull::modules::properties { class PropertiesPanelView; } +namespace ifcviewerfull::modules::viewport { class ViewportController; } +namespace ifcviewerfull::modules::viewport { class ViewportPanel; } -namespace ifcinterface::shell { +namespace ifcviewerfull::shell { class MainWindow : public QMainWindow { Q_OBJECT @@ -73,30 +73,30 @@ private: QLabel* status_selection_label_ = nullptr; QLabel* status_perf_label_ = nullptr; QProgressBar* status_progress_bar_ = nullptr; - ifcinterface::components::TabBar* ribbon_tabs_ = nullptr; + ifcviewerfull::components::TabBar* ribbon_tabs_ = nullptr; QStackedWidget* ribbon_pages_ = nullptr; - ifcinterface::modules::viewport::ViewportPanel* viewport_widget_ = nullptr; - ifcinterface::modules::viewport::ViewportController* viewport_controller_ = nullptr; + ifcviewerfull::modules::viewport::ViewportPanel* viewport_widget_ = nullptr; + ifcviewerfull::modules::viewport::ViewportController* viewport_controller_ = nullptr; SceneLoader* loader_ = nullptr; - ifcinterface::ElementRegistry* element_registry_ = nullptr; - ifcinterface::SessionState* session_state_ = nullptr; - ifcinterface::modules::models::ModelsPanel* models_panel_ = nullptr; - ifcinterface::modules::spatial_hierarchy::SpatialHierarchyPanel* spatial_panel_ = nullptr; + ifcviewerfull::ElementRegistry* element_registry_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; + ifcviewerfull::modules::models::ModelsPanel* models_panel_ = nullptr; + ifcviewerfull::modules::spatial_hierarchy::SpatialHierarchyPanel* spatial_panel_ = nullptr; QDockWidget* layers_panel_ = nullptr; - ifcinterface::modules::properties::PropertiesPanel* properties_panel_ = nullptr; + ifcviewerfull::modules::properties::PropertiesPanel* properties_panel_ = nullptr; QDockWidget* stored_views_panel_ = nullptr; QDockWidget* search_panel_ = nullptr; QDockWidget* spreadsheet_panel_ = nullptr; QDockWidget* audit_panel_ = nullptr; QDockWidget* clash_panel_ = nullptr; QDockWidget* issues_panel_ = nullptr; - ifcinterface::modules::models::ModelsPanelController* models_controller_ = nullptr; - ifcinterface::modules::models::ModelsPanelView* models_view_ = nullptr; - ifcinterface::modules::project::ProjectController* project_controller_ = nullptr; - ifcinterface::modules::spatial_hierarchy::SpatialHierarchyPanelView* spatial_view_ = nullptr; - ifcinterface::modules::properties::PropertiesPanelView* properties_view_ = nullptr; + ifcviewerfull::modules::models::ModelsPanelController* models_controller_ = nullptr; + ifcviewerfull::modules::models::ModelsPanelView* models_view_ = nullptr; + ifcviewerfull::modules::project::ProjectController* project_controller_ = nullptr; + ifcviewerfull::modules::spatial_hierarchy::SpatialHierarchyPanelView* spatial_view_ = nullptr; + ifcviewerfull::modules::properties::PropertiesPanelView* properties_view_ = nullptr; }; -} // namespace ifcinterface::shell +} // namespace ifcviewerfull::shell #endif diff --git a/src/ifcviewer-full/SessionState.cpp b/src/ifcviewer-full/SessionState.cpp index c4f26fc004..bcd7c59fac 100644 --- a/src/ifcviewer-full/SessionState.cpp +++ b/src/ifcviewer-full/SessionState.cpp @@ -22,7 +22,7 @@ #include "../ifcviewer/Federation.h" -namespace ifcinterface { +namespace ifcviewerfull { SessionState::SessionState(QObject* parent) : QObject(parent) @@ -108,4 +108,4 @@ void SessionState::notifyProjectReset() { emit projectReset(); } -} // namespace ifcinterface +} // namespace ifcviewerfull diff --git a/src/ifcviewer-full/SessionState.h b/src/ifcviewer-full/SessionState.h index 340ad5048a..b62a855fef 100644 --- a/src/ifcviewer-full/SessionState.h +++ b/src/ifcviewer-full/SessionState.h @@ -28,7 +28,7 @@ class Federation; class SceneLoader; -namespace ifcinterface { +namespace ifcviewerfull { class ElementRegistry; @@ -88,6 +88,6 @@ private: QHash model_id_to_fed_id_; }; -} // namespace ifcinterface +} // namespace ifcviewerfull #endif diff --git a/src/ifcviewer-full/InterfaceSettings.cpp b/src/ifcviewer-full/ViewerSettings.cpp similarity index 62% rename from src/ifcviewer-full/InterfaceSettings.cpp rename to src/ifcviewer-full/ViewerSettings.cpp index 5e05584c22..f643eb6df6 100644 --- a/src/ifcviewer-full/InterfaceSettings.cpp +++ b/src/ifcviewer-full/ViewerSettings.cpp @@ -18,7 +18,7 @@ * * ********************************************************************************/ -#include "InterfaceSettings.h" +#include "ViewerSettings.h" #include "components/Style.h" @@ -30,45 +30,45 @@ namespace { constexpr const char* kThemeModeKey = "interface/theme/mode"; constexpr const char* kThemeColorPrefix = "interface/theme/colors/"; -using Spec = ifcinterface::InterfaceSettings::ThemeColorSpec; +using Spec = ifcviewerfull::ViewerSettings::ThemeColorSpec; const std::vector kThemeColorSpecs = { - {"app_background", "App Background", ifcinterface::components::style::palette::app_background, "#eef1f5"}, - {"border", "Border", ifcinterface::components::style::palette::border, "#c9d1dc"}, - {"selection_background", "Selection Background", ifcinterface::components::style::palette::selection_background, + {"app_background", "App Background", ifcviewerfull::components::style::palette::app_background, "#eef1f5"}, + {"border", "Border", ifcviewerfull::components::style::palette::border, "#c9d1dc"}, + {"selection_background", "Selection Background", ifcviewerfull::components::style::palette::selection_background, "#2f9e44"}, - {"tab_bar_background", "Tab Bar Background", ifcinterface::components::style::palette::tab_bar_background, + {"tab_bar_background", "Tab Bar Background", ifcviewerfull::components::style::palette::tab_bar_background, "#eef1f5"}, - {"tab_background", "Tab Background", ifcinterface::components::style::palette::tab_background, "#e3e8ef"}, - {"ribbon_background", "Ribbon Background", ifcinterface::components::style::palette::ribbon_background, + {"tab_background", "Tab Background", ifcviewerfull::components::style::palette::tab_background, "#e3e8ef"}, + {"ribbon_background", "Ribbon Background", ifcviewerfull::components::style::palette::ribbon_background, "#e3e8ef"}, - {"ribbon_button_hover", "Ribbon Button Hover", ifcinterface::components::style::palette::ribbon_button_hover, + {"ribbon_button_hover", "Ribbon Button Hover", ifcviewerfull::components::style::palette::ribbon_button_hover, "#d6dde7"}, - {"ribbon_button_pressed", "Ribbon Button Pressed", ifcinterface::components::style::palette::ribbon_button_pressed, + {"ribbon_button_pressed", "Ribbon Button Pressed", ifcviewerfull::components::style::palette::ribbon_button_pressed, "#cad3df"}, {"viewport_shell_background", "Viewport Shell Background", - ifcinterface::components::style::palette::viewport_shell_background, "#dbe1e8"}, - {"viewport_background", "Viewport Background", ifcinterface::components::style::palette::viewport_background, + ifcviewerfull::components::style::palette::viewport_shell_background, "#dbe1e8"}, + {"viewport_background", "Viewport Background", ifcviewerfull::components::style::palette::viewport_background, "#eef2f6"}, - {"panel_background", "Panel Background", ifcinterface::components::style::palette::panel_background, "#ffffff"}, - {"control_background", "Control Background", ifcinterface::components::style::palette::control_background, + {"panel_background", "Panel Background", ifcviewerfull::components::style::palette::panel_background, "#ffffff"}, + {"control_background", "Control Background", ifcviewerfull::components::style::palette::control_background, "#f5f7fa"}, - {"control_border_focus", "Control Border Focus", ifcinterface::components::style::palette::control_border_focus, + {"control_border_focus", "Control Border Focus", ifcviewerfull::components::style::palette::control_border_focus, "#7c8ca3"}, - {"box_background", "Box Background", ifcinterface::components::style::palette::box_background, "#f5f7fa"}, - {"scroll_handle", "Scroll Handle", ifcinterface::components::style::palette::scroll_handle, "#b1bac8"}, - {"scroll_handle_hover", "Scroll Handle Hover", ifcinterface::components::style::palette::scroll_handle_hover, + {"box_background", "Box Background", ifcviewerfull::components::style::palette::box_background, "#f5f7fa"}, + {"scroll_handle", "Scroll Handle", ifcviewerfull::components::style::palette::scroll_handle, "#b1bac8"}, + {"scroll_handle_hover", "Scroll Handle Hover", ifcviewerfull::components::style::palette::scroll_handle_hover, "#929daf"}, - {"status_background", "Status Background", ifcinterface::components::style::palette::status_background, + {"status_background", "Status Background", ifcviewerfull::components::style::palette::status_background, "#edf1f5"}, {"section_header_background", "Section Header Background", - ifcinterface::components::style::palette::section_header_background, "#eef2f6"}, - {"primary_text", "Primary Text", ifcinterface::components::style::palette::primary_text, "#1f2937"}, - {"secondary_text", "Secondary Text", ifcinterface::components::style::palette::secondary_text, "#5b6676"}, - {"disabled_text", "Disabled Text", ifcinterface::components::style::palette::disabled_text, "#8b95a3"}, - {"warning_text", "Warning Text", ifcinterface::components::style::palette::warning_text, "#b26b00"}, - {"selection_text", "Selection Text", ifcinterface::components::style::palette::selection_text, "#ffffff"}, - {"hover_text", "Hover Text", ifcinterface::components::style::palette::hover_text, "#0f172a"}, + ifcviewerfull::components::style::palette::section_header_background, "#eef2f6"}, + {"primary_text", "Primary Text", ifcviewerfull::components::style::palette::primary_text, "#1f2937"}, + {"secondary_text", "Secondary Text", ifcviewerfull::components::style::palette::secondary_text, "#5b6676"}, + {"disabled_text", "Disabled Text", ifcviewerfull::components::style::palette::disabled_text, "#8b95a3"}, + {"warning_text", "Warning Text", ifcviewerfull::components::style::palette::warning_text, "#b26b00"}, + {"selection_text", "Selection Text", ifcviewerfull::components::style::palette::selection_text, "#ffffff"}, + {"hover_text", "Hover Text", ifcviewerfull::components::style::palette::hover_text, "#0f172a"}, {"icon_color", "Icon Color", "#e7ebf2", "#445066"}, {"icon_active_color", "Icon Active Color", "#ffffff", "#101828"}, {"icon_disabled_color", "Icon Disabled Color", "#6f7988", "#98a2b3"}, @@ -93,27 +93,27 @@ QString normalizedColor(const QString& value, const QString& fallback) { } // namespace -namespace ifcinterface { +namespace ifcviewerfull { -InterfaceSettings& InterfaceSettings::instance() { - static InterfaceSettings inst; +ViewerSettings& ViewerSettings::instance() { + static ViewerSettings inst; return inst; } -const std::vector& InterfaceSettings::themeColorSpecs() { +const std::vector& ViewerSettings::themeColorSpecs() { return kThemeColorSpecs; } -InterfaceSettings::InterfaceSettings() { +ViewerSettings::ViewerSettings() { custom_colors_.resize(kThemeColorSpecs.size()); load(); } -InterfaceSettings::ThemeMode InterfaceSettings::themeMode() const { +ViewerSettings::ThemeMode ViewerSettings::themeMode() const { return theme_mode_; } -void InterfaceSettings::setThemeMode(ThemeMode mode) { +void ViewerSettings::setThemeMode(ThemeMode mode) { if (theme_mode_ == mode) return; theme_mode_ = mode; persist(); @@ -121,7 +121,7 @@ void InterfaceSettings::setThemeMode(ThemeMode mode) { emit themeChanged(); } -QString InterfaceSettings::color(const QString& key) const { +QString ViewerSettings::color(const QString& key) const { const int index = colorIndexForKey(key); if (index < 0) return {}; @@ -137,7 +137,7 @@ QString InterfaceSettings::color(const QString& key) const { return QString::fromUtf8(spec.dark_default); } -QString InterfaceSettings::customColor(const QString& key) const { +QString ViewerSettings::customColor(const QString& key) const { const int index = colorIndexForKey(key); if (index < 0) return {}; const auto& spec = kThemeColorSpecs[static_cast(index)]; @@ -145,7 +145,7 @@ QString InterfaceSettings::customColor(const QString& key) const { return stored.isEmpty() ? QString::fromUtf8(spec.dark_default) : stored; } -void InterfaceSettings::setCustomColor(const QString& key, const QString& value) { +void ViewerSettings::setCustomColor(const QString& key, const QString& value) { const int index = colorIndexForKey(key); if (index < 0) return; @@ -160,7 +160,7 @@ void InterfaceSettings::setCustomColor(const QString& key, const QString& value) } } -void InterfaceSettings::load() { +void ViewerSettings::load() { QSettings settings; int raw_mode = settings.value(kThemeModeKey, static_cast(ThemeMode::Dark)).toInt(); if (raw_mode < static_cast(ThemeMode::Dark) || raw_mode > static_cast(ThemeMode::Custom)) { @@ -177,7 +177,7 @@ void InterfaceSettings::load() { } } -void InterfaceSettings::persist() const { +void ViewerSettings::persist() const { QSettings settings; settings.setValue(kThemeModeKey, static_cast(theme_mode_)); for (size_t i = 0; i < kThemeColorSpecs.size(); ++i) { @@ -186,4 +186,4 @@ void InterfaceSettings::persist() const { } } -} // namespace ifcinterface +} // namespace ifcviewerfull diff --git a/src/ifcviewer-full/InterfaceSettings.h b/src/ifcviewer-full/ViewerSettings.h similarity index 93% rename from src/ifcviewer-full/InterfaceSettings.h rename to src/ifcviewer-full/ViewerSettings.h index 1079e6c514..87d8a17160 100644 --- a/src/ifcviewer-full/InterfaceSettings.h +++ b/src/ifcviewer-full/ViewerSettings.h @@ -25,9 +25,9 @@ #include #include -namespace ifcinterface { +namespace ifcviewerfull { -class InterfaceSettings : public QObject { +class ViewerSettings : public QObject { Q_OBJECT public: enum class ThemeMode { @@ -44,7 +44,7 @@ public: const char* light_default; }; - static InterfaceSettings& instance(); + static ViewerSettings& instance(); static const std::vector& themeColorSpecs(); ThemeMode themeMode() const; @@ -59,7 +59,7 @@ signals: void themeChanged(); private: - InterfaceSettings(); + ViewerSettings(); void load(); void persist() const; @@ -67,6 +67,6 @@ private: std::vector custom_colors_; }; -} // namespace ifcinterface +} // namespace ifcviewerfull #endif diff --git a/src/ifcviewer-full/components/Buttons.cpp b/src/ifcviewer-full/components/Buttons.cpp index 3420f81f25..8f8db4cad4 100644 --- a/src/ifcviewer-full/components/Buttons.cpp +++ b/src/ifcviewer-full/components/Buttons.cpp @@ -28,7 +28,7 @@ #include #include -namespace ifcinterface::components::buttons { +namespace ifcviewerfull::components::buttons { QToolButton* makeButton(const QString& text, const QString& icon_path, @@ -74,4 +74,4 @@ QWidget* makeButtonGroup(const QString& title, return group; } -} // namespace ifcinterface::components::buttons +} // namespace ifcviewerfull::components::buttons diff --git a/src/ifcviewer-full/components/Buttons.h b/src/ifcviewer-full/components/Buttons.h index dd1b47ff7b..498e7b4bbd 100644 --- a/src/ifcviewer-full/components/Buttons.h +++ b/src/ifcviewer-full/components/Buttons.h @@ -26,7 +26,7 @@ class QToolButton; class QWidget; -namespace ifcinterface::components::buttons { +namespace ifcviewerfull::components::buttons { QToolButton* makeButton(const QString& text, const QString& icon_path, @@ -38,6 +38,6 @@ QWidget* makeButtonGroup(const QString& title, bool trailing_separator = true, int vertical_spacing = 4); -} // namespace ifcinterface::components::buttons +} // namespace ifcviewerfull::components::buttons #endif diff --git a/src/ifcviewer-full/components/Dialog.cpp b/src/ifcviewer-full/components/Dialog.cpp index 01c6d3e049..d480640aa1 100644 --- a/src/ifcviewer-full/components/Dialog.cpp +++ b/src/ifcviewer-full/components/Dialog.cpp @@ -28,7 +28,7 @@ #include #include -namespace ifcinterface::components { +namespace ifcviewerfull::components { Dialog::Dialog(QWidget* parent, bool scrollable) : QDialog(parent) @@ -140,4 +140,4 @@ void TabbedDialog::addFooterWidget(QWidget* widget) { footer_layout_->addWidget(widget); } -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components diff --git a/src/ifcviewer-full/components/Dialog.h b/src/ifcviewer-full/components/Dialog.h index 09959cf7c1..827be44c9c 100644 --- a/src/ifcviewer-full/components/Dialog.h +++ b/src/ifcviewer-full/components/Dialog.h @@ -27,7 +27,7 @@ class QVBoxLayout; class QWidget; class QTabWidget; -namespace ifcinterface::components { +namespace ifcviewerfull::components { class Dialog : public QDialog { Q_OBJECT @@ -58,6 +58,6 @@ private: QVBoxLayout* footer_layout_ = nullptr; }; -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components #endif diff --git a/src/ifcviewer-full/components/KeyValueTable.cpp b/src/ifcviewer-full/components/KeyValueTable.cpp index 48c84acc36..b71bf62f18 100644 --- a/src/ifcviewer-full/components/KeyValueTable.cpp +++ b/src/ifcviewer-full/components/KeyValueTable.cpp @@ -25,7 +25,7 @@ #include #include -namespace ifcinterface::components { +namespace ifcviewerfull::components { KeyValueTable::KeyValueTable(const QList& rows, QWidget* parent) : QWidget(parent) @@ -69,4 +69,4 @@ KeyValueTable::KeyValueTable(const QList& rows, QWidget* paren } } -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components diff --git a/src/ifcviewer-full/components/KeyValueTable.h b/src/ifcviewer-full/components/KeyValueTable.h index 807376ce94..fa69e94ad8 100644 --- a/src/ifcviewer-full/components/KeyValueTable.h +++ b/src/ifcviewer-full/components/KeyValueTable.h @@ -25,7 +25,7 @@ #include #include -namespace ifcinterface::components { +namespace ifcviewerfull::components { struct KeyValueTableRow { QString key; @@ -42,6 +42,6 @@ public: explicit KeyValueTable(const QList& rows, QWidget* parent = nullptr); }; -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components #endif diff --git a/src/ifcviewer-full/components/Panel.cpp b/src/ifcviewer-full/components/Panel.cpp index 99a0531636..70f2899151 100644 --- a/src/ifcviewer-full/components/Panel.cpp +++ b/src/ifcviewer-full/components/Panel.cpp @@ -32,7 +32,7 @@ #include #include -namespace ifcinterface::components { +namespace ifcviewerfull::components { namespace { @@ -137,4 +137,4 @@ void Panel::clearBodyWidgets() { } } -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components diff --git a/src/ifcviewer-full/components/Panel.h b/src/ifcviewer-full/components/Panel.h index c5bb32c85b..4267415696 100644 --- a/src/ifcviewer-full/components/Panel.h +++ b/src/ifcviewer-full/components/Panel.h @@ -26,7 +26,7 @@ class QWidget; class QVBoxLayout; -namespace ifcinterface::components { +namespace ifcviewerfull::components { class Panel : public QDockWidget { Q_OBJECT @@ -48,6 +48,6 @@ private: QVBoxLayout* body_layout_ = nullptr; }; -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components #endif diff --git a/src/ifcviewer-full/components/Section.cpp b/src/ifcviewer-full/components/Section.cpp index 79e8e5f62a..3a6bdc5e9d 100644 --- a/src/ifcviewer-full/components/Section.cpp +++ b/src/ifcviewer-full/components/Section.cpp @@ -28,7 +28,7 @@ #include #include -namespace ifcinterface::components { +namespace ifcviewerfull::components { Section::Section(const QString& title, SectionHeaderMode header_mode, QWidget* parent) : QWidget(parent) @@ -115,4 +115,4 @@ void Section::setBodyExpanding(bool expanding) { updateGeometry(); } -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components diff --git a/src/ifcviewer-full/components/Section.h b/src/ifcviewer-full/components/Section.h index 8452694b8a..69622bf9db 100644 --- a/src/ifcviewer-full/components/Section.h +++ b/src/ifcviewer-full/components/Section.h @@ -27,7 +27,7 @@ class QHBoxLayout; class QToolButton; class QVBoxLayout; -namespace ifcinterface::components { +namespace ifcviewerfull::components { enum class SectionHeaderMode { Visible, @@ -56,6 +56,6 @@ private: bool body_expanding_ = false; }; -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components #endif diff --git a/src/ifcviewer-full/components/Style.cpp b/src/ifcviewer-full/components/Style.cpp index 5c6e282d03..15cdd66e29 100644 --- a/src/ifcviewer-full/components/Style.cpp +++ b/src/ifcviewer-full/components/Style.cpp @@ -20,12 +20,12 @@ #include "Style.h" -#include "../InterfaceSettings.h" +#include "../ViewerSettings.h" -namespace ifcinterface::components::style { +namespace ifcviewerfull::components::style { QString buildAppStyleSheet() { - const auto& theme = ifcinterface::InterfaceSettings::instance(); + const auto& theme = ifcviewerfull::ViewerSettings::instance(); QString stylesheet = QStringLiteral(R"( QMainWindow#appWindow { background: ${app_background}; @@ -494,4 +494,4 @@ QString buildAppStyleSheet() { return stylesheet; } -} // namespace ifcinterface::components::style +} // namespace ifcviewerfull::components::style diff --git a/src/ifcviewer-full/components/Style.h b/src/ifcviewer-full/components/Style.h index a72b42ec80..d98f19650e 100644 --- a/src/ifcviewer-full/components/Style.h +++ b/src/ifcviewer-full/components/Style.h @@ -23,22 +23,22 @@ #include -namespace ifcinterface::components::style::metrics { +namespace ifcviewerfull::components::style::metrics { inline constexpr int padding = 6; inline constexpr int section_body_padding = 10; inline constexpr int section_header_padding = 2; inline constexpr int panel_radius = 3; -} // namespace ifcinterface::components::style::metrics +} // namespace ifcviewerfull::components::style::metrics -namespace ifcinterface::components::style::typography { +namespace ifcviewerfull::components::style::typography { inline constexpr int small = 10; -} // namespace ifcinterface::components::style::typography +} // namespace ifcviewerfull::components::style::typography -namespace ifcinterface::components::style::palette { +namespace ifcviewerfull::components::style::palette { inline constexpr auto app_background = "#26292f"; inline constexpr auto border = "#3e444e"; @@ -66,12 +66,12 @@ inline constexpr auto warning_text = "#e4b35a"; inline constexpr auto selection_text = "#14161a"; inline constexpr auto hover_text = "#ffffff"; -} // namespace ifcinterface::components::style::palette +} // namespace ifcviewerfull::components::style::palette -namespace ifcinterface::components::style { +namespace ifcviewerfull::components::style { QString buildAppStyleSheet(); -} // namespace ifcinterface::components::style +} // namespace ifcviewerfull::components::style #endif diff --git a/src/ifcviewer-full/components/SvgIcon.cpp b/src/ifcviewer-full/components/SvgIcon.cpp index b2e70866c4..cbb0a02d77 100644 --- a/src/ifcviewer-full/components/SvgIcon.cpp +++ b/src/ifcviewer-full/components/SvgIcon.cpp @@ -20,14 +20,14 @@ #include "SvgIcon.h" -#include "../InterfaceSettings.h" +#include "../ViewerSettings.h" #include #include #include #include -namespace ifcinterface::components::icons { +namespace ifcviewerfull::components::icons { QPixmap renderTintedSvgPixmap(const QString& icon_path, const QString& color, const QSize& size) { QFile file(icon_path); @@ -64,7 +64,7 @@ QIcon makeTintedSvgIcon(const QString& icon_path, const QString& normal, } QIcon makeAccentSvgIcon(const QString& icon_path) { - const auto& theme = ifcinterface::InterfaceSettings::instance(); + const auto& theme = ifcviewerfull::ViewerSettings::instance(); return makeTintedSvgIcon(icon_path, theme.color("icon_accent_color"), theme.color("icon_accent_active_color"), @@ -72,7 +72,7 @@ QIcon makeAccentSvgIcon(const QString& icon_path) { } QIcon makeSvgIcon(const QString& icon_path) { - const auto& theme = ifcinterface::InterfaceSettings::instance(); + const auto& theme = ifcviewerfull::ViewerSettings::instance(); return makeTintedSvgIcon(icon_path, theme.color("icon_color"), theme.color("icon_active_color"), @@ -80,7 +80,7 @@ QIcon makeSvgIcon(const QString& icon_path) { } QPixmap makeSvgPixmap(const QString& icon_path, const QSize& size) { - return renderTintedSvgPixmap(icon_path, ifcinterface::InterfaceSettings::instance().color("icon_color"), size); + return renderTintedSvgPixmap(icon_path, ifcviewerfull::ViewerSettings::instance().color("icon_color"), size); } -} // namespace ifcinterface::components::icons +} // namespace ifcviewerfull::components::icons diff --git a/src/ifcviewer-full/components/SvgIcon.h b/src/ifcviewer-full/components/SvgIcon.h index 126f85be7e..76a1cba94b 100644 --- a/src/ifcviewer-full/components/SvgIcon.h +++ b/src/ifcviewer-full/components/SvgIcon.h @@ -26,7 +26,7 @@ #include #include -namespace ifcinterface::components::icons { +namespace ifcviewerfull::components::icons { QPixmap renderTintedSvgPixmap(const QString& icon_path, const QString& color, const QSize& size); QIcon makeTintedSvgIcon(const QString& icon_path, @@ -37,6 +37,6 @@ QIcon makeAccentSvgIcon(const QString& icon_path); QIcon makeSvgIcon(const QString& icon_path); QPixmap makeSvgPixmap(const QString& icon_path, const QSize& size); -} // namespace ifcinterface::components::icons +} // namespace ifcviewerfull::components::icons #endif diff --git a/src/ifcviewer-full/components/Tabs.cpp b/src/ifcviewer-full/components/Tabs.cpp index 86c4466a29..22f066e2ff 100644 --- a/src/ifcviewer-full/components/Tabs.cpp +++ b/src/ifcviewer-full/components/Tabs.cpp @@ -20,7 +20,7 @@ #include "Tabs.h" -namespace ifcinterface::components { +namespace ifcviewerfull::components { TabBar::TabBar(QWidget* parent) : QTabBar(parent) @@ -37,4 +37,4 @@ TabWidget::TabWidget(QWidget* parent) setTabBar(new TabBar(this)); } -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components diff --git a/src/ifcviewer-full/components/Tabs.h b/src/ifcviewer-full/components/Tabs.h index ea70ce5f1c..4f119b60be 100644 --- a/src/ifcviewer-full/components/Tabs.h +++ b/src/ifcviewer-full/components/Tabs.h @@ -24,7 +24,7 @@ #include #include -namespace ifcinterface::components { +namespace ifcviewerfull::components { class TabBar : public QTabBar { Q_OBJECT @@ -40,6 +40,6 @@ public: explicit TabWidget(QWidget* parent = nullptr); }; -} // namespace ifcinterface::components +} // namespace ifcviewerfull::components #endif diff --git a/src/ifcviewer-full/interface_resources.qrc b/src/ifcviewer-full/ifcviewer_full_resources.qrc similarity index 100% rename from src/ifcviewer-full/interface_resources.qrc rename to src/ifcviewer-full/ifcviewer_full_resources.qrc diff --git a/src/ifcviewer-full/main.cpp b/src/ifcviewer-full/main.cpp index c2e47ee685..d80199da07 100644 --- a/src/ifcviewer-full/main.cpp +++ b/src/ifcviewer-full/main.cpp @@ -19,7 +19,7 @@ ********************************************************************************/ #include "MainWindow.h" -#include "InterfaceSettings.h" +#include "ViewerSettings.h" #include "components/Style.h" #include @@ -67,15 +67,15 @@ int main(int argc, char* argv[]) { installUiFont(); const auto applyStyle = [&app]() { - app.setStyleSheet(ifcinterface::components::style::buildAppStyleSheet()); + app.setStyleSheet(ifcviewerfull::components::style::buildAppStyleSheet()); }; applyStyle(); - QObject::connect(&ifcinterface::InterfaceSettings::instance(), - &ifcinterface::InterfaceSettings::themeChanged, + QObject::connect(&ifcviewerfull::ViewerSettings::instance(), + &ifcviewerfull::ViewerSettings::themeChanged, &app, applyStyle); - ifcinterface::shell::MainWindow window; + ifcviewerfull::shell::MainWindow window; window.show(); return app.exec(); } diff --git a/src/ifcviewer-full/modules/models/AddModelDialog.cpp b/src/ifcviewer-full/modules/models/AddModelDialog.cpp index a5a80f07f8..841ddc26ab 100644 --- a/src/ifcviewer-full/modules/models/AddModelDialog.cpp +++ b/src/ifcviewer-full/modules/models/AddModelDialog.cpp @@ -31,7 +31,7 @@ #include #include -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { namespace { @@ -136,4 +136,4 @@ void AddModelDialog::setupUi() { addBodyWidget(choices_section); } -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models diff --git a/src/ifcviewer-full/modules/models/AddModelDialog.h b/src/ifcviewer-full/modules/models/AddModelDialog.h index 8e97409fd0..905b562349 100644 --- a/src/ifcviewer-full/modules/models/AddModelDialog.h +++ b/src/ifcviewer-full/modules/models/AddModelDialog.h @@ -23,7 +23,7 @@ #include "../../components/Dialog.h" -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { enum class SourceMode { None, @@ -45,6 +45,6 @@ private: SourceMode selected_mode_ = SourceMode::None; }; -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models #endif diff --git a/src/ifcviewer-full/modules/models/Controller.cpp b/src/ifcviewer-full/modules/models/Controller.cpp index 00e8a9e63d..4815c1ca97 100644 --- a/src/ifcviewer-full/modules/models/Controller.cpp +++ b/src/ifcviewer-full/modules/models/Controller.cpp @@ -41,11 +41,11 @@ #include -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { ModelsPanelController::ModelsPanelController(QWidget* host, ModelsPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, ViewportWindow* viewport, QObject* parent) : QObject(parent) @@ -315,4 +315,4 @@ void ModelsPanelController::writeSidecarForModel(SceneLoader* loader, uint32_t m qDebug(" Sidecar write: %lld ms (%s)", sidecar_timer.elapsed(), ok ? "ok" : "FAILED"); } -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models diff --git a/src/ifcviewer-full/modules/models/Controller.h b/src/ifcviewer-full/modules/models/Controller.h index f5b4d02bc2..95c1b06dff 100644 --- a/src/ifcviewer-full/modules/models/Controller.h +++ b/src/ifcviewer-full/modules/models/Controller.h @@ -27,11 +27,11 @@ #include class QWidget; -namespace ifcinterface { class SessionState; } +namespace ifcviewerfull { class SessionState; } class ViewportWindow; class SceneLoader; -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { class ModelsPanel; @@ -41,7 +41,7 @@ class ModelsPanelController : public QObject { public: explicit ModelsPanelController(QWidget* host, ModelsPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, ViewportWindow* viewport, QObject* parent = nullptr); @@ -58,10 +58,10 @@ private: QWidget* host_ = nullptr; ModelsPanel* widget_ = nullptr; - ifcinterface::SessionState* session_state_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; ViewportWindow* viewport_ = nullptr; }; -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models #endif diff --git a/src/ifcviewer-full/modules/models/Panel.cpp b/src/ifcviewer-full/modules/models/Panel.cpp index 1aa9d1c6a4..61a3982abc 100644 --- a/src/ifcviewer-full/modules/models/Panel.cpp +++ b/src/ifcviewer-full/modules/models/Panel.cpp @@ -20,7 +20,7 @@ #include "Panel.h" -#include "../../InterfaceSettings.h" +#include "../../ViewerSettings.h" #include "../../components/Section.h" #include "../../components/SvgIcon.h" @@ -41,11 +41,11 @@ #include -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { namespace { -constexpr auto kDragMimeType = "application/x-ifcinterface-model-items"; +constexpr auto kDragMimeType = "application/x-ifcviewerfull-model-items"; class ModelsTreeWidget : public QTreeWidget { public: @@ -434,7 +434,7 @@ void ModelsPanel::addNode(QTreeWidgetItem* parent, const TreeNode& node) { if (!node.visible) { const QBrush disabled_brush( - QColor(ifcinterface::InterfaceSettings::instance().color("disabled_text"))); + QColor(ifcviewerfull::ViewerSettings::instance().color("disabled_text"))); item->setForeground(0, disabled_brush); item->setForeground(1, disabled_brush); } @@ -444,4 +444,4 @@ void ModelsPanel::addNode(QTreeWidgetItem* parent, const TreeNode& node) { } } -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models diff --git a/src/ifcviewer-full/modules/models/Panel.h b/src/ifcviewer-full/modules/models/Panel.h index bd2e5bc056..88f4b2e068 100644 --- a/src/ifcviewer-full/modules/models/Panel.h +++ b/src/ifcviewer-full/modules/models/Panel.h @@ -28,7 +28,7 @@ class QTreeWidget; class QTreeWidgetItem; -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { class ModelsPanel : public components::Panel { Q_OBJECT @@ -52,6 +52,6 @@ private: QTreeWidget* tree_ = nullptr; }; -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models #endif diff --git a/src/ifcviewer-full/modules/models/SettingsDialog.cpp b/src/ifcviewer-full/modules/models/SettingsDialog.cpp index 9ed4204ed0..dce1191dd7 100644 --- a/src/ifcviewer-full/modules/models/SettingsDialog.cpp +++ b/src/ifcviewer-full/modules/models/SettingsDialog.cpp @@ -46,7 +46,7 @@ #include #include -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { namespace { @@ -124,7 +124,7 @@ QLabel* makeReadOnlyValue(QWidget* parent) { } // namespace -SettingsDialog::SettingsDialog(ifcinterface::SessionState* session_state, QWidget* parent) +SettingsDialog::SettingsDialog(ifcviewerfull::SessionState* session_state, QWidget* parent) : components::TabbedDialog(parent) , session_state_(session_state) , federation_(session_state ? session_state->federation() : nullptr) @@ -479,4 +479,4 @@ void SettingsDialog::onAccepted() { accept(); } -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models diff --git a/src/ifcviewer-full/modules/models/SettingsDialog.h b/src/ifcviewer-full/modules/models/SettingsDialog.h index f03815a0df..0916081ee6 100644 --- a/src/ifcviewer-full/modules/models/SettingsDialog.h +++ b/src/ifcviewer-full/modules/models/SettingsDialog.h @@ -36,18 +36,18 @@ class QShowEvent; class QTableWidget; class QTableWidgetItem; -namespace ifcinterface { +namespace ifcviewerfull { class SessionState; } -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { class SettingsView; class SettingsDialog : public components::TabbedDialog { Q_OBJECT public: - explicit SettingsDialog(ifcinterface::SessionState* session_state, QWidget* parent = nullptr); + explicit SettingsDialog(ifcviewerfull::SessionState* session_state, QWidget* parent = nullptr); void renderSelectedModelGeoref(const SelectedModelGeorefState& state); protected: @@ -69,7 +69,7 @@ private: void updateSelectedModelGeoref(); void onAccepted(); - ifcinterface::SessionState* session_state_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; Federation* federation_ = nullptr; SceneLoader* loader_ = nullptr; @@ -100,6 +100,6 @@ private: SettingsView* settings_view_ = nullptr; }; -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models #endif diff --git a/src/ifcviewer-full/modules/models/SettingsView.cpp b/src/ifcviewer-full/modules/models/SettingsView.cpp index 42dbb5adff..3fc65b9aa8 100644 --- a/src/ifcviewer-full/modules/models/SettingsView.cpp +++ b/src/ifcviewer-full/modules/models/SettingsView.cpp @@ -29,7 +29,7 @@ #include -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { namespace { @@ -203,7 +203,7 @@ SelectedModelGeorefState stateFromCachedGeoref(const ModelGeoref& georef) { } // namespace SettingsView::SettingsView(SettingsDialog* widget, - ifcinterface::SessionState* session_state) + ifcviewerfull::SessionState* session_state) : widget_(widget), session_state_(session_state) { } @@ -243,4 +243,4 @@ void SettingsView::refresh(const QString& fed_id) const { widget_->renderSelectedModelGeoref(stateFromCachedGeoref(*georef)); } -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models diff --git a/src/ifcviewer-full/modules/models/SettingsView.h b/src/ifcviewer-full/modules/models/SettingsView.h index 510865c6ff..b6ccfc02be 100644 --- a/src/ifcviewer-full/modules/models/SettingsView.h +++ b/src/ifcviewer-full/modules/models/SettingsView.h @@ -23,26 +23,26 @@ #include "Types.h" -namespace ifcinterface { +namespace ifcviewerfull { class SessionState; } -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { class SettingsDialog; class SettingsView { public: explicit SettingsView(SettingsDialog* widget, - ifcinterface::SessionState* session_state); + ifcviewerfull::SessionState* session_state); void refresh(const QString& fed_id) const; private: SettingsDialog* widget_ = nullptr; - ifcinterface::SessionState* session_state_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; }; -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models #endif diff --git a/src/ifcviewer-full/modules/models/Types.h b/src/ifcviewer-full/modules/models/Types.h index a9b963712b..bd313ba737 100644 --- a/src/ifcviewer-full/modules/models/Types.h +++ b/src/ifcviewer-full/modules/models/Types.h @@ -24,7 +24,7 @@ #include #include -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { enum class ItemKind { Group, @@ -57,6 +57,6 @@ struct SelectedModelGeorefState { QString factor_z; }; -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models #endif diff --git a/src/ifcviewer-full/modules/models/View.cpp b/src/ifcviewer-full/modules/models/View.cpp index 992df7b273..d16e5f97e2 100644 --- a/src/ifcviewer-full/modules/models/View.cpp +++ b/src/ifcviewer-full/modules/models/View.cpp @@ -22,11 +22,11 @@ #include "Panel.h" -#include "../../InterfaceSettings.h" +#include "../../ViewerSettings.h" #include "../../SessionState.h" #include "../../../ifcviewer/Federation.h" -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { namespace { @@ -57,22 +57,22 @@ TreeNode makeGroupNode(const Federation* federation, const Federation::Group* gr } // namespace ModelsPanelView::ModelsPanelView(ModelsPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, QObject* parent) : QObject(parent), widget_(widget), session_state_(session_state) { - connect(session_state_, &ifcinterface::SessionState::modelsChanged, + connect(session_state_, &ifcviewerfull::SessionState::modelsChanged, this, [this]() { reload(); }); - connect(session_state_, &ifcinterface::SessionState::federationStructureChanged, + connect(session_state_, &ifcviewerfull::SessionState::federationStructureChanged, this, [this]() { reload(); }); - connect(session_state_, &ifcinterface::SessionState::visibilityChanged, + connect(session_state_, &ifcviewerfull::SessionState::visibilityChanged, this, [this]() { reload(); }); - connect(session_state_, &ifcinterface::SessionState::projectReset, + connect(session_state_, &ifcviewerfull::SessionState::projectReset, this, [this]() { reload(); }); - connect(session_state_, &ifcinterface::SessionState::projectOpened, + connect(session_state_, &ifcviewerfull::SessionState::projectOpened, this, [this](const QString&) { reload(); }); - connect(&ifcinterface::InterfaceSettings::instance(), - &ifcinterface::InterfaceSettings::themeChanged, + connect(&ifcviewerfull::ViewerSettings::instance(), + &ifcviewerfull::ViewerSettings::themeChanged, this, [this]() { reload(); }); reload(); @@ -97,4 +97,4 @@ void ModelsPanelView::reload() { widget_->setNodes(nodes); } -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models diff --git a/src/ifcviewer-full/modules/models/View.h b/src/ifcviewer-full/modules/models/View.h index 05df55961a..6ca38a7231 100644 --- a/src/ifcviewer-full/modules/models/View.h +++ b/src/ifcviewer-full/modules/models/View.h @@ -25,9 +25,9 @@ #include -namespace ifcinterface { class SessionState; } +namespace ifcviewerfull { class SessionState; } -namespace ifcinterface::modules::models { +namespace ifcviewerfull::modules::models { class ModelsPanel; @@ -35,16 +35,16 @@ class ModelsPanelView : public QObject { Q_OBJECT public: explicit ModelsPanelView(ModelsPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, QObject* parent = nullptr); private: void reload(); ModelsPanel* widget_ = nullptr; - ifcinterface::SessionState* session_state_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; }; -} // namespace ifcinterface::modules::models +} // namespace ifcviewerfull::modules::models #endif diff --git a/src/ifcviewer-full/modules/project/Controller.cpp b/src/ifcviewer-full/modules/project/Controller.cpp index f65bdc58f5..9dbfa9b4ce 100644 --- a/src/ifcviewer-full/modules/project/Controller.cpp +++ b/src/ifcviewer-full/modules/project/Controller.cpp @@ -32,15 +32,15 @@ #include #include -namespace ifcinterface::modules::project { +namespace ifcviewerfull::modules::project { ProjectController::ProjectController(QWidget* host, Federation* federation, - ifcinterface::SessionState* session_state, - ifcinterface::ElementRegistry* element_registry, + ifcviewerfull::SessionState* session_state, + ifcviewerfull::ElementRegistry* element_registry, ViewportWindow* viewport, - ifcinterface::modules::models::ModelsPanelController* models_controller, - ifcinterface::modules::viewport::ViewportController* viewport_controller, + ifcviewerfull::modules::models::ModelsPanelController* models_controller, + ifcviewerfull::modules::viewport::ViewportController* viewport_controller, QObject* parent) : QObject(parent) , host_(host) @@ -204,4 +204,4 @@ bool ProjectController::confirmDiscardIfDirty() { return true; } -} // namespace ifcinterface::modules::project +} // namespace ifcviewerfull::modules::project diff --git a/src/ifcviewer-full/modules/project/Controller.h b/src/ifcviewer-full/modules/project/Controller.h index 7e87fc34aa..81f56f4609 100644 --- a/src/ifcviewer-full/modules/project/Controller.h +++ b/src/ifcviewer-full/modules/project/Controller.h @@ -26,12 +26,12 @@ class QWidget; class Federation; class ViewportWindow; -namespace ifcinterface { class ElementRegistry; } -namespace ifcinterface { class SessionState; } -namespace ifcinterface::modules::models { class ModelsPanelController; } -namespace ifcinterface::modules::viewport { class ViewportController; } +namespace ifcviewerfull { class ElementRegistry; } +namespace ifcviewerfull { class SessionState; } +namespace ifcviewerfull::modules::models { class ModelsPanelController; } +namespace ifcviewerfull::modules::viewport { class ViewportController; } -namespace ifcinterface::modules::project { +namespace ifcviewerfull::modules::project { class ProjectController : public QObject { Q_OBJECT @@ -39,11 +39,11 @@ class ProjectController : public QObject { public: explicit ProjectController(QWidget* host, Federation* federation, - ifcinterface::SessionState* session_state, - ifcinterface::ElementRegistry* element_registry, + ifcviewerfull::SessionState* session_state, + ifcviewerfull::ElementRegistry* element_registry, ViewportWindow* viewport, - ifcinterface::modules::models::ModelsPanelController* models_controller, - ifcinterface::modules::viewport::ViewportController* viewport_controller, + ifcviewerfull::modules::models::ModelsPanelController* models_controller, + ifcviewerfull::modules::viewport::ViewportController* viewport_controller, QObject* parent = nullptr); bool newProject(); @@ -59,13 +59,13 @@ private: QWidget* host_ = nullptr; Federation* federation_ = nullptr; - ifcinterface::SessionState* session_state_ = nullptr; - ifcinterface::ElementRegistry* element_registry_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; + ifcviewerfull::ElementRegistry* element_registry_ = nullptr; ViewportWindow* viewport_ = nullptr; - ifcinterface::modules::models::ModelsPanelController* models_controller_ = nullptr; - ifcinterface::modules::viewport::ViewportController* viewport_controller_ = nullptr; + ifcviewerfull::modules::models::ModelsPanelController* models_controller_ = nullptr; + ifcviewerfull::modules::viewport::ViewportController* viewport_controller_ = nullptr; }; -} // namespace ifcinterface::modules::project +} // namespace ifcviewerfull::modules::project #endif diff --git a/src/ifcviewer-full/modules/properties/Panel.cpp b/src/ifcviewer-full/modules/properties/Panel.cpp index f9e4b4b0fb..e643db8bf6 100644 --- a/src/ifcviewer-full/modules/properties/Panel.cpp +++ b/src/ifcviewer-full/modules/properties/Panel.cpp @@ -35,31 +35,31 @@ namespace { -QWidget* makePropertySetPanel(const ifcinterface::modules::properties::PropertySet& property_set, QWidget* parent = nullptr) { +QWidget* makePropertySetPanel(const ifcviewerfull::modules::properties::PropertySet& property_set, QWidget* parent = nullptr) { auto* group = new QGroupBox(property_set.title, parent); group->setObjectName("propertySetBox"); auto* layout = new QVBoxLayout(group); layout->setContentsMargins(10, 10, 10, 10); layout->setSpacing(0); - QList rows; + QList rows; for (const auto& row : property_set.rows) { rows.append({row.key, row.value, "keyValueValueLabel", "", "", 0}); } - layout->addWidget(new ifcinterface::components::KeyValueTable(rows, group)); + layout->addWidget(new ifcviewerfull::components::KeyValueTable(rows, group)); return group; } -QWidget* makeAttributeList(const QList& rows, QWidget* parent = nullptr) { - QList table_rows; +QWidget* makeAttributeList(const QList& rows, QWidget* parent = nullptr) { + QList table_rows; for (const auto& row : rows) { table_rows.append({row.key, row.value, "keyValueValueLabel", "", "", 0}); } - return new ifcinterface::components::KeyValueTable(table_rows, parent); + return new ifcviewerfull::components::KeyValueTable(table_rows, parent); } -QWidget* makeRelationshipList(const QList& rows, QWidget* parent = nullptr) { - QList table_rows; +QWidget* makeRelationshipList(const QList& rows, QWidget* parent = nullptr) { + QList table_rows; for (const auto& row_data : rows) { table_rows.append({row_data.key, row_data.value, @@ -68,22 +68,22 @@ QWidget* makeRelationshipList(const QListsetObjectName("panelSectionFilterWrapper"); auto* layout = new QVBoxLayout(wrapper); - layout->setContentsMargins(ifcinterface::components::style::metrics::section_body_padding, + layout->setContentsMargins(ifcviewerfull::components::style::metrics::section_body_padding, 0, - ifcinterface::components::style::metrics::section_body_padding, + ifcviewerfull::components::style::metrics::section_body_padding, 0); layout->setSpacing(0); auto* field = new QLineEdit(wrapper); field->setClearButtonEnabled(true); - field->addAction(ifcinterface::components::icons::makeSvgIcon(":/icons/filter.svg"), QLineEdit::LeadingPosition); + field->addAction(ifcviewerfull::components::icons::makeSvgIcon(":/icons/filter.svg"), QLineEdit::LeadingPosition); field->setVisible(false); layout->addWidget(field); @@ -91,7 +91,7 @@ QWidget* makeFilterWrapper(QLineEdit** field_out, QWidget* parent = nullptr) { return wrapper; } -QFrame* makeEntityBox(const ifcinterface::modules::properties::EntitySummary& entity, QWidget* parent = nullptr) { +QFrame* makeEntityBox(const ifcviewerfull::modules::properties::EntitySummary& entity, QWidget* parent = nullptr) { auto* entity_box = new QFrame(parent); entity_box->setObjectName("entityClassBox"); auto* entity_layout = new QHBoxLayout(entity_box); @@ -99,7 +99,7 @@ QFrame* makeEntityBox(const ifcinterface::modules::properties::EntitySummary& en entity_layout->setSpacing(10); auto* entity_icon = new QLabel(entity_box); - entity_icon->setPixmap(ifcinterface::components::icons::makeSvgPixmap(":/icons/cube-dots.svg", QSize(28, 28))); + entity_icon->setPixmap(ifcviewerfull::components::icons::makeSvgPixmap(":/icons/cube-dots.svg", QSize(28, 28))); entity_icon->setAlignment(Qt::AlignCenter); auto* entity_text = new QWidget(entity_box); @@ -121,7 +121,7 @@ QFrame* makeEntityBox(const ifcinterface::modules::properties::EntitySummary& en } // namespace -namespace ifcinterface::modules::properties { +namespace ifcviewerfull::modules::properties { PropertiesPanel::PropertiesPanel(QWidget* parent) : components::Panel("Properties", nullptr, parent, false, true) @@ -234,4 +234,4 @@ void PropertiesPanel::render(const PropertiesPanelState& state) { addBodyWidget(quantities_section); } -} // namespace ifcinterface::modules::properties +} // namespace ifcviewerfull::modules::properties diff --git a/src/ifcviewer-full/modules/properties/Panel.h b/src/ifcviewer-full/modules/properties/Panel.h index fcc01fdb11..bd92850701 100644 --- a/src/ifcviewer-full/modules/properties/Panel.h +++ b/src/ifcviewer-full/modules/properties/Panel.h @@ -31,7 +31,7 @@ class QLabel; class QLineEdit; class QToolButton; -namespace ifcinterface::modules::properties { +namespace ifcviewerfull::modules::properties { class PropertiesPanel : public components::Panel { Q_OBJECT @@ -51,6 +51,6 @@ private: QString quantities_filter_text_; }; -} // namespace ifcinterface::modules::properties +} // namespace ifcviewerfull::modules::properties #endif diff --git a/src/ifcviewer-full/modules/properties/Types.h b/src/ifcviewer-full/modules/properties/Types.h index b513be2562..fe4a94e201 100644 --- a/src/ifcviewer-full/modules/properties/Types.h +++ b/src/ifcviewer-full/modules/properties/Types.h @@ -25,7 +25,7 @@ #include #include -namespace ifcinterface::modules::properties { +namespace ifcviewerfull::modules::properties { struct KeyValueRow { QString key; @@ -55,6 +55,6 @@ struct PropertiesPanelState { QList quantity_sets; }; -} // namespace ifcinterface::modules::properties +} // namespace ifcviewerfull::modules::properties #endif diff --git a/src/ifcviewer-full/modules/properties/View.cpp b/src/ifcviewer-full/modules/properties/View.cpp index 26f6d01765..a98b49bbde 100644 --- a/src/ifcviewer-full/modules/properties/View.cpp +++ b/src/ifcviewer-full/modules/properties/View.cpp @@ -25,17 +25,17 @@ #include "../../ElementRegistry.h" #include "../../SessionState.h" -namespace ifcinterface::modules::properties { +namespace ifcviewerfull::modules::properties { PropertiesPanelView::PropertiesPanelView(PropertiesPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, QObject* parent) : QObject(parent), widget_(widget), session_state_(session_state) { - connect(session_state_, &ifcinterface::SessionState::selectionChanged, this, [this](uint32_t object_id) { + connect(session_state_, &ifcviewerfull::SessionState::selectionChanged, this, [this](uint32_t object_id) { refresh(object_id); }); - connect(session_state_, &ifcinterface::SessionState::projectReset, this, [this]() { + connect(session_state_, &ifcviewerfull::SessionState::projectReset, this, [this]() { refresh(0); }); refresh(0); @@ -118,4 +118,4 @@ void PropertiesPanelView::refresh(uint32_t object_id) { widget_->render(state); } -} // namespace ifcinterface::modules::properties +} // namespace ifcviewerfull::modules::properties diff --git a/src/ifcviewer-full/modules/properties/View.h b/src/ifcviewer-full/modules/properties/View.h index 1762de908a..2f7cdde57a 100644 --- a/src/ifcviewer-full/modules/properties/View.h +++ b/src/ifcviewer-full/modules/properties/View.h @@ -25,8 +25,8 @@ #include -namespace ifcinterface { class SessionState; } -namespace ifcinterface::modules::properties { +namespace ifcviewerfull { class SessionState; } +namespace ifcviewerfull::modules::properties { class PropertiesPanel; @@ -34,16 +34,16 @@ class PropertiesPanelView : public QObject { Q_OBJECT public: explicit PropertiesPanelView(PropertiesPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, QObject* parent = nullptr); private: void refresh(uint32_t object_id); PropertiesPanel* widget_ = nullptr; - ifcinterface::SessionState* session_state_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; }; -} // namespace ifcinterface::modules::properties +} // namespace ifcviewerfull::modules::properties #endif diff --git a/src/ifcviewer-full/modules/settings/Dialog.cpp b/src/ifcviewer-full/modules/settings/Dialog.cpp index 6eb8af5830..2cfaa3a7a7 100644 --- a/src/ifcviewer-full/modules/settings/Dialog.cpp +++ b/src/ifcviewer-full/modules/settings/Dialog.cpp @@ -20,7 +20,7 @@ #include "Dialog.h" -#include "../../InterfaceSettings.h" +#include "../../ViewerSettings.h" #include "../../../ifcviewer/AppSettings.h" #include "../../components/Dialog.h" #include "../../components/Section.h" @@ -42,7 +42,7 @@ #include #include -namespace ifcinterface::modules::settings { +namespace ifcviewerfull::modules::settings { SettingsDialog::SettingsDialog(QWidget* parent) : components::TabbedDialog(parent) @@ -202,9 +202,9 @@ void SettingsDialog::setupUi() { theme_form->setVerticalSpacing(10); theme_mode_combo_ = new QComboBox(theme_body); - theme_mode_combo_->addItem("Dark", static_cast(ifcinterface::InterfaceSettings::ThemeMode::Dark)); - theme_mode_combo_->addItem("Light", static_cast(ifcinterface::InterfaceSettings::ThemeMode::Light)); - theme_mode_combo_->addItem("Custom", static_cast(ifcinterface::InterfaceSettings::ThemeMode::Custom)); + theme_mode_combo_->addItem("Dark", static_cast(ifcviewerfull::ViewerSettings::ThemeMode::Dark)); + theme_mode_combo_->addItem("Light", static_cast(ifcviewerfull::ViewerSettings::ThemeMode::Light)); + theme_mode_combo_->addItem("Custom", static_cast(ifcviewerfull::ViewerSettings::ThemeMode::Custom)); theme_form->addRow("Preset", theme_mode_combo_); theme_custom_body_ = new QWidget(theme_body); @@ -214,7 +214,7 @@ void SettingsDialog::setupUi() { custom_grid->setVerticalSpacing(8); int row = 0; - for (const auto& spec : ifcinterface::InterfaceSettings::themeColorSpecs()) { + for (const auto& spec : ifcviewerfull::ViewerSettings::themeColorSpecs()) { auto* label = new QLabel(QString::fromUtf8(spec.label), theme_custom_body_); auto* edit = new QLineEdit(theme_custom_body_); edit->setPlaceholderText("#000000"); @@ -302,7 +302,7 @@ void SettingsDialog::syncFromSettings() { } void SettingsDialog::syncThemeSettings() { - const auto& settings = ifcinterface::InterfaceSettings::instance(); + const auto& settings = ifcviewerfull::ViewerSettings::instance(); const int idx = theme_mode_combo_->findData(static_cast(settings.themeMode())); theme_mode_combo_->setCurrentIndex(idx >= 0 ? idx : 0); for (auto& editor : theme_color_editors_) { @@ -314,8 +314,8 @@ void SettingsDialog::syncThemeSettings() { void SettingsDialog::updateThemeEditorEnabled() { if (!theme_mode_combo_ || !theme_custom_body_) return; const auto mode = - static_cast(theme_mode_combo_->currentData().toInt()); - const bool is_custom = mode == ifcinterface::InterfaceSettings::ThemeMode::Custom; + static_cast(theme_mode_combo_->currentData().toInt()); + const bool is_custom = mode == ifcviewerfull::ViewerSettings::ThemeMode::Custom; theme_custom_body_->setVisible(is_custom); theme_custom_body_->setEnabled(is_custom); } @@ -345,13 +345,13 @@ void SettingsDialog::onAccepted() { AppSettings::instance().setHizResolution(hiz_resolution_spin_->value()); AppSettings::instance().setNavPreset( static_cast(nav_preset_combo_->currentIndex())); - auto& interface_settings = ifcinterface::InterfaceSettings::instance(); + auto& interface_settings = ifcviewerfull::ViewerSettings::instance(); interface_settings.setThemeMode( - static_cast(theme_mode_combo_->currentData().toInt())); + static_cast(theme_mode_combo_->currentData().toInt())); for (const auto& editor : theme_color_editors_) { interface_settings.setCustomColor(editor.key, editor.edit->text()); } accept(); } -} // namespace ifcinterface::modules::settings +} // namespace ifcviewerfull::modules::settings diff --git a/src/ifcviewer-full/modules/settings/Dialog.h b/src/ifcviewer-full/modules/settings/Dialog.h index d021855884..da581b395d 100644 --- a/src/ifcviewer-full/modules/settings/Dialog.h +++ b/src/ifcviewer-full/modules/settings/Dialog.h @@ -34,7 +34,7 @@ class QShowEvent; class QSpinBox; class QWidget; -namespace ifcinterface::modules::settings { +namespace ifcviewerfull::modules::settings { class SettingsDialog : public components::TabbedDialog { Q_OBJECT @@ -74,6 +74,6 @@ private: std::vector theme_color_editors_; }; -} // namespace ifcinterface::modules::settings +} // namespace ifcviewerfull::modules::settings #endif diff --git a/src/ifcviewer-full/modules/spatial_hierarchy/Panel.cpp b/src/ifcviewer-full/modules/spatial_hierarchy/Panel.cpp index c7c0e3cfa7..8c2ca124c1 100644 --- a/src/ifcviewer-full/modules/spatial_hierarchy/Panel.cpp +++ b/src/ifcviewer-full/modules/spatial_hierarchy/Panel.cpp @@ -27,7 +27,7 @@ #include #include -namespace ifcinterface::modules::spatial_hierarchy { +namespace ifcviewerfull::modules::spatial_hierarchy { SpatialHierarchyPanel::SpatialHierarchyPanel(QWidget* parent) : components::Panel("Spatial Hierarchy", nullptr, parent) @@ -92,4 +92,4 @@ QString SpatialHierarchyPanel::iconPath(ItemKind kind) const { return ":/icons/frame-alt.svg"; } -} // namespace ifcinterface::modules::spatial_hierarchy +} // namespace ifcviewerfull::modules::spatial_hierarchy diff --git a/src/ifcviewer-full/modules/spatial_hierarchy/Panel.h b/src/ifcviewer-full/modules/spatial_hierarchy/Panel.h index 713e277e44..3227ab1439 100644 --- a/src/ifcviewer-full/modules/spatial_hierarchy/Panel.h +++ b/src/ifcviewer-full/modules/spatial_hierarchy/Panel.h @@ -28,7 +28,7 @@ class QTreeWidget; class QTreeWidgetItem; -namespace ifcinterface::modules::spatial_hierarchy { +namespace ifcviewerfull::modules::spatial_hierarchy { class SpatialHierarchyPanel : public components::Panel { Q_OBJECT @@ -48,6 +48,6 @@ private: QTreeWidget* tree_ = nullptr; }; -} // namespace ifcinterface::modules::spatial_hierarchy +} // namespace ifcviewerfull::modules::spatial_hierarchy #endif diff --git a/src/ifcviewer-full/modules/spatial_hierarchy/Types.h b/src/ifcviewer-full/modules/spatial_hierarchy/Types.h index f5f64332d5..24152d2879 100644 --- a/src/ifcviewer-full/modules/spatial_hierarchy/Types.h +++ b/src/ifcviewer-full/modules/spatial_hierarchy/Types.h @@ -25,7 +25,7 @@ #include #include -namespace ifcinterface::modules::spatial_hierarchy { +namespace ifcviewerfull::modules::spatial_hierarchy { enum class ItemKind { Site, @@ -43,6 +43,6 @@ struct TreeNode { using NodePath = QStringList; -} // namespace ifcinterface::modules::spatial_hierarchy +} // namespace ifcviewerfull::modules::spatial_hierarchy #endif diff --git a/src/ifcviewer-full/modules/spatial_hierarchy/View.cpp b/src/ifcviewer-full/modules/spatial_hierarchy/View.cpp index 78fbd04f73..b568314e67 100644 --- a/src/ifcviewer-full/modules/spatial_hierarchy/View.cpp +++ b/src/ifcviewer-full/modules/spatial_hierarchy/View.cpp @@ -24,7 +24,7 @@ #include "../../SessionState.h" -namespace ifcinterface::modules::spatial_hierarchy { +namespace ifcviewerfull::modules::spatial_hierarchy { namespace { @@ -40,7 +40,7 @@ TreeNode* findNodeRecursive(QList& nodes, const NodePath& path, int de } // namespace SpatialHierarchyPanelView::SpatialHierarchyPanelView(SpatialHierarchyPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, QObject* parent) : QObject(parent), widget_(widget), session_state_(session_state) { @@ -72,4 +72,4 @@ TreeNode* SpatialHierarchyPanelView::findNode(const NodePath& path) { return findNodeRecursive(nodes_, path, 0); } -} // namespace ifcinterface::modules::spatial_hierarchy +} // namespace ifcviewerfull::modules::spatial_hierarchy diff --git a/src/ifcviewer-full/modules/spatial_hierarchy/View.h b/src/ifcviewer-full/modules/spatial_hierarchy/View.h index c2e8313fbe..de9aae2b25 100644 --- a/src/ifcviewer-full/modules/spatial_hierarchy/View.h +++ b/src/ifcviewer-full/modules/spatial_hierarchy/View.h @@ -25,8 +25,8 @@ #include -namespace ifcinterface { class SessionState; } -namespace ifcinterface::modules::spatial_hierarchy { +namespace ifcviewerfull { class SessionState; } +namespace ifcviewerfull::modules::spatial_hierarchy { class SpatialHierarchyPanel; @@ -34,7 +34,7 @@ class SpatialHierarchyPanelView : public QObject { Q_OBJECT public: explicit SpatialHierarchyPanelView(SpatialHierarchyPanel* widget, - ifcinterface::SessionState* session_state, + ifcviewerfull::SessionState* session_state, QObject* parent = nullptr); private: @@ -42,10 +42,10 @@ private: TreeNode* findNode(const NodePath& path); SpatialHierarchyPanel* widget_ = nullptr; - ifcinterface::SessionState* session_state_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; QList nodes_; }; -} // namespace ifcinterface::modules::spatial_hierarchy +} // namespace ifcviewerfull::modules::spatial_hierarchy #endif diff --git a/src/ifcviewer-full/modules/todo/Panel.cpp b/src/ifcviewer-full/modules/todo/Panel.cpp index a73497ae7a..8b43858bd5 100644 --- a/src/ifcviewer-full/modules/todo/Panel.cpp +++ b/src/ifcviewer-full/modules/todo/Panel.cpp @@ -25,7 +25,7 @@ #include #include -namespace ifcinterface::modules::todo { +namespace ifcviewerfull::modules::todo { TodoPanel::TodoPanel(const QString& title, QWidget* parent) : QWidget(parent) @@ -56,4 +56,4 @@ TodoPanel::TodoPanel(const QString& title, QWidget* parent) layout->addWidget(section); } -} // namespace ifcinterface::modules::todo +} // namespace ifcviewerfull::modules::todo diff --git a/src/ifcviewer-full/modules/todo/Panel.h b/src/ifcviewer-full/modules/todo/Panel.h index cebf530123..67f789fc04 100644 --- a/src/ifcviewer-full/modules/todo/Panel.h +++ b/src/ifcviewer-full/modules/todo/Panel.h @@ -23,7 +23,7 @@ #include -namespace ifcinterface::modules::todo { +namespace ifcviewerfull::modules::todo { class TodoPanel : public QWidget { Q_OBJECT @@ -31,6 +31,6 @@ public: explicit TodoPanel(const QString& title, QWidget* parent = nullptr); }; -} // namespace ifcinterface::modules::todo +} // namespace ifcviewerfull::modules::todo #endif diff --git a/src/ifcviewer-full/modules/viewport/Controller.cpp b/src/ifcviewer-full/modules/viewport/Controller.cpp index 454a266961..f7d8a2736c 100644 --- a/src/ifcviewer-full/modules/viewport/Controller.cpp +++ b/src/ifcviewer-full/modules/viewport/Controller.cpp @@ -20,7 +20,7 @@ #include "Controller.h" -#include "../../InterfaceSettings.h" +#include "../../ViewerSettings.h" #include "../../SessionState.h" #include "../../../ifcviewer/AppSettings.h" #include "../../../ifcviewer/Federation.h" @@ -34,9 +34,9 @@ #include -namespace ifcinterface::modules::viewport { +namespace ifcviewerfull::modules::viewport { -ViewportController::ViewportController(ifcinterface::SessionState* session_state, +ViewportController::ViewportController(ifcviewerfull::SessionState* session_state, ViewportWindow* viewport, QObject* parent) : QObject(parent) @@ -47,12 +47,12 @@ ViewportController::ViewportController(ifcinterface::SessionState* session_state { Federation* federation = session_state_->federation(); SceneLoader* loader = session_state_->loader(); - connect(&ifcinterface::InterfaceSettings::instance(), - &ifcinterface::InterfaceSettings::themeChanged, + connect(&ifcviewerfull::ViewerSettings::instance(), + &ifcviewerfull::ViewerSettings::themeChanged, this, [this]() { - viewport_->setBackgroundColor(QColor(ifcinterface::InterfaceSettings::instance().color("viewport_background"))); + viewport_->setBackgroundColor(QColor(ifcviewerfull::ViewerSettings::instance().color("viewport_background"))); }); - viewport_->setBackgroundColor(QColor(ifcinterface::InterfaceSettings::instance().color("viewport_background"))); + viewport_->setBackgroundColor(QColor(ifcviewerfull::ViewerSettings::instance().color("viewport_background"))); connect(federation, &Federation::federatedFalseOriginChanged, this, &ViewportController::applyFederatedFalseOrigin); connect(federation, &Federation::configChanged, this, [this]() { @@ -334,4 +334,4 @@ void ViewportController::maybeGuessFederatedFalseOrigin(uint32_t mid) { *placement, *georef, federation->config())); } -} // namespace ifcinterface::modules::viewport +} // namespace ifcviewerfull::modules::viewport diff --git a/src/ifcviewer-full/modules/viewport/Controller.h b/src/ifcviewer-full/modules/viewport/Controller.h index 20f569d797..e9f5bb3a56 100644 --- a/src/ifcviewer-full/modules/viewport/Controller.h +++ b/src/ifcviewer-full/modules/viewport/Controller.h @@ -24,18 +24,18 @@ #include #include -namespace ifcinterface { class SessionState; } +namespace ifcviewerfull { class SessionState; } class ViewportWindow; class AreaMeasurement; class LengthMeasurement; -namespace ifcinterface::modules::viewport { +namespace ifcviewerfull::modules::viewport { class ViewportController : public QObject { Q_OBJECT public: - explicit ViewportController(ifcinterface::SessionState* session_state, + explicit ViewportController(ifcviewerfull::SessionState* session_state, ViewportWindow* viewport, QObject* parent = nullptr); ~ViewportController() override; @@ -62,12 +62,12 @@ private: void maybeGuessFederatedFalseOrigin(uint32_t mid); void updateVolumeReadout(); - ifcinterface::SessionState* session_state_ = nullptr; + ifcviewerfull::SessionState* session_state_ = nullptr; ViewportWindow* viewport_ = nullptr; std::unique_ptr area_measurement_; std::unique_ptr length_measurement_; }; -} // namespace ifcinterface::modules::viewport +} // namespace ifcviewerfull::modules::viewport #endif diff --git a/src/ifcviewer-full/modules/viewport/Panel.cpp b/src/ifcviewer-full/modules/viewport/Panel.cpp index a6c8f5263b..d2ad709299 100644 --- a/src/ifcviewer-full/modules/viewport/Panel.cpp +++ b/src/ifcviewer-full/modules/viewport/Panel.cpp @@ -26,7 +26,7 @@ #include #include -namespace ifcinterface::modules::viewport { +namespace ifcviewerfull::modules::viewport { ViewportPanel::ViewportPanel(QWidget* parent) : QWidget(parent) @@ -57,4 +57,4 @@ ViewportPanel::ViewportPanel(QWidget* parent) root->addWidget(shell); } -} // namespace ifcinterface::modules::viewport +} // namespace ifcviewerfull::modules::viewport diff --git a/src/ifcviewer-full/modules/viewport/Panel.h b/src/ifcviewer-full/modules/viewport/Panel.h index d9a772af82..9b5a512696 100644 --- a/src/ifcviewer-full/modules/viewport/Panel.h +++ b/src/ifcviewer-full/modules/viewport/Panel.h @@ -25,7 +25,7 @@ class ViewportWindow; -namespace ifcinterface::modules::viewport { +namespace ifcviewerfull::modules::viewport { class ViewportPanel : public QWidget { Q_OBJECT @@ -40,6 +40,6 @@ private: QWidget* viewport_container_ = nullptr; }; -} // namespace ifcinterface::modules::viewport +} // namespace ifcviewerfull::modules::viewport #endif