Changeset 214

Show
Ignore:
Timestamp:
02/07/08 17:45:26 (4 years ago)
Author:
uncle_fungus
Message:

doxygenated preferencesDialog

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.3.2beta3/src/include/preferencesDialog.h

    r122 r214  
    1515*/ 
    1616 
     17/** 
     18 * \file preferencesDialog.h 
     19 * The preferences dialog. 
     20 * Creates the dialog to reconfigure FahMon. 
     21 * \author François Ingelrest 
     22 * \author Andrew Schofield 
     23 **/ 
     24 
    1725#ifndef _PREFERENCESDIALOG_H 
    1826#define _PREFERENCESDIALOG_H 
     
    3139 
    3240/** 
    33 * This dialog box allows the user to change 'public' preferences 
    34 * It's a singleton 
    35 **/ 
     41 * This dialog box allows the user to change 'public' preferences. 
     42 * This class can only be instanciated once. 
     43 **/ 
    3644class PreferencesDialog : public wxDialog 
    3745{ 
    3846protected: 
    39         static PreferencesDialog *mInstance; 
     47        static PreferencesDialog *mInstance; /**< The single instance of the PreferencesDialog */ 
    4048 
    4149        // Widgets for the general tab 
    42         wxCheckBox *mGeneralEnableTrayIcon; 
    43         wxCheckBox *mGeneralAutoUpdateProjectsDatabase; 
    44         wxCheckBox *mGeneralCollectXYZFiles; 
    45         wxCheckBox *mGeneralKeepInaccessibleClientsLast; 
    46         wxCheckBox *mGeneralStartMinimised; 
    47         wxCheckBox *mGeneralUpdateCheck; 
     50        wxCheckBox *mGeneralEnableTrayIcon; /**< Checkbox for tray icon option */ 
     51        wxCheckBox *mGeneralAutoUpdateProjectsDatabase; /**< Checkbox for auto updating projects database */ 
     52        wxCheckBox *mGeneralCollectXYZFiles; /**< Checkbox for collecting xyz files */ 
     53        wxCheckBox *mGeneralKeepInaccessibleClientsLast; /**< Checkbox for listing dead clients last */ 
     54        wxCheckBox *mGeneralStartMinimised; /**< Checkbox for starting minimised */ 
     55        wxCheckBox *mGeneralUpdateCheck; /**< Checkbox for update checking */ 
    4856 
    4957        // Widgets for the monitoring tab 
    50         wxChoice     *mMonitoringETADisplayStyle; 
    51         wxCheckBox   *mMonitoringAdvancedReload; 
    52         wxCheckBox   *mMonitoringAutoReload; 
    53         wxStaticText *mMonitoringAutoReloadInt; 
    54         wxSpinCtrl   *mMonitoringAutoReloadFrequency; 
    55         wxChoice     *mMonitoringPPDType; 
    56         wxCheckBox   *mMonitoringIgnoreAsynchrony; 
     58        wxChoice     *mMonitoringETADisplayStyle; /**< Select box for ETA style */ 
     59        wxCheckBox   *mMonitoringAdvancedReload; /**< Checkbox for advanced reload system */ 
     60        wxCheckBox   *mMonitoringAutoReload; /**< Checkbox for auto reload */ 
     61        wxStaticText *mMonitoringAutoReloadInt; /**< Text control for reload interval */ 
     62        wxSpinCtrl   *mMonitoringAutoReloadFrequency; /**< Spin control for reload interval */ 
     63        wxChoice     *mMonitoringPPDType; /**< Select box for PPD calculation method */ 
     64        wxCheckBox   *mMonitoringIgnoreAsynchrony; /**< Checkbox for ignoring asynchronous clocks */ 
    5765 
    5866        // Widgets for the networking tab 
    59         wxCheckBox   *mNetworkingUseProxy; 
    60         wxTextCtrl   *mNetworkingProxyAddress; 
    61         wxTextCtrl   *mNetworkingProxyPort; 
    62         wxCheckBox   *mNetworkingUseProxyAuthentication; 
    63         wxTextCtrl   *mNetworkingProxyUsername; 
    64         wxTextCtrl   *mNetworkingProxyPassword; 
    65         wxStaticText *mNetworkingLabelAddress; 
    66         wxStaticText *mNetworkingLabelPort; 
    67         wxStaticText *mNetworkingLabelUsername; 
    68         wxStaticText *mNetworkingLabelPassword; 
     67        wxCheckBox   *mNetworkingUseProxy; /**< Checkbox for use of proxy */ 
     68        wxTextCtrl   *mNetworkingProxyAddress; /**< Input box for proxy address */ 
     69        wxTextCtrl   *mNetworkingProxyPort; /**< Input box for proxy port */ 
     70        wxCheckBox   *mNetworkingUseProxyAuthentication; /**< Checkbox for use of proxy authentication */ 
     71        wxTextCtrl   *mNetworkingProxyUsername; /**< Input box for proxy username */ 
     72        wxTextCtrl   *mNetworkingProxyPassword; /**< Input box for proxy password */ 
     73        wxStaticText *mNetworkingLabelAddress; /**< Text control for proxy address */ 
     74        wxStaticText *mNetworkingLabelPort; /**< Text control for proxy port */ 
     75        wxStaticText *mNetworkingLabelUsername; /**< Text control for proxy username */ 
     76        wxStaticText *mNetworkingLabelPassword; /**< Text control for proxy password */ 
    6977 
    7078        // Widgets for the advanced tab 
    71         wxCheckBox   *mAdvancedUseAlternateProjectSource; 
    72         wxTextCtrl   *mAdvancedAlternateProjectSourceLocationAddress; 
    73         wxStaticText *mAdvancedLabelLocationAddress; 
    74         wxCheckBox   *mAdvancedUseLocalFile; 
    75         wxTextCtrl   *mAdvancedLocalFileLocation; 
    76         wxStaticText *mAdvancedLabelLocalFile; 
    77         wxButton     *mAdvancedLocationChooser; 
     79        wxCheckBox   *mAdvancedUseAlternateProjectSource; /**< Checkbox for use of alternative update source */ 
     80        wxTextCtrl   *mAdvancedAlternateProjectSourceLocationAddress; /**< Input box for alternative update source location */ 
     81        wxStaticText *mAdvancedLabelLocationAddress; /**< Text control for alternative address location */ 
     82        wxCheckBox   *mAdvancedUseLocalFile; /**< Checkbox for use of local file as update source */ 
     83        wxTextCtrl   *mAdvancedLocalFileLocation; /**< Input box for local file location */ 
     84        wxStaticText *mAdvancedLabelLocalFile; /**< Text control for local file location */ 
     85        wxButton     *mAdvancedLocationChooser; /**< Button to open file chooser for local file */ 
    7886 
    7987        // Widgets for the system tab 
    80         wxTextCtrl   *mSystemBrowser; 
    81         wxStaticText *mSystemBrowserLabel; 
    82         wxChoice     *mSystemFileManager; 
    83         wxStaticText *mSystemFileManagerLabel; 
    84         wxTextCtrl   *mSystemOtherFM; 
    85         wxStaticText *mSystemOtherFMLabel; 
    86         wxCheckBox   *mSystemOverrideTimezone; 
    87         wxSpinCtrl   *mSystemTZ; 
     88        wxTextCtrl   *mSystemBrowser; /**< Input box for web browser */ 
     89        wxStaticText *mSystemBrowserLabel; /**< Text control for web browser */ 
     90        wxChoice     *mSystemFileManager; /**< Select box for file manager */ 
     91        wxStaticText *mSystemFileManagerLabel; /**< Text control for file manager */ 
     92        wxTextCtrl   *mSystemOtherFM; /**< Text control for alternative file manager */ 
     93        wxStaticText *mSystemOtherFMLabel; /**< Input box for alternative file manager */ 
     94        wxCheckBox   *mSystemOverrideTimezone; /**< Checkbox for overriding timezone */ 
     95        wxSpinCtrl   *mSystemTZ; /**< Spin control for timezone offset */ 
    8896 
    8997        // Widgets for the webapp tab 
    90         wxTextCtrl   *mWebAppWebAppLocation; 
    91         wxStaticText *mWebAppWebAppLabel; 
    92         wxButton     *mWebAppWebAppLocationChooser; 
    93         wxCheckBox   *mWebAppUseWebApp; 
    94         wxTextCtrl   *mWebAppSimpleWebLocation; 
    95         wxStaticText *mWebAppSimpleWebLabel; 
    96         wxButton     *mWebAppSimpleWebLocationChooser; 
    97         wxCheckBox   *mWebAppUseSimpleWeb; 
    98         wxTextCtrl   *mWebAppSimpleTextLocation; 
    99         wxStaticText *mWebAppSimpleTextLabel; 
    100         wxButton     *mWebAppSimpleTextLocationChooser; 
    101         wxCheckBox   *mWebAppUseSimpleText; 
     98        wxTextCtrl   *mWebAppWebAppLocation; /**< Input box for fancy web output location */ 
     99        wxStaticText *mWebAppWebAppLabel; /**< Text control for fancy web output location */ 
     100        wxButton     *mWebAppWebAppLocationChooser; /**< Button to open file chooser for fancy web output location */ 
     101        wxCheckBox   *mWebAppUseWebApp; /**< Checkbox for use of fancy web output */ 
     102        wxTextCtrl   *mWebAppSimpleWebLocation; /**< Input box for simple web output location */ 
     103        wxStaticText *mWebAppSimpleWebLabel; /**< Text control for simple web output location */ 
     104        wxButton     *mWebAppSimpleWebLocationChooser; /**< Button to open file chooser for simple web output location */ 
     105        wxCheckBox   *mWebAppUseSimpleWeb; /**< Checkbox for use of simple web output */ 
     106        wxTextCtrl   *mWebAppSimpleTextLocation; /**< Input box for simple text output location */ 
     107        wxStaticText *mWebAppSimpleTextLabel; /**< Text control for simple text output location */ 
     108        wxButton     *mWebAppSimpleTextLocationChooser; /**< Button to open file chooser for simple text output location */ 
     109        wxCheckBox   *mWebAppUseSimpleText; /**< Checkbox for use of simple text output */ 
    102110 
    103111        // Storage for the initial value of some important preferences 
    104112        // This is needed to detect when one of them has changed, so that the concerned component can be warned 
    105         bool     mInitAdvancedReload; 
    106         bool     mInitAutoReload; 
    107         bool     mInitEnableTrayIcon; 
    108         bool     mInstantFrames; 
    109         bool     mInitOverrideTz; 
    110         bool     mInitIgnoreAsynchronousClocks; 
    111         wxInt32  mInitTimezone; 
    112         wxUint32 mInitAutoReloadFrequency; 
    113         wxUint32 mInitETADisplayStyle; 
    114         wxUint32 mInitPPDDisplayStyle; 
    115  
    116  
     113        bool     mInitAdvancedReload; /**< Initial value for advanced reload option */ 
     114        bool     mInitAutoReload; /**< Inititial value for auto reload option */ 
     115        bool     mInitEnableTrayIcon; /**< Initial value for tray icon option */ 
     116        bool     mInstantFrames; /**< Initial value for instant frames option */ 
     117        bool     mInitOverrideTz; /**< Initial value for overriding of timezone */ 
     118        bool     mInitIgnoreAsynchronousClocks; /**< Initial value for ignoring asynchronous clocks */ 
     119        wxInt32  mInitTimezone; /**< Initial value for timezone */ 
     120        wxUint32 mInitAutoReloadFrequency; /**< Initial value for auto reload frequency */ 
     121        wxUint32 mInitETADisplayStyle; /**< Initial value for ETA display style */ 
     122        wxUint32 mInitPPDDisplayStyle; /**< Initial value for PPD display style */ 
     123 
     124        /** 
     125         * Constructor. 
     126         * Contructs a Preferences Dialog of type wxDialog with a title of "Preferences". 
     127         * @param parent The parent window of type wxWindow 
     128         **/ 
    117129        PreferencesDialog(wxWindow* parent); 
     130 
     131        /** 
     132         * Destructor. 
     133         **/ 
    118134        ~PreferencesDialog(void); 
    119135 
     136        /** 
     137         * Create the tab containing general preferences. 
     138         * @param parent The notebook object. 
     139         * @return A wxPanel object. 
     140         **/ 
    120141        wxPanel* CreateGeneralTab(wxNotebook* parent); 
     142 
     143        /** 
     144         * Create the tab containing monitoring preferences. 
     145         * @param parent The notebook object. 
     146         * @return A wxPanel object. 
     147         **/ 
    121148        wxPanel* CreateMonitoringTab(wxNotebook* parent); 
     149 
     150        /** 
     151         * Create the tab containing networking preferences. 
     152         * @param parent The notebook object. 
     153         * @return A wxPanel object. 
     154         **/ 
    122155        wxPanel* CreateNetworkingTab(wxNotebook* parent); 
     156 
     157        /** 
     158         * Create the tab containing advanced preferences. 
     159         * @param parent The notebook object. 
     160         * @return A wxPanel object. 
     161         **/ 
    123162        wxPanel* CreateAdvancedTab(wxNotebook* parent); 
     163 
     164        /** 
     165         * Create the tab containing system preferences. 
     166         * @param parent The notebook object. 
     167         * @return A wxPanel object. 
     168         **/ 
    124169        wxPanel* CreateSystemTab(wxNotebook* parent); 
    125170        //wxPanel* CreateFahinfoTab(wxNotebook* parent); 
     171 
     172        /** 
     173         * Create the tab containing web application preferences. 
     174         * @param parent The notebook object. 
     175         * @return A wxPanel object. 
     176         **/ 
    126177        wxPanel* CreateWebAppTab(wxNotebook* parent); 
    127178 
     179        /** 
     180         * Give the correct value to each controls using the preferences. 
     181         **/ 
    128182        void LoadPreferences(void); 
     183 
     184        /** 
     185         * Save the value of each control using the preferences. 
     186         **/ 
    129187        void SavePreferences(void); 
    130188 
     189        /** 
     190         * Event: Manages the 'ok' button 
     191         * Save preferences before exiting the dialog box. 
     192         * @param event The event itself. This is sent automatically. 
     193         **/ 
    131194        void OnOkButton(wxCommandEvent& event); 
     195 
     196        /** 
     197         * Event: Manages the 'browse' button for local data file. 
     198         * Show file chooser dialog box. 
     199         * @param event The event itself. This is sent automatically. 
     200         **/ 
    132201        void OnBrowseButton(wxCommandEvent& event); 
     202 
     203        /** 
     204         * Event: Manages the 'browse' button for web application output. 
     205         * Show file chooser dialog box. 
     206         * @param event The event itself. This is sent automatically. 
     207         **/ 
    133208        void OnWebAppBrowseButton(wxCommandEvent& event); 
     209 
     210        /** 
     211         * Event: Manages the 'browse' button for simple web output. 
     212         * Show file chooser dialog box. 
     213         * @param event The event itself. This is sent automatically. 
     214         **/ 
    134215        void OnSimpleWebBrowseButton(wxCommandEvent& event); 
     216 
     217        /** 
     218         * Event: Manages the 'browse' button for simple text output. 
     219         * Show file chooser dialog box. 
     220         * @param event The event itself. This is sent automatically. 
     221         **/ 
    135222        void OnSimpleTextBrowseButton(wxCommandEvent& event); 
     223 
     224        /** 
     225         * Event: Manages the checkbox clicks. 
     226         * Enable/Disable fields associated with some checkboxes. 
     227         * @param event The event itself. This is sent automatically. 
     228         **/ 
    136229        void OnCheckboxes(wxCommandEvent& event); 
     230 
     231        /** 
     232         * Event: Manages the choicebox alterations. 
     233         * Alter fields when choicebox values are changed. 
     234         * @param event The event itself. This is sent automatically. 
     235         **/ 
    137236        void OnChoices(wxCommandEvent& event); 
    138237 
     
    140239public: 
    141240        // Singleton pattern 
     241        /** 
     242         * Retrieve the instance of PreferencessDialog. 
     243         * If an instance doesn't already exist, create it. 
     244         * @param parent The parent windows of type wxWindow. 
     245         * @return An instance of class PreferencesDialog. 
     246         **/ 
    142247        static PreferencesDialog* GetInstance(wxWindow* parent); 
     248 
     249        /** 
     250         * Destroy the instance of PreferencesDialog. 
     251         * Only if an instance exists. 
     252         **/ 
    143253        static void DestroyInstance(void); 
    144254 
     255        /** 
     256         * Show the Preferences Dialog. 
     257         * Opens a modal window and centres it. 
     258         **/ 
    145259        int ShowModal(void); 
    146260 
  • branches/2.3.2beta3/src/preferencesDialog.cpp

    r148 r214  
    1414*  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
    1515*/ 
     16 
     17/** 
     18 * \file preferencesDialog.cpp 
     19 * The preferences dialog. 
     20 * Creates the dialog to reconfigure FahMon. 
     21 * \author François Ingelrest 
     22 * \author Andrew Schofield 
     23 **/ 
    1624 
    1725#include "fahmon.h" 
     
    8391 
    8492 
    85 /** 
    86 * Constructor 
    87 **/ 
    8893PreferencesDialog::PreferencesDialog(wxWindow* parent) : wxDialog(parent, wxID_ANY, wxString::Format(_("Preferences / %s"), wxT(FMC_PRODUCT))) 
    8994{ 
     
    127132 
    128133 
    129 /** 
    130 * Destructor 
    131 **/ 
    132134PreferencesDialog::~PreferencesDialog(void) 
    133135{ 
     
    135137 
    136138 
    137 /** 
    138 * Retrieve the instance of PreferencesDialog, create it if needed 
    139 **/ 
    140139PreferencesDialog* PreferencesDialog::GetInstance(wxWindow* parent) 
    141140{ 
     
    149148 
    150149 
    151 /** 
    152 * Destroy the instance of PreferencesDialog, if any 
    153 **/ 
    154150void PreferencesDialog::DestroyInstance(void) 
    155151{ 
     
    162158 
    163159 
    164 /** 
    165 * Create the tab containing general preferences 
    166 **/ 
    167160inline wxPanel* PreferencesDialog::CreateGeneralTab(wxNotebook* parent) 
    168161{ 
     
    202195 
    203196 
    204 /** 
    205 * Create the tab containing monitoring preferences 
    206 **/ 
    207197inline wxPanel* PreferencesDialog::CreateMonitoringTab(wxNotebook* parent) 
    208198{ 
     
    265255 
    266256 
    267 /** 
    268 * Create the tab containing networking preferences 
    269 **/ 
    270257inline wxPanel* PreferencesDialog::CreateNetworkingTab(wxNotebook* parent) 
    271258{ 
     
    321308} 
    322309 
    323 /** 
    324 * Create the tab containing advanced preferences 
    325 **/ 
     310 
    326311inline wxPanel* PreferencesDialog::CreateAdvancedTab(wxNotebook* parent) 
    327312{ 
     
    371356} 
    372357 
    373 /** 
    374 * Create the tab containing system preferences 
    375 **/ 
     358 
    376359inline wxPanel* PreferencesDialog::CreateSystemTab(wxNotebook* parent) 
    377360{ 
     
    458441 
    459442 
    460 /** 
    461 * Create the tab containing web application preferences 
    462 **/ 
    463443inline wxPanel* PreferencesDialog::CreateWebAppTab(wxNotebook* parent) 
    464444{ 
     
    534514 
    535515 
    536 /** 
    537 * Give the correct state to each control before displaying the dialog 
    538 **/ 
    539516int PreferencesDialog::ShowModal(void) 
    540517{ 
     
    546523 
    547524 
    548 /** 
    549 * Give the correct value to each controls using the preferences 
    550 **/ 
    551525inline void PreferencesDialog::LoadPreferences(void) 
    552526{ 
     
    785759} 
    786760 
    787 /** 
    788 * Save the value of each control using the preferences 
    789 **/ 
     761 
    790762inline void PreferencesDialog::SavePreferences(void) 
    791763{ 
     
    882854 
    883855 
    884 /** 
    885 * Save preferences before exiting the dialog box 
    886 **/ 
    887856void PreferencesDialog::OnOkButton(wxCommandEvent& event) 
    888857{ 
     
    893862 
    894863 
    895 /** 
    896 * Show file chooser dialog box 
    897 **/ 
    898864void PreferencesDialog::OnBrowseButton(wxCommandEvent& event) 
    899865{ 
     
    910876 
    911877 
    912 /** 
    913 * Show file chooser dialog box 
    914 **/ 
    915878void PreferencesDialog::OnWebAppBrowseButton(wxCommandEvent& event) 
    916879{ 
     
    927890 
    928891 
    929 /** 
    930 * Show file chooser dialog box 
    931 **/ 
    932892void PreferencesDialog::OnSimpleWebBrowseButton(wxCommandEvent& event) 
    933893{ 
     
    944904 
    945905 
    946 /** 
    947 * Show file chooser dialog box 
    948 **/ 
    949906void PreferencesDialog::OnSimpleTextBrowseButton(wxCommandEvent& event) 
    950907{ 
     
    961918 
    962919 
    963 /** 
    964 * Enable/Disable fields associated with some checkboxes 
    965 **/ 
    966920void PreferencesDialog::OnCheckboxes(wxCommandEvent& event) 
    967921{ 
     
    10761030 
    10771031 
    1078 /** 
    1079 * Alter fields when choicebox values are changed 
    1080 **/ 
    10811032void PreferencesDialog::OnChoices(wxCommandEvent& event) 
    10821033{