The ApplicationAdmin class defines how the application should look like, it also ties Python classes to their associated camelot.admin.object_admin.ObjectAdmin class or subclass. It’s behaviour can be steered by overwriting its static attributes or it’s methods :
The name of the application, as it will appear in the title of the main window.
The url of the web site where the user can find more information on the application.
Points to either a local html file or a web site that contains the documentation of the application.
The name of the author of the application
The domain name of the author of the application, eg ‘mydomain.com’, this domain will be used to store settings of the application.
A string with the version of the application
A subclass of camelot.core.backup.BackupMechanism that enables the application to perform backups an restores.
The wizard that should be used to create new database profiles. Defaults to camelot.view.database_selection.ProfileWizard
if this is set to True, present the user with a database selection wizard prior to starting the application. Defaults to False.
alias of BackupMechanism
Create the main window that will be shown when the application starts up. By default, returns an instance of
Returns: | a PyQt4.QtGui.QWidget |
---|
alias of ProfileWizard
Dump the state of the application to the output, this method is triggered by pressing Ctrl-Alt-D in the GUI
Returns: | a list of camelot.admin.application_action.ApplicationAction objects |
---|
that should be added to the menu and the icon bar for this application
Returns: | a PyQt4.QtCore.QUrl pointing to an affiliated webpage |
---|
When this method returns a QUrl, an additional item will be available in the ‘Help’ menu, when clicked the system browser will be opened an pointing to this url.
This can be used to connect the user to a website that is used a lot in the organization, but hard to remember.
Get the default camelot.admin.object_admin.ObjectAdmin class for a specific entity, return None, if not known. The ObjectAdmin should either be registered through the register() method or be defined as an inner class with name Admin of the entity.
Parameters: | entity – a class |
---|
deprecated : use get_related_admin instead
Returns: | the camelot.view.art.Icon that should be used for the application |
---|
Returns: | the name of the application, by default this is the class |
---|
attribute name
Get the default camelot.admin.object_admin.ObjectAdmin class for a specific class, return None, if not known. The ObjectAdmin should either be registered through the register() method or be defined as an inner class with name Admin of the entity.
Parameters: | entity – a class |
---|
Returns: | a PyQt4.QtCore.QUrl pointing to a page to get remote support |
---|
When this method returns a QUrl, an additional item will be available in the ‘Help’ menu, when clicked the system browser will be opened an pointing to this url.
This can be used to connect the user to services like logmein.com, an online ticketing system or others.
A list of camelot.admin.section.Section objects, these are the sections to be displayed in the left panel.
Returns: | a string with the qt stylesheet to be used for this application as a string |
---|
or None if no stylesheet needed.
Camelot comes with a couple of default stylesheets :
- stylesheet/office2007_blue.qss
- stylesheet/office2007_black.qss
- stylesheet/office2007_silver.qss
Have a look at the default implementation to use another stylesheet.
Reimplement this method to add application specific translations to your application. The default method returns a list with the default Qt and the default Camelot translator for the current system locale. Call QLocale.setDefault() before this method is called if you want to load different translations then the system default.
Returns: | a list of QtCore.QTranslator objects that should be used to translate the application |
---|
Returns: | string representing version of the application, by default this |
---|
is the class attribute verion
Create a segmentation fault by reading null, this is to test the faulthandling functions. this method is triggered by pressing Ctrl-Alt-0 in the GUI
Associate a certain ObjectAdmin class with another class. This ObjectAdmin will be used as default to render object the specified type.
Parameters: |
|
---|