Package Camelot :: Package camelot :: Package view :: Module main :: Class Application
[frames] | no frames]

Class Application

source code


The camelot application. This class will take care of the order of initialization of various stuff needed to get the application up and running, each of its methods will be called in subsequent order, overwrite any of them to customize its behaviour.

This class will create the QApplication and call its processEvents method regulary will starting up the application

Instance Methods
 
__init__(self, application_admin)
customized to your app
source code
 
show_splashscreen(self)
Returns: the splash window
source code
 
show_splash_message(self, splash_window, message)
the user of the status of the application
source code
 
set_application_attributes(self, application)
Sets the attributes of the QApplication object :param application: the QApplication object
source code
 
pre_initialization(self)
Method that is called before the model thread is started, while the app is still running single threaded
source code
 
start_model_thread(self)
Launch the second thread where the model lives
source code
 
load_translations(self, application)
Fill the QApplication with the needed translations :param application: the QApplication on which to install the translator
source code
 
initialization(self)
Method that is called afther the model has been set up, before the main window is constructed
source code
 
create_main_window(self)
screen will be closed
source code
 
close_splashscreen(self, splash_window, main_window)
closes the splashcreen on appearance of the main window :param splash_window: the splash screen window, as generated by the show splashcreen function
source code
 
start_event_loop(self, application)
Starts the application's main event loop, wait until it is finished, then exit :param application: the QApplication to run
source code
 
initialization_exception(self, exception_info)
This method is called whenever an exception occurs before the event loop has been started, by default, this method pops up a message box to inform the user :param exception_info: a tuple (exception, traceback_print) where traceback_print is a string representation of the traceback
source code
 
main(self)
the main function of the application, this will call all other functions before starting the event loop
source code

Inherited from PyQt4.QtCore.QObject: blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __delattr__, __getattribute__, __new__, __setattr__

Inherited from object: __format__, __hash__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __str__, __subclasshook__

Class Variables

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties

Inherited from object: __class__

Method Details

__init__(self, application_admin)
(Constructor)

source code 
customized to your app
Parameters:
  • application_admin - a subclass of camelot.admin.application_admin.ApplicationAdmin
Overrides: object.__init__

show_splashscreen(self)

source code 
Returns:
the splash window

show_splash_message(self, splash_window, message)

source code 
the user of the status of the application
Parameters:
  • message - displays a message on the splash screen, informing

create_main_window(self)

source code 
screen will be closed
Returns:
a QWidget representing the main window, upon its appearance, the splash