2015-07-09 11:35:51 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 CERN
|
2023-06-27 15:52:50 +00:00
|
|
|
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2015-07-09 11:35:51 +00:00
|
|
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <dialogs/dialog_track_via_properties_base.h>
|
2017-11-10 23:27:46 +00:00
|
|
|
#include <widgets/unit_binder.h>
|
2022-08-25 22:50:47 +00:00
|
|
|
#include <optional>
|
2021-07-29 09:47:43 +00:00
|
|
|
#include <layer_ids.h>
|
2015-07-09 11:35:51 +00:00
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
class PCB_SELECTION;
|
2015-07-09 11:35:51 +00:00
|
|
|
class PCB_BASE_FRAME;
|
2020-11-12 22:30:02 +00:00
|
|
|
class PAD;
|
2015-07-09 11:35:51 +00:00
|
|
|
|
|
|
|
class DIALOG_TRACK_VIA_PROPERTIES : public DIALOG_TRACK_VIA_PROPERTIES_BASE
|
|
|
|
{
|
|
|
|
public:
|
2023-06-27 15:52:50 +00:00
|
|
|
DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParent, const PCB_SELECTION& aItems );
|
2015-07-09 11:35:51 +00:00
|
|
|
|
2021-12-23 13:11:26 +00:00
|
|
|
~DIALOG_TRACK_VIA_PROPERTIES();
|
|
|
|
|
2018-02-03 09:09:53 +00:00
|
|
|
bool TransferDataFromWindow() override;
|
2015-07-09 11:35:51 +00:00
|
|
|
|
|
|
|
private:
|
2022-09-20 10:36:44 +00:00
|
|
|
void onNetSelector( wxCommandEvent& aEvent );
|
|
|
|
void onViaNotFreeClicked( wxCommandEvent& aEvent ) override;
|
2016-09-24 18:53:15 +00:00
|
|
|
void onTrackNetclassCheck( wxCommandEvent& aEvent ) override;
|
2019-08-25 10:06:01 +00:00
|
|
|
void onWidthSelect( wxCommandEvent& aEvent ) override;
|
|
|
|
void onWidthEdit( wxCommandEvent& aEvent ) override;
|
2016-09-24 18:53:15 +00:00
|
|
|
void onViaNetclassCheck( wxCommandEvent& aEvent ) override;
|
2019-08-25 10:06:01 +00:00
|
|
|
void onViaSelect( wxCommandEvent& aEvent ) override;
|
|
|
|
void onViaEdit( wxCommandEvent& aEvent ) override;
|
2015-07-09 11:35:51 +00:00
|
|
|
|
2021-12-23 13:11:26 +00:00
|
|
|
void onUnitsChanged( wxCommandEvent& aEvent );
|
2023-05-12 21:03:54 +00:00
|
|
|
void onTeardropsUpdateUi( wxUpdateUIEvent& event ) override;
|
|
|
|
void onCurvedEdgesUpdateUi( wxUpdateUIEvent& event ) override;
|
2021-12-23 13:11:26 +00:00
|
|
|
|
2020-11-12 22:30:02 +00:00
|
|
|
bool confirmPadChange( const std::vector<PAD*>& connectedPads );
|
2018-08-19 16:11:58 +00:00
|
|
|
|
2022-11-24 18:05:37 +00:00
|
|
|
int getLayerDepth();
|
|
|
|
|
|
|
|
private:
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_BASE_FRAME* m_frame;
|
|
|
|
const PCB_SELECTION& m_items; // List of items to be modified.
|
2016-07-14 17:30:25 +00:00
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
UNIT_BINDER m_trackStartX, m_trackStartY;
|
|
|
|
UNIT_BINDER m_trackEndX, m_trackEndY;
|
|
|
|
UNIT_BINDER m_trackWidth;
|
2016-07-14 17:30:25 +00:00
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
UNIT_BINDER m_viaX, m_viaY;
|
|
|
|
UNIT_BINDER m_viaDiameter, m_viaDrill;
|
2015-07-09 11:35:51 +00:00
|
|
|
|
2023-05-12 21:03:54 +00:00
|
|
|
UNIT_BINDER m_teardropHDPercent;
|
|
|
|
UNIT_BINDER m_teardropLenPercent;
|
|
|
|
UNIT_BINDER m_teardropMaxLen;
|
2024-02-23 14:38:22 +00:00
|
|
|
UNIT_BINDER m_teardropWidthPercent;
|
|
|
|
UNIT_BINDER m_teardropMaxWidth;
|
2023-05-12 21:03:54 +00:00
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
bool m_tracks; // True if dialog displays any track properties.
|
|
|
|
bool m_vias; // True if dialog displays any via properties.
|
2015-07-09 11:35:51 +00:00
|
|
|
};
|