CreateDeviceType::CreateDeviceTypeWindow Class Reference

List of all members.


Detailed Description

This dialog window and class lets the user create or modify a device type. It is set to be modal.

Definition at line 29 of file CreateDeviceType.py.


Public Member Functions

def __init__
def getColor
def languageChange
def SaveObject
def OkButtonClicked
def AddSubSystem
def IsCreationMode
def GetDeviceTypeObj

Public Attributes

 buttonOk
 buttonCancel
 description
 outputLabel
 addsybsystemLabel
 inputLabel
 descriptionLabel
 colorLabel
 renameobj
 devicetypeobj

Static Public Attributes

string title = "Create A DeviceType"
 selectedsystem = selectedsystem
tuple selectedsystem = self.devicetypeobj.GetSystem()
tuple tmpsystems = self.main.GetCdb()
list subsystems = []
tuple selected = self.devicetypeobj.GetName()
tuple selid = self.devicetypeobj.GetDeviceTypeID()
string selected = ""
int style = 0
int val_in = 0
int val_out = 0
tuple val_in = int(devicetypeobj.GetPortsIn())
tuple val_out = int(devicetypeobj.GetPortsOut())
tuple tmpcolor = devicetypeobj.GetColour()

Private Attributes

 __nbrinputspinbutton
 __nbroutputspinbutton
 __systemnamecaption
 __devicetypetxtbox
 __systemnametxtbox
 __sysnamescmbbox
 __colorbutton
 __devicetypenameLabel
 __colorselected

Member Function Documentation

def CreateDeviceType::CreateDeviceTypeWindow::__init__ (   self,
  parent,
  name,
  selectedsystem,
  creationmode = True,
  devicetypeobj = None,
  devicetypes = [] 
)

The constructor.

Parameters: - parent window to this window (usually MainWindow) - id of this window, set by its parent - the subsystem to create this device type in; the user can also add others in the dialog - if True; a device type is being created if False; a device type is being modified (already created) - if we are modifying a device type (creationmode=False), then we have to send the device type object that we want to modify; to show the settings/attributes to the user so he/she can modify them - both when we are creating and modifying a device type we send a list of names of currently available devicetypes; so that we can check that the name we don't get any name conflicts when creating or renaming a device type

Definition at line 50 of file CreateDeviceType.py.

def CreateDeviceType::CreateDeviceTypeWindow::getColor (   self  ) 

Definition at line 198 of file CreateDeviceType.py.

def CreateDeviceType::CreateDeviceTypeWindow::languageChange (   self  ) 

Definition at line 204 of file CreateDeviceType.py.

def CreateDeviceType::CreateDeviceTypeWindow::SaveObject (   self  ) 

If standard validation was successful, this method is called when the user clicks on the Ok button. Here we create the device type object (and a rename object if renamed), and do some more excessive validation on all values set for this object.

!return - False if unsuccessful, True if successful

Definition at line 227 of file CreateDeviceType.py.

def CreateDeviceType::CreateDeviceTypeWindow::OkButtonClicked (   self  ) 

As a reaction to the event that the user pressed the Ok button. We only do some simple validation here; f. ex. that the required fields are set.

!return - False if unsuccessful (will not close the window)

Definition at line 293 of file CreateDeviceType.py.

def CreateDeviceType::CreateDeviceTypeWindow::AddSubSystem (   self,
  item 
)

Add a subsystem to the systemname txtbox of subsystems that can be chosen that this device type should be added to.

Definition at line 309 of file CreateDeviceType.py.

def CreateDeviceType::CreateDeviceTypeWindow::IsCreationMode (   self  ) 

Whether we are creating or modifying a device type. !return - True if we are creating, False if we are modifying

Definition at line 320 of file CreateDeviceType.py.

def CreateDeviceType::CreateDeviceTypeWindow::GetDeviceTypeObj (   self  ) 

Called from outside this class (by the caller of this window) to get the created device type or the modified device type (and renamed device type) to be able to take action on them.

!return - If creating device type: the device type object If modifying device type: the device type object, and a rename object if renamed (the rename object is None if not renamed)

Definition at line 344 of file CreateDeviceType.py.


Member Data Documentation

string CreateDeviceType::CreateDeviceTypeWindow::title = "Create A DeviceType" [static]

Definition at line 143 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::selectedsystem = selectedsystem [static]

Definition at line 144 of file CreateDeviceType.py.

tuple CreateDeviceType::CreateDeviceTypeWindow::selectedsystem = self.devicetypeobj.GetSystem() [static]

Definition at line 148 of file CreateDeviceType.py.

tuple CreateDeviceType::CreateDeviceTypeWindow::tmpsystems = self.main.GetCdb() [static]

Definition at line 154 of file CreateDeviceType.py.

list CreateDeviceType::CreateDeviceTypeWindow::subsystems = [] [static]

Definition at line 155 of file CreateDeviceType.py.

tuple CreateDeviceType::CreateDeviceTypeWindow::selected = self.devicetypeobj.GetName() [static]

Definition at line 167 of file CreateDeviceType.py.

tuple CreateDeviceType::CreateDeviceTypeWindow::selid = self.devicetypeobj.GetDeviceTypeID() [static]

Definition at line 168 of file CreateDeviceType.py.

string CreateDeviceType::CreateDeviceTypeWindow::selected = "" [static]

Definition at line 170 of file CreateDeviceType.py.

int CreateDeviceType::CreateDeviceTypeWindow::style = 0 [static]

Definition at line 171 of file CreateDeviceType.py.

int CreateDeviceType::CreateDeviceTypeWindow::val_in = 0 [static]

Definition at line 180 of file CreateDeviceType.py.

int CreateDeviceType::CreateDeviceTypeWindow::val_out = 0 [static]

Definition at line 181 of file CreateDeviceType.py.

tuple CreateDeviceType::CreateDeviceTypeWindow::val_in = int(devicetypeobj.GetPortsIn()) [static]

Definition at line 183 of file CreateDeviceType.py.

tuple CreateDeviceType::CreateDeviceTypeWindow::val_out = int(devicetypeobj.GetPortsOut()) [static]

Definition at line 184 of file CreateDeviceType.py.

tuple CreateDeviceType::CreateDeviceTypeWindow::tmpcolor = devicetypeobj.GetColour() [static]

Definition at line 190 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::buttonOk

Definition at line 56 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::buttonCancel

Definition at line 67 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::description

Definition at line 72 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__nbrinputspinbutton [private]

Definition at line 76 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::outputLabel

Definition at line 82 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__nbroutputspinbutton [private]

Definition at line 86 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::addsybsystemLabel

Definition at line 90 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::inputLabel

Definition at line 94 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::descriptionLabel

Definition at line 98 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__systemnamecaption [private]

Definition at line 104 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__devicetypetxtbox [private]

Definition at line 108 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__systemnametxtbox [private]

Definition at line 112 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__sysnamescmbbox [private]

Definition at line 115 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__colorbutton [private]

Definition at line 119 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__devicetypenameLabel [private]

Definition at line 123 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::colorLabel

Definition at line 127 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::__colorselected [private]

Definition at line 201 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::renameobj

Definition at line 250 of file CreateDeviceType.py.

CreateDeviceType::CreateDeviceTypeWindow::devicetypeobj

Definition at line 255 of file CreateDeviceType.py.


The documentation for this class was generated from the following file:
Generated on Fri Aug 31 11:11:18 2007 for CDBVis by  doxygen 1.5.3