KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_update_check_prompt.cpp
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 Mark Roszko <
[email protected]
>
5
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, you may find one here:
19
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20
* or you may search the http://www.gnu.org website for the version 2 license,
21
* or you may write to the Free Software Foundation, Inc.,
22
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23
*/
24
25
#include <
dialogs/dialog_update_check_prompt.h
>
26
#include <
settings/settings_manager.h
>
27
#include <
settings/kicad_settings.h
>
28
#include <
pgm_base.h
>
29
30
DIALOG_UPDATE_CHECK_PROMPT::DIALOG_UPDATE_CHECK_PROMPT
( wxWindow* aWindow ) :
31
DIALOG_UPDATE_CHECK_PROMPT_BASE
( aWindow )
32
{
33
#ifndef KICAD_UPDATE_CHECK
34
m_cbKiCadUpdates
->Hide();
35
#endif
36
37
m_sdbSizerOK
->SetFocus();
38
}
39
40
41
bool
DIALOG_UPDATE_CHECK_PROMPT::TransferDataFromWindow
()
42
{
43
if
(
KICAD_SETTINGS
* settings =
GetAppSettings<KICAD_SETTINGS>
(
"kicad"
) )
44
{
45
settings->m_PcmUpdateCheck =
m_cbPCMUpdates
->GetValue();
46
#ifndef KICAD_UPDATE_CHECK
47
settings->m_KiCadUpdateCheck =
m_cbKiCadUpdates
->GetValue();
48
#endif
49
}
50
51
return
true
;
52
}
DIALOG_UPDATE_CHECK_PROMPT_BASE::m_cbKiCadUpdates
wxCheckBox * m_cbKiCadUpdates
Definition
dialog_update_check_prompt_base.h:36
DIALOG_UPDATE_CHECK_PROMPT_BASE::DIALOG_UPDATE_CHECK_PROMPT_BASE
DIALOG_UPDATE_CHECK_PROMPT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Check for Updates"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
Definition
dialog_update_check_prompt_base.cpp:12
DIALOG_UPDATE_CHECK_PROMPT_BASE::m_cbPCMUpdates
wxCheckBox * m_cbPCMUpdates
Definition
dialog_update_check_prompt_base.h:37
DIALOG_UPDATE_CHECK_PROMPT_BASE::m_sdbSizerOK
wxButton * m_sdbSizerOK
Definition
dialog_update_check_prompt_base.h:39
DIALOG_UPDATE_CHECK_PROMPT::DIALOG_UPDATE_CHECK_PROMPT
DIALOG_UPDATE_CHECK_PROMPT(wxWindow *aParent)
Definition
dialog_update_check_prompt.cpp:30
DIALOG_UPDATE_CHECK_PROMPT::TransferDataFromWindow
bool TransferDataFromWindow() override
Definition
dialog_update_check_prompt.cpp:41
KICAD_SETTINGS
Definition
kicad_settings.h:29
dialog_update_check_prompt.h
kicad_settings.h
pgm_base.h
see class PGM_BASE
settings_manager.h
GetAppSettings
T * GetAppSettings(const char *aFilename)
Definition
settings_manager.h:552
src
kicad
dialogs
dialog_update_check_prompt.cpp
Generated on Sun Sep 21 2025 01:05:26 for KiCad PCB EDA Suite by
1.13.2