Project
index
/home/mike/src/jokosher/trunk/Jokosher/Project.py

 
Modules
       
Globals
JokDebug
TransportManager
dbus
gobject
gst
gtk
gzip
math
os
pygst
shutil
time
types
urlparse
xml.dom.minidom

 
Classes
       
CommandManager.CommandManaged(__builtin__.object)
Project(Monitored.Monitored, CommandManager.CommandManaged)
Monitored.Monitored
Project(Monitored.Monitored, CommandManager.CommandManaged)
exceptions.EnvironmentError(exceptions.StandardError)
OpenProjectError
exceptions.Exception
AudioInputsError
CreateProjectError
InvalidProjectError

 
class AudioInputsError(exceptions.Exception)
     Methods defined here:
__init__(self, errno)
Error numbers:
1) No recording channels found
2) Sound card is not capable of multiple simultanious inputs

Methods inherited from exceptions.Exception:
__getitem__(...)
__str__(...)

 
class CreateProjectError(exceptions.Exception)
     Methods defined here:
__init__(self, errno)
Error numbers:
1) Unable to create a project object
2) Path for project file already exists
3) Unable to create file. (Invalid permissions, read-only, or the disk is full)
4) Invalid path, name or author
5) Invalid uri passed for the project file

Methods inherited from exceptions.Exception:
__getitem__(...)
__str__(...)

 
class InvalidProjectError(exceptions.Exception)
     Methods defined here:
__init__(self, missingfiles, missingimages)

Methods inherited from exceptions.Exception:
__getitem__(...)
__str__(...)

 
class OpenProjectError(exceptions.EnvironmentError)
    
Method resolution order:
OpenProjectError
exceptions.EnvironmentError
exceptions.StandardError
exceptions.Exception

Methods defined here:
__init__(self, errno, info=None)
Error Numbers:
   1) Invalid uri passed for the project file
   2) Unable to unzip the project
   3) Project created by a different version of Jokosher 
If a version string is given, it means the project file was created by
another version of Jokosher. That version is specified in the string.
   4) Project file doesn't exist

Methods inherited from exceptions.EnvironmentError:
__str__(...)

Methods inherited from exceptions.Exception:
__getitem__(...)

 
class Project(Monitored.Monitored, CommandManager.CommandManaged)
    This class maintains all of the information required about single
project.
 
 
Method resolution order:
Project
Monitored.Monitored
CommandManager.CommandManaged
__builtin__.object

Methods defined here:
AddInstrument(self, name, type, pixbuf)
Adds a new instrument to the project
 
undo : DeleteInstrument(%(temp)d)
AppendToCurrentStack(self, object)
CheckUnsavedChanges(self)
Uses boolean self.unsavedChanges and Undo/Redo to 
determine if the program needs to save anything on exit
ClearEventSelections(self)
Clears the selection of any events
ClearInstrumentSelections(self)
Clears the selection of any instruments
DeleteInstrument(self, id)
undo : ResurrectInstrument(%(temp)d)
ExecuteCommand(self, cmd)
This function executes the string cmd from the undo/redo stack.
Commands are made up of 2 parts - the object (and it's ID if
relevant), and the function to call.
 
i.e.
        E2 Delete()
        which means 'Call Delete()' on the Event with ID=2
GenerateUniqueID(self, id=None)
GetProjectLength(self)
MoveInstrument(self, id, position)
Move an instrument in the instrument list.
Used for drag and drop ordering of instruments in
InstrumentViewer.py
 
undo : MoveInstrument(%(temp)d, %(temp1)d)
OnAllInstrumentsMute(self)
Redo(self)
ResurrectInstrument(self, id)
undo : DeleteInstrument(%(temp)d)
SetLevel(self, level)
Note that this sets the current REPORTED level, NOT THE VOLUME!
SetTransportMode(self, val)
Sets the Mode in the Transportmanager. Used to enable Undo/Redo.
 
undo : SetTransportMode(%(temp)d)
SetViewScale(self, scale)
SetViewStart(self, start)
SetVolume(self, volume)
Sets the volume of the instrument in the range 0..1
Undo(self)
ValidateProject(self)
__init__(self)
bus_error(self, bus, message)
bus_message(self, bus, message)
closeProject(self)
export(self, filename)
Export to ogg/mp3
export_eos(self, bus=None, message=None)
get_export_progress(self)
newPad(self, element, pad, instrument)
play(self, movePlayhead=True)
Set all instruments playing
record(self)
Start all selected instruments recording
removePad(self, element, pad, instrument)
saveProjectFile(self, path=None)
Saves the project and its children as an XML file 
to the path specified by file.
state_changed(self, bus, message, movePlayhead=True)
stop(self, bus=None, message=None)
Stop playing or recording
terminate(self)
Terminate all instruments (used to disregard recording when an error occurs after instruments have started)

Data and other attributes defined here:
EXPORTING_FLAC = 4
EXPORTING_MP3 = 2
EXPORTING_VORBIS = 1
EXPORTING_WAV = 3
NOT_EXPORTING = 0

Methods inherited from Monitored.Monitored:
AddListener(self, obj)
Adds an object to report changes too.
 
Keyword arguments:
obj -- An object to inform when StateChanged is called.
RemoveListener(self, obj)
Stop reporting changes to the specified object.
 
Keyword arguments:
obj -- The object which should no longer receive change updates.
StateChanged(self, change=None)
This function should be called when we want a change to be reported to all objects previously added by AddListener. 
 
Keyword arguments:
change -- The change which has occured (optional).

Methods inherited from CommandManager.CommandManaged:
__getattribute__(self, attr)
wrapperFunction(self, func, *args, **kwargs)

Data and other attributes inherited from CommandManager.CommandManaged:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'CommandManaged' objects>
list of weak references to the object (if defined)

 
Functions
       
CreateNew(projecturi, name, author)
LoadFromFile(uri)

 
Data
        GlobalProjectObject = None