KiCad PCB EDA Suite
Loading...
Searching...
No Matches
local_history_pane.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
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/gpl-3.0.html
19 * or you may search the http://www.gnu.org website for the version 3 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
27
28#ifndef LOCAL_HISTORY_PANE_H
29#define LOCAL_HISTORY_PANE_H
30
31#include <wx/datetime.h>
32#include <wx/listctrl.h>
33#include <wx/panel.h>
34#include <wx/string.h>
35#include <wx/timer.h>
36#include <wx/tipwin.h>
37#include <wx/event.h>
38#include <mutex>
39#include <vector>
40
41wxDECLARE_EVENT( EVT_LOCAL_HISTORY_REFRESH, wxCommandEvent );
42
44
46{
47 wxString hash;
48 wxString summary;
49 wxString message;
50 wxDateTime date;
51};
52
53class LOCAL_HISTORY_PANE : public wxPanel
54{
55public:
58
59 void RefreshHistory( const wxString& aProjectPath );
60
61private:
62 void OnMotion( wxMouseEvent& aEvent );
63 void OnLeave( wxMouseEvent& aEvent );
64 void OnTimer( wxTimerEvent& aEvent );
65 void OnRightClick( wxListEvent& aEvent );
66 void OnRefreshEvent( wxCommandEvent& aEvent );
67 void OnRefreshTimer( wxTimerEvent& aEvent );
68
70 wxListCtrl* m_list;
71 std::vector<LOCAL_COMMIT_INFO> m_commits;
72 wxTimer m_timer;
75 wxPoint m_hoverPos;
76 wxTipWindow* m_tip;
77 std::mutex m_mutex;
78};
79
80#endif // LOCAL_HISTORY_PANE_H
The main KiCad project manager frame.
LOCAL_HISTORY_PANE(KICAD_MANAGER_FRAME *aParent)
void OnLeave(wxMouseEvent &aEvent)
void OnRefreshTimer(wxTimerEvent &aEvent)
void OnTimer(wxTimerEvent &aEvent)
void OnRightClick(wxListEvent &aEvent)
KICAD_MANAGER_FRAME * m_frame
void RefreshHistory(const wxString &aProjectPath)
void OnRefreshEvent(wxCommandEvent &aEvent)
std::vector< LOCAL_COMMIT_INFO > m_commits
void OnMotion(wxMouseEvent &aEvent)
wxDECLARE_EVENT(EVT_LOCAL_HISTORY_REFRESH, wxCommandEvent)