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

ImGui panel for collaboration features. More...

#include <collaboration_panel.h>

Collaboration diagram for yaze::gui::CollaborationPanel:

Public Member Functions

 CollaborationPanel ()
 
 ~CollaborationPanel ()
 
void Initialize (Rom *rom, net::RomVersionManager *version_mgr, net::ProposalApprovalManager *approval_mgr)
 
void Render (bool *p_open=nullptr)
 
void AddRomSync (const RomSyncEntry &entry)
 
void AddSnapshot (const SnapshotEntry &entry)
 
void AddProposal (const ProposalEntry &entry)
 
void UpdateProposalStatus (const std::string &proposal_id, const std::string &status)
 
void Clear ()
 
ProposalEntryGetProposal (const std::string &proposal_id)
 

Private Member Functions

void RenderRomSyncTab ()
 
void RenderSnapshotsTab ()
 
void RenderProposalsTab ()
 
void RenderVersionHistoryTab ()
 
void RenderApprovalTab ()
 
void RenderRomSyncEntry (const RomSyncEntry &entry, int index)
 
void RenderSnapshotEntry (const SnapshotEntry &entry, int index)
 
void RenderProposalEntry (const ProposalEntry &entry, int index)
 
void RenderVersionSnapshot (const net::RomSnapshot &snapshot, int index)
 
void RenderApprovalProposal (const net::ProposalApprovalManager::ApprovalStatus &status, int index)
 
std::string FormatTimestamp (int64_t timestamp)
 
std::string FormatFileSize (size_t bytes)
 
const char * GetProposalStatusIcon (const std::string &status)
 
ImVec4 GetProposalStatusColor (const std::string &status)
 

Private Attributes

Romrom_
 
net::RomVersionManagerversion_mgr_
 
net::ProposalApprovalManagerapproval_mgr_
 
int selected_tab_
 
std::vector< RomSyncEntryrom_syncs_
 
std::vector< SnapshotEntrysnapshots_
 
std::vector< ProposalEntryproposals_
 
int selected_rom_sync_
 
int selected_snapshot_
 
int selected_proposal_
 
bool show_sync_details_
 
bool show_snapshot_preview_
 
bool auto_scroll_
 
char search_filter_ [256]
 
bool filter_pending_only_
 
struct { 
 
   ImVec4   sync_applied 
 
   ImVec4   sync_pending 
 
   ImVec4   sync_error 
 
   ImVec4   proposal_pending 
 
   ImVec4   proposal_approved 
 
   ImVec4   proposal_rejected 
 
   ImVec4   proposal_applied 
 
colors_ 
 

Detailed Description

ImGui panel for collaboration features.

Displays:

