From 6314f4e38131e2d8f9efc58002900ec231d6abe7 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Mon, 21 Jan 2013 12:02:30 +0100 Subject: [PATCH] Feature #1711 CreaDevManager application implementation - View Creation and additional classes documented. --- lib/creaDevManagerLib/wxCDMAppliHelpDialog.h | 6 ++ .../wxCDMApplicationHelpDialog.h | 6 ++ .../wxCDMBlackBoxHelpDialog.h | 6 ++ lib/creaDevManagerLib/wxCDMLibHelpDialog.h | 6 ++ .../wxCDMLibraryHelpDialog.h | 6 ++ lib/creaDevManagerLib/wxCDMMainHelpDialog.h | 5 ++ .../wxCDMNewBlackBoxDialog.h | 89 ++++++++++++++++++- lib/creaDevManagerLib/wxCDMNewPackageDialog.h | 67 +++++++++++++- lib/creaDevManagerLib/wxCDMNewProjectDialog.h | 72 ++++++++++++++- .../wxCDMPackageHelpDialog.h | 6 ++ .../wxCDMPackageManagerHelpDialog.h | 7 ++ .../wxCDMPackageManagerPanel.h | 61 ++++++++++++- .../wxCDMProjectActionsPanel.h | 44 +++++++++ .../wxCDMProjectDescriptionPanel.h | 85 ++++++++++++++++++ .../wxCDMProjectHelpDialog.h | 3 + .../wxCDMProjectStructureReportDialog.h | 40 +++++++++ lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h | 74 +++++++++++++++ 17 files changed, 576 insertions(+), 7 deletions(-) diff --git a/lib/creaDevManagerLib/wxCDMAppliHelpDialog.h b/lib/creaDevManagerLib/wxCDMAppliHelpDialog.h index 21cf046..40d8d11 100644 --- a/lib/creaDevManagerLib/wxCDMAppliHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMAppliHelpDialog.h @@ -79,6 +79,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 350, 600. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -106,25 +107,30 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when a cmakelists button is pressed. + * @param event cmakelists event. */ void OnEditCMake(wxCommandEvent& event); /** * Handler when a cmakelists button is hovered. + * @param event cmakelists event. */ void OnCMakeListsEnter(wxMouseEvent& event); /** * Handler when a cmakelists button hover finishes. + * @param event cmakelists event. */ void OnCMakeListsExit(wxMouseEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMApplicationHelpDialog.h b/lib/creaDevManagerLib/wxCDMApplicationHelpDialog.h index 0d891d0..f9b4131 100644 --- a/lib/creaDevManagerLib/wxCDMApplicationHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMApplicationHelpDialog.h @@ -81,6 +81,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 410, 670. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -107,25 +108,30 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when a cmakelists button is pressed. + * @param event cmakelists event. */ void OnCMakeLists(wxCommandEvent& event); /** * Handler when a cmakelists button is hovered. + * @param event cmakelists event. */ void OnCMakeListsEnter(wxMouseEvent& event); /** * Handler when a cmakelists button hover finishes. + * @param event cmakelists event. */ void OnCMakeListsExit(wxMouseEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMBlackBoxHelpDialog.h b/lib/creaDevManagerLib/wxCDMBlackBoxHelpDialog.h index 25438c6..66995d5 100644 --- a/lib/creaDevManagerLib/wxCDMBlackBoxHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMBlackBoxHelpDialog.h @@ -81,6 +81,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 410, 700. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -107,25 +108,30 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when a cmakelists button is pressed. + * @param event cmakelists event. */ void OnCMakeLists(wxCommandEvent& event); /** * Handler when a cmakelists button is hovered. + * @param event cmakelists event. */ void OnCMakeListsEnter(wxMouseEvent& event); /** * Handler when a cmakelists button hover finishes. + * @param event cmakelists event. */ void OnCMakeListsExit(wxMouseEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMLibHelpDialog.h b/lib/creaDevManagerLib/wxCDMLibHelpDialog.h index 5620dc9..9d7049a 100644 --- a/lib/creaDevManagerLib/wxCDMLibHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMLibHelpDialog.h @@ -79,6 +79,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 350, 600. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -106,25 +107,30 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when a cmakelists button is pressed. + * @param event cmakelists event. */ void OnEditCMake(wxCommandEvent& event); /** * Handler when a cmakelists button is hovered. + * @param event cmakelists event. */ void OnEditCMakeMouseEnter(wxMouseEvent& event); /** * Handler when a cmakelists button hover finishes. + * @param event cmakelists event. */ void OnEditCMakeMouseExit(wxMouseEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMLibraryHelpDialog.h b/lib/creaDevManagerLib/wxCDMLibraryHelpDialog.h index 1d327fa..f475b50 100644 --- a/lib/creaDevManagerLib/wxCDMLibraryHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMLibraryHelpDialog.h @@ -81,6 +81,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 410, 650. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -107,26 +108,31 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when a cmakelists button is pressed. + * @param event cmakelists event. */ void OnCMakeLists(wxCommandEvent& event); /** * Handler when a cmakelists button is hovered. + * @param event cmakelists event. */ void OnCMakeListsEnter(wxMouseEvent& event); /** * Handler when a cmakelists button hover finishes. + * @param event cmakelists event. */ void OnCMakeListsExit(wxMouseEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMMainHelpDialog.h b/lib/creaDevManagerLib/wxCDMMainHelpDialog.h index 1fc0e2b..a011c24 100644 --- a/lib/creaDevManagerLib/wxCDMMainHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMMainHelpDialog.h @@ -79,6 +79,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 350, 370. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -106,20 +107,24 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when new project button is pressed. + * @param event Unused. */ void OnNewProject(wxCommandEvent& event); /** * Handler when open project button is pressed. + * @param event Unused. */ void OnOpenProject(wxCommandEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMNewBlackBoxDialog.h b/lib/creaDevManagerLib/wxCDMNewBlackBoxDialog.h index 9d5a7fc..1c48f94 100644 --- a/lib/creaDevManagerLib/wxCDMNewBlackBoxDialog.h +++ b/lib/creaDevManagerLib/wxCDMNewBlackBoxDialog.h @@ -23,7 +23,7 @@ # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ -*/ + */ /* @@ -40,10 +40,22 @@ #include #include +/** + * Dialog to create a new Black Box in a Crea Project. + */ class wxCDMNewBlackBoxDialog : public wxDialog { DECLARE_EVENT_TABLE() public: + /** + * New Black Box Dialog Constructor. + * @param parent Parent window reference. + * @param id Dialog ID. By default wxID_ANY. + * @param caption Dialog label. By default "New Black Box". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 500, 500. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + */ wxCDMNewBlackBoxDialog( wxWindow* parent, wxWindowID id = wxID_ANY, @@ -52,7 +64,20 @@ public: const wxSize& size = wxSize(500,500), long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + /** + * Destructor. + */ ~wxCDMNewBlackBoxDialog(); + /** + * New Black Box Dialog Constructor. + * @param parent Parent window reference. + * @param id Dialog ID. By default wxID_ANY. + * @param caption Dialog label. By default "New Black Box". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 500, 500. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return True if the creation was successful. + */ bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, @@ -62,29 +87,89 @@ public: long style = wxDEFAULT_DIALOG_STYLE ); + /** + * Returns the black box name chosen by the user. + * @return Black box name. + */ const wxString GetBlackBoxName() const; + /** + * Returns the black box's author name chosen by the user. + * @return Black box's author name. + */ const wxString GetBlackBoxAuthor() const; + /** + * Returns the black box's author email chosen by the user. + * @return Black box's author email. + */ const wxString GetBlackBoxAuthorEmail() const; + /** + * Returns the black box description chosen by the user. + * @return Black box description. + */ const wxString GetBlackBoxDescription() const ; + /** + * Returns the black box categories chosen by the user. + * @return Black box categories. + */ const wxString GetBlackBoxCategories() const ; + /** + * Returns the black box type chosen by the user. + * @return Black box type. + */ const wxString GetBlackBoxType() const; + /** + * Returns the black box format chosen by the user. + * @return Black box format. + */ const wxString GetBlackBoxFormat() const; protected: + /** + * Creates the visual controls of the Dialog. + */ void CreateControls(); private: + /** + * Black box name. + */ wxTextCtrl* blackBoxName; + /** + * Black box's author name. + */ wxTextCtrl* blackBoxAuthor; + /** + * Black box's author email. + */ wxTextCtrl* blackBoxAuthorEmail; + /** + * Black box description. + */ wxTextCtrl* blackBoxDescription; + /** + * Black box categories. + */ wxTextCtrl* blackBoxCategories; + /** + * Black box type. + */ wxChoice* blackBoxType; + /** + * Black box format. + */ wxChoice* blackBoxFormat; -//handlers + //handlers protected: + /* + * Handles when the create black box button is pressed. + * @param event Unused event. + */ void OnCreateBlackBox(wxCommandEvent& event); + /* + * Handles when the cancel button is pressed. + * @param event Unused event. + */ void OnCancel(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMNewPackageDialog.h b/lib/creaDevManagerLib/wxCDMNewPackageDialog.h index 1f0e55f..eda8a91 100644 --- a/lib/creaDevManagerLib/wxCDMNewPackageDialog.h +++ b/lib/creaDevManagerLib/wxCDMNewPackageDialog.h @@ -23,7 +23,7 @@ # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ -*/ + */ /* @@ -39,10 +39,22 @@ #include #include +/** + * Dialog to create a new Package in a Crea Project. + */ class wxCDMNewPackageDialog : public wxDialog { DECLARE_EVENT_TABLE() public: + /** + * New Package Dialog Constructor. + * @param parent Parent window reference. + * @param id Dialog ID. By default wxID_ANY. + * @param caption Dialog label. By default "New Package". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 500, 400. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + */ wxCDMNewPackageDialog( wxWindow* parent, wxWindowID id = wxID_ANY, @@ -51,7 +63,19 @@ public: const wxSize& size = wxSize(500,400), long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + /** + * Destructor. + */ ~wxCDMNewPackageDialog(); + /** + * New Package Dialog Creator. + * @param parent Parent window reference. + * @param id Dialog ID. By default wxID_ANY. + * @param caption Dialog label. By default "New Package". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 500, 400. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + */ bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, @@ -61,23 +85,62 @@ public: long style = wxDEFAULT_DIALOG_STYLE ); + /** + * Returns the package name chosen by the user. + * @return Package name. + */ const wxString GetPackageName(); + /** + * Returns the package author name chosen by the user. + * @return Package author name. + */ const wxString GetPackageAuthor(); + /** + * Returns the package author's email chosen by the user. + * @return Package author's email. + */ const wxString GetPackageAuthorEmail(); + /** + * Returns the package description chosen by the user. + * @return Package description. + */ const wxString GetPackageDescription(); protected: + /** + * Creates the visual controls of the Dialog. + */ void CreateControls(); private: + /** + * Package name. + */ wxTextCtrl* packageName; + /** + * Package author name. + */ wxTextCtrl* packageAuthor; + /** + * Package author's email. + */ wxTextCtrl* packageAuthorEmail; + /** + * Package description. + */ wxTextCtrl* packageDescription; -//handlers + //handlers protected: + /** + * Handles when the create package button is pressed. + * @param event Unused event. + */ void OnCreatePackage(wxCommandEvent& event); + /** + * Handles when the cancel button is pressed. + * @param event Unused event. + */ void OnCancel(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMNewProjectDialog.h b/lib/creaDevManagerLib/wxCDMNewProjectDialog.h index 22dec24..be99c95 100644 --- a/lib/creaDevManagerLib/wxCDMNewProjectDialog.h +++ b/lib/creaDevManagerLib/wxCDMNewProjectDialog.h @@ -23,7 +23,7 @@ # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ -*/ + */ /* @@ -39,10 +39,22 @@ #include #include +/** + * Dialog to create a new Crea Project. + */ class wxCDMNewProjectDialog : public wxDialog { DECLARE_EVENT_TABLE() public: + /** + * New Project Dialog Constructor. + * @param parent Parent window reference. + * @param id Dialog ID. By default wxID_ANY. + * @param caption Dialog label. By default "New Project". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 700, 400. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + */ wxCDMNewProjectDialog( wxWindow* parent, wxWindowID id = wxID_ANY, @@ -51,7 +63,20 @@ public: const wxSize& size = wxSize(700,400), long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + /** + * Destructor. + */ ~wxCDMNewProjectDialog(); + /** + * New Project Dialog Creator. + * @param parent Parent window reference. + * @param id Dialog ID. By default wxID_ANY. + * @param caption Dialog label. By default "New Project". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 700, 400. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return True if the creation was successful. + */ bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, @@ -61,24 +86,67 @@ public: long style = wxDEFAULT_DIALOG_STYLE ); + /** + * Returns the project location chosen by the user. + * @return Project creation path. + */ const wxString GetProjectLocation(); + /** + * Returns the project name chosen by the user. + * @return Project name. + */ const wxString GetProjectName(); + /** + * Returns the default package authors chosen by the user. + * @return Default Package authors. + */ const wxString GetPackageAuthor(); + /** + * Returns the default package description chosen by the user. + * @return Default Package description. + */ const wxString GetPackageDescription(); protected: + /** + * Creates the visual controls of the Dialog. + */ void CreateControls(); private: + /** + * Project creation path. + */ wxStaticText* projectLocation; + /** + * Project Name. + */ wxTextCtrl* projectName; + /** + * Default Package Author. + */ wxTextCtrl* packageAuthor; + /** + * Default Package Description. + */ wxTextCtrl* packageDescription; -//handlers + //handlers protected: + /** + * Handles when the create project button is pressed. If no path or no author was specified, the dialog shows an error. + * @param event Unused event. + */ void OnCreateProject(wxCommandEvent& event); + /** + * Handles when the cancel button is pressed. + * @param event Unused event. + */ void OnCancel(wxCommandEvent& event); + /** + * Handles when the choose location is pressed. a Directory dialog is shown and the new project location is chosen. + * @param event Unused event. + */ void OnChooseLocation(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMPackageHelpDialog.h b/lib/creaDevManagerLib/wxCDMPackageHelpDialog.h index 9dd08c6..870f7a7 100644 --- a/lib/creaDevManagerLib/wxCDMPackageHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMPackageHelpDialog.h @@ -81,6 +81,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 350, 570. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -107,25 +108,30 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when a cmakelists button is pressed. + * @param event cmakelists event. */ void OnCMakeLists(wxCommandEvent& event); /** * Handler when a cmakelists button is hovered. + * @param event cmakelists event. */ void OnCMakeListsEnter(wxMouseEvent& event); /** * Handler when a cmakelists button hover finishes. + * @param event cmakelists event. */ void OnCMakeListsExit(wxMouseEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMPackageManagerHelpDialog.h b/lib/creaDevManagerLib/wxCDMPackageManagerHelpDialog.h index 1f03aa0..50c8ed1 100644 --- a/lib/creaDevManagerLib/wxCDMPackageManagerHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMPackageManagerHelpDialog.h @@ -79,6 +79,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 350, 450. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -106,29 +107,35 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when the create package button is pressed. + * @param event Unused. */ void OnCreatePackage(wxCommandEvent& event); /** * Handler when a cmakelists button is pressed. + * @param event cmakelists event. */ void OnEditCMake(wxCommandEvent& event); /** * Handler when a cmakelists button is hovered. + * @param event cmakelists event. */ void OnEditCMakeMouseEnter(wxMouseEvent& event); /** * Handler when a cmakelists button hover finishes. + * @param event cmakelists event. */ void OnEditCMakeMouseExit(wxMouseEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMPackageManagerPanel.h b/lib/creaDevManagerLib/wxCDMPackageManagerPanel.h index 8990868..dcf2fd3 100644 --- a/lib/creaDevManagerLib/wxCDMPackageManagerPanel.h +++ b/lib/creaDevManagerLib/wxCDMPackageManagerPanel.h @@ -42,12 +42,24 @@ #include "modelCDMProject.h" - +/** + * Package manager description panel. Shows the available packages in the project and the actions corresponding to package management. + */ class wxCDMPackageManagerPanel : public wxPanel { DECLARE_EVENT_TABLE() public: + /** + * Package manager description panel Constructor. + * @param parent Parent window reference. + * @param project Project class reference. + * @param id Panel ID. By default -1. + * @param caption Panel label. By default "Description Frame". + * @param pos Panel position. By default wxDefaultPosition. + * @param size Panel size. By default wxDefaultSize. + * @param style Panel style. By default wxDEFAULT_FRAME_STYLE. + */ wxCDMPackageManagerPanel( wxWindow* parent, modelCDMProject* project, @@ -58,8 +70,21 @@ public: long style = wxDEFAULT_FRAME_STYLE ); + /** + * Destructor. + */ ~wxCDMPackageManagerPanel(); + /** + * Package manager description panel Creator. + * @param parent Parent window reference. + * @param project Project class reference. + * @param id Panel ID. By default -1. + * @param caption Panel label. By default "Description Frame". + * @param pos Panel position. By default wxDefaultPosition. + * @param size Panel size. By default wxDefaultSize. + * @param style Panel style. By default wxDEFAULT_FRAME_STYLE. + */ bool Create( wxWindow* parent, modelCDMProject* project, @@ -70,23 +95,57 @@ public: long style = wxDEFAULT_FRAME_STYLE ); + /** + * Creates all the controls in the panel (property and action controls). + */ void CreateControls(); + /** + * Retrieves the described project class reference. + * @return Project reference. + */ modelCDMProject* GetProject() const; private: + /** + * Project described + */ modelCDMProject* project; //handlers protected: + /** + * Handles when a return link is pressed. + */ void OnBtnReturn(wxHyperlinkEvent& event); + /** + * Handles when a packages link is pressed. + */ void OnLnkPackageSelect(wxHyperlinkEvent& event); + /** + * Handles when the create package button is pressed. + */ void OnBtnCreatePackage(wxCommandEvent& event); + /** + * Handles when the open package cmakelists file button is pressed. + */ void OnBtnEditCMakeLists(wxCommandEvent& event); + /** + * Handles when a package link is hovered. + */ void OnMouseEnter(wxMouseEvent& event); + /** + * Handles when a package link button finishes hover. + */ void OnMouseExit(wxMouseEvent& event); + /** + * Handles when the open cmakelists file button is hovered. + */ void OnCMakeMouseEnter(wxMouseEvent& event); + /** + * Handles when the open cmakelists file button finishes hover. + */ void OnCMakeMouseExit(wxMouseEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.h b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.h index dc98709..93850e2 100755 --- a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.h +++ b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.h @@ -41,10 +41,23 @@ #include "modelCDMProject.h" +/** + * Panel with common actions for an open Crea project. + */ class wxCDMProjectActionsPanel : public wxPanel { DECLARE_EVENT_TABLE() public: + /** + * Project actions panel constructor. + * @param parent Parent window reference. + * @param project Project class reference. + * @param id Panel ID. By default -1. + * @param caption Panel label. By default "Description Frame". + * @param pos Panel position. By default wxDefaultPosition. + * @param size Panel size. By default wxDefaultSize. + * @param style Panel style. By default wxDEFAULT_FRAME_STYLE. + */ wxCDMProjectActionsPanel( wxWindow* parent, modelCDMProject* project, @@ -54,7 +67,20 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE ); + /** + * Destructor. + */ ~wxCDMProjectActionsPanel(); + /** + * Project actions panel constructor. + * @param parent Parent window reference. + * @param id Panel ID. By default -1. + * @param caption Panel label. By default "Description Frame". + * @param pos Panel position. By default wxDefaultPosition. + * @param size Panel size. By default wxDefaultSize. + * @param style Panel style. By default wxDEFAULT_FRAME_STYLE. + * @return True if the creation was successful. + */ bool Create( wxWindow* parent, wxWindowID id = -1, @@ -65,14 +91,32 @@ public: ); protected: + /** + * Creates the Panel controls (buttons) + */ void CreateControls(); + /** + * Handles when the Check Project Structure button is pressed. + */ void OnBtnCheckProjectStructure(wxCommandEvent& event); + /** + * Handles when the Configure Compilation button is pressed. + */ void OnBtnConfigureBuild(wxCommandEvent& event); + /** + * Handles when the Compile Project button is pressed. + */ void OnBtnBuildProject(wxCommandEvent& event); + /** + * Handles when the Plug packages button is pressed. + */ void OnBtnConnectProject(wxCommandEvent& event); private: + /** + * Project class reference + */ modelCDMProject* project; }; diff --git a/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h b/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h index 0341921..86726c5 100644 --- a/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h +++ b/lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h @@ -40,11 +40,24 @@ #include "modelCDMProject.h" +/** + * Project Description Panel. Shows the project properties and the principal actions for the project. + */ class wxCDMProjectDescriptionPanel : public wxPanel { DECLARE_EVENT_TABLE() public: + /** + * Project Description panel Constructor. + * @param parent Parent window reference. + * @param project Project class reference. + * @param id Panel ID. By default -1. + * @param caption Panel label. By default "Description Frame". + * @param pos Panel position. By default wxDefaultPosition. + * @param size Panel size. By default wxDefaultSize. + * @param style Panel style. By default wxDEFAULT_FRAME_STYLE. + */ wxCDMProjectDescriptionPanel( wxWindow* parent, modelCDMProject* project, @@ -55,8 +68,22 @@ public: long style = wxDEFAULT_FRAME_STYLE ); + /** + * Destructor. + */ ~wxCDMProjectDescriptionPanel(); + /** + * Project Description panel Creator. + * @param parent Parent window reference. + * @param project Project class reference. + * @param id Panel ID. By default -1. + * @param caption Panel label. By default "Description Frame". + * @param pos Panel position. By default wxDefaultPosition. + * @param size Panel size. By default wxDefaultSize. + * @param style Panel style. By default wxDEFAULT_FRAME_STYLE. + * @return True if creation was successful. + */ bool Create( wxWindow* parent, modelCDMProject* project, @@ -67,31 +94,89 @@ public: long style = wxDEFAULT_FRAME_STYLE ); + /** + * Creates all the controls in the panel (property and action controls). + */ void CreateControls(); + /** + * Retrieves the described project class reference. + * @return Project reference. + */ modelCDMProject* GetProject() const; private: + /** + * Project described + */ modelCDMProject* project; + /** + * Text control showing the project version. + */ wxStaticText* versiontc; + /** + * Text control showing the project version date. + */ wxStaticText* versionDatetc; + /** + * Text control showing the project build path. + */ wxStaticText* buildPathtc; //handlers protected: + /** + * Handles when the manage packages button is pressed. + */ void OnBtnManagePackages(wxCommandEvent& event); + /** + * Handles when the manage libraries button is pressed. + */ void OnBtnManageLibraries(wxCommandEvent& event); + /** + * Handles when the manage applications button is pressed. + */ void OnBtnManageApplications(wxCommandEvent& event); + /** + * Handles when the open cmakelists file button is pressed. + */ void OnBtnEditCMakeLists(wxCommandEvent& event); + /** + * Handles when the choose build path button is pressed. + */ void OnBtnSetBuildPath(wxCommandEvent& event); + /** + * Handles when the open containing folder button is pressed. + */ void OnBtnOpenFolder(wxCommandEvent& event); + /** + * Handles when the set version button is pressed. + */ void OnBtnSetVersion(wxCommandEvent& event); + /** + * Handles when the open cmakelists file button is hovered. + */ void OnCMakeMouseEnter(wxMouseEvent& event); + /** + * Handles when the open cmakelists file button finishes hover. + */ void OnCMakeMouseExit(wxMouseEvent& event); + /** + * Handles when the manage applications button is hovered. + */ void OnAppliMouseEnter(wxMouseEvent& event); + /** + * Handles when the manage applications file button finishes hover. + */ void OnAppliMouseExit(wxMouseEvent& event); + /** + * Handles when the manage libraries button is hovered. + */ void OnLibMouseEnter(wxMouseEvent& event); + /** + * Handles when the manage libraries button finishes hover. + */ void OnLibMouseExit(wxMouseEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h b/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h index bc79bf9..2e03c56 100644 --- a/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h +++ b/lib/creaDevManagerLib/wxCDMProjectHelpDialog.h @@ -79,6 +79,7 @@ public: * @param position Dialog position. By default wxDefaultPosition. * @param size Dialog size. By default 350, 700. * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. */ bool Create( wxWindow* parent, @@ -106,11 +107,13 @@ private: protected: /** * Handler to close help dialog. + * @param event Unused. */ void OnFinish(wxCommandEvent& event); /** * Handler when the disable help checkbox is changed. + * @param event Check box event. */ void OnDisableHelp(wxCommandEvent& event); }; diff --git a/lib/creaDevManagerLib/wxCDMProjectStructureReportDialog.h b/lib/creaDevManagerLib/wxCDMProjectStructureReportDialog.h index 1536e09..72fb814 100644 --- a/lib/creaDevManagerLib/wxCDMProjectStructureReportDialog.h +++ b/lib/creaDevManagerLib/wxCDMProjectStructureReportDialog.h @@ -41,10 +41,23 @@ #include +/** + * Project Structure Report Dialog. Allows the user to inspect what is compiling and what's not. + */ class wxCDMProjectStructureReportDialog : public wxDialog { DECLARE_EVENT_TABLE() public: + /** + * Project Structure Report Dialog Constructor. + * @param parent Parent window. + * @param properties Project precompilation check map. + * @param id Window ID. By default wxID_ANY. + * @param caption Window label. By default "Project Structure Report". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 700, 500. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + */ wxCDMProjectStructureReportDialog( wxWindow* parent, const std::map& properties, @@ -54,7 +67,20 @@ public: const wxSize& size = wxSize(700,500), long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ); + /** + * Destructor. + */ ~wxCDMProjectStructureReportDialog(); + /** + * Project Structure Report Dialog Creator. + * @param parent Parent window. + * @param id Window ID. By default wxID_ANY. + * @param caption Window label. By default "Project Structure Report". + * @param position Dialog position. By default wxDefaultPosition. + * @param size Dialog size. By default 700, 500. + * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER. + * @return if the creation was successful. + */ bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, @@ -65,15 +91,29 @@ public: ); protected: + /** + * Creates the Dialog controls (text and button). + */ void CreateControls(); //attributes private: + /** + * Project check results. + */ std::map properties; //handlers protected: + /** + * Handles when the close button is pressed. + * @param event Unused. + */ void OnFinish(wxCommandEvent& event); + /** + * Creates the project structure check results processed for showing them. In HTML + * @return Report in HTML format. + */ wxString GetContent(); }; diff --git a/lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h b/lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h index 82a9698..87958dd 100755 --- a/lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h +++ b/lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h @@ -44,9 +44,22 @@ #include #include +/** + * Project Tree Control. Shows a project's content in a hierarchy tree control. + */ class wxCDMProjectsTreeCtrl: public wxTreeCtrl { public: + /** + * Project Tree Control Constructor. + * @param parent Parent window reference. + * @param id Control ID, by default wxID_ANY. + * @param pos Control position. By default wxDefaultPosition. + * @param size Control size. By default wxDefaultSize. + * @param style Control style. By default wxTR_DEFAULT_STYLE. + * @param validator Validator. By default wxDefaultValidator. + * @param name Control Name. By default "Projects tree". + */ wxCDMProjectsTreeCtrl( wxWindow *parent, wxWindowID id=wxID_ANY, @@ -56,7 +69,21 @@ public: const wxValidator &validator=wxDefaultValidator, const wxString &name=_("Projects tree") ); + /** + * Destructor. + */ ~wxCDMProjectsTreeCtrl(); + /** + * Project Tree Control Creator. + * @param parent Parent window reference. + * @param id Control ID, by default wxID_ANY. + * @param pos Control position. By default wxDefaultPosition. + * @param size Control size. By default wxDefaultSize. + * @param style Control style. By default wxTR_DEFAULT_STYLE. + * @param validator Validator. By default wxDefaultValidator. + * @param name Control Name. By default "Projects tree". + * @return True if the creation was successful. + */ bool Create( wxWindow *parent, wxWindowID id=wxID_ANY, @@ -67,23 +94,70 @@ public: const wxString &name=_("Projects tree") ); + /** + * Builds the tree hierarchy with the given model elements. + */ void BuildTree(std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, modelCDMProject* tree = NULL); private: + /** + * A Icon ID. + */ int ID_AIcon; + /** + * Ap Icon ID. + */ int ID_ApIcon; + /** + * BB Icon ID. + */ int ID_BBIcon; + /** + * C Icon ID. + */ int ID_Cicon; + /** + * CM Icon ID. + */ int ID_CMIcon; + /** + * Fd Icon ID. + */ int ID_FdIcon; + /** + * Fl Icon ID. + */ int ID_FlIcon; + /** + * Lb Icon ID. + */ int ID_LbIcon; + /** + * L Icon ID. + */ int ID_LIcon; + /** + * Pr Icon ID. + */ int ID_PrIcon; + /** + * Pk Icon ID. + */ int ID_PkIcon; + /** + * Builds the tree with the hierarchy given and fills the modelElements map. + * @param tree Root node of the tree. + * @param modelElements Id->node map. + * @param parent ID of the root node ID. + */ void BuildTree(const std::vector& tree, std::map< wxTreeItemId, modelCDMIProjectTreeNode* >& modelElements, wxTreeItemId parent); + /** + * Retrieves the icon ID of the given node by its type. + * @param node Node to search its icon. + * @return Icon ID + */ int GetIconId(modelCDMIProjectTreeNode* node); }; -- 2.45.1