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.
This commit is contained in:
Dion Moult
2026-05-15 07:22:31 +10:00
parent 4a91e6a87d
commit 6901533368
60 changed files with 293 additions and 293 deletions
@@ -31,7 +31,7 @@
#include <QToolButton>
#include <QVBoxLayout>
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
@@ -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
@@ -41,11 +41,11 @@
#include <Eigen/Dense>
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
@@ -27,11 +27,11 @@
#include <QStringList>
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
+5 -5
View File
@@ -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 <functional>
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
+2 -2
View File
@@ -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
@@ -46,7 +46,7 @@
#include <QTableWidgetItem>
#include <QVBoxLayout>
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
@@ -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
@@ -29,7 +29,7 @@
#include <cmath>
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
@@ -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
+2 -2
View File
@@ -24,7 +24,7 @@
#include <QList>
#include <QString>
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
+11 -11
View File
@@ -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
+5 -5
View File
@@ -25,9 +25,9 @@
#include <QObject>
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
@@ -32,15 +32,15 @@
#include <QFileInfo>
#include <QMessageBox>
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
+14 -14
View File
@@ -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
+16 -16
View File
@@ -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<ifcinterface::components::KeyValueTableRow> rows;
QList<ifcviewerfull::components::KeyValueTableRow> 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<ifcinterface::modules::properties::KeyValueRow>& rows, QWidget* parent = nullptr) {
QList<ifcinterface::components::KeyValueTableRow> table_rows;
QWidget* makeAttributeList(const QList<ifcviewerfull::modules::properties::KeyValueRow>& rows, QWidget* parent = nullptr) {
QList<ifcviewerfull::components::KeyValueTableRow> 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<ifcinterface::modules::properties::RelationshipRow>& rows, QWidget* parent = nullptr) {
QList<ifcinterface::components::KeyValueTableRow> table_rows;
QWidget* makeRelationshipList(const QList<ifcviewerfull::modules::properties::RelationshipRow>& rows, QWidget* parent = nullptr) {
QList<ifcviewerfull::components::KeyValueTableRow> table_rows;
for (const auto& row_data : rows) {
table_rows.append({row_data.key,
row_data.value,
@@ -68,22 +68,22 @@ QWidget* makeRelationshipList(const QList<ifcinterface::modules::properties::Rel
"keyValueTrailingIconLabel",
72});
}
return new ifcinterface::components::KeyValueTable(table_rows, parent);
return new ifcviewerfull::components::KeyValueTable(table_rows, parent);
}
QWidget* makeFilterWrapper(QLineEdit** field_out, QWidget* parent = nullptr) {
auto* wrapper = new QWidget(parent);
wrapper->setObjectName("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
@@ -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
@@ -25,7 +25,7 @@
#include <QPair>
#include <QString>
namespace ifcinterface::modules::properties {
namespace ifcviewerfull::modules::properties {
struct KeyValueRow {
QString key;
@@ -55,6 +55,6 @@ struct PropertiesPanelState {
QList<PropertySet> quantity_sets;
};
} // namespace ifcinterface::modules::properties
} // namespace ifcviewerfull::modules::properties
#endif
@@ -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
+5 -5
View File
@@ -25,8 +25,8 @@
#include <QObject>
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
+12 -12
View File
@@ -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 <QSpinBox>
#include <QVBoxLayout>
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<int>(ifcinterface::InterfaceSettings::ThemeMode::Dark));
theme_mode_combo_->addItem("Light", static_cast<int>(ifcinterface::InterfaceSettings::ThemeMode::Light));
theme_mode_combo_->addItem("Custom", static_cast<int>(ifcinterface::InterfaceSettings::ThemeMode::Custom));
theme_mode_combo_->addItem("Dark", static_cast<int>(ifcviewerfull::ViewerSettings::ThemeMode::Dark));
theme_mode_combo_->addItem("Light", static_cast<int>(ifcviewerfull::ViewerSettings::ThemeMode::Light));
theme_mode_combo_->addItem("Custom", static_cast<int>(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<int>(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<ifcinterface::InterfaceSettings::ThemeMode>(theme_mode_combo_->currentData().toInt());
const bool is_custom = mode == ifcinterface::InterfaceSettings::ThemeMode::Custom;
static_cast<ifcviewerfull::ViewerSettings::ThemeMode>(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<AppSettings::NavPreset>(nav_preset_combo_->currentIndex()));
auto& interface_settings = ifcinterface::InterfaceSettings::instance();
auto& interface_settings = ifcviewerfull::ViewerSettings::instance();
interface_settings.setThemeMode(
static_cast<ifcinterface::InterfaceSettings::ThemeMode>(theme_mode_combo_->currentData().toInt()));
static_cast<ifcviewerfull::ViewerSettings::ThemeMode>(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
+2 -2
View File
@@ -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<ThemeColorEditor> theme_color_editors_;
};
} // namespace ifcinterface::modules::settings
} // namespace ifcviewerfull::modules::settings
#endif
@@ -27,7 +27,7 @@
#include <QTreeWidget>
#include <QTreeWidgetItem>
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
@@ -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
@@ -25,7 +25,7 @@
#include <QString>
#include <QStringList>
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
@@ -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<TreeNode>& 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
@@ -25,8 +25,8 @@
#include <QObject>
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<TreeNode> nodes_;
};
} // namespace ifcinterface::modules::spatial_hierarchy
} // namespace ifcviewerfull::modules::spatial_hierarchy
#endif
+2 -2
View File
@@ -25,7 +25,7 @@
#include <QLabel>
#include <QVBoxLayout>
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
+2 -2
View File
@@ -23,7 +23,7 @@
#include <QWidget>
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
@@ -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 <vector>
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
@@ -24,18 +24,18 @@
#include <QObject>
#include <memory>
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<AreaMeasurement> area_measurement_;
std::unique_ptr<LengthMeasurement> length_measurement_;
};
} // namespace ifcinterface::modules::viewport
} // namespace ifcviewerfull::modules::viewport
#endif
@@ -26,7 +26,7 @@
#include <QVBoxLayout>
#include <QWidget>
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
+2 -2
View File
@@ -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