| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : cppchecksettingsdlg.h |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#ifndef CPPCHECH_SETTINGS_DLG_H_INCLUDED |
| 27 |
#define CPPCHECH_SETTINGS_DLG_H_INCLUDED |
| 28 |
|
| 29 |
#include "cppchecksettingsdlgbase.h" |
| 30 |
#include "cppcheck_settings.h" |
| 31 |
class IConfigTool; |
| 32 |
|
| 33 |
class CppCheckSettings; |
| 34 |
|
| 35 |
class CppCheckSettingsDialog : public CppCheckSettingsDialogBase |
| 36 |
{ |
| 37 |
CppCheckSettings* m_settings; |
| 38 |
IConfigTool* m_conf; |
| 39 |
wxString m_defaultpath; |
| 40 |
wxArrayString m_SuppressionsKeys; |
| 41 |
|
| 42 |
public: |
| 43 |
CppCheckSettingsDialog(wxWindow* parent, CppCheckSettings* settings, IConfigTool *conf, const wxString& defaultpath, bool showDefsTab); |
| 44 |
virtual ~CppCheckSettingsDialog(); |
| 45 |
|
| 46 |
protected: |
| 47 |
// Warnings page |
| 48 |
virtual void OnChecksTickAll(wxCommandEvent& e); |
| 49 |
virtual void OnChecksUntickAll(wxCommandEvent& e); |
| 50 |
virtual void OnChecksTickAllUI(wxUpdateUIEvent& e); |
| 51 |
virtual void OnChecksUntickAllUI(wxUpdateUIEvent& e); |
| 52 |
virtual void OnJobsUpdateUI(wxUpdateUIEvent& event); |
| 53 |
|
| 54 |
// Exclude-files page |
| 55 |
virtual void OnAddFile (wxCommandEvent& e); |
| 56 |
virtual void OnRemoveFile (wxCommandEvent& e); |
| 57 |
virtual void OnClearList (wxCommandEvent& e); |
| 58 |
virtual void OnRemoveFileUI(wxUpdateUIEvent& e); |
| 59 |
virtual void OnClearListUI (wxUpdateUIEvent& e); |
| 60 |
|
| 61 |
|
| 62 |
// Suppressions page |
| 63 |
virtual void OnAddSuppression(wxCommandEvent& e); |
| 64 |
virtual void OnRemoveSuppression(wxCommandEvent& e); |
| 65 |
virtual void OnSuppressTickAll(wxCommandEvent& e); |
| 66 |
virtual void OnSuppressUntickAll(wxCommandEvent& e); |
| 67 |
virtual void OnRemoveSuppressionUI(wxUpdateUIEvent& e); |
| 68 |
virtual void OnSuppressTickAllUI(wxUpdateUIEvent& e); |
| 69 |
virtual void OnSuppressUntickAllUI(wxUpdateUIEvent& e); |
| 70 |
|
| 71 |
// Extra include dirs page |
| 72 |
virtual void OnIncludeDirsUpdateUI(wxUpdateUIEvent& event); |
| 73 |
virtual void OnAddIncludeDir(wxCommandEvent& event); |
| 74 |
virtual void OnRemoveIncludeDir(wxCommandEvent& event); |
| 75 |
virtual void OnRemoveIncludeDirUI(wxUpdateUIEvent& event); |
| 76 |
|
| 77 |
// Definitions page |
| 78 |
virtual void OnAddDefinition(wxCommandEvent& e); |
| 79 |
virtual void OnRemoveDefinition(wxCommandEvent& e); |
| 80 |
virtual void OnClearDefinitions(wxCommandEvent& e); |
| 81 |
virtual void OnRemoveDefinitionUI(wxUpdateUIEvent& e); |
| 82 |
virtual void OnClearDefinitionsUI(wxUpdateUIEvent& e); |
| 83 |
virtual void OnAddUndefine(wxCommandEvent& e); |
| 84 |
virtual void OnRemoveUndefine(wxCommandEvent& e); |
| 85 |
virtual void OnClearUndefines(wxCommandEvent& e); |
| 86 |
virtual void OnRemoveUndefineUI(wxUpdateUIEvent& e); |
| 87 |
virtual void OnClearUndefinesUI(wxUpdateUIEvent& e); |
| 88 |
|
| 89 |
virtual void OnBtnOK(wxCommandEvent& e); |
| 90 |
}; |
| 91 |
|
| 92 |
class CppCheckAddSuppressionDialog : public CppCheckAddSuppressionDialogBase |
| 93 |
{ |
| 94 |
public: |
| 95 |
CppCheckAddSuppressionDialog(wxWindow* parent) : CppCheckAddSuppressionDialogBase(parent) |
| 96 |
{ m_txtDescription->SetFocus(); } |
| 97 |
virtual ~CppCheckAddSuppressionDialog(){} |
| 98 |
|
| 99 |
wxTextCtrl* GetDescription() const { return m_txtDescription; } |
| 100 |
wxTextCtrl* GetKey() const { return m_txtKey; } |
| 101 |
|
| 102 |
protected: |
| 103 |
virtual void OnOKButtonUpdateUI(wxUpdateUIEvent& e); |
| 104 |
}; |
| 105 |
|
| 106 |
#endif // CPPCHECH_SETTINGS_DLG_H_INCLUDED |