def selectPanel::__init__ | ( | self, | ||
main, | ||||
parent | ||||
) |
Constructor
Parameters: - the parent window (mainPanel) - the window id set by parent - main program object (mainWindow), for communication with instances of other classes
Definition at line 158 of file selectPanel.py.
def selectPanel::AddItem | ( | self, | ||
item, | ||||
type | ||||
) |
Add an item (DeviceType, Device) to the tree. type : the type of the item : TN_DEVICETYPE, TN_DEVICE
Definition at line 390 of file selectPanel.py.
def selectPanel::CollapseAndExpand | ( | self, | ||
id, | ||||
doexpand = True , |
||||
set_to_minus_one = True | ||||
) |
Sometimes we need to collapse a tree node, and then expand it again automatically; f.ex. if new nodes have been added as children of the tree node in question, or children have been deleted.
We therefore need a new expand to sort the tree node names alphabetically.
Parameters: - tree node id of the tree node that should be collapsed and expanded. - Whether the node should be expanded after the collapse or not. - Whether the level in the visual window should be set to device level (-1) or not.
Definition at line 378 of file selectPanel.py.
def selectPanel::CollapseInactiveSystems | ( | self, | ||
item | ||||
) |
Definition at line 284 of file selectPanel.py.
def selectPanel::GetCdb | ( | self | ) |
Return handle on configuration database module
!return - The method does not return the confifuration database itself, but an instance of a confdb class. Before connecting (and after disconnecting) None return None.
Definition at line 1300 of file selectPanel.py.
def selectPanel::GetItemID | ( | self, | ||
value | ||||
) |
Since we need the tree node/item id to do something with a tree node, this function will return the tree node id in the tree view, if it exists.
Parameters: - The name of the tree node as seen by the user.
!Return - The tree node id as a TreeItemID Object, or a KeyError Exception if an error occurs.
Definition at line 316 of file selectPanel.py.
def selectPanel::GetListCtrl | ( | self | ) |
One of the requirements for using the sorting mechanism of the ColMixer thingy, this method is needed.
Definition at line 1290 of file selectPanel.py.
def selectPanel::GetPath | ( | self | ) |
Return the path index currently chosen in the path window dialog.
!return - path index (integer)
Definition at line 1313 of file selectPanel.py.
def selectPanel::InfoCtrlDoubleClick | ( | self, | ||
item, | ||||
point, | ||||
col | ||||
) |
Definition at line 292 of file selectPanel.py.
def selectPanel::myCollapseAndReset | ( | self, | ||
item | ||||
) |
Definition at line 276 of file selectPanel.py.
def selectPanel::myListViewMouseEvent | ( | self, | ||
button, | ||||
item | ||||
) |
Definition at line 581 of file selectPanel.py.
def selectPanel::OnCheckRestrict | ( | self, | ||
event | ||||
) |
When a user clicks on the check box to restrict the view of the links to a given link type.
Definition at line 434 of file selectPanel.py.
def selectPanel::OnChoice | ( | self, | ||
item, | ||||
point = QPoint(0,0 , |
||||
column = 0 , |
||||
onexpand = False , |
||||
doexpand = True , |
||||
set_to_minus_one = True | ||||
) |
This method was called in one of the three situations: 1. Single-click: doexpand=False, rest default 2. Double-click: all defaults 3. On expanding of a tree node, onexpand=True, rest default
Parameters: - information about the tree node that is chosen - whether the node chosen is about to expand or not (OnExpand event) - the tree node item object that is chosen - whether the chosen tree item should be expanded or not - whether we should change to device level (-1) in the visual window or not.
Definition at line 657 of file selectPanel.py.
def selectPanel::OnClick | ( | self, | ||
button, | ||||
item, | ||||
point, | ||||
column | ||||
) |
Definition at line 589 of file selectPanel.py.
def selectPanel::OnDbUpdate | ( | self, | ||
evtReason, | ||||
cdb | ||||
) |
This method is called from another class as a reaction to that the ConfDB status changed. React on database state change event
Call UpdateDb to change things to the current state of the ConfDB
Definition at line 545 of file selectPanel.py.
def selectPanel::OnDeviceInfoSelected | ( | self, | ||
event | ||||
) |
If the user selects (single-click) an info row in the list control, a tooltip text will appear. this tooltip text is available because it is not always possible to read the whole string/text in the information window, but the whole information text will be visible in this tooltip window.
Definition at line 492 of file selectPanel.py.
def selectPanel::OnExpanding | ( | self, | ||
event | ||||
) |
When a treeItem is expanded we close the other treeItem located at the same level in the tree.
Parameters: - The node that is expanding
Definition at line 632 of file selectPanel.py.
def selectPanel::OnRestrictedLinkTypeChoice | ( | self, | ||
event | ||||
) |
When a user changes restriction of the link type in the combo box, to another link type.
Definition at line 466 of file selectPanel.py.
def selectPanel::OnRestrictedSparePartChoice | ( | self, | ||
event = '' | ||||
) |
When user changes spare parts view
Definition at line 458 of file selectPanel.py.
def selectPanel::OnSelect | ( | self | ) |
A tree node was selected with a single-click. Treat it the same wat as a double-click, wo. expanding it.
Parameters: - information about the node that was clicked
Definition at line 605 of file selectPanel.py.
def selectPanel::RemoveItem | ( | self, | ||
id, | ||||
parent | ||||
) |
Remove a tree node/item from the tree view. Usually because the object has been deleted by the user.
Parameters: - the tree node id of the item that we want to delete - the tree node name/string of the parent to the item that we want to delete.
!Return - Raise a KeyError exception if some error occured
Definition at line 342 of file selectPanel.py.
def selectPanel::SetItemToDeleted | ( | self, | ||
item | ||||
) |
We set the tree item node entry in the dictionary to -1, which is not a valid treeitemID, because the tree item node has been deleted from the tree view.
Parameters: - tree item name/string of the deleted object
Definition at line 362 of file selectPanel.py.
def selectPanel::SystemChanged | ( | self | ) |
If a subsystem change is detected (the active subsystem is changed) this method will be called. Here we collapse all nodes of the previous chosen subsystem, in fact; everything down to the tree node root item will be collapsed.
Definition at line 504 of file selectPanel.py.
def selectPanel::UpdateDb | ( | self, | ||
evtReason, | ||||
cdb | ||||
) |
Update controls on a database state change. This method is usually called by the MainWindow OnDbUpdate
evtReason -- not used here, from interface definition cdb -- If not connected to database (cdb == None), delete all the contents of the controls. If connected (was disconnected), update content of the controls.
Definition at line 557 of file selectPanel.py.
def selectPanel::UpdateDevice | ( | self, | ||
treeitem, | ||||
system, | ||||
doexpand = True | ||||
) |
Chose a Device item in tree view, update it.
parameters: - tree item id of the selected tree item - subsystem of the selected tree item - whether the tree item should be expanded or not
Definition at line 1077 of file selectPanel.py.
def selectPanel::UpdateDeviceType | ( | self, | ||
treeitem, | ||||
system, | ||||
doexpand = True | ||||
) |
Chose a Device Type item in tree view, update it.
parameters: - tree item id of the selected tree item - subsystem of the selected tree item - whether the tree item should be expanded or not
Definition at line 977 of file selectPanel.py.
def selectPanel::UpdateDeviceTypes | ( | self, | ||
treeitem, | ||||
system, | ||||
doexpand = True | ||||
) |
Chose DeviceTypes item in treeview, update it.
parameters: - treeitem id of the selected tree item - in which system we are in (and the selected tree item) - whether the DeviceTypes nodes should be expanded or not
Definition at line 872 of file selectPanel.py.
def selectPanel::UpdateInfo | ( | self, | ||
obj = None | ||||
) |
Send an data object of one of the types that are created in objectclasses.py (DeviceType,LinkType,Device, Link or Port at the moment), and display the information about the data object in the information window.
Parameters: - the data object which has to have a method called GetObjectInfo() which returns a dictionary of {attribute:value} pairs.
!return - False if unsuccessful
Definition at line 1239 of file selectPanel.py.
def selectPanel::UpdateLink | ( | self, | ||
treeitem, | ||||
system, | ||||
doexpand = True | ||||
) |
Chose a Link item in tree view, update it. Not in use at the moment...may be in the future
parameters: - tree item id of the selected tree item - subsystem of the selected tree item - whether the tree item should be expanded or not
Definition at line 1151 of file selectPanel.py.
def selectPanel::UpdateLinkType | ( | self, | ||
treeitem, | ||||
system, | ||||
doexpand = True | ||||
) |
Chose a Link Type item in tree view, update it.
parameters: - tree item id of the selected tree item - subsystem of the selected tree item - whether the tree item should be expanded or not
Definition at line 1046 of file selectPanel.py.
def selectPanel::UpdateLinkTypes | ( | self, | ||
treeitem, | ||||
system, | ||||
doexpand = True | ||||
) |
Chose LinkTypes item in tree view, update it.
parameters: - tree item id of the selected tree item - subsystem of the selected tree item - whether the tree item should be expanded or not
Definition at line 922 of file selectPanel.py.
def selectPanel::UpdatePath | ( | self, | ||
deviceobj = None | ||||
) |
Update the path selection control.
This method uses the PathSelect class to show the paths passing the selected device.
parameters: - the device object that we will show the path window for, and get paths from.
Definition at line 1327 of file selectPanel.py.
def selectPanel::UpdatePort | ( | self, | ||
treeitem, | ||||
system, | ||||
doexpand = True | ||||
) |
Chose a Link item in tree view, update it. Not in use at the moment...may be in the future
parameters: - tree item id of the selected tree item - subsystem of the selected tree item - whether the tree item should be expanded or not
Definition at line 1189 of file selectPanel.py.
def selectPanel::UpdateSystem | ( | self, | ||
treeitem, | ||||
update = False , |
||||
doexpand = True | ||||
) |
A subsystem is selected in the tree view. Update it.
Parameters: - The tree item id of the subsystem chosen - whether the child nodes of this node should be update or not - whether this node should be expanded or not
Definition at line 801 of file selectPanel.py.
def selectPanel::UpdateSystems | ( | self, | ||
update = False , |
||||
doexpand = True | ||||
) |
Update subsystems available in ConfDB.
Parameters: - whether we should update and add children to the child nodes of this node - whether this node should be expanded
Definition at line 743 of file selectPanel.py.
Definition at line 163 of file selectPanel.py.
Definition at line 194 of file selectPanel.py.
Definition at line 168 of file selectPanel.py.
Definition at line 178 of file selectPanel.py.
Definition at line 572 of file selectPanel.py.
int selectPanel::ID_COMMIT_BUTTON = 451 [static] |
Definition at line 19 of file selectPanel.py.
int selectPanel::ID_LINKTYPECHOICE = 452 [static] |
Definition at line 20 of file selectPanel.py.
int selectPanel::ID_LINKTYPERESTRICT = 453 [static] |
Definition at line 21 of file selectPanel.py.
int selectPanel::ID_SPAREPARTSCHOICE = 455 [static] |
Definition at line 24 of file selectPanel.py.
int selectPanel::ID_TREE_CTRL = 454 [static] |
Definition at line 22 of file selectPanel.py.
Definition at line 260 of file selectPanel.py.
Definition at line 271 of file selectPanel.py.
Definition at line 246 of file selectPanel.py.
Definition at line 228 of file selectPanel.py.
Definition at line 180 of file selectPanel.py.
Definition at line 184 of file selectPanel.py.
selectPanel::listViewDevice_data = \ [static] |
Definition at line 122 of file selectPanel.py.
Definition at line 182 of file selectPanel.py.
selectPanel::listViewEmptyDevice_data = \ [static] |
Definition at line 103 of file selectPanel.py.
selectPanel::listviewIcon0_data = \ [static] |
Definition at line 27 of file selectPanel.py.
selectPanel::listviewIcon1_data = \ [static] |
Definition at line 52 of file selectPanel.py.
selectPanel::listviewIcon2_data = \ [static] |
Definition at line 77 of file selectPanel.py.
Definition at line 160 of file selectPanel.py.
Definition at line 1240 of file selectPanel.py.
Definition at line 274 of file selectPanel.py.
Definition at line 273 of file selectPanel.py.
Definition at line 1330 of file selectPanel.py.
Definition at line 164 of file selectPanel.py.
Definition at line 167 of file selectPanel.py.
Definition at line 216 of file selectPanel.py.
Definition at line 176 of file selectPanel.py.
Definition at line 190 of file selectPanel.py.
Definition at line 200 of file selectPanel.py.