ifcviewer-full: add .ifcfed federation save/load

Federation (JSON) tracks an ordered list of model sources plus an
optional home-view camera state. Sources are stored relative when
under the federation file's directory, absolute otherwise.

File menu now exposes New / Open / Save / Save As; Add Files moves
to Ctrl+Shift+O. View menu gains Set/Go to Home View. Window title
binds to dirty state via setWindowModified, and the close-window
prompt offers Save/Discard/Cancel.

Per-model transform (4x4 column-major) and visible round-trip
through load/save but are not yet applied at the viewport — the
georeferencing work uses them.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-04-27 18:31:59 +10:00
parent 81a7c5b50e
commit 7bc64bef1a
7 changed files with 669 additions and 8 deletions
+4
View File
@@ -1186,6 +1186,10 @@ QString ViewportWindow::cameraString() const {
.arg(camera_pitch_, 0, 'f', 2);
}
ViewportWindow::CameraState ViewportWindow::cameraState() const {
return { camera_target_, camera_distance_, camera_yaw_, camera_pitch_ };
}
void ViewportWindow::keyPressEvent(QKeyEvent* event) {
const int key = event->key();