yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::ProjectManagementPanel Class Reference

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<absl::Status()>
 
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, bool dirty=false)
 
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)
 
bool IsProjectDirty () const
 
void SetProjectDirty (bool dirty)
 
absl::Status SaveProjectEdits ()
 
void Draw ()
 

Private Member Functions

void DrawProjectOverview ()
 
void DrawStorageLocations ()
 
void DrawRomManagement ()
 
void DrawVersionControl ()
 
void DrawSnapshotHistory ()
 
void DrawQuickActions ()
 
void ReloadProjectBuffers ()
 

Private Attributes

project::YazeProjectproject_ = nullptr
 
core::VersionManagerversion_manager_ = nullptr
 
Romrom_ = nullptr
 
ToastManagertoast_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
 
std::array< char, 256 > name_buffer_ {}
 
std::array< char, 256 > author_buffer_ {}
 
std::array< char, 1024 > description_buffer_ {}
 
std::array< char, 512 > code_buffer_ {}
 
std::array< char, 512 > assets_buffer_ {}
 
std::array< char, 256 > build_buffer_ {}
 
std::array< char, 512 > script_buffer_ {}
 
ProjectWorkflowStatus build_status_
 
ProjectWorkflowStatus run_status_
 
std::string build_log_output_
 

Detailed Description

Panel for managing project settings, ROM versions, and snapshots.

Displayed in the right sidebar when a project is loaded. Features:

  • Project overview (name, ROM file, paths)
  • ROM version management (swap ROMs, reload)
  • Git/snapshot integration for versioning
  • Quick access to project configuration

Definition at line 32 of file project_management_panel.h.

Member Typedef Documentation

◆ SwapRomCallback

Definition at line 45 of file project_management_panel.h.

◆ ReloadRomCallback

Definition at line 46 of file project_management_panel.h.

◆ SaveProjectCallback

using yaze::editor::ProjectManagementPanel::SaveProjectCallback = std::function<absl::Status()>

Definition at line 47 of file project_management_panel.h.

◆ BuildProjectCallback

Definition at line 48 of file project_management_panel.h.

◆ CancelBuildCallback

Definition at line 49 of file project_management_panel.h.

◆ RunProjectCallback

Definition at line 50 of file project_management_panel.h.

◆ BrowseFolderCallback

using yaze::editor::ProjectManagementPanel::BrowseFolderCallback = std::function<void(const std::string& type)>

Definition at line 51 of file project_management_panel.h.

Constructor & Destructor Documentation

◆ ProjectManagementPanel()

yaze::editor::ProjectManagementPanel::ProjectManagementPanel ( )
default

Member Function Documentation

◆ SetProject()

void yaze::editor::ProjectManagementPanel::SetProject ( project::YazeProject * project,
bool dirty = false )

Definition at line 77 of file project_management_panel.cc.

References history_cache_, history_dirty_, project_, project_dirty_, and ReloadProjectBuffers().

Here is the call graph for this function:

◆ SetVersionManager()

void yaze::editor::ProjectManagementPanel::SetVersionManager ( core::VersionManager * manager)
inline

Definition at line 38 of file project_management_panel.h.

References version_manager_.

◆ SetRom()

void yaze::editor::ProjectManagementPanel::SetRom ( Rom * rom)
inline

Definition at line 41 of file project_management_panel.h.

References rom_.

◆ SetToastManager()

void yaze::editor::ProjectManagementPanel::SetToastManager ( ToastManager * manager)
inline

Definition at line 42 of file project_management_panel.h.

References toast_manager_.

◆ SetSwapRomCallback()

void yaze::editor::ProjectManagementPanel::SetSwapRomCallback ( SwapRomCallback cb)
inline

Definition at line 53 of file project_management_panel.h.

References swap_rom_callback_.

◆ SetReloadRomCallback()

void yaze::editor::ProjectManagementPanel::SetReloadRomCallback ( ReloadRomCallback cb)
inline

Definition at line 54 of file project_management_panel.h.

References reload_rom_callback_.

◆ SetSaveProjectCallback()

void yaze::editor::ProjectManagementPanel::SetSaveProjectCallback ( SaveProjectCallback cb)
inline

