Wire IfcViewer to cloud sync connectors

Implements the viewer side of CLOUD_SYNC_PROTOCOL.md: connector
discovery, JSON-RPC stdio host, and Open/Save/Sync/Add cloud workflows
wired through the ribbon, Models panel right-click, and Settings tab.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-05-20 09:15:03 +10:00
parent 95c62cc70e
commit 486b858d56
28 changed files with 2153 additions and 67 deletions
@@ -0,0 +1,54 @@
// This file was generated with the assistance of an AI coding tool.
/********************************************************************************
* *
* This file is part of IfcOpenShell. *
* *
* IfcOpenShell is free software: you can redistribute it and/or modify *
* it under the terms of the Lesser GNU General Public License as published by *
* the Free Software Foundation, either version 3.0 of the License, or *
* (at your option) any later version. *
* *
* IfcOpenShell is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Lesser GNU General Public License for more details. *
* *
* You should have received a copy of the Lesser GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
#ifndef IFCINTERFACE_MODULES_PROJECT_SAVEPROJECTDIALOG_H
#define IFCINTERFACE_MODULES_PROJECT_SAVEPROJECTDIALOG_H
#include "../../components/Dialog.h"
namespace ifcviewerfull::modules::project {
enum class SaveTarget {
None,
Local, // saveProject: write to current file_path_ (or fall through to LocalAs)
LocalAs, // saveProjectAs: pick file with QFileDialog
Cloud, // saveCloudProject: push_ifcfed using existing manifest
CloudAs, // saveAsCloudProject: connector picker + push_ifcfed_interactive
};
// "Save Project" dispatch dialog, modelled on AddModelDialog. Always shows
// all four buttons; "Save to Cloud" is disabled when the project has no
// .ifcfed.manifest (there is no cloud target to push to).
class SaveProjectDialog : public components::Dialog {
Q_OBJECT
public:
explicit SaveProjectDialog(bool has_manifest, QWidget* parent = nullptr);
SaveTarget selectedTarget() const { return selected_target_; }
private:
void setupUi(bool has_manifest);
SaveTarget selected_target_ = SaveTarget::None;
};
} // namespace ifcviewerfull::modules::project
#endif