Share and Money Management 0.18devel
|
Sortable ListCtrl. More...
Public Member Functions | |
def | __init__ (self, parent, *args, **kwargs) |
Constructor, that initialise the wx.ListCtrl only. More... | |
def | enableColumnSorter (self) |
Enables the column sorter. More... | |
def | DeleteAllItems (self) |
Delete all items and clean currentItem too. More... | |
def | disableColumnSorter (self) |
Disables the column sorter. More... | |
def | GetListCtrl (self) |
Returns the list to be sorted. More... | |
def | GetColumnSorter (self) |
Returns a column sorter, that support unicode. More... | |
def | GetSortImages (self) |
Return the index of the up and down arrow images in img_list that indicate the sort order in the column header. More... | |
def | ReSort (self) |
Sort the ListCtrl again using the current settings. More... | |
def | unicodeColumnSorter (self, key1, key2) |
Simple sort of two keys. More... | |
Public Attributes | |
columnSorterEnabled | |
Flag to control the state of column sorter. More... | |
currentItem | |
Index of the currently selected item. More... | |
itemDataMap | |
Mapping between the index and the row values. More... | |
img_list | |
List of images used by this list control. More... | |
up_arrow_idx | |
Position of the arrow point up image inside img_list. More... | |
down_arrow_idx | |
Position of the arrow point down image inside img_list. More... | |
Private Member Functions | |
def | _OnColClick (self, evt) |
Event handler of clicks at the column headers. More... | |
def | _OnItemSelected (self, event) |
Store the index of the selected item in currentItem. More... | |
def | _updateImages (self, oldCol) |
Updates the sort images in the column headers. More... | |
Private Attributes | |
_col | |
Sortable ListCtrl.
Use this control only for combined lists (e.g. click to one list item causes an action of the other list) in a widget.
Please use SortedListPanel for single lists!
def gui.controls.SortedListCtrl.__init__ | ( | self, | |
parent, | |||
* | args, | ||
** | kwargs | ||
) |
Constructor, that initialise the wx.ListCtrl only.
We don't use the constructor of the class ColumnSorterMixin. The functionality is moved to enableColumnSorter().
|
private |
Event handler of clicks at the column headers.
References gui.controls.SortedListCtrl._col, gui.controls.SortedListCtrl._updateImages(), and gui.controls.SortedListCtrl.GetColumnSorter().
Referenced by gui.controls.SortedListCtrl.disableColumnSorter(), and gui.controls.SortedListCtrl.enableColumnSorter().
|
private |
Store the index of the selected item in currentItem.
References gui.controls.SortedListCtrl.currentItem.
|
private |
Updates the sort images in the column headers.
References gui.controls.SortedListCtrl._col, and gui.controls.SortedListCtrl.GetSortImages().
Referenced by gui.controls.SortedListCtrl._OnColClick().
def gui.controls.SortedListCtrl.DeleteAllItems | ( | self | ) |
Delete all items and clean currentItem too.
References gui.controls.SortedListCtrl.currentItem, and gui.controls.SortedListCtrl.itemDataMap.
def gui.controls.SortedListCtrl.disableColumnSorter | ( | self | ) |
Disables the column sorter.
Disconnects the event handler from the event only.
References gui.controls.SortedListCtrl._col, gui.controls.SortedListCtrl._OnColClick(), and gui.controls.SortedListCtrl.columnSorterEnabled.
def gui.controls.SortedListCtrl.enableColumnSorter | ( | self | ) |
Enables the column sorter.
Calling this function is mandatory cause the ColumnSorterMixin will NOT be initialised during the constructor runs!
References gui.controls.SortedListCtrl._OnColClick(), and gui.controls.SortedListCtrl.columnSorterEnabled.
def gui.controls.SortedListCtrl.GetColumnSorter | ( | self | ) |
Returns a column sorter, that support unicode.
References gui.controls.SortedListCtrl.unicodeColumnSorter().
Referenced by gui.controls.SortedListCtrl._OnColClick().
def gui.controls.SortedListCtrl.GetListCtrl | ( | self | ) |
Returns the list to be sorted.
This function is needed by the ColumnSorterMixin
def gui.controls.SortedListCtrl.GetSortImages | ( | self | ) |
Return the index of the up and down arrow images in img_list that indicate the sort order in the column header.
References gui.controls.SortedListCtrl.down_arrow_idx, and gui.controls.SortedListCtrl.up_arrow_idx.
Referenced by gui.controls.SortedListCtrl._updateImages().
def gui.controls.SortedListCtrl.ReSort | ( | self | ) |
Sort the ListCtrl again using the current settings.
References gui.controls.SortedListCtrl._col.
def gui.controls.SortedListCtrl.unicodeColumnSorter | ( | self, | |
key1, | |||
key2 | |||
) |
Simple sort of two keys.
The sorter bases at the original code. The locale stuff has been removed only.
References gui.controls.SortedListCtrl._col, and gui.controls.SortedListCtrl.itemDataMap.
Referenced by gui.controls.SortedListCtrl.GetColumnSorter().
|
private |
gui.controls.SortedListCtrl.columnSorterEnabled |
Flag to control the state of column sorter.
Referenced by gui.controls.SortedListCtrl.disableColumnSorter(), and gui.controls.SortedListCtrl.enableColumnSorter().
gui.controls.SortedListCtrl.currentItem |
Index of the currently selected item.
None
means that no item has been selected
Referenced by gui.controls.SortedListCtrl._OnItemSelected(), and gui.controls.SortedListCtrl.DeleteAllItems().
gui.controls.SortedListCtrl.down_arrow_idx |
Position of the arrow point down image inside img_list.
Referenced by gui.controls.SortedListCtrl.GetSortImages().
gui.controls.SortedListCtrl.img_list |
List of images used by this list control.
gui.controls.SortedListCtrl.itemDataMap |
Mapping between the index and the row values.
This structure is used to sort the columns
Referenced by gui.controls.SortedListCtrl.DeleteAllItems(), and gui.controls.SortedListCtrl.unicodeColumnSorter().
gui.controls.SortedListCtrl.up_arrow_idx |
Position of the arrow point up image inside img_list.
Referenced by gui.controls.SortedListCtrl.GetSortImages().