KiCad PCB EDA Suite
dialog_migrate_buses.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) 2018 CERN
5  * @author Jon Evans <jon@craftyjon.com>
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 along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef _DIALOG_MIGRATE_BUSES_H
22 #define _DIALOG_MIGRATE_BUSES_H
23 
24 #include <vector>
25 
26 #include <sch_edit_frame.h>
27 
29 
31 
32 
34 {
36 
37  std::vector<wxString> labels;
38 
39  std::vector<wxString> possible_labels;
40 
41  wxString approved_label;
42 
43  bool approved;
44 };
45 
47 {
48 public:
49 
51 
52 private:
53 
55 
56  unsigned m_selected_index;
57 
58  void loadGraphData();
59 
60  void updateUi();
61 
62  std::vector<wxString> getProposedLabels( const std::vector<wxString>& aLabelList );
63 
64  void onItemSelected( wxListEvent& aEvent );
65 
66  void onAcceptClicked( wxCommandEvent& aEvent );
67 
68  std::vector<BUS_MIGRATION_STATUS> m_items;
69 };
70 
71 #endif
void onItemSelected(wxListEvent &aEvent)
std::vector< BUS_MIGRATION_STATUS > m_items
SCH_EDIT_FRAME * m_frame
Schematic editor (Eeschema) main window.
std::vector< wxString > labels
A subgraph is a set of items that are electrically connected on a single sheet.
std::vector< wxString > getProposedLabels(const std::vector< wxString > &aLabelList)
void onAcceptClicked(wxCommandEvent &aEvent)
DIALOG_MIGRATE_BUSES(SCH_EDIT_FRAME *aParent)
Migrates buses using legacy multi-label joining behavior.
std::vector< wxString > possible_labels
Class DIALOG_MIGRATE_BUSES_BASE.
const CONNECTION_SUBGRAPH * subgraph