2017-04-02 12:09:01 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2017 Oliver Walters
|
2018-04-17 10:34:48 +00:00
|
|
|
* Copyright (C) 2017-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
2017-04-02 12:09:01 +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-09 16:35:45 +00:00
|
|
|
#ifndef DIALOG_FIELDS_EDITOR_GLOBAL_H
|
|
|
|
#define DIALOG_FIELDS_EDITOR_GLOBAL_H
|
2017-04-02 12:09:01 +00:00
|
|
|
|
|
|
|
|
2018-02-09 16:35:45 +00:00
|
|
|
#include <dialog_fields_editor_global_base.h>
|
2017-04-02 12:09:01 +00:00
|
|
|
#include <sch_reference_list.h>
|
|
|
|
|
2018-04-17 10:34:48 +00:00
|
|
|
|
|
|
|
class SCH_EDIT_FRAME;
|
|
|
|
class FIELDS_EDITOR_GRID_DATA_MODEL;
|
|
|
|
|
2017-04-02 12:09:01 +00:00
|
|
|
|
2018-02-09 16:35:45 +00:00
|
|
|
class DIALOG_FIELDS_EDITOR_GLOBAL : public DIALOG_FIELDS_EDITOR_GLOBAL_BASE
|
2017-04-02 12:09:01 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-02-09 16:35:45 +00:00
|
|
|
DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent );
|
|
|
|
virtual ~DIALOG_FIELDS_EDITOR_GLOBAL();
|
2017-04-02 12:09:01 +00:00
|
|
|
|
2018-04-17 10:34:48 +00:00
|
|
|
bool TransferDataFromWindow() override;
|
|
|
|
|
2017-04-02 12:09:01 +00:00
|
|
|
private:
|
|
|
|
SCH_EDIT_FRAME* m_parent;
|
2018-04-23 17:23:09 +00:00
|
|
|
int m_showColWidth;
|
|
|
|
int m_groupByColWidth;
|
2017-04-02 12:09:01 +00:00
|
|
|
|
2018-04-17 10:34:48 +00:00
|
|
|
SCH_REFERENCE_LIST m_componentRefs;
|
|
|
|
FIELDS_EDITOR_GRID_DATA_MODEL* m_dataModel;
|
2017-04-02 12:09:01 +00:00
|
|
|
|
2018-04-17 10:34:48 +00:00
|
|
|
void AddField( const wxString& aFieldName, bool defaultShow, bool defaultSortBy );
|
|
|
|
void LoadFieldNames();
|
2017-04-02 12:09:01 +00:00
|
|
|
|
2018-04-17 10:34:48 +00:00
|
|
|
void OnColSort( wxGridEvent& aEvent );
|
2017-04-18 09:25:02 +00:00
|
|
|
|
2018-04-19 22:13:19 +00:00
|
|
|
void OnColumnItemToggled( wxDataViewEvent& event ) override;
|
|
|
|
void OnGroupComponentsToggled( wxCommandEvent& event ) override;
|
|
|
|
void OnRegroupComponents( wxCommandEvent& event ) override;
|
|
|
|
void OnTableValueChanged( wxGridEvent& event ) override;
|
2018-05-12 22:04:11 +00:00
|
|
|
void OnTableCellClick( wxGridEvent& event ) override;
|
2018-04-19 22:13:19 +00:00
|
|
|
void OnTableItemContextMenu( wxGridEvent& event ) override;
|
|
|
|
void OnSizeFieldList( wxSizeEvent& event ) override;
|
|
|
|
void OnSaveAndContinue( wxCommandEvent& aEvent ) override;
|
2017-04-02 12:09:01 +00:00
|
|
|
};
|
|
|
|
|
2018-02-09 16:35:45 +00:00
|
|
|
#endif /* DIALOG_FIELDS_EDITOR_GLOBAL_H */
|