KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kicad_manager_control.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 (C) 2019 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef KICAD_MANAGER_CONTROL_H
22#define KICAD_MANAGER_CONTROL_H
23
26#include <mutex>
27
28
30
31
36{
37public:
40
42 void Reset( RESET_REASON aReason ) override;
43
44 int NewProject( const TOOL_EVENT& aEvent );
45 int NewFromRepository( const TOOL_EVENT& aEvent );
46 int NewJobsetFile( const TOOL_EVENT& aEvent );
47 int OpenProject( const TOOL_EVENT& aEvent );
48 int OpenDemoProject( const TOOL_EVENT& aEvent );
49 int OpenJobsetFile( const TOOL_EVENT& aEvent );
50 int CloseProject( const TOOL_EVENT& aEvent );
51 int SaveProjectAs( const TOOL_EVENT& aEvent );
52 int LoadProject( const TOOL_EVENT& aEvent );
53
54 int ArchiveProject( const TOOL_EVENT& aEvent );
55 int UnarchiveProject( const TOOL_EVENT& aEvent );
56 int ExportForOlderVersion( const TOOL_EVENT& aEvent );
57 int ExploreProject( const TOOL_EVENT& aEvent );
58 int RestoreLocalHistory( const TOOL_EVENT& aEvent );
59 int ToggleLocalHistory( const TOOL_EVENT& aEvent );
60 int ToggleGitCommitPane( const TOOL_EVENT& aEvent );
61
66 int ViewDroppedViewers( const TOOL_EVENT& aEvent );
67
68 int Refresh( const TOOL_EVENT& aEvent );
69 int UpdateMenu( const TOOL_EVENT& aEvent );
70
71 int ShowPlayer( const TOOL_EVENT& aEvent );
72 int Execute( const TOOL_EVENT& aEvent );
73
74 int ShowDesignBlockLibTable( const TOOL_EVENT& aEvent );
75 int ShowPluginManager( const TOOL_EVENT& aEvent );
76
78 void setTransitions() override;
79
80 bool InShowPlayer() const { return m_inShowPlayer; }
81
82private:
83 int openProject( const wxString& aDefaultDir );
84
85 wxFileName newProjectDirectory( wxString* aFileName = nullptr, bool isRepo = false );
86
87private:
90
93};
94
95#endif
int ExportForOlderVersion(const TOOL_EVENT &aEvent)
int OpenProject(const TOOL_EVENT &aEvent)
int NewJobsetFile(const TOOL_EVENT &aEvent)
void setTransitions() override
Set up handlers for various events.
int OpenDemoProject(const TOOL_EVENT &aEvent)
int CloseProject(const TOOL_EVENT &aEvent)
int ToggleLocalHistory(const TOOL_EVENT &aEvent)
int ArchiveProject(const TOOL_EVENT &aEvent)
bool m_inShowPlayer
Re-entrancy guard.
int SaveProjectAs(const TOOL_EVENT &aEvent)
int NewProject(const TOOL_EVENT &aEvent)
int RestoreLocalHistory(const TOOL_EVENT &aEvent)
int ShowDesignBlockLibTable(const TOOL_EVENT &aEvent)
int UnarchiveProject(const TOOL_EVENT &aEvent)
int ViewDroppedViewers(const TOOL_EVENT &aEvent)
Imports a non kicad project from a sch/pcb dropped file.
int ShowPluginManager(const TOOL_EVENT &aEvent)
int UpdateMenu(const TOOL_EVENT &aEvent)
int OpenJobsetFile(const TOOL_EVENT &aEvent)
int ToggleGitCommitPane(const TOOL_EVENT &aEvent)
wxFileName newProjectDirectory(wxString *aFileName=nullptr, bool isRepo=false)
int NewFromRepository(const TOOL_EVENT &aEvent)
int LoadProject(const TOOL_EVENT &aEvent)
KICAD_MANAGER_FRAME * m_frame
Pointer to the currently used edit/draw frame.
int ExploreProject(const TOOL_EVENT &aEvent)
int ShowPlayer(const TOOL_EVENT &aEvent)
int Refresh(const TOOL_EVENT &aEvent)
int openProject(const wxString &aDefaultDir)
int Execute(const TOOL_EVENT &aEvent)
KIGIT_QUERY m_identityQuery
Read the identity after cloning. Closing or resetting the tool suppresses its prompt.
The main KiCad project manager frame.
Read repository state without blocking the UI.
RESET_REASON
Determine the reason of reset for a tool.
Definition tool_base.h:74
Generic, UI-independent tool event.
Definition tool_event.h:167
TOOL_INTERACTIVE(TOOL_ID aId, const std::string &aName)
Create a tool with given id & name.
void Reset() override