Definition at line 55 of file project_management_panel.h.

References save_project_callback_.

◆ SetBuildProjectCallback()

void yaze::editor::ProjectManagementPanel::SetBuildProjectCallback ( BuildProjectCallback cb)
inline

Definition at line 58 of file project_management_panel.h.

References build_project_callback_.

◆ SetCancelBuildCallback()

void yaze::editor::ProjectManagementPanel::SetCancelBuildCallback ( CancelBuildCallback cb)
inline

Definition at line 61 of file project_management_panel.h.

References cancel_build_callback_.

◆ SetRunProjectCallback()

void yaze::editor::ProjectManagementPanel::SetRunProjectCallback ( RunProjectCallback cb)
inline

Definition at line 64 of file project_management_panel.h.

References run_project_callback_.

◆ SetBrowseFolderCallback()

void yaze::editor::ProjectManagementPanel::SetBrowseFolderCallback ( BrowseFolderCallback cb)
inline

Definition at line 67 of file project_management_panel.h.

References browse_folder_callback_.

◆ SetBuildStatus()

void yaze::editor::ProjectManagementPanel::SetBuildStatus ( const ProjectWorkflowStatus & status)
inline

◆ SetRunStatus()

void yaze::editor::ProjectManagementPanel::SetRunStatus ( const ProjectWorkflowStatus & status)
inline

◆ SetBuildLogOutput()

void yaze::editor::ProjectManagementPanel::SetBuildLogOutput ( const std::string & output)
inline

Definition at line 76 of file project_management_panel.h.

References build_log_output_.

◆ IsProjectDirty()

bool yaze::editor::ProjectManagementPanel::IsProjectDirty ( ) const
inline

Definition at line 80 of file project_management_panel.h.

References project_dirty_.

◆ SetProjectDirty()

void yaze::editor::ProjectManagementPanel::SetProjectDirty ( bool dirty)
inline

Definition at line 81 of file project_management_panel.h.

References project_dirty_.

◆ SaveProjectEdits()

absl::Status yaze::editor::ProjectManagementPanel::SaveProjectEdits ( )

Definition at line 107 of file project_management_panel.cc.

References project_dirty_, and save_project_callback_.

Referenced by DrawQuickActions().

◆ Draw()

◆ DrawProjectOverview()

◆ DrawStorageLocations()

◆ DrawRomManagement()

◆ DrawVersionControl()

◆ DrawSnapshotHistory()

void yaze::editor::ProjectManagementPanel::DrawSnapshotHistory ( )
private

◆ DrawQuickActions()

◆ ReloadProjectBuffers()

Member Data Documentation

◆ project_

project::YazeProject* yaze::editor::ProjectManagementPanel::project_ = nullptr
private

◆ version_manager_

core::VersionManager* yaze::editor::ProjectManagementPanel::version_manager_ = nullptr
private

◆ rom_

Rom* yaze::editor::ProjectManagementPanel::rom_ = nullptr
private

Definition at line 98 of file project_management_panel.h.

Referenced by DrawRomManagement(), and SetRom().

◆ toast_manager_

ToastManager* yaze::editor::ProjectManagementPanel::toast_manager_ = nullptr
private

◆ swap_rom_callback_

SwapRomCallback yaze::editor::ProjectManagementPanel::swap_rom_callback_
private

Definition at line 102 of file project_management_panel.h.

Referenced by DrawRomManagement(), and SetSwapRomCallback().

◆ reload_rom_callback_

ReloadRomCallback yaze::editor::ProjectManagementPanel::reload_rom_callback_
private

Definition at line 103 of file project_management_panel.h.

Referenced by DrawRomManagement(), and SetReloadRomCallback().

◆ save_project_callback_

SaveProjectCallback yaze::editor::ProjectManagementPanel::save_project_callback_
private

Definition at line 104 of file project_management_panel.h.

Referenced by SaveProjectEdits(), and SetSaveProjectCallback().

◆ build_project_callback_

BuildProjectCallback yaze::editor::ProjectManagementPanel::build_project_callback_
private

Definition at line 105 of file project_management_panel.h.

Referenced by DrawQuickActions(), and SetBuildProjectCallback().

