2026-05-20 09:15:03 +10:00
|
|
|
// This file was generated with the assistance of an AI coding tool.
|
|
|
|
|
/********************************************************************************
|
|
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* This file is part of Bonsai. *
|
2026-05-20 09:15:03 +10:00
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* Bonsai is free software: you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
2026-05-20 09:15:03 +10:00
|
|
|
* the Free Software Foundation, either version 3.0 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* Bonsai is distributed in the hope that it will be useful, *
|
2026-05-20 09:15:03 +10:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
2026-07-03 09:39:27 +10:00
|
|
|
* GNU General Public License for more details. *
|
2026-05-20 09:15:03 +10:00
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* You should have received a copy of the GNU General Public License *
|
2026-05-20 09:15:03 +10:00
|
|
|
* 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"
|
|
|
|
|
|
2026-05-20 09:38:10 +10:00
|
|
|
namespace bonsaiviewer::modules::project {
|
2026-05-20 09:15:03 +10:00
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-20 09:38:10 +10:00
|
|
|
} // namespace bonsaiviewer::modules::project
|
2026-05-20 09:15:03 +10:00
|
|
|
|
|
|
|
|
#endif
|