2019-03-11 21:32:05 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 CERN
|
2021-03-21 17:31:23 +00:00
|
|
|
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
2019-03-11 21:32:05 +00:00
|
|
|
* @author Jon Evans <jon@craftyjon.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _DIALOG_MIGRATE_BUSES_H
|
|
|
|
#define _DIALOG_MIGRATE_BUSES_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <sch_edit_frame.h>
|
|
|
|
|
|
|
|
#include <dialog_migrate_buses_base.h>
|
|
|
|
|
|
|
|
class CONNECTION_SUBGRAPH;
|
|
|
|
|
|
|
|
|
|
|
|
struct BUS_MIGRATION_STATUS
|
|
|
|
{
|
2019-04-20 01:45:33 +00:00
|
|
|
const CONNECTION_SUBGRAPH* subgraph;
|
2019-03-11 21:32:05 +00:00
|
|
|
|
|
|
|
std::vector<wxString> labels;
|
|
|
|
|
|
|
|
std::vector<wxString> possible_labels;
|
|
|
|
|
|
|
|
wxString approved_label;
|
|
|
|
|
|
|
|
bool approved;
|
|
|
|
};
|
|
|
|
|
|
|
|
class DIALOG_MIGRATE_BUSES : public DIALOG_MIGRATE_BUSES_BASE
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
DIALOG_MIGRATE_BUSES( SCH_EDIT_FRAME* aParent );
|
2023-10-02 11:22:00 +00:00
|
|
|
~DIALOG_MIGRATE_BUSES();
|
2019-03-11 21:32:05 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void loadGraphData();
|
|
|
|
|
|
|
|
void updateUi();
|
|
|
|
|
2019-06-04 12:49:11 +00:00
|
|
|
std::vector<wxString> getProposedLabels( const std::vector<wxString>& aLabelList );
|
2019-03-11 21:32:05 +00:00
|
|
|
|
|
|
|
void onItemSelected( wxListEvent& aEvent );
|
|
|
|
|
|
|
|
void onAcceptClicked( wxCommandEvent& aEvent );
|
|
|
|
|
2021-03-21 17:31:23 +00:00
|
|
|
|
|
|
|
SCH_EDIT_FRAME* m_frame;
|
|
|
|
|
|
|
|
unsigned m_selected_index;
|
|
|
|
|
2019-03-11 21:32:05 +00:00
|
|
|
std::vector<BUS_MIGRATION_STATUS> m_items;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|