Uranium
Application Framework
UM.OutputDevice.OutputDevice.OutputDevice Class Reference
Inheritance diagram for UM.OutputDevice.OutputDevice.OutputDevice:
UM.OutputDevice.ProjectOutputDevice.ProjectOutputDevice

Public Member Functions

def __init__
 
def getId (self)
 
def getName (self)
 
def setName
 
def getShortDescription (self)
 
def setShortDescription
 
def getDescription (self)
 
def setDescription
 
def getIconName (self)
 
def setIconName
 
def getPriority (self)
 
def setPriority
 
def requestWrite
 

Static Public Attributes

tuple metaDataChanged = Signal()
 
tuple writeStarted = Signal()
 
tuple writeProgress = Signal()
 
tuple writeFinished = Signal()
 
tuple writeError = Signal()
 
tuple writeSuccess = Signal()
 

Detailed Description

Base class for output devices.

This class provides a base class for output devices. An output device can be
anything we want to output to, like a local file, an USB connected printer but
also an HTTP web service.

Each subclass must implement requestWrite(). requestWrite() is expected to raise
errors from OutputDeviceError when certain conditions occur, like insufficient
permissions. For the rest, output device subclasses are completely free to implement
writing however they want, though you should emit writeStarted and related signals
whenever certain events happen related to the write process.

For example, when implementing a web service as output device, it would be completely
acceptable to show a login dialog when calling requestWrite() if there are no saved
login credentials.

Member Function Documentation

def UM.OutputDevice.OutputDevice.OutputDevice.getDescription (   self,
  str 
)
Get a full description for this device.

The full description describes what would happen when writing
to this device. For example, "Save to Removable Drive /media/sdcard",
"Upload to YouMagine with account User".
def UM.OutputDevice.OutputDevice.OutputDevice.getIconName (   self,
  str 
)
Get the name of an icon that can be used to identify this device.

This icon should be available in the theme.
def UM.OutputDevice.OutputDevice.OutputDevice.getId (   self,
  str 
)
Get the device id
def UM.OutputDevice.OutputDevice.OutputDevice.getName (   self,
  str 
)
Get a human-readable name for this device.
def UM.OutputDevice.OutputDevice.OutputDevice.getPriority (   self,
  int 
)
The priority of this device.

Priority indicates which device is most likely to be used as the
default device to write to. It should be a number and higher numbers
indicate that the device should be preferred over devices with
lower numbers.
def UM.OutputDevice.OutputDevice.OutputDevice.getShortDescription (   self,
  str 
)
Get a short description for this device.

The short description can be used as a button label or similar
and should thus be only a few words at most. For example,
"Save to File", "Print with USB".

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