Browse Source
Finish project frame library table editing.
Finish project frame library table editing.
Fixes: lp:1782761 * https://bugs.launchpad.net/kicad/+bug/1782761pull/17/head
26 changed files with 290 additions and 325 deletions
-
2common/dialog_shim.cpp
-
45common/dialogs/dialog_configure_paths.cpp
-
4common/dialogs/dialog_configure_paths_base.cpp
-
4common/dialogs/dialog_configure_paths_base.fbp
-
1common/dialogs/dialog_configure_paths_base.h
-
4cvpcb/CMakeLists.txt
-
4eeschema/CMakeLists.txt
-
112eeschema/dialogs/panel_sym_lib_table.cpp
-
166eeschema/dialogs/panel_sym_lib_table.h
-
54eeschema/dialogs/panel_sym_lib_table_base.cpp
-
67eeschema/dialogs/panel_sym_lib_table_base.fbp
-
33eeschema/dialogs/panel_sym_lib_table_base.h
-
17eeschema/sch_base_frame.cpp
-
5eeschema/sch_base_frame.h
-
2eeschema/symbol_lib_table.h
-
3include/dialog_configure_paths.h
-
4pcbnew/CMakeLists.txt
-
42pcbnew/dialogs/dialog_fp_plugin_options.cpp
-
2pcbnew/dialogs/dialog_fp_plugin_options_base.cpp
-
2pcbnew/dialogs/dialog_fp_plugin_options_base.fbp
-
1pcbnew/dialogs/dialog_fp_plugin_options_base.h
-
27pcbnew/dialogs/panel_fp_lib_table.cpp
-
2pcbnew/dialogs/panel_fp_lib_table.h
-
2pcbnew/dialogs/panel_fp_lib_table_base.cpp
-
4pcbnew/dialogs/panel_fp_lib_table_base.fbp
-
6pcbnew/dialogs/panel_fp_lib_table_base.h
@ -1,82 +1,84 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com> |
|||
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* 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 3 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_SYM_LIB_TABLE_H_ |
|||
#define _DIALOG_SYM_LIB_TABLE_H_ |
|||
|
|||
#include <dialog_sym_lib_table_base.h> |
|||
|
|||
class SYMBOL_LIB_TABLE; |
|||
class SYMBOL_LIB_TABLE_GRID; |
|||
|
|||
|
|||
/** |
|||
* Dialog to show and edit symbol library tables. |
|||
*/ |
|||
class DIALOG_SYMBOL_LIB_TABLE : public DIALOG_SYMBOL_LIB_TABLE_BASE |
|||
{ |
|||
|
|||
public: |
|||
DIALOG_SYMBOL_LIB_TABLE( wxTopLevelWindow* aParent, SYMBOL_LIB_TABLE* aGlobal, |
|||
SYMBOL_LIB_TABLE* aProject ); |
|||
virtual ~DIALOG_SYMBOL_LIB_TABLE(); |
|||
|
|||
bool Show( bool aShow ) override; |
|||
|
|||
private: |
|||
/** |
|||
* Trim important fields, removes blank row entries, and checks for duplicates. |
|||
* |
|||
* @return bool - true if tables are OK, else false. |
|||
*/ |
|||
bool verifyTables(); |
|||
|
|||
void pageChangedHandler( wxAuiNotebookEvent& event ) override; |
|||
void browseLibrariesHandler( wxCommandEvent& event ) override; |
|||
void appendRowHandler( wxCommandEvent& event ) override; |
|||
void deleteRowHandler( wxCommandEvent& event ) override; |
|||
void moveUpHandler( wxCommandEvent& event ) override; |
|||
void moveDownHandler( wxCommandEvent& event ) override; |
|||
void onSizeGrid( wxSizeEvent& event ) override; |
|||
void adjustPathSubsGridColumns( int aWidth ); |
|||
|
|||
bool TransferDataFromWindow() override; |
|||
|
|||
/// Populate the readonly environment variable table with names and values |
|||
/// by examining all the full_uri columns. |
|||
void populateEnvironReadOnlyTable(); |
|||
|
|||
// Caller's tables are modified only on OK button and successful verification. |
|||
SYMBOL_LIB_TABLE* m_global; |
|||
SYMBOL_LIB_TABLE* m_project; |
|||
|
|||
SYMBOL_LIB_TABLE_GRID* global_model() const; |
|||
|
|||
SYMBOL_LIB_TABLE_GRID* project_model() const; |
|||
|
|||
SYMBOL_LIB_TABLE_GRID* cur_model() const; |
|||
|
|||
wxGrid* m_cur_grid; ///< changed based on tab choice |
|||
static size_t m_pageNdx; ///< Remember the last notebook page selected during a session |
|||
|
|||
wxString m_lastBrowseDir; ///< last browsed directory |
|||
}; |
|||
|
|||
#endif // _DIALOG_SYM_LIB_TABLE_H_ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com> |
|||
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* 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 3 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 PANEL_SYM_LIB_TABLE_H |
|||
#define PANEL_SYM_LIB_TABLE_H |
|||
|
|||
#include <dialog_edit_library_tables.h> |
|||
#include <panel_sym_lib_table_base.h> |
|||
|
|||
class SYMBOL_LIB_TABLE; |
|||
class SYMBOL_LIB_TABLE_GRID; |
|||
|
|||
|
|||
/** |
|||
* Dialog to show and edit symbol library tables. |
|||
*/ |
|||
class PANEL_SYM_LIB_TABLE : public PANEL_SYM_LIB_TABLE_BASE |
|||
{ |
|||
|
|||
public: |
|||
PANEL_SYM_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, SYMBOL_LIB_TABLE* aGlobal, |
|||
SYMBOL_LIB_TABLE* aProject ); |
|||
virtual ~PANEL_SYM_LIB_TABLE(); |
|||
|
|||
bool Show( bool aShow ) override; |
|||
|
|||
private: |
|||
/** |
|||
* Trim important fields, removes blank row entries, and checks for duplicates. |
|||
* |
|||
* @return bool - true if tables are OK, else false. |
|||
*/ |
|||
bool verifyTables(); |
|||
|
|||
void pageChangedHandler( wxAuiNotebookEvent& event ) override; |
|||
void browseLibrariesHandler( wxCommandEvent& event ) override; |
|||
void appendRowHandler( wxCommandEvent& event ) override; |
|||
void deleteRowHandler( wxCommandEvent& event ) override; |
|||
void moveUpHandler( wxCommandEvent& event ) override; |
|||
void moveDownHandler( wxCommandEvent& event ) override; |
|||
void onSizeGrid( wxSizeEvent& event ) override; |
|||
void adjustPathSubsGridColumns( int aWidth ); |
|||
|
|||
bool TransferDataFromWindow() override; |
|||
|
|||
/// Populate the readonly environment variable table with names and values |
|||
/// by examining all the full_uri columns. |
|||
void populateEnvironReadOnlyTable(); |
|||
|
|||
// Caller's tables are modified only on OK button and successful verification. |
|||
SYMBOL_LIB_TABLE* m_global; |
|||
SYMBOL_LIB_TABLE* m_project; |
|||
|
|||
SYMBOL_LIB_TABLE_GRID* global_model() const; |
|||
|
|||
SYMBOL_LIB_TABLE_GRID* project_model() const; |
|||
|
|||
SYMBOL_LIB_TABLE_GRID* cur_model() const; |
|||
|
|||
DIALOG_EDIT_LIBRARY_TABLES* m_parent; |
|||
|
|||
wxGrid* m_cur_grid; ///< changed based on tab choice |
|||
static size_t m_pageNdx; ///< Remember the last notebook page selected during a session |
|||
wxString m_lastBrowseDir; ///< last browsed directory |
|||
}; |
|||
|
|||
#endif // PANEL_SYM_LIB_TABLE_H |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue