KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_zone_properties.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) 2023 Ethan Chien <[email protected]>
5 * Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
6 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
7 * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef PANEL_ZONE_PROPERTIES_H
27#define PANEL_ZONE_PROPERTIES_H
28
29
30#include "widgets/unit_binder.h"
33
35#include <memory>
36#include <zone_settings.h>
37
38wxDECLARE_EVENT( EVT_ZONE_NAME_UPDATE, wxCommandEvent );
39
40
41class PCB_BASE_FRAME;
42class ZONES_CONTAINER;
46{
47public:
48 PANEL_ZONE_PROPERTIES( wxWindow* aParent, PCB_BASE_FRAME* aPcb,
49 ZONES_CONTAINER& aZoneContainer );
50
51
52 void ActivateSelectedZone( ZONE* new_zone ) override;
53
54 void OnUserConfirmChange() override;
55
56 std::shared_ptr<ZONE_SETTINGS> GetZoneSettings() const { return m_settings; }
57
58
59private:
60 static constexpr int INVALID_NET_CODE{ 0 };
61
62 static constexpr int DEFAULT_SORT_CONFIG{ -1 };
63 static constexpr int NO_PERSISTENT_SORT_MODE{ 0 };
64 static constexpr int HIDE_ANONYMOUS_NETS{ 1 << 0 };
65 static constexpr int SORT_BY_PAD_COUNT{ 1 << 1 };
66
69
75 bool AcceptOptions( bool aUseExportableSetupOnly = false );
76
77 void OnStyleSelection( wxCommandEvent& event ) override;
78 void OnUpdateUI( wxUpdateUIEvent& ) override;
79 void OnRemoveIslandsSelection( wxCommandEvent& event ) override;
80 void OnZoneNameChanged( wxCommandEvent& event ) override;
81
82
83private:
86
87 std::shared_ptr<ZONE_SETTINGS> m_settings;
88
91
97
103};
104
105
106#endif
Class PANEL_ZONE_PROPERTIES_BASE.
static constexpr int INVALID_NET_CODE
ZONES_CONTAINER & m_ZoneContainer
void ActivateSelectedZone(ZONE *new_zone) override
static constexpr int DEFAULT_SORT_CONFIG
static constexpr int HIDE_ANONYMOUS_NETS
void OnUserConfirmChange() override
void OnZoneNameChanged(wxCommandEvent &event) override
void OnStyleSelection(wxCommandEvent &event) override
static constexpr int SORT_BY_PAD_COUNT
bool AcceptOptions(bool aUseExportableSetupOnly=false)
static constexpr int NO_PERSISTENT_SORT_MODE
void OnUpdateUI(wxUpdateUIEvent &) override
std::shared_ptr< ZONE_SETTINGS > GetZoneSettings() const
PCB_BASE_FRAME * m_PCB_Frame
void OnRemoveIslandsSelection(wxCommandEvent &event) override
std::shared_ptr< ZONE_SETTINGS > m_settings
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
Classes need post progress after user click OK.
Subscriber who is interested in the zone selection change.
Handle a list of polygons defining a copper zone.
Definition: zone.h:72
wxDECLARE_EVENT(EVT_ZONE_NAME_UPDATE, wxCommandEvent)
Class ZONE_SETTINGS used to handle zones parameters in dialogs.