◆ cancel_build_callback_

CancelBuildCallback yaze::editor::ProjectManagementPanel::cancel_build_callback_
private

Definition at line 106 of file project_management_panel.h.

Referenced by DrawQuickActions(), and SetCancelBuildCallback().

◆ run_project_callback_

RunProjectCallback yaze::editor::ProjectManagementPanel::run_project_callback_
private

Definition at line 107 of file project_management_panel.h.

Referenced by DrawQuickActions(), and SetRunProjectCallback().

◆ browse_folder_callback_

BrowseFolderCallback yaze::editor::ProjectManagementPanel::browse_folder_callback_
private

Definition at line 108 of file project_management_panel.h.

Referenced by DrawQuickActions(), and SetBrowseFolderCallback().

◆ snapshot_message_

char yaze::editor::ProjectManagementPanel::snapshot_message_[256] = {}
private

Definition at line 111 of file project_management_panel.h.

Referenced by DrawVersionControl().

◆ show_snapshot_dialog_

bool yaze::editor::ProjectManagementPanel::show_snapshot_dialog_ = false
private

Definition at line 112 of file project_management_panel.h.

◆ history_cache_

std::vector<std::string> yaze::editor::ProjectManagementPanel::history_cache_
private

Definition at line 115 of file project_management_panel.h.

Referenced by DrawSnapshotHistory(), and SetProject().

◆ history_dirty_

bool yaze::editor::ProjectManagementPanel::history_dirty_ = true
private

Definition at line 116 of file project_management_panel.h.

Referenced by DrawSnapshotHistory(), DrawVersionControl(), and SetProject().

◆ project_dirty_

bool yaze::editor::ProjectManagementPanel::project_dirty_ = false
private

◆ name_buffer_

std::array<char, 256> yaze::editor::ProjectManagementPanel::name_buffer_ {}
private

Definition at line 120 of file project_management_panel.h.

Referenced by DrawProjectOverview(), and ReloadProjectBuffers().

◆ author_buffer_

std::array<char, 256> yaze::editor::ProjectManagementPanel::author_buffer_ {}
private

Definition at line 121 of file project_management_panel.h.

Referenced by DrawProjectOverview(), and ReloadProjectBuffers().

◆ description_buffer_

std::array<char, 1024> yaze::editor::ProjectManagementPanel::description_buffer_ {}
private

Definition at line 122 of file project_management_panel.h.

Referenced by DrawProjectOverview(), and ReloadProjectBuffers().

◆ code_buffer_

std::array<char, 512> yaze::editor::ProjectManagementPanel::code_buffer_ {}
private

Definition at line 123 of file project_management_panel.h.

Referenced by DrawQuickActions(), and ReloadProjectBuffers().

◆ assets_buffer_

std::array<char, 512> yaze::editor::ProjectManagementPanel::assets_buffer_ {}
private

Definition at line 124 of file project_management_panel.h.

Referenced by DrawQuickActions(), and ReloadProjectBuffers().

◆ build_buffer_

std::array<char, 256> yaze::editor::ProjectManagementPanel::build_buffer_ {}
private

Definition at line 125 of file project_management_panel.h.

Referenced by DrawQuickActions(), and ReloadProjectBuffers().

◆ script_buffer_

std::array<char, 512> yaze::editor::ProjectManagementPanel::script_buffer_ {}
private

Definition at line 126 of file project_management_panel.h.

Referenced by DrawQuickActions(), and ReloadProjectBuffers().

◆ build_status_

ProjectWorkflowStatus yaze::editor::ProjectManagementPanel::build_status_
private

Definition at line 128 of file project_management_panel.h.

Referenced by DrawQuickActions(), and SetBuildStatus().

◆ run_status_

ProjectWorkflowStatus yaze::editor::ProjectManagementPanel::run_status_
private

Definition at line 129 of file project_management_panel.h.

Referenced by DrawQuickActions(), and SetRunStatus().

◆ build_log_output_

std::string yaze::editor::ProjectManagementPanel::build_log_output_
private

Definition at line 130 of file project_management_panel.h.

Referenced by DrawQuickActions(), and SetBuildLogOutput().


The documentation for this class was generated from the following files: