2017-01-31 07:55:02 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010-2014 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
|
2018-04-18 09:31:33 +00:00
|
|
|
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
2017-01-31 07:55:02 +00:00
|
|
|
*
|
|
|
|
* 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, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2018-02-16 19:26:55 +00:00
|
|
|
#ifndef DIALOG_EXCHANGE_FOOTPRINTS_H_
|
|
|
|
#define DIALOG_EXCHANGE_FOOTPRINTS_H_
|
2017-01-31 07:55:02 +00:00
|
|
|
|
2018-02-16 19:26:55 +00:00
|
|
|
#include <dialog_exchange_footprints_base.h>
|
2017-01-31 07:55:02 +00:00
|
|
|
|
|
|
|
#include <board_commit.h>
|
|
|
|
|
|
|
|
class PCB_EDIT_FRAME;
|
|
|
|
class MODULE;
|
2018-10-15 15:09:03 +00:00
|
|
|
class LIB_ID;
|
2017-01-31 07:55:02 +00:00
|
|
|
|
2018-02-16 19:26:55 +00:00
|
|
|
class DIALOG_EXCHANGE_FOOTPRINTS : public DIALOG_EXCHANGE_FOOTPRINTS_BASE
|
2017-01-31 07:55:02 +00:00
|
|
|
{
|
|
|
|
private:
|
2018-04-18 09:31:33 +00:00
|
|
|
BOARD_COMMIT m_commit;
|
2017-01-31 07:55:02 +00:00
|
|
|
PCB_EDIT_FRAME* m_parent;
|
2020-10-14 23:37:26 +00:00
|
|
|
MODULE* m_currentFootprint;
|
2018-01-12 19:36:15 +00:00
|
|
|
bool m_updateMode;
|
2018-10-22 15:01:29 +00:00
|
|
|
int* m_matchMode;
|
2017-01-31 07:55:02 +00:00
|
|
|
|
|
|
|
public:
|
2020-10-14 23:37:26 +00:00
|
|
|
DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, MODULE* aFootprint, bool updateMode,
|
2018-10-22 15:01:29 +00:00
|
|
|
bool selectedMode );
|
2019-11-05 17:38:29 +00:00
|
|
|
~DIALOG_EXCHANGE_FOOTPRINTS() override;
|
2017-01-31 07:55:02 +00:00
|
|
|
|
|
|
|
private:
|
2018-01-28 18:44:52 +00:00
|
|
|
void updateMatchModeRadioButtons( wxUpdateUIEvent& event ) override;
|
2018-01-12 19:36:15 +00:00
|
|
|
void OnMatchAllClicked( wxCommandEvent& event ) override;
|
2018-10-22 15:01:29 +00:00
|
|
|
void OnMatchSelectedClicked( wxCommandEvent& event ) override;
|
2018-01-12 19:36:15 +00:00
|
|
|
void OnMatchRefClicked( wxCommandEvent& event ) override;
|
|
|
|
void OnMatchValueClicked( wxCommandEvent& event ) override;
|
|
|
|
void OnMatchIDClicked( wxCommandEvent& event ) override;
|
2020-05-06 19:49:58 +00:00
|
|
|
void OnOKClicked( wxCommandEvent& event ) override;
|
2017-01-31 07:55:02 +00:00
|
|
|
void ViewAndSelectFootprint( wxCommandEvent& event ) override;
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
wxRadioButton* getRadioButtonForMode();
|
|
|
|
|
|
|
|
bool isMatch( MODULE* );
|
2020-10-14 23:37:26 +00:00
|
|
|
bool processMatchingFootprints();
|
|
|
|
bool processFootprint( MODULE* aFootprint, const LIB_ID& aNewFPID );
|
2017-01-31 07:55:02 +00:00
|
|
|
};
|
|
|
|
|
2018-02-16 19:26:55 +00:00
|
|
|
#endif // DIALOG_EXCHANGE_FOOTPRINTS_H_
|