#include <dlgAddMatchFiles.hpp>
Collaboration diagram for dlgAddMatchFiles:
Public Member Functions | |
void | createControls () |
Creates and initializes the controls of the dialog. | |
dlgAddMatchFiles (wxWindow *parent, const wxString &checksumsFileName=wxEmptyString) | |
Creates a new dialog. | |
dlgAddMatchFiles () | |
Creates a new dialog. | |
wxString | getChecksumsFileName () const |
Gets the name of the checksums' file where the files will be added. | |
void | getMatchPatterns (ArrayMatchPattern &patterns) const |
Gets the choosed matching patterns. | |
void | setChecksumsFileName (const wxString &fileName) |
Sets the name of the checksums' file where the files will be added. | |
virtual | ~dlgAddMatchFiles () |
The class descructor. | |
Static Public Member Functions | |
wxString | getDirectoryConfigKey (const int n) |
Gets the configuration key for the last directories to add. | |
int | getHistoryMaxSize () |
Get the maximum size of the history of the last match patterns and directories to add. | |
wxString | getMatchPatternConfigKey (const int n) |
Gets the configuration key for the last match patterns to add. | |
wxString | getRootConfigKey () |
Gets the root configuration key for parameters of this dialog. | |
Protected Types | |
enum | { LVW_FILES = wxID_HIGHEST + 1, BTN_REMOVE, BTN_ADDLIST, BTN_LOADLIST, BTN_SAVELIST, CBO_PATTERN, CBO_DIRECTORY, BTN_BROWSE, BTN_ADD_PATTERN, SPN_DEPTH, RBX_SORT_BY, RBX_SORT_ORDER, BTN_ADD } |
Controls IDs. More... | |
enum | PreferencesKey { prGUI_ADD_MATCH_FILES_SORT_BY = 0, prGUI_ADD_MATCH_FILES_SORT_ORDER, prGUI_ADD_MATCH_FILES_DIRECTORY_WIDTH, prGUI_ADD_MATCH_FILES_PATTERN_WIDTH, prGUI_ADD_MATCH_FILES_DEPTH_WIDTH, prGUI_ADD_MATCH_FILES_WINDOW_SIZE } |
Preferences keys. More... | |
Protected Member Functions | |
void | addPatternToListView (const MatchPattern &pattern) |
Add a pattern to the list view of patterns. | |
void | btnAddClick (wxCommandEvent &event) |
Processes button Add. | |
void | btnAddListClick (wxCommandEvent &event) |
Processes button Add List. | |
void | btnAddPatternClick (wxCommandEvent &event) |
Processes button Add pattern. | |
void | btnBrowseClick (wxCommandEvent &event) |
Processes button Browse. | |
void | btnLoadListClick (wxCommandEvent &event) |
Processes button Load List. | |
void | btnRemoveClick (wxCommandEvent &event) |
Processes button Remove. | |
void | btnSaveListClick (wxCommandEvent &event) |
Processes button Save List. | |
void | cboAddTextEnter (wxCommandEvent &event) |
Event handler for the enter key pressed on a search combo box. | |
void | lvwPatternsColumnClick (wxListEvent &event) |
Processes a click on a header of a column of the list of patterns. | |
void | lvwPatternsDeselectItem (wxListEvent &event) |
Event handler for the deselection of an item. | |
void | lvwPatternsKeyDown (wxListEvent &event) |
Event handler for the key down event. | |
void | lvwPatternsSelectItem (wxListEvent &event) |
Event handler for the selection of an item. | |
void | rbxSortBySelect (wxCommandEvent &event) |
Processes a selection of the column to sort. | |
void | rbxSortOrderSelect (wxCommandEvent &event) |
Processes a selection of the sort order. | |
void | setDialogTitle () |
Sets the title of the dialog. | |
Static Protected Member Functions | |
wxString | getConfigKey (const PreferencesKey pk) |
Gets the configuration key corresponding to the given preference key. | |
long | getID () |
Gets a new unique identifier. | |
Protected Attributes | |
wxButton * | btnAddPattern |
Add a pattern to the list. | |
wxButton * | btnRemove |
Button for removing patterns. | |
wxComboBox * | cboDirectory |
Directory of the pattern. | |
wxComboBox * | cboPattern |
Pattern to add. | |
wxString | checksumsFileName |
Name of the checksums' file where the files will be added. | |
wxSortableListView * | lvwPatterns |
List of patterns. | |
ArrayMatchPattern * | matchPatterns |
Match patterns given by the validator. | |
wxRadioBox * | rbxSortBy |
Sort by radio box buttons. | |
wxRadioBox * | rbxSortOrder |
Sort order radio box buttons. | |
wxSpinCtrl * | spnDepth |
Search depth. | |
Static Protected Attributes | |
long | idGen = 0L |
Value for unique identifiers generation. | |
Static Private Member Functions | |
void | addLineToComboBox (wxComboBox *cboBox, const int maxLines) |
Adds a file or a directory or a match pattern to a combo box. | |
void | getLastDirectoryAndFilter (const wxString &configKey, wxString &lastDirKey, wxString &lastDir, wxFileDialogFilterMaker &fltMaker) |
Gets the last directory used and the filter for the open or save dialog. | |
void | readMatchPatternsFile (const wxString &fileName, ArrayMatchPattern &patterns) |
Reads a file of matching patterns. |
If no name of checksums' file is given to the constructor, give one with the setChecksumsFileName() method before showing the dialog.
Definition at line 54 of file dlgAddMatchFiles.hpp.
|
Controls IDs.
Definition at line 130 of file dlgAddMatchFiles.hpp. |
|
Preferences keys.
Definition at line 185 of file dlgAddMatchFiles.hpp. |
|
Creates a new dialog.
Definition at line 918 of file dlgAddMatchFiles.cpp. References createControls(), matchPatterns, and setChecksumsFileName(). |
|
Creates a new dialog.
Definition at line 934 of file dlgAddMatchFiles.cpp. References createControls(), getConfigKey(), matchPatterns, and setChecksumsFileName(). |
|
The class descructor.
Definition at line 1114 of file dlgAddMatchFiles.cpp. References matchPatterns. |
|
Adds a file or a directory or a match pattern to a combo box.
Definition at line 1415 of file dlgAddMatchFiles.cpp. References addLineToComboBox(), and compareFileName(). Referenced by addLineToComboBox(), and btnAddPatternClick(). |
|
Add a pattern to the list view of patterns. If the pattern is already are in the list, it is not added.
Definition at line 1644 of file dlgAddMatchFiles.cpp. References addPatternToListView(), dlgAddMatchFiles::MatchPattern::getDepth(), dlgAddMatchFiles::MatchPattern::getDirectory(), getID(), dlgAddMatchFiles::MatchPattern::getPattern(), lvwPatterns, patternsListCmpFnct(), dlgAddMatchFiles::MatchPattern::setDepth(), dlgAddMatchFiles::MatchPattern::setDirectory(), and dlgAddMatchFiles::MatchPattern::setPattern(). Referenced by addPatternToListView(), btnAddListClick(), btnAddPatternClick(), and btnLoadListClick(). |
|
Processes button Add.
Definition at line 1611 of file dlgAddMatchFiles.cpp. References btnAddClick(), wxSortableListView::GetColumnToSort(), getConfigKey(), wxSortableListView::GetSortOrder(), and lvwPatterns. Referenced by btnAddClick(). |
|
Processes button Add List.
Definition at line 1258 of file dlgAddMatchFiles.cpp. References addPatternToListView(), btnAddListClick(), dlgAddMatchFiles::ArrayMatchPattern::getCount(), wxFileDialogFilterMaker::GetFilters(), getLastDirectoryAndFilter(), and readMatchPatternsFile(). Referenced by btnAddListClick(). |
|
Processes button Add pattern.
Definition at line 1455 of file dlgAddMatchFiles.cpp. References addLineToComboBox(), addPatternToListView(), btnAddPatternClick(), cboDirectory, cboPattern, getDirectoryConfigKey(), getHistoryMaxSize(), getMatchPatternConfigKey(), and spnDepth. Referenced by btnAddPatternClick(). |
|
Processes button Browse.
Definition at line 1384 of file dlgAddMatchFiles.cpp. References btnBrowseClick(), cboDirectory, getChecksumsFileName(), and AppPrefs::getUserDocumentsDirName(). Referenced by btnBrowseClick(). |
|
Processes button Load List.
Definition at line 1290 of file dlgAddMatchFiles.cpp. References addPatternToListView(), btnLoadListClick(), dlgAddMatchFiles::ArrayMatchPattern::getCount(), wxFileDialogFilterMaker::GetFilters(), getLastDirectoryAndFilter(), lvwPatterns, and readMatchPatternsFile(). Referenced by btnLoadListClick(). |
|
Processes button Remove.
Definition at line 1130 of file dlgAddMatchFiles.cpp. References btnRemoveClick(), and lvwPatterns. Referenced by btnRemoveClick(). |
|
Processes button Save List.
Definition at line 1328 of file dlgAddMatchFiles.cpp. References btnSaveListClick(), getAppName(), wxFileDialogFilterMaker::GetFilters(), getLastDirectoryAndFilter(), and lvwPatterns. Referenced by btnSaveListClick(). |
|
Event handler for the enter key pressed on a search combo box.
Definition at line 1545 of file dlgAddMatchFiles.cpp. References btnAddPattern, and cboAddTextEnter(). Referenced by cboAddTextEnter(). |
|
Creates and initializes the controls of the dialog.
Definition at line 962 of file dlgAddMatchFiles.cpp. References btnAddPattern, btnRemove, cboDirectory, cboPattern, CONTROL_SPACE, wxSortableListView::GetColumnToSort(), getConfigKey(), getDirectoryConfigKey(), getHistoryMaxSize(), getMatchPatternConfigKey(), wxSortableListView::GetSortOrder(), lvwPatterns, matchPatterns, rbxSortBy, rbxSortOrder, wxSortableListView::SetColumnToSort(), wxSortableListView::SetSortOrder(), and spnDepth. Referenced by dlgAddMatchFiles(). |
|
Gets the name of the checksums' file where the files will be added.
Definition at line 1722 of file dlgAddMatchFiles.cpp. References checksumsFileName. Referenced by btnBrowseClick(), and setDialogTitle(). |
|
Gets the configuration key corresponding to the given preference key.
Definition at line 1807 of file dlgAddMatchFiles.cpp. References getConfigKey(), and getRootConfigKey(). Referenced by btnAddClick(), createControls(), dlgAddMatchFiles(), and getConfigKey(). |
|
Gets the configuration key for the last directories to add.
Definition at line 1776 of file dlgAddMatchFiles.cpp. References getDirectoryConfigKey(), getHistoryMaxSize(), and getRootConfigKey(). Referenced by btnAddPatternClick(), createControls(), and getDirectoryConfigKey(). |
|
Get the maximum size of the history of the last match patterns and directories to add.
Definition at line 1793 of file dlgAddMatchFiles.cpp. Referenced by btnAddPatternClick(), createControls(), getDirectoryConfigKey(), and getMatchPatternConfigKey(). |
|
Gets a new unique identifier.
Definition at line 1845 of file dlgAddMatchFiles.cpp. References idGen. Referenced by addPatternToListView(), and dlgAddMatchFiles::PatternsListValidator::TransferToWindow(). |
|
Gets the last directory used and the filter for the open or save dialog.
Definition at line 1152 of file dlgAddMatchFiles.cpp. References wxFileDialogFilterMaker::AddFilter(), getLastDirectoryAndFilter(), getRootConfigKey(), and AppPrefs::getUserDocumentsDirName(). Referenced by btnAddListClick(), btnLoadListClick(), btnSaveListClick(), and getLastDirectoryAndFilter(). |
|
Gets the configuration key for the last match patterns to add.
Definition at line 1760 of file dlgAddMatchFiles.cpp. References getHistoryMaxSize(), getMatchPatternConfigKey(), and getRootConfigKey(). Referenced by btnAddPatternClick(), createControls(), and getMatchPatternConfigKey(). |
|
Gets the choosed matching patterns. The given array of matching patterns is erased. The matching array could contains directories with both relative and absolute paths.
Definition at line 1709 of file dlgAddMatchFiles.cpp. References getMatchPatterns(), and matchPatterns. Referenced by getMatchPatterns(), and ChecksumsListView::selectMatchingFilesToAdd(). |
|
Gets the root configuration key for parameters of this dialog.
Definition at line 1747 of file dlgAddMatchFiles.cpp. Referenced by getConfigKey(), getDirectoryConfigKey(), getLastDirectoryAndFilter(), and getMatchPatternConfigKey(). |
|
Processes a click on a header of a column of the list of patterns.
Definition at line 1578 of file dlgAddMatchFiles.cpp. References wxSortableListView::GetColumnToSort(), wxSortableListView::GetSortOrder(), lvwPatterns, lvwPatternsColumnClick(), patternsListCmpFnct(), rbxSortBy, rbxSortOrder, wxSortableListView::SetColumnToSort(), and wxSortableListView::SetSortOrder(). Referenced by lvwPatternsColumnClick(). |
|
Event handler for the deselection of an item.
Definition at line 1495 of file dlgAddMatchFiles.cpp. References btnRemove, lvwPatterns, and lvwPatternsDeselectItem(). Referenced by lvwPatternsDeselectItem(). |
|
Event handler for the key down event.
Definition at line 1558 of file dlgAddMatchFiles.cpp. References btnRemove, and lvwPatternsKeyDown(). Referenced by lvwPatternsKeyDown(). |
|
Event handler for the selection of an item.
Definition at line 1483 of file dlgAddMatchFiles.cpp. References btnRemove, and lvwPatternsSelectItem(). Referenced by lvwPatternsSelectItem(). |
|
Processes a selection of the column to sort.
Definition at line 1508 of file dlgAddMatchFiles.cpp. References lvwPatterns, patternsListCmpFnct(), rbxSortBySelect(), and wxSortableListView::SetColumnToSort(). Referenced by rbxSortBySelect(). |
|
Processes a selection of the sort order.
Definition at line 1521 of file dlgAddMatchFiles.cpp. References lvwPatterns, patternsListCmpFnct(), rbxSortOrderSelect(), and wxSortableListView::SetSortOrder(). Referenced by rbxSortOrderSelect(). |
|
Reads a file of matching patterns.
Definition at line 1178 of file dlgAddMatchFiles.cpp. References dlgAddMatchFiles::ArrayMatchPattern::add(), and readMatchPatternsFile(). Referenced by btnAddListClick(), btnLoadListClick(), and readMatchPatternsFile(). |
|
Sets the name of the checksums' file where the files will be added.
Definition at line 1734 of file dlgAddMatchFiles.cpp. References checksumsFileName, setChecksumsFileName(), and setDialogTitle(). Referenced by dlgAddMatchFiles(), and setChecksumsFileName(). |
|
Sets the title of the dialog. This method is called when the name of the checksums' file is modified. Definition at line 1104 of file dlgAddMatchFiles.cpp. References getChecksumsFileName(). Referenced by setChecksumsFileName(). |
|
Add a pattern to the list.
Definition at line 87 of file dlgAddMatchFiles.hpp. Referenced by cboAddTextEnter(), and createControls(). |
|
Button for removing patterns.
Definition at line 84 of file dlgAddMatchFiles.hpp. Referenced by createControls(), lvwPatternsDeselectItem(), lvwPatternsKeyDown(), and lvwPatternsSelectItem(). |
|
Directory of the pattern.
Definition at line 89 of file dlgAddMatchFiles.hpp. Referenced by btnAddPatternClick(), btnBrowseClick(), and createControls(). |
|
Pattern to add.
Definition at line 88 of file dlgAddMatchFiles.hpp. Referenced by btnAddPatternClick(), and createControls(). |
|
Name of the checksums' file where the files will be added.
Definition at line 91 of file dlgAddMatchFiles.hpp. Referenced by getChecksumsFileName(), and setChecksumsFileName(). |
|
Value for unique identifiers generation.
Definition at line 911 of file dlgAddMatchFiles.cpp. Referenced by getID(). |
|
List of patterns.
Definition at line 82 of file dlgAddMatchFiles.hpp. Referenced by addPatternToListView(), btnAddClick(), btnLoadListClick(), btnRemoveClick(), btnSaveListClick(), createControls(), lvwPatternsColumnClick(), lvwPatternsDeselectItem(), rbxSortBySelect(), and rbxSortOrderSelect(). |
|
Match patterns given by the validator.
Definition at line 83 of file dlgAddMatchFiles.hpp. Referenced by createControls(), dlgAddMatchFiles(), getMatchPatterns(), and ~dlgAddMatchFiles(). |
|
Sort by radio box buttons.
Definition at line 85 of file dlgAddMatchFiles.hpp. Referenced by createControls(), and lvwPatternsColumnClick(). |
|
Sort order radio box buttons.
Definition at line 86 of file dlgAddMatchFiles.hpp. Referenced by createControls(), and lvwPatternsColumnClick(). |
|
Search depth.
Definition at line 90 of file dlgAddMatchFiles.hpp. Referenced by btnAddPatternClick(), and createControls(). |