KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_git_remotes.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PANEL_GIT_REMOTES_H
21#define PANEL_GIT_REMOTES_H
22
23#include <functional>
24
25#include <wx/datetime.h>
26
29
30class EDA_BASE_FRAME;
32class KIGIT_COMMON;
33
34
40{
41public:
42 PANEL_GIT_REMOTES( wxWindow* aParent, GIT_ADVANCED_DIALOG* aDialog, EDA_BASE_FRAME* aFrame );
43
45 void Populate();
46
47private:
49 void showRemoteDetail( const wxString& aRemote );
50 void fillRemoteDetail( const wxString& aRemote, const wxDateTime& aFetched );
51 void hideRemoteDetail();
52
54 void runRemoteAction( const std::function<bool( KIGIT_COMMON& )>& aMutation, const wxString& aError );
55
56 void onAddRemote();
57 void onEditRemote();
58 void onRemoveRemote();
59
62
65 wxDateTime m_lastFetched;
66
69
71 bool m_fillingRemotes = false;
72};
73
74#endif // PANEL_GIT_REMOTES_H
The base frame for deriving all KiCad main window classes.
The advanced Git window: a non-modal dialog with a top bar naming the repository and branch and a sid...
The project's git session.
Read repository state without blocking the UI.
PANEL_GIT_REMOTES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
GIT_ADVANCED_DIALOG * m_dialog
PANEL_GIT_REMOTES(wxWindow *aParent, GIT_ADVANCED_DIALOG *aDialog, EDA_BASE_FRAME *aFrame)
KIGIT_QUERY m_listQuery
The list and its shared fetch timestamp are read together on a worker.
bool m_fillingRemotes
True while the list is being refilled, when its selection events are its own.
int m_remoteSashPos
Where the user left the sash between the list and its detail pane.
EDA_BASE_FRAME * m_frame
void Populate()
Fill the list from the repository's remotes. The repository is read on a worker.
void fillRemoteDetail(const wxString &aRemote, const wxDateTime &aFetched)
void runRemoteAction(const std::function< bool(KIGIT_COMMON &)> &aMutation, const wxString &aError)
Run a change to the remotes, then refresh the cached remote so a later push uses it.
void showRemoteDetail(const wxString &aRemote)
Fill the detail pane with aRemote, or hide it when the name is empty.