  • ROM sync history and status
  • Shared snapshots gallery
  • Proposal management and voting

Definition at line 80 of file collaboration_panel.h.

Constructor & Destructor Documentation

◆ CollaborationPanel()

yaze::gui::CollaborationPanel::CollaborationPanel ( )

Definition at line 14 of file collaboration_panel.cc.

References colors_, and search_filter_.

◆ ~CollaborationPanel()

yaze::gui::CollaborationPanel::~CollaborationPanel ( )

Definition at line 40 of file collaboration_panel.cc.

References snapshots_.

Member Function Documentation

◆ Initialize()

void yaze::gui::CollaborationPanel::Initialize ( Rom rom,
net::RomVersionManager version_mgr,
net::ProposalApprovalManager approval_mgr 
)

Initialize with ROM and version manager

Definition at line 51 of file collaboration_panel.cc.

References approval_mgr_, rom_, and version_mgr_.

◆ Render()

void yaze::gui::CollaborationPanel::Render ( bool *  p_open = nullptr)

◆ AddRomSync()

void yaze::gui::CollaborationPanel::AddRomSync ( const RomSyncEntry entry)

Add a ROM sync event

Definition at line 391 of file collaboration_panel.cc.

References rom_syncs_.

◆ AddSnapshot()

void yaze::gui::CollaborationPanel::AddSnapshot ( const SnapshotEntry entry)

Add a snapshot

Definition at line 395 of file collaboration_panel.cc.

References snapshots_.

◆ AddProposal()

void yaze::gui::CollaborationPanel::AddProposal ( const ProposalEntry entry)

Add a proposal

Definition at line 399 of file collaboration_panel.cc.

References proposals_.

◆ UpdateProposalStatus()

void yaze::gui::CollaborationPanel::UpdateProposalStatus ( const std::string &  proposal_id,
const std::string &  status 
)

Update proposal status

Definition at line 403 of file collaboration_panel.cc.

References proposals_.

◆ Clear()

void yaze::gui::CollaborationPanel::Clear ( )

Clear all collaboration data

Definition at line 412 of file collaboration_panel.cc.

References proposals_, rom_syncs_, and snapshots_.

◆ GetProposal()

ProposalEntry * yaze::gui::CollaborationPanel::GetProposal ( const std::string &  proposal_id)

Get proposal by ID

Definition at line 418 of file collaboration_panel.cc.

References proposals_.

◆ RenderRomSyncTab()

void yaze::gui::CollaborationPanel::RenderRomSyncTab ( )
private

Definition at line 104 of file collaboration_panel.cc.

References auto_scroll_, colors_, RenderRomSyncEntry(), rom_syncs_, and show_sync_details_.

Referenced by Render().

Here is the call graph for this function:

◆ RenderSnapshotsTab()

void yaze::gui::CollaborationPanel::RenderSnapshotsTab ( )
private

Definition at line 153 of file collaboration_panel.cc.

References RenderSnapshotEntry(), search_filter_, show_snapshot_preview_, and snapshots_.

Referenced by Render().

Here is the call graph for this function:

◆ RenderProposalsTab()

void yaze::gui::CollaborationPanel::RenderProposalsTab ( )
private

Definition at line 201 of file collaboration_panel.cc.

References colors_, filter_pending_only_, proposals_, RenderProposalEntry(), and search_filter_.

Referenced by Render().

Here is the call graph for this function:

◆ RenderVersionHistoryTab()

void yaze::gui::CollaborationPanel::RenderVersionHistoryTab ( )
private

◆ RenderApprovalTab()

void yaze::gui::CollaborationPanel::RenderApprovalTab ( )
private

Definition at line 520 of file collaboration_panel.cc.

References approval_mgr_, yaze::net::ProposalApprovalManager::GetPendingProposals(), and RenderApprovalProposal().

Referenced by Render().

Here is the call graph for this function:

◆ RenderRomSyncEntry()

void yaze::gui::CollaborationPanel::RenderRomSyncEntry ( const RomSyncEntry entry,
int  index 
)
private

◆ RenderSnapshotEntry()

void yaze::gui::CollaborationPanel::RenderSnapshotEntry ( const SnapshotEntry entry,
int  index 
)
private

◆ RenderProposalEntry()

void yaze::gui::CollaborationPanel::RenderProposalEntry ( const ProposalEntry entry,
int  index 
)
private

◆ RenderVersionSnapshot()

◆ RenderApprovalProposal()

◆ FormatTimestamp()

std::string yaze::gui::CollaborationPanel::FormatTimestamp ( int64_t  timestamp)
private

◆ FormatFileSize()

std::string yaze::gui::CollaborationPanel::FormatFileSize ( size_t  bytes)
private

◆ GetProposalStatusIcon()

const char * yaze::gui::CollaborationPanel::GetProposalStatusIcon ( const std::string &  status)
private

Definition at line 451 of file collaboration_panel.cc.

Referenced by RenderProposalEntry().

◆ GetProposalStatusColor()

ImVec4 yaze::gui::CollaborationPanel::GetProposalStatusColor ( const std::string &  status)
private

Definition at line 459 of file collaboration_panel.cc.

References colors_.

Referenced by RenderProposalEntry().

Member Data Documentation

◆ rom_

Rom* yaze::gui::CollaborationPanel::rom_
private

Definition at line 140 of file collaboration_panel.h.

Referenced by Initialize().

◆ version_mgr_

net::RomVersionManager* yaze::gui::CollaborationPanel::version_mgr_
private

◆ approval_mgr_

net::ProposalApprovalManager* yaze::gui::CollaborationPanel::approval_mgr_
private

Definition at line 142 of file collaboration_panel.h.

Referenced by Initialize(), and RenderApprovalTab().

◆ selected_tab_

int yaze::gui::CollaborationPanel::selected_tab_
private

Definition at line 145 of file collaboration_panel.h.

Referenced by Render().

◆ rom_syncs_

std::vector<RomSyncEntry> yaze::gui::CollaborationPanel::rom_syncs_
private

Definition at line 148 of file collaboration_panel.h.

Referenced by AddRomSync(), Clear(), and RenderRomSyncTab().

◆ snapshots_

std::vector<SnapshotEntry> yaze::gui::CollaborationPanel::snapshots_
private

Definition at line 149 of file collaboration_panel.h.

Referenced by AddSnapshot(), Clear(), RenderSnapshotsTab(), and ~CollaborationPanel().

◆ proposals_

std::vector<ProposalEntry> yaze::gui::CollaborationPanel::proposals_
private

◆ selected_rom_sync_

int yaze::gui::CollaborationPanel::selected_rom_sync_
private

Definition at line 153 of file collaboration_panel.h.

◆ selected_snapshot_

int yaze::gui::CollaborationPanel::selected_snapshot_
private

Definition at line 154 of file collaboration_panel.h.

Referenced by RenderSnapshotEntry().

◆ selected_proposal_

int yaze::gui::CollaborationPanel::selected_proposal_
private

Definition at line 155 of file collaboration_panel.h.

◆ show_sync_details_

bool yaze::gui::CollaborationPanel::show_sync_details_
private

Definition at line 156 of file collaboration_panel.h.

Referenced by RenderRomSyncEntry(), and RenderRomSyncTab().

◆ show_snapshot_preview_

bool yaze::gui::CollaborationPanel::show_snapshot_preview_
private

Definition at line 157 of file collaboration_panel.h.

Referenced by RenderSnapshotEntry(), and RenderSnapshotsTab().

◆ auto_scroll_

bool yaze::gui::CollaborationPanel::auto_scroll_
private

Definition at line 158 of file collaboration_panel.h.

Referenced by RenderRomSyncTab().

◆ search_filter_

char yaze::gui::CollaborationPanel::search_filter_[256]
private

◆ filter_pending_only_

bool yaze::gui::CollaborationPanel::filter_pending_only_
private

Definition at line 162 of file collaboration_panel.h.

Referenced by RenderProposalsTab().

◆ sync_applied

ImVec4 yaze::gui::CollaborationPanel::sync_applied

Definition at line 166 of file collaboration_panel.h.

◆ sync_pending

ImVec4 yaze::gui::CollaborationPanel::sync_pending

Definition at line 167 of file collaboration_panel.h.

◆ sync_error

ImVec4 yaze::gui::CollaborationPanel::sync_error

Definition at line 168 of file collaboration_panel.h.

◆ proposal_pending

ImVec4 yaze::gui::CollaborationPanel::proposal_pending

Definition at line 169 of file collaboration_panel.h.

◆ proposal_approved

ImVec4 yaze::gui::CollaborationPanel::proposal_approved

Definition at line 170 of file collaboration_panel.h.

◆ proposal_rejected

ImVec4 yaze::gui::CollaborationPanel::proposal_rejected

Definition at line 171 of file collaboration_panel.h.

◆ proposal_applied

ImVec4 yaze::gui::CollaborationPanel::proposal_applied

Definition at line 172 of file collaboration_panel.h.

◆ [struct]


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