API — ICoreSDK/ICoreStudio/StudioObjects/Panels/Git
The public contract of 2 header(s) under src/ICoreSDK/ICoreStudio/StudioObjects/Panels/Git — 2 class/struct definition(s), 8 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
| Header | Defines | Declarations | Bases |
|---|---|---|---|
ICoreGitClient.h | ICoreGitClient | 4 | — |
ICoreGitMenuPanel.h | ICoreGitMenuPanel | 4 | public ICoreWidget |
ICoreGitClient.h#
src/ICoreSDK/ICoreStudio/StudioObjects/Panels/Git/ICoreGitClient.h
ICoreGitClient#
ICoreGitClient.h:22 · class · pImpl · nested Result · 4 declaration(s)
Thin async wrapper around the system git executable, always operating on the active project folder (ICoreActiveProjectFolder::getActiveProjectFolderPath()).
class ICoreGitClient {
public:
struct Result {
bool success = false; // started, exited normally, exit code 0
ICoreString output; // stdout + stderr interleaved, trimmed
};
ICoreGitClient();
~ICoreGitClient();
bool isBusy() const;
// Runs `git <args>` in the active project folder (created on demand so
// `git init` works on a never-saved project). `onFinished` is always
// called exactly once, on the UI thread.
void run(const ICoreStringList& args, const std::function<void(const Result&)>& onFinished);
// Console-style echo of everything that runs, for the panel's log view.
// Raised synchronously, on the UI thread, exactly where the callback runs.
ICoreSignal<ICoreString> onCommandStarted;
ICoreSignal<ICoreString, bool, ICoreString> onCommandFinished; // command line, success, output
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreGitMenuPanel.h#
src/ICoreSDK/ICoreStudio/StudioObjects/Panels/Git/UI/ICoreGitMenuPanel.h
ICoreGitMenuPanel#
ICoreGitMenuPanel.h:30 · class · bases public ICoreWidget · pImpl · 4 declaration(s)
Left-panel page giving a minimal git workflow over the active project folder: initialize a repository, review pending changes, commit everything, wire an origin remote, and pull/push/fetch.
class ICoreGitMenuPanel : public ICoreWidget {
public:
explicit ICoreGitMenuPanel(ICoreWidget* parent = nullptr);
// Out of line: the Impl it owns is only forward-declared here.
~ICoreGitMenuPanel() override;
// Re-queries repo state / status / remote / history. Cheap no-op trigger
// while a git command is already in flight.
void refreshAll();
protected:
// The panel lives in a ICoreStackedLayout; it refreshes itself whenever it
// becomes the visible page.
void shown() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};