Panel for managing project settings, ROM versions, and snapshots. More...
#include <project_management_panel.h>
Public Types | |
| using | SwapRomCallback = std::function<void()> |
| using | ReloadRomCallback = std::function<void()> |
| using | SaveProjectCallback = std::function<void()> |
| using | BuildProjectCallback = std::function<void()> |
| using | CancelBuildCallback = std::function<void()> |
| using | RunProjectCallback = std::function<void()> |
| using | BrowseFolderCallback = std::function<void(const std::string& type)> |
Public Member Functions | |
| ProjectManagementPanel ()=default | |
| void | SetProject (project::YazeProject *project) |
| void | SetVersionManager (core::VersionManager *manager) |
| void | SetRom (Rom *rom) |
| void | SetToastManager (ToastManager *manager) |
| void | SetSwapRomCallback (SwapRomCallback cb) |
| void | SetReloadRomCallback (ReloadRomCallback cb) |
| void | SetSaveProjectCallback (SaveProjectCallback cb) |
| void | SetBuildProjectCallback (BuildProjectCallback cb) |
| void | SetCancelBuildCallback (CancelBuildCallback cb) |
| void | SetRunProjectCallback (RunProjectCallback cb) |
| void | SetBrowseFolderCallback (BrowseFolderCallback cb) |
| void | SetBuildStatus (const ProjectWorkflowStatus &status) |
| void | SetRunStatus (const ProjectWorkflowStatus &status) |
| void | SetBuildLogOutput (const std::string &output) |
| void | Draw () |
Private Member Functions | |
| void | DrawProjectOverview () |
| void | DrawStorageLocations () |
| void | DrawRomManagement () |
| void | DrawVersionControl () |
| void | DrawSnapshotHistory () |
| void | DrawQuickActions () |
Private Attributes | |
| project::YazeProject * | project_ = nullptr |
| core::VersionManager * | version_manager_ = nullptr |
| Rom * | rom_ = nullptr |
| ToastManager * | toast_manager_ = nullptr |
| SwapRomCallback | swap_rom_callback_ |
| ReloadRomCallback | reload_rom_callback_ |
| SaveProjectCallback | save_project_callback_ |
| BuildProjectCallback | build_project_callback_ |
| CancelBuildCallback | cancel_build_callback_ |
| RunProjectCallback | run_project_callback_ |
| BrowseFolderCallback | browse_folder_callback_ |
| char | snapshot_message_ [256] = {} |
| bool | show_snapshot_dialog_ = false |
| std::vector< std::string > | history_cache_ |
| bool | history_dirty_ = true |
| bool | project_dirty_ = false |
| ProjectWorkflowStatus | build_status_ |
| ProjectWorkflowStatus | run_status_ |
| std::string | build_log_output_ |
Panel for managing project settings, ROM versions, and snapshots.
Displayed in the right sidebar when a project is loaded. Features:
Definition at line 30 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::SwapRomCallback = std::function<void()> |
Definition at line 43 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::ReloadRomCallback = std::function<void()> |
Definition at line 44 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::SaveProjectCallback = std::function<void()> |
Definition at line 45 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::BuildProjectCallback = std::function<void()> |
Definition at line 46 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::CancelBuildCallback = std::function<void()> |
Definition at line 47 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::RunProjectCallback = std::function<void()> |
Definition at line 48 of file project_management_panel.h.
| using yaze::editor::ProjectManagementPanel::BrowseFolderCallback = std::function<void(const std::string& type)> |
Definition at line 49 of file project_management_panel.h.
|
default |
|
inline |
Definition at line 35 of file project_management_panel.h.
References project_.
|
inline |
Definition at line 36 of file project_management_panel.h.
References version_manager_.
|
inline |
Definition at line 39 of file project_management_panel.h.
References rom_.
|
inline |
Definition at line 40 of file project_management_panel.h.
References toast_manager_.
|
inline |
Definition at line 51 of file project_management_panel.h.
References swap_rom_callback_.
|
inline |
Definition at line 52 of file project_management_panel.h.
References reload_rom_callback_.
|
inline |
Definition at line 53 of file project_management_panel.h.
References save_project_callback_.
|
inline |
Definition at line 56 of file project_management_panel.h.
References build_project_callback_.
|
inline |
Definition at line 59 of file project_management_panel.h.
References cancel_build_callback_.
|
inline |
Definition at line 62 of file project_management_panel.h.
References run_project_callback_.
|
inline |
Definition at line 65 of file project_management_panel.h.
References browse_folder_callback_.
|
inline |
Definition at line 68 of file project_management_panel.h.
References build_status_.
Referenced by yaze::editor::anonymous_namespace{editor_manager.cc}::UpdateBuildWorkflowStatus().
|
inline |
Definition at line 71 of file project_management_panel.h.
References run_status_.
Referenced by yaze::editor::anonymous_namespace{editor_manager.cc}::UpdateRunWorkflowStatus().
|
inline |
Definition at line 74 of file project_management_panel.h.
References build_log_output_.
| void yaze::editor::ProjectManagementPanel::Draw | ( | ) |
Definition at line 67 of file project_management_panel.cc.
References DrawProjectOverview(), DrawQuickActions(), DrawRomManagement(), DrawStorageLocations(), DrawVersionControl(), and project_.
Referenced by yaze::editor::RightDrawerManager::DrawProjectPanel().
|
private |
Definition at line 88 of file project_management_panel.cc.
References yaze::project::ProjectMetadata::author, yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::project::ProjectMetadata::description, yaze::project::YazeProject::filepath, yaze::project::YazeProject::format, yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_FOLDER_SPECIAL, yaze::editor::kInfo, yaze::project::kYazeNative, yaze::project::YazeProject::metadata, yaze::project::YazeProject::name, project_, project_dirty_, yaze::editor::ToastManager::Show(), toast_manager_, yaze::project::ProjectMetadata::yaze_version, and YAZE_VERSION_STRING.
Referenced by Draw().
|
private |
Definition at line 181 of file project_management_panel.cc.
References yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), yaze::util::PlatformPaths::GetAppDataDirectory(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::util::PlatformPaths::GetTempDirectory(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_STORAGE, yaze::editor::kInfo, yaze::util::PlatformPaths::NormalizePathForDisplay(), yaze::editor::ToastManager::Show(), and toast_manager_.
Referenced by Draw().
|
private |
Definition at line 243 of file project_management_panel.cc.
References yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::Rom::dirty(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_MEMORY, ICON_MD_REFRESH, ICON_MD_SWAP_HORIZ, ICON_MD_WARNING, yaze::Rom::is_loaded(), project_, reload_rom_callback_, rom_, yaze::project::YazeProject::rom_filename, yaze::Rom::size(), swap_rom_callback_, and yaze::Rom::title().
Referenced by Draw().
|
private |
Definition at line 311 of file project_management_panel.cc.
References yaze::gui::ColoredTextF(), yaze::core::VersionManager::CreateSnapshot(), DrawSnapshotHistory(), yaze::core::VersionManager::GetCurrentHash(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), history_dirty_, ICON_MD_ADD, ICON_MD_CAMERA_ALT, ICON_MD_HISTORY, yaze::core::VersionManager::InitializeGit(), yaze::core::VersionManager::IsGitInitialized(), yaze::editor::kError, yaze::editor::kSuccess, yaze::editor::ToastManager::Show(), snapshot_message_, toast_manager_, and version_manager_.
Referenced by Draw().
|
private |
Definition at line 394 of file project_management_panel.cc.
References yaze::gui::ColoredText(), yaze::core::VersionManager::GetHistory(), yaze::gui::GetTextSecondaryVec4(), history_cache_, history_dirty_, ICON_MD_LIST, yaze::core::VersionManager::IsGitInitialized(), and version_manager_.
Referenced by DrawVersionControl().

|
private |
Definition at line 427 of file project_management_panel.cc.
References yaze::project::YazeProject::assets_folder, browse_folder_callback_, build_log_output_, build_project_callback_, yaze::project::YazeProject::build_script, build_status_, yaze::project::YazeProject::build_target, cancel_build_callback_, yaze::project::YazeProject::code_folder, yaze::gui::ColoredTextF(), yaze::gui::ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetPrimaryVec4(), yaze::gui::GetTextSecondaryVec4(), ICON_MD_BOLT, ICON_MD_BUILD, ICON_MD_CANCEL, ICON_MD_EDIT, ICON_MD_FOLDER_OPEN, ICON_MD_PLAY_ARROW, ICON_MD_ROUTE, ICON_MD_SAVE, yaze::editor::kRunning, project_, project_dirty_, run_project_callback_, run_status_, save_project_callback_, yaze::editor::ProjectWorkflowStatus::state, and yaze::editor::ProjectWorkflowStatus::visible.
Referenced by Draw().
|
private |
Definition at line 89 of file project_management_panel.h.
Referenced by Draw(), DrawProjectOverview(), DrawQuickActions(), DrawRomManagement(), and SetProject().
|
private |
Definition at line 90 of file project_management_panel.h.
Referenced by DrawSnapshotHistory(), DrawVersionControl(), and SetVersionManager().
|
private |
Definition at line 91 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetRom().
|
private |
Definition at line 92 of file project_management_panel.h.
Referenced by DrawProjectOverview(), DrawStorageLocations(), DrawVersionControl(), and SetToastManager().
|
private |
Definition at line 95 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetSwapRomCallback().
|
private |
Definition at line 96 of file project_management_panel.h.
Referenced by DrawRomManagement(), and SetReloadRomCallback().
|
private |
Definition at line 97 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetSaveProjectCallback().
|
private |
Definition at line 98 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBuildProjectCallback().
|
private |
Definition at line 99 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetCancelBuildCallback().
|
private |
Definition at line 100 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetRunProjectCallback().
|
private |
Definition at line 101 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBrowseFolderCallback().
|
private |
Definition at line 104 of file project_management_panel.h.
Referenced by DrawVersionControl().
|
private |
Definition at line 105 of file project_management_panel.h.
|
private |
Definition at line 108 of file project_management_panel.h.
Referenced by DrawSnapshotHistory().
|
private |
Definition at line 109 of file project_management_panel.h.
Referenced by DrawSnapshotHistory(), and DrawVersionControl().
|
private |
Definition at line 112 of file project_management_panel.h.
Referenced by DrawProjectOverview(), and DrawQuickActions().
|
private |
Definition at line 114 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBuildStatus().
|
private |
Definition at line 115 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetRunStatus().
|
private |
Definition at line 116 of file project_management_panel.h.
Referenced by DrawQuickActions(), and SetBuildLogOutput().