objects.gui.filterSettings.filterSettings Class Reference

Code generated by "Boa Constructor". More...

List of all members.

Public Member Functions

def __init__
def populateListCtrl
 Populate the Window's list control.
def OnButtonRemoveFilterButton
 "Remove Filter" Button handler.
def OnButtonApplyButton
 "Apply" Button handler.
def OnButtonCancelButton
 "Cancel" Button handler.
def OnListCtrlFitlersListItemSelected
 Handler called whenever a filter has been clicked on.
def OnListCtrlFitlersListItemDeselected
 Handler called whenever a filter has been deselected.

Public Attributes

 listCtrlFitlers
 buttonRemoveFilter
 buttonApply
 buttonCancel
 peerDict
 removeList
 peerFilter
 selectedFilter
 somethingRemoved


Detailed Description

Code generated by "Boa Constructor".

This class should be edited using the Boa Constructor IDE. Minimal inline documentation will be provided for this class as it may interfere with the automatic code generation.

The filterSettings class represents the applications's 'Filters' window

Definition at line 37 of file filterSettings.py.


Member Function Documentation

def objects.gui.filterSettings.filterSettings.__init__ (   self,
  parent,
  peerFilter 
)

Definition at line 85 of file filterSettings.py.

00085                                           :
00086         self._init_ctrls(parent)
00087         
00088         self.peerDict = dict()
00089         self.removeList = []
00090         self.peerFilter = peerFilter
00091         self.populateListCtrl(peerFilter)
00092         self.selectedFilter = None
00093         
00094         self.somethingRemoved = False
00095     
00096     
    ## Populate the Window's list control

def objects.gui.filterSettings.filterSettings.OnButtonApplyButton (   self,
  event 
)

"Apply" Button handler.

Parameters:
event Standard wx.Button event

Definition at line 149 of file filterSettings.py.

00149                                         :
00150         # remove the actual items from the master list
00151         try: 
00152             map(self.peerFilter.removeFromFilter, self.removeList)
00153         except ValueError, ve:
00154             logger.log(__name__ + "-- error deleting items from filter list: " + str(ve))
00155     
00156         return self.EndModal(wx.ID_OK)
00157 
00158 
    ## "Cancel" Button handler.

def objects.gui.filterSettings.filterSettings.OnButtonCancelButton (   self,
  event 
)

"Cancel" Button handler.

Parameters:
event Standard wx.Button event

Definition at line 161 of file filterSettings.py.

00161                                          :
00162         return self.EndModal(wx.ID_CANCEL)
00163 
00164 
    ## Handler called whenever a filter has been clicked on.

def objects.gui.filterSettings.filterSettings.OnButtonRemoveFilterButton (   self,
  event 
)

"Remove Filter" Button handler.

Parameters:
event Standard wx.Button event

Definition at line 117 of file filterSettings.py.

00117                                                :
00118         # create a tuple, and remove it
00119         if self.selectedFilter == None:
00120             dlg = wx.MessageDialog(None, "No Item was selected", 'Error', wx.ICON_ERROR)
00121             dlg.ShowModal()
00122             dlg.Destroy()
00123             return
00124         
00125         tbdIndex = self.selectedFilter
00126         self.removeList.append(self.peerDict[self.selectedFilter])
00127         self.listCtrlFitlers.DeleteItem(self.selectedFilter)
00128         
00129         #mark the item for deletion
00130         self.peerDict[tbdIndex] = "@@$$"
00131         
00132         # reindex the filter dictionary
00133         idx = 0
00134         rebuildPeerList = dict()
00135         for key, val in self.peerDict.iteritems():
00136             if val != "@@$$":
00137                 rebuildPeerList[idx] = val
00138                 idx += 1
00139             
00140         self.peerDict = rebuildPeerList
00141             
00142         
00143         self.somethingRemoved = True
00144 
00145 
00146 
    ## "Apply" Button handler.

def objects.gui.filterSettings.filterSettings.OnListCtrlFitlersListItemDeselected (   self,
  event 
)

Handler called whenever a filter has been deselected.

Parameters:
event Standard wx.Button event

Definition at line 175 of file filterSettings.py.

00175                                                         :
00176         self.selectedFilter = None
        self.selectedFilter = None

def objects.gui.filterSettings.filterSettings.OnListCtrlFitlersListItemSelected (   self,
  event 
)

Handler called whenever a filter has been clicked on.

Parameters:
event Standard wx.Button event

Definition at line 167 of file filterSettings.py.

00167                                                       :
00168         item = event.GetItem()        
00169         self.selectedFilter = item.GetId()
00170         
00171         print self.selectedFilter
00172 
    ## Handler called whenever a filter has been deselected.

def objects.gui.filterSettings.filterSettings.populateListCtrl (   self,
  peerFilter 
)

Populate the Window's list control.

Parameters:
peerFilter customFilter object representing all current filters

Definition at line 99 of file filterSettings.py.

00099                                           :
00100         
00101         peerFilterList = peerFilter.getSafeFilterList()
00102         
00103         if len(peerFilterList) == 0: return
00104         
00105         for filterCat, filterVal in peerFilterList:
00106             index = self.listCtrlFitlers.InsertStringItem(sys.maxint, filterCat)        
00107                         
00108             self.listCtrlFitlers.SetStringItem(index, 1, str(filterVal))
00109             
00110             self.peerDict[index] = (filterCat, filterVal)
00111             print index
00112 
00113 
00114 
    ## "Remove Filter" Button handler.


Member Data Documentation

Definition at line 73 of file filterSettings.py.

Definition at line 79 of file filterSettings.py.

Definition at line 66 of file filterSettings.py.

Definition at line 54 of file filterSettings.py.

Definition at line 88 of file filterSettings.py.

Definition at line 90 of file filterSettings.py.

Definition at line 89 of file filterSettings.py.

Definition at line 92 of file filterSettings.py.

Definition at line 94 of file filterSettings.py.


The documentation for this class was generated from the following file:

Generated on Mon Mar 30 00:26:22 2009 for EyeSpy by  doxygen 1.5.8