Rename IfcViewerFull to Bonsai Viewer
Directory src/ifcviewer-full -> src/bonsaiviewer, CMake target IfcViewerFull -> BonsaiViewer, namespace ifcviewerfull -> bonsaiviewer, QApplication / window titles / connector path now use the new brand. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@@ -687,7 +687,7 @@ if(BUILD_IFCVIEWER)
|
||||
|
||||
add_subdirectory(../src/ifcviewer ifcviewer)
|
||||
add_subdirectory(../src/ifcviewer-minimal ifcviewer-minimal)
|
||||
add_subdirectory(../src/ifcviewer-full ifcviewer-full)
|
||||
add_subdirectory(../src/bonsaiviewer bonsaiviewer)
|
||||
endif()
|
||||
|
||||
# Cmake uninstall target
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
message("Running CMakeLists.txt in /src/ifcviewer-full")
|
||||
message("Running CMakeLists.txt in /src/bonsaiviewer")
|
||||
|
||||
set(QT_VERSION 6 CACHE STRING "Qt version")
|
||||
find_package(Qt${QT_VERSION} COMPONENTS Core CorePrivate Gui Widgets Svg REQUIRED PATHS ${QT_DIR})
|
||||
|
||||
set(IFCVIEWER_FULL_FILES
|
||||
set(BONSAIVIEWER_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ElementRegistry.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ElementRegistry.h
|
||||
@@ -98,19 +98,19 @@ set(IFCVIEWER_FULL_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/modules/viewport/Commands.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/modules/viewport/View.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/modules/viewport/View.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ifcviewer_full_resources.qrc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bonsaiviewer_resources.qrc
|
||||
)
|
||||
|
||||
add_executable(IfcViewerFull ${IFCVIEWER_FULL_FILES})
|
||||
add_executable(BonsaiViewer ${BONSAIVIEWER_FILES})
|
||||
|
||||
set_target_properties(IfcViewerFull PROPERTIES
|
||||
set_target_properties(BonsaiViewer PROPERTIES
|
||||
AUTOMOC ON
|
||||
AUTORCC ON
|
||||
WIN32_EXECUTABLE ON
|
||||
MACOSX_BUNDLE ON
|
||||
)
|
||||
|
||||
target_link_libraries(IfcViewerFull PRIVATE
|
||||
target_link_libraries(BonsaiViewer PRIVATE
|
||||
IfcViewer
|
||||
Qt${QT_VERSION}::Core
|
||||
Qt${QT_VERSION}::CorePrivate
|
||||
@@ -119,5 +119,5 @@ target_link_libraries(IfcViewerFull PRIVATE
|
||||
Qt${QT_VERSION}::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS IfcViewerFull EXPORT ${IFCOPENSHELL_EXPORT_TARGETS})
|
||||
ifcopenshell_deploy_qt_runtime(IfcViewerFull)
|
||||
install(TARGETS BonsaiViewer EXPORT ${IFCOPENSHELL_EXPORT_TARGETS})
|
||||
ifcopenshell_deploy_qt_runtime(BonsaiViewer)
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "../ifcviewer/SceneLoader.h"
|
||||
#include "../ifcviewer/SidecarCache.h"
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
|
||||
ElementRegistry::ElementRegistry(QObject* parent)
|
||||
: QObject(parent)
|
||||
@@ -123,4 +123,4 @@ void ElementRegistry::onStreamedElementsReady(uint32_t /*mid*/, std::vector<Elem
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull
|
||||
} // namespace bonsaiviewer
|
||||
@@ -33,7 +33,7 @@ class SceneLoader;
|
||||
struct PackedElementInfo;
|
||||
struct ElementInfo;
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
|
||||
struct BasicElementInfo {
|
||||
uint32_t object_id = 0;
|
||||
@@ -67,6 +67,6 @@ private:
|
||||
std::unordered_map<uint32_t, BasicElementInfo> elements_;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull
|
||||
} // namespace bonsaiviewer
|
||||
|
||||
#endif
|
||||
@@ -56,12 +56,12 @@
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::shell {
|
||||
namespace bonsaiviewer::shell {
|
||||
|
||||
MainWindow::MainWindow(QWidget* parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
session_state_ = new ifcviewerfull::SessionState(this);
|
||||
session_state_ = new bonsaiviewer::SessionState(this);
|
||||
auto on_mutated = [this]() {
|
||||
setWindowModified(true);
|
||||
updateWindowTitle();
|
||||
@@ -70,11 +70,11 @@ MainWindow::MainWindow(QWidget* parent)
|
||||
setWindowModified(false);
|
||||
updateWindowTitle();
|
||||
};
|
||||
connect(session_state_, &ifcviewerfull::SessionState::federationChanged, this, on_mutated);
|
||||
connect(session_state_, &ifcviewerfull::SessionState::modelsChanged, this, on_mutated);
|
||||
connect(session_state_, &ifcviewerfull::SessionState::projectReset, this, on_clean_state);
|
||||
connect(session_state_, &ifcviewerfull::SessionState::projectOpened, this, on_clean_state);
|
||||
connect(session_state_, &ifcviewerfull::SessionState::projectSaved, this, on_clean_state);
|
||||
connect(session_state_, &bonsaiviewer::SessionState::federationChanged, this, on_mutated);
|
||||
connect(session_state_, &bonsaiviewer::SessionState::modelsChanged, this, on_mutated);
|
||||
connect(session_state_, &bonsaiviewer::SessionState::projectReset, this, on_clean_state);
|
||||
connect(session_state_, &bonsaiviewer::SessionState::projectOpened, this, on_clean_state);
|
||||
connect(session_state_, &bonsaiviewer::SessionState::projectSaved, this, on_clean_state);
|
||||
setupChrome();
|
||||
setupViewport();
|
||||
setupPanels();
|
||||
@@ -443,22 +443,22 @@ void MainWindow::setupStatus() {
|
||||
status_perf_label_->setVisible(show);
|
||||
if (!show) status_perf_label_->clear();
|
||||
});
|
||||
connect(session_state_, &ifcviewerfull::SessionState::statusMessageChanged,
|
||||
connect(session_state_, &bonsaiviewer::SessionState::statusMessageChanged,
|
||||
this, [this](const QString& mode, const QString& detail) {
|
||||
status_mode_label_->setText(mode);
|
||||
status_selection_label_->setText(detail);
|
||||
});
|
||||
connect(session_state_, &ifcviewerfull::SessionState::progressBegan, this, [this](const QString&) {
|
||||
connect(session_state_, &bonsaiviewer::SessionState::progressBegan, this, [this](const QString&) {
|
||||
// Start in indeterminate mode (spinning bar). The first concrete
|
||||
// setProgress(...) call below switches it to a determinate 0-100 bar.
|
||||
status_progress_bar_->setRange(0, 0);
|
||||
status_progress_bar_->setVisible(true);
|
||||
});
|
||||
connect(session_state_, &ifcviewerfull::SessionState::progressChanged, this, [this](int percent) {
|
||||
connect(session_state_, &bonsaiviewer::SessionState::progressChanged, this, [this](int percent) {
|
||||
if (status_progress_bar_->maximum() == 0) status_progress_bar_->setRange(0, 100);
|
||||
status_progress_bar_->setValue(percent);
|
||||
});
|
||||
connect(session_state_, &ifcviewerfull::SessionState::progressEnded, this, [this]() {
|
||||
connect(session_state_, &bonsaiviewer::SessionState::progressEnded, this, [this]() {
|
||||
status_progress_bar_->setVisible(false);
|
||||
});
|
||||
session_state_->setStatusMessage("Ready", "No selection");
|
||||
@@ -471,9 +471,9 @@ void MainWindow::setupLoader() {
|
||||
|
||||
// Load errors surface through SessionState as a session-level signal; the
|
||||
// status text + progress are already cleared there, we only show the modal.
|
||||
connect(session_state_, &ifcviewerfull::SessionState::loadError, this,
|
||||
connect(session_state_, &bonsaiviewer::SessionState::loadError, this,
|
||||
[this](const QString& message) {
|
||||
QMessageBox::warning(this, "IfcViewer", message);
|
||||
QMessageBox::warning(this, "Bonsai Viewer", message);
|
||||
});
|
||||
|
||||
connect(viewport_widget_->viewport(), &ViewportWindow::frameStatsUpdated, this,
|
||||
@@ -500,12 +500,12 @@ void MainWindow::updateWindowTitle() {
|
||||
auto* federation = session_state_->federation();
|
||||
const QString project_path = federation->filePath();
|
||||
if (project_path.isEmpty() && federation->models().empty()) {
|
||||
setWindowTitle("IfcOpenShell Interface");
|
||||
setWindowTitle("Bonsai Viewer");
|
||||
} else if (project_path.isEmpty()) {
|
||||
setWindowTitle("untitled[*] - IfcOpenShell Interface");
|
||||
setWindowTitle("untitled[*] - Bonsai Viewer");
|
||||
} else {
|
||||
setWindowTitle(QFileInfo(project_path).fileName() + "[*] - IfcOpenShell Interface");
|
||||
setWindowTitle(QFileInfo(project_path).fileName() + "[*] - Bonsai Viewer");
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::shell
|
||||
} // namespace bonsaiviewer::shell
|
||||
@@ -30,18 +30,18 @@ class QDockWidget;
|
||||
class QProgressBar;
|
||||
class QStackedWidget;
|
||||
class QToolButton;
|
||||
namespace ifcviewerfull { class SessionState; }
|
||||
namespace ifcviewerfull::components { class TabBar; }
|
||||
namespace ifcviewerfull::modules::models { class ModelsPanel; }
|
||||
namespace ifcviewerfull::modules::models { class ModelsPanelView; }
|
||||
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 ViewportView; }
|
||||
namespace ifcviewerfull::modules::viewport { class ViewportPanel; }
|
||||
namespace bonsaiviewer { class SessionState; }
|
||||
namespace bonsaiviewer::components { class TabBar; }
|
||||
namespace bonsaiviewer::modules::models { class ModelsPanel; }
|
||||
namespace bonsaiviewer::modules::models { class ModelsPanelView; }
|
||||
namespace bonsaiviewer::modules::spatial_hierarchy { class SpatialHierarchyPanel; }
|
||||
namespace bonsaiviewer::modules::spatial_hierarchy { class SpatialHierarchyPanelView; }
|
||||
namespace bonsaiviewer::modules::properties { class PropertiesPanel; }
|
||||
namespace bonsaiviewer::modules::properties { class PropertiesPanelView; }
|
||||
namespace bonsaiviewer::modules::viewport { class ViewportView; }
|
||||
namespace bonsaiviewer::modules::viewport { class ViewportPanel; }
|
||||
|
||||
namespace ifcviewerfull::shell {
|
||||
namespace bonsaiviewer::shell {
|
||||
|
||||
class MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
@@ -67,26 +67,26 @@ private:
|
||||
QLabel* status_selection_label_ = nullptr;
|
||||
QLabel* status_perf_label_ = nullptr;
|
||||
QProgressBar* status_progress_bar_ = nullptr;
|
||||
ifcviewerfull::components::TabBar* ribbon_tabs_ = nullptr;
|
||||
bonsaiviewer::components::TabBar* ribbon_tabs_ = nullptr;
|
||||
QStackedWidget* ribbon_pages_ = nullptr;
|
||||
ifcviewerfull::modules::viewport::ViewportPanel* viewport_widget_ = nullptr;
|
||||
ifcviewerfull::modules::viewport::ViewportView* viewport_view_ = nullptr;
|
||||
ifcviewerfull::SessionState* session_state_ = nullptr;
|
||||
ifcviewerfull::modules::models::ModelsPanel* models_panel_ = nullptr;
|
||||
ifcviewerfull::modules::spatial_hierarchy::SpatialHierarchyPanel* spatial_panel_ = nullptr;
|
||||
bonsaiviewer::modules::viewport::ViewportPanel* viewport_widget_ = nullptr;
|
||||
bonsaiviewer::modules::viewport::ViewportView* viewport_view_ = nullptr;
|
||||
bonsaiviewer::SessionState* session_state_ = nullptr;
|
||||
bonsaiviewer::modules::models::ModelsPanel* models_panel_ = nullptr;
|
||||
bonsaiviewer::modules::spatial_hierarchy::SpatialHierarchyPanel* spatial_panel_ = nullptr;
|
||||
QDockWidget* layers_panel_ = nullptr;
|
||||
ifcviewerfull::modules::properties::PropertiesPanel* properties_panel_ = nullptr;
|
||||
bonsaiviewer::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;
|
||||
ifcviewerfull::modules::models::ModelsPanelView* models_view_ = nullptr;
|
||||
ifcviewerfull::modules::spatial_hierarchy::SpatialHierarchyPanelView* spatial_view_ = nullptr;
|
||||
ifcviewerfull::modules::properties::PropertiesPanelView* properties_view_ = nullptr;
|
||||
bonsaiviewer::modules::models::ModelsPanelView* models_view_ = nullptr;
|
||||
bonsaiviewer::modules::spatial_hierarchy::SpatialHierarchyPanelView* spatial_view_ = nullptr;
|
||||
bonsaiviewer::modules::properties::PropertiesPanelView* properties_view_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::shell
|
||||
} // namespace bonsaiviewer::shell
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "../ifcviewer/Federation.h"
|
||||
#include "../ifcviewer/SceneLoader.h"
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
|
||||
SessionState::SessionState(QObject* parent)
|
||||
: QObject(parent)
|
||||
@@ -183,4 +183,4 @@ void SessionState::notifyProjectReset() {
|
||||
emit projectReset();
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull
|
||||
} // namespace bonsaiviewer
|
||||
@@ -30,7 +30,7 @@ class Federation;
|
||||
class SceneLoader;
|
||||
class ViewportWindow;
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
|
||||
class ElementRegistry;
|
||||
|
||||
@@ -124,6 +124,6 @@ private:
|
||||
QHash<QString, QVariantMap> cloud_metadata_;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull
|
||||
} // namespace bonsaiviewer
|
||||
|
||||
#endif
|
||||
@@ -30,45 +30,45 @@ namespace {
|
||||
constexpr const char* kThemeModeKey = "interface/theme/mode";
|
||||
constexpr const char* kThemeColorPrefix = "interface/theme/colors/";
|
||||
|
||||
using Spec = ifcviewerfull::ViewerSettings::ThemeColorSpec;
|
||||
using Spec = bonsaiviewer::ViewerSettings::ThemeColorSpec;
|
||||
|
||||
const std::vector<Spec> kThemeColorSpecs = {
|
||||
{"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,
|
||||
{"app_background", "App Background", bonsaiviewer::components::style::palette::app_background, "#eef1f5"},
|
||||
{"border", "Border", bonsaiviewer::components::style::palette::border, "#c9d1dc"},
|
||||
{"selection_background", "Selection Background", bonsaiviewer::components::style::palette::selection_background,
|
||||
"#2f9e44"},
|
||||
{"tab_bar_background", "Tab Bar Background", ifcviewerfull::components::style::palette::tab_bar_background,
|
||||
{"tab_bar_background", "Tab Bar Background", bonsaiviewer::components::style::palette::tab_bar_background,
|
||||
"#eef1f5"},
|
||||
{"tab_background", "Tab Background", ifcviewerfull::components::style::palette::tab_background, "#e3e8ef"},
|
||||
{"ribbon_background", "Ribbon Background", ifcviewerfull::components::style::palette::ribbon_background,
|
||||
{"tab_background", "Tab Background", bonsaiviewer::components::style::palette::tab_background, "#e3e8ef"},
|
||||
{"ribbon_background", "Ribbon Background", bonsaiviewer::components::style::palette::ribbon_background,
|
||||
"#e3e8ef"},
|
||||
{"ribbon_button_hover", "Ribbon Button Hover", ifcviewerfull::components::style::palette::ribbon_button_hover,
|
||||
{"ribbon_button_hover", "Ribbon Button Hover", bonsaiviewer::components::style::palette::ribbon_button_hover,
|
||||
"#d6dde7"},
|
||||
{"ribbon_button_pressed", "Ribbon Button Pressed", ifcviewerfull::components::style::palette::ribbon_button_pressed,
|
||||
{"ribbon_button_pressed", "Ribbon Button Pressed", bonsaiviewer::components::style::palette::ribbon_button_pressed,
|
||||
"#cad3df"},
|
||||
{"viewport_shell_background", "Viewport Shell Background",
|
||||
ifcviewerfull::components::style::palette::viewport_shell_background, "#dbe1e8"},
|
||||
{"viewport_background", "Viewport Background", ifcviewerfull::components::style::palette::viewport_background,
|
||||
bonsaiviewer::components::style::palette::viewport_shell_background, "#dbe1e8"},
|
||||
{"viewport_background", "Viewport Background", bonsaiviewer::components::style::palette::viewport_background,
|
||||
"#eef2f6"},
|
||||
{"panel_background", "Panel Background", ifcviewerfull::components::style::palette::panel_background, "#ffffff"},
|
||||
{"control_background", "Control Background", ifcviewerfull::components::style::palette::control_background,
|
||||
{"panel_background", "Panel Background", bonsaiviewer::components::style::palette::panel_background, "#ffffff"},
|
||||
{"control_background", "Control Background", bonsaiviewer::components::style::palette::control_background,
|
||||
"#f5f7fa"},
|
||||
{"control_border_focus", "Control Border Focus", ifcviewerfull::components::style::palette::control_border_focus,
|
||||
{"control_border_focus", "Control Border Focus", bonsaiviewer::components::style::palette::control_border_focus,
|
||||
"#7c8ca3"},
|
||||
{"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,
|
||||
{"box_background", "Box Background", bonsaiviewer::components::style::palette::box_background, "#f5f7fa"},
|
||||
{"scroll_handle", "Scroll Handle", bonsaiviewer::components::style::palette::scroll_handle, "#b1bac8"},
|
||||
{"scroll_handle_hover", "Scroll Handle Hover", bonsaiviewer::components::style::palette::scroll_handle_hover,
|
||||
"#929daf"},
|
||||
{"status_background", "Status Background", ifcviewerfull::components::style::palette::status_background,
|
||||
{"status_background", "Status Background", bonsaiviewer::components::style::palette::status_background,
|
||||
"#edf1f5"},
|
||||
{"section_header_background", "Section Header Background",
|
||||
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"},
|
||||
bonsaiviewer::components::style::palette::section_header_background, "#eef2f6"},
|
||||
{"primary_text", "Primary Text", bonsaiviewer::components::style::palette::primary_text, "#1f2937"},
|
||||
{"secondary_text", "Secondary Text", bonsaiviewer::components::style::palette::secondary_text, "#5b6676"},
|
||||
{"disabled_text", "Disabled Text", bonsaiviewer::components::style::palette::disabled_text, "#8b95a3"},
|
||||
{"warning_text", "Warning Text", bonsaiviewer::components::style::palette::warning_text, "#b26b00"},
|
||||
{"selection_text", "Selection Text", bonsaiviewer::components::style::palette::selection_text, "#ffffff"},
|
||||
{"hover_text", "Hover Text", bonsaiviewer::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,7 +93,7 @@ QString normalizedColor(const QString& value, const QString& fallback) {
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
|
||||
ViewerSettings& ViewerSettings::instance() {
|
||||
static ViewerSettings inst;
|
||||
@@ -186,4 +186,4 @@ void ViewerSettings::persist() const {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull
|
||||
} // namespace bonsaiviewer
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
|
||||
class ViewerSettings : public QObject {
|
||||
Q_OBJECT
|
||||
@@ -67,6 +67,6 @@ private:
|
||||
std::vector<QString> custom_colors_;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull
|
||||
} // namespace bonsaiviewer
|
||||
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::components::buttons {
|
||||
namespace bonsaiviewer::components::buttons {
|
||||
|
||||
QToolButton* makeButton(const QString& text,
|
||||
const QString& icon_path,
|
||||
@@ -74,4 +74,4 @@ QWidget* makeButtonGroup(const QString& title,
|
||||
return group;
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components::buttons
|
||||
} // namespace bonsaiviewer::components::buttons
|
||||
@@ -26,7 +26,7 @@
|
||||
class QToolButton;
|
||||
class QWidget;
|
||||
|
||||
namespace ifcviewerfull::components::buttons {
|
||||
namespace bonsaiviewer::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 ifcviewerfull::components::buttons
|
||||
} // namespace bonsaiviewer::components::buttons
|
||||
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
Dialog::Dialog(QWidget* parent, bool scrollable)
|
||||
: QDialog(parent)
|
||||
@@ -140,4 +140,4 @@ void TabbedDialog::addFooterWidget(QWidget* widget) {
|
||||
footer_layout_->addWidget(widget);
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
@@ -27,7 +27,7 @@ class QVBoxLayout;
|
||||
class QWidget;
|
||||
class QTabWidget;
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
class Dialog : public QDialog {
|
||||
Q_OBJECT
|
||||
@@ -58,6 +58,6 @@ private:
|
||||
QVBoxLayout* footer_layout_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
KeyValueTable::KeyValueTable(const QList<KeyValueTableRow>& rows, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
@@ -69,4 +69,4 @@ KeyValueTable::KeyValueTable(const QList<KeyValueTableRow>& rows, QWidget* paren
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
struct KeyValueTableRow {
|
||||
QString key;
|
||||
@@ -42,6 +42,6 @@ public:
|
||||
explicit KeyValueTable(const QList<KeyValueTableRow>& rows, QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
|
||||
#endif
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -137,4 +137,4 @@ void Panel::clearBodyWidgets() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
@@ -26,7 +26,7 @@
|
||||
class QWidget;
|
||||
class QVBoxLayout;
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
class Panel : public QDockWidget {
|
||||
Q_OBJECT
|
||||
@@ -48,6 +48,6 @@ private:
|
||||
QVBoxLayout* body_layout_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
Section::Section(const QString& title, SectionHeaderMode header_mode, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
@@ -115,4 +115,4 @@ void Section::setBodyExpanding(bool expanding) {
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
@@ -27,7 +27,7 @@ class QHBoxLayout;
|
||||
class QToolButton;
|
||||
class QVBoxLayout;
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
enum class SectionHeaderMode {
|
||||
Visible,
|
||||
@@ -56,6 +56,6 @@ private:
|
||||
bool body_expanding_ = false;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
|
||||
#endif
|
||||
@@ -22,10 +22,10 @@
|
||||
|
||||
#include "../ViewerSettings.h"
|
||||
|
||||
namespace ifcviewerfull::components::style {
|
||||
namespace bonsaiviewer::components::style {
|
||||
|
||||
QString buildAppStyleSheet() {
|
||||
const auto& theme = ifcviewerfull::ViewerSettings::instance();
|
||||
const auto& theme = bonsaiviewer::ViewerSettings::instance();
|
||||
QString stylesheet = QStringLiteral(R"(
|
||||
QMainWindow#appWindow {
|
||||
background: ${app_background};
|
||||
@@ -494,4 +494,4 @@ QString buildAppStyleSheet() {
|
||||
return stylesheet;
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components::style
|
||||
} // namespace bonsaiviewer::components::style
|
||||
@@ -23,22 +23,22 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace ifcviewerfull::components::style::metrics {
|
||||
namespace bonsaiviewer::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 ifcviewerfull::components::style::metrics
|
||||
} // namespace bonsaiviewer::components::style::metrics
|
||||
|
||||
namespace ifcviewerfull::components::style::typography {
|
||||
namespace bonsaiviewer::components::style::typography {
|
||||
|
||||
inline constexpr int small = 10;
|
||||
|
||||
} // namespace ifcviewerfull::components::style::typography
|
||||
} // namespace bonsaiviewer::components::style::typography
|
||||
|
||||
namespace ifcviewerfull::components::style::palette {
|
||||
namespace bonsaiviewer::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 ifcviewerfull::components::style::palette
|
||||
} // namespace bonsaiviewer::components::style::palette
|
||||
|
||||
namespace ifcviewerfull::components::style {
|
||||
namespace bonsaiviewer::components::style {
|
||||
|
||||
QString buildAppStyleSheet();
|
||||
|
||||
} // namespace ifcviewerfull::components::style
|
||||
} // namespace bonsaiviewer::components::style
|
||||
|
||||
#endif
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QRegularExpression>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
namespace ifcviewerfull::components::icons {
|
||||
namespace bonsaiviewer::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 = ifcviewerfull::ViewerSettings::instance();
|
||||
const auto& theme = bonsaiviewer::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 = ifcviewerfull::ViewerSettings::instance();
|
||||
const auto& theme = bonsaiviewer::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, ifcviewerfull::ViewerSettings::instance().color("icon_color"), size);
|
||||
return renderTintedSvgPixmap(icon_path, bonsaiviewer::ViewerSettings::instance().color("icon_color"), size);
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components::icons
|
||||
} // namespace bonsaiviewer::components::icons
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QString>
|
||||
#include <QSize>
|
||||
|
||||
namespace ifcviewerfull::components::icons {
|
||||
namespace bonsaiviewer::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 ifcviewerfull::components::icons
|
||||
} // namespace bonsaiviewer::components::icons
|
||||
|
||||
#endif
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "Tabs.h"
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
TabBar::TabBar(QWidget* parent)
|
||||
: QTabBar(parent)
|
||||
@@ -37,4 +37,4 @@ TabWidget::TabWidget(QWidget* parent)
|
||||
setTabBar(new TabBar(this));
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <QTabBar>
|
||||
#include <QTabWidget>
|
||||
|
||||
namespace ifcviewerfull::components {
|
||||
namespace bonsaiviewer::components {
|
||||
|
||||
class TabBar : public QTabBar {
|
||||
Q_OBJECT
|
||||
@@ -40,6 +40,6 @@ public:
|
||||
explicit TabWidget(QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::components
|
||||
} // namespace bonsaiviewer::components
|
||||
|
||||
#endif
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1005 B After Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 644 B |
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 437 B |
|
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 688 B |
|
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 528 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 426 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 674 B |
|
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 942 B |
|
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 651 B |
|
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
|
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 700 B |
|
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 579 B |
|
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 426 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
|
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
|
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 995 B |
|
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 458 B |
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 1020 B After Width: | Height: | Size: 1020 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 875 B After Width: | Height: | Size: 875 B |
|
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 786 B |
|
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 533 B |
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
|
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
@@ -49,7 +49,7 @@ void installUiFont() {
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
QApplication app(argc, argv);
|
||||
app.setApplicationName("IfcViewer");
|
||||
app.setApplicationName("Bonsai Viewer");
|
||||
app.setOrganizationName("IfcOpenShell");
|
||||
|
||||
QSurfaceFormat fmt;
|
||||
@@ -61,21 +61,21 @@ int main(int argc, char* argv[]) {
|
||||
QSurfaceFormat::setDefaultFormat(fmt);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription("IfcOpenShell IFC viewer");
|
||||
parser.setApplicationDescription("Bonsai Viewer — IfcOpenShell IFC viewer");
|
||||
parser.addHelpOption();
|
||||
parser.process(app);
|
||||
|
||||
installUiFont();
|
||||
const auto applyStyle = [&app]() {
|
||||
app.setStyleSheet(ifcviewerfull::components::style::buildAppStyleSheet());
|
||||
app.setStyleSheet(bonsaiviewer::components::style::buildAppStyleSheet());
|
||||
};
|
||||
applyStyle();
|
||||
QObject::connect(&ifcviewerfull::ViewerSettings::instance(),
|
||||
&ifcviewerfull::ViewerSettings::themeChanged,
|
||||
QObject::connect(&bonsaiviewer::ViewerSettings::instance(),
|
||||
&bonsaiviewer::ViewerSettings::themeChanged,
|
||||
&app,
|
||||
applyStyle);
|
||||
|
||||
ifcviewerfull::shell::MainWindow window;
|
||||
bonsaiviewer::shell::MainWindow window;
|
||||
window.show();
|
||||
return app.exec();
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QSet>
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -85,7 +85,7 @@ QString userConnectorsDir() {
|
||||
// Win -> %APPDATA% (Roaming)
|
||||
// matching CLOUD_SYNC_PROTOCOL.md's listed locations.
|
||||
const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
|
||||
return QDir(base).filePath("IfcOpenShell/IfcViewer/connectors");
|
||||
return QDir(base).filePath("IfcOpenShell/BonsaiViewer/connectors");
|
||||
}
|
||||
|
||||
std::vector<ConnectorManifest> discoverConnectors() {
|
||||
@@ -111,4 +111,4 @@ std::vector<ConnectorManifest> discoverConnectors() {
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
struct ConnectorManifest {
|
||||
QString id; // from connector.json; stable identifier
|
||||
@@ -45,6 +45,6 @@ std::vector<ConnectorManifest> discoverConnectors();
|
||||
// for "open user connectors dir" affordances.
|
||||
QString userConnectorsDir();
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
|
||||
#endif
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
ConnectorPickerDialog::ConnectorPickerDialog(const std::vector<ConnectorManifest>& manifests,
|
||||
const QString& title,
|
||||
@@ -76,4 +76,4 @@ ConnectorPickerDialog::ConnectorPickerDialog(const std::vector<ConnectorManifest
|
||||
addBodyWidget(choices_section);
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
// Connector chooser, modelled on AddModelDialog: one button per available
|
||||
// connector. Always shown (even when only one connector is installed), per
|
||||
@@ -49,6 +49,6 @@ private:
|
||||
QString selected_id_;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
|
||||
#endif
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QStringList>
|
||||
#include <QTimer>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -194,4 +194,4 @@ void ConnectorProcess::failPendingAndClear(int code, const QString& message) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <QString>
|
||||
#include <functional>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
// One running connector subprocess. Owns the QProcess, frames stdio as
|
||||
// newline-delimited JSON-RPC 2.0, and routes responses back to per-call
|
||||
@@ -93,6 +93,6 @@ private:
|
||||
QHash<QString, Pending> pending_;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
ConnectorRegistry::ConnectorRegistry(QObject* parent)
|
||||
: QObject(parent)
|
||||
@@ -106,4 +106,4 @@ void ConnectorRegistry::shutdownAll() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
|
||||
namespace ifcviewerfull::modules::connectors {
|
||||
namespace bonsaiviewer::modules::connectors {
|
||||
|
||||
class ConnectorProcess;
|
||||
|
||||
@@ -69,6 +69,6 @@ private:
|
||||
QString last_error_;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::connectors
|
||||
} // namespace bonsaiviewer::modules::connectors
|
||||
|
||||
#endif
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -157,4 +157,4 @@ void AddModelDialog::setupUi() {
|
||||
addBodyWidget(choices_section);
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "../../components/Dialog.h"
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
enum class SourceMode {
|
||||
None,
|
||||
@@ -48,6 +48,6 @@ private:
|
||||
SourceMode selected_mode_ = SourceMode::None;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
|
||||
#endif
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ifcviewerfull::modules::models::commands {
|
||||
namespace bonsaiviewer::modules::models::commands {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -749,4 +749,4 @@ void openSettings(SessionState& s, QWidget& host) {
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::models::commands
|
||||
} // namespace bonsaiviewer::modules::models::commands
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
class QWidget;
|
||||
class ViewportWindow;
|
||||
namespace ifcviewerfull { class SessionState; }
|
||||
namespace bonsaiviewer { class SessionState; }
|
||||
|
||||
namespace ifcviewerfull::modules::models::commands {
|
||||
namespace bonsaiviewer::modules::models::commands {
|
||||
|
||||
// User-facing commands. Each one is responsible for emitting any notify()
|
||||
// signals exactly once, at the end of its execution.
|
||||
@@ -67,6 +67,6 @@ void loadModels(SessionState& s, const QStringList& paths, const QStringList& fe
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace ifcviewerfull::modules::models::commands
|
||||
} // namespace bonsaiviewer::modules::models::commands
|
||||
|
||||
#endif
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -113,7 +113,7 @@ void FederationItemModel::styleRowVisibility(QStandardItem* name_item, bool visi
|
||||
name_item->setData(QVariant(), Qt::ForegroundRole);
|
||||
if (vis_item) vis_item->setData(QVariant(), Qt::ForegroundRole);
|
||||
} else {
|
||||
const QBrush disabled(QColor(ifcviewerfull::ViewerSettings::instance().color("disabled_text")));
|
||||
const QBrush disabled(QColor(bonsaiviewer::ViewerSettings::instance().color("disabled_text")));
|
||||
name_item->setForeground(disabled);
|
||||
if (vis_item) vis_item->setForeground(disabled);
|
||||
}
|
||||
@@ -271,4 +271,4 @@ void FederationItemModel::onModelGroupChanged(const QString& fed_id, const QStri
|
||||
refreshSubtreeVisibility(taken.first());
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
class Federation;
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
// QStandardItemModel that mirrors the Federation tree (groups + models in
|
||||
// two columns: name + visibility icon). Subscribes directly to Federation's
|
||||
@@ -81,6 +81,6 @@ private:
|
||||
QHash<QString, QStandardItem*> id_to_name_item_; // both group_ids and fed_ids
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
|
||||
#endif
|
||||
@@ -40,11 +40,11 @@
|
||||
#include <QSizePolicy>
|
||||
#include <QTreeView>
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr auto kDragMimeType = "application/x-ifcviewerfull-model-items";
|
||||
constexpr auto kDragMimeType = "application/x-bonsaiviewer-model-items";
|
||||
|
||||
QString idOf(const QModelIndex& index) {
|
||||
return index.sibling(index.row(), 0).data(FederationItemModel::IdRole).toString();
|
||||
@@ -85,7 +85,7 @@ constexpr int kVisibilityColumnWidth = 28;
|
||||
// messages happen the same way as menu-driven moves.
|
||||
class ModelsTreeView : public QTreeView {
|
||||
public:
|
||||
explicit ModelsTreeView(ifcviewerfull::SessionState* session_state, QWidget* parent)
|
||||
explicit ModelsTreeView(bonsaiviewer::SessionState* session_state, QWidget* parent)
|
||||
: QTreeView(parent), session_state_(session_state) {}
|
||||
|
||||
protected:
|
||||
@@ -223,12 +223,12 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
ifcviewerfull::SessionState* session_state_;
|
||||
bonsaiviewer::SessionState* session_state_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
ModelsPanel::ModelsPanel(ifcviewerfull::SessionState* session_state,
|
||||
ModelsPanel::ModelsPanel(bonsaiviewer::SessionState* session_state,
|
||||
ViewportWindow* viewport,
|
||||
QWidget* parent)
|
||||
: components::Panel("Models", nullptr, parent, true)
|
||||
@@ -392,4 +392,4 @@ void ModelsPanel::setModel(FederationItemModel* model) {
|
||||
tree_->expandAll();
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
@@ -27,9 +27,9 @@
|
||||
|
||||
class QTreeView;
|
||||
class ViewportWindow;
|
||||
namespace ifcviewerfull { class SessionState; }
|
||||
namespace bonsaiviewer { class SessionState; }
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
class FederationItemModel;
|
||||
|
||||
@@ -40,7 +40,7 @@ class FederationItemModel;
|
||||
class ModelsPanel : public components::Panel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ModelsPanel(ifcviewerfull::SessionState* session_state,
|
||||
explicit ModelsPanel(bonsaiviewer::SessionState* session_state,
|
||||
ViewportWindow* viewport,
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
void setModel(FederationItemModel* model);
|
||||
|
||||
private:
|
||||
ifcviewerfull::SessionState* session_state_ = nullptr;
|
||||
bonsaiviewer::SessionState* session_state_ = nullptr;
|
||||
ViewportWindow* viewport_ = nullptr;
|
||||
QTreeView* tree_ = nullptr;
|
||||
FederationItemModel* model_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
|
||||
#endif
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <QTableWidgetItem>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -124,7 +124,7 @@ QLabel* makeReadOnlyValue(QWidget* parent) {
|
||||
|
||||
} // namespace
|
||||
|
||||
SettingsDialog::SettingsDialog(ifcviewerfull::SessionState* session_state, QWidget* parent)
|
||||
SettingsDialog::SettingsDialog(bonsaiviewer::SessionState* session_state, QWidget* parent)
|
||||
: components::TabbedDialog(parent)
|
||||
, session_state_(session_state)
|
||||
, federation_(session_state ? session_state->federation() : nullptr)
|
||||
@@ -482,4 +482,4 @@ void SettingsDialog::onAccepted() {
|
||||
accept();
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
@@ -36,18 +36,18 @@ class QShowEvent;
|
||||
class QTableWidget;
|
||||
class QTableWidgetItem;
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
class SessionState;
|
||||
}
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
class SettingsView;
|
||||
|
||||
class SettingsDialog : public components::TabbedDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SettingsDialog(ifcviewerfull::SessionState* session_state, QWidget* parent = nullptr);
|
||||
explicit SettingsDialog(bonsaiviewer::SessionState* session_state, QWidget* parent = nullptr);
|
||||
void renderSelectedModelGeoref(const SelectedModelGeorefState& state);
|
||||
|
||||
protected:
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
void updateSelectedModelGeoref();
|
||||
void onAccepted();
|
||||
|
||||
ifcviewerfull::SessionState* session_state_ = nullptr;
|
||||
bonsaiviewer::SessionState* session_state_ = nullptr;
|
||||
Federation* federation_ = nullptr;
|
||||
SceneLoader* loader_ = nullptr;
|
||||
|
||||
@@ -100,6 +100,6 @@ private:
|
||||
SettingsView* settings_view_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
|
||||
#endif
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -203,7 +203,7 @@ SelectedModelGeorefState stateFromCachedGeoref(const ModelGeoref& georef) {
|
||||
} // namespace
|
||||
|
||||
SettingsView::SettingsView(SettingsDialog* widget,
|
||||
ifcviewerfull::SessionState* session_state)
|
||||
bonsaiviewer::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 ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
@@ -23,26 +23,26 @@
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
namespace ifcviewerfull {
|
||||
namespace bonsaiviewer {
|
||||
class SessionState;
|
||||
}
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
class SettingsDialog;
|
||||
|
||||
class SettingsView {
|
||||
public:
|
||||
explicit SettingsView(SettingsDialog* widget,
|
||||
ifcviewerfull::SessionState* session_state);
|
||||
bonsaiviewer::SessionState* session_state);
|
||||
|
||||
void refresh(const QString& fed_id) const;
|
||||
|
||||
private:
|
||||
SettingsDialog* widget_ = nullptr;
|
||||
ifcviewerfull::SessionState* session_state_ = nullptr;
|
||||
bonsaiviewer::SessionState* session_state_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
enum class ItemKind {
|
||||
Group,
|
||||
@@ -64,6 +64,6 @@ struct SelectedModelGeorefState {
|
||||
QString factor_z;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
|
||||
#endif
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "../../SessionState.h"
|
||||
#include "../../../ifcviewer/Federation.h"
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -53,7 +53,7 @@ QList<GroupOption> validMoveTargets(const Federation& federation,
|
||||
}
|
||||
|
||||
ModelsPanelView::ModelsPanelView(ModelsPanel* widget,
|
||||
ifcviewerfull::SessionState* session_state,
|
||||
bonsaiviewer::SessionState* session_state,
|
||||
QObject* parent)
|
||||
: QObject(parent)
|
||||
, widget_(widget)
|
||||
@@ -67,9 +67,9 @@ ModelsPanelView::ModelsPanelView(ModelsPanel* widget,
|
||||
auto rebuild = [this]() { model_->rebuildAll(); };
|
||||
connect(session_state_, &SessionState::projectReset, this, rebuild);
|
||||
connect(session_state_, &SessionState::projectOpened, this, rebuild);
|
||||
connect(&ifcviewerfull::ViewerSettings::instance(),
|
||||
&ifcviewerfull::ViewerSettings::themeChanged,
|
||||
connect(&bonsaiviewer::ViewerSettings::instance(),
|
||||
&bonsaiviewer::ViewerSettings::themeChanged,
|
||||
this, rebuild);
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
@@ -26,9 +26,9 @@
|
||||
#include <QObject>
|
||||
|
||||
class Federation;
|
||||
namespace ifcviewerfull { class SessionState; }
|
||||
namespace bonsaiviewer { class SessionState; }
|
||||
|
||||
namespace ifcviewerfull::modules::models {
|
||||
namespace bonsaiviewer::modules::models {
|
||||
|
||||
class FederationItemModel;
|
||||
class ModelsPanel;
|
||||
@@ -49,15 +49,15 @@ class ModelsPanelView : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ModelsPanelView(ModelsPanel* widget,
|
||||
ifcviewerfull::SessionState* session_state,
|
||||
bonsaiviewer::SessionState* session_state,
|
||||
QObject* parent = nullptr);
|
||||
|
||||
private:
|
||||
ModelsPanel* widget_ = nullptr;
|
||||
ifcviewerfull::SessionState* session_state_ = nullptr;
|
||||
bonsaiviewer::SessionState* session_state_ = nullptr;
|
||||
FederationItemModel* model_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ifcviewerfull::modules::models
|
||||
} // namespace bonsaiviewer::modules::models
|
||||
|
||||
#endif
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ifcviewerfull::modules::project::commands {
|
||||
namespace bonsaiviewer::modules::project::commands {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -668,4 +668,4 @@ bool saveProjectDialog(SessionState& s, QWidget& host) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace ifcviewerfull::modules::project::commands
|
||||
} // namespace bonsaiviewer::modules::project::commands
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
class QWidget;
|
||||
class ViewportWindow;
|
||||
namespace ifcviewerfull { class SessionState; }
|
||||
namespace bonsaiviewer { class SessionState; }
|
||||
|
||||
namespace ifcviewerfull::modules::project::commands {
|
||||
namespace bonsaiviewer::modules::project::commands {
|
||||
|
||||
// User-facing commands. Each owns its own dialogs and confirmations; each
|
||||
// emits exactly one notify() at the end (projectReset / projectOpened /
|
||||
@@ -58,6 +58,6 @@ bool saveAsCloudProject(SessionState& s, QWidget& host);
|
||||
// Project" ribbon button is wired to.
|
||||
bool saveProjectDialog(SessionState& s, QWidget& host);
|
||||
|
||||
} // namespace ifcviewerfull::modules::project::commands
|
||||
} // namespace bonsaiviewer::modules::project::commands
|
||||
|
||||
#endif
|
||||