Package Camelot :: Package camelot :: Package view :: Module application_admin :: Class ApplicationAdmin |
[frames] | no frames]

# Class ApplicationAdmin

source code

    The Application Admin class defines how the application should look
    like, it also ties python classes to their associated admin classes.  It's
    behaviour can be steered by overwriting its static attributes or it's
    methods :

    .. attribute:: name

    The name of the application, as it will appear in the title of the main
    window.

    .. attribute:: sections

    A list containing the various sections that should appear in the left panel
    of the mainwindow.

    .. image:: ../_static/picture2.png

    .. attribute:: backup_mechanism

    A subclass of camelot.core.backup.BackupMechanism that enables the application
    to perform backups an restores.

Nested Classes
| backup_mechanism Create a backup of the current database to an sqlite database stored in filename.

Instance Methods
__init__(self) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
register(self, entity, admin_class) | source code
get_sections(*args, **kwargs) | source code
get_entity_admin(self, entity) Get the default entity admin for this entity, return None, if not existant | source code
get_entity_query(self, entity) Get the root query for an entity | source code
create_main_window(self) create_main_window | source code
get_entities_and_queries_in_section(self, section) the entities in this section. | source code
get_actions(self) that should be added to the menu and the icon bar for this application | source code
get_name(self) Returns: the name of the application | source code
get_version(self) Returns: string representing version of the application | source code
get_icon(self) Returns: the QIcon that should be used for the application | source code
get_splashscreen(self) Returns: a QtGui.QPixmap to be used as splash screen | source code
get_organization_name(self) | source code
get_organization_domain(self) | source code
get_help_url(self) Returns: a QUrl pointing to the index page for help | source code
get_whats_new(self) Returns: a widget that has a show() method | source code
get_affiliated_url(self) 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. | source code
get_remote_support_url(self) 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. | source code
get_stylesheet(self) or None if no stylesheet needed | source code
get_translator(self) Reimplement this method to add application specific translations to your application. | source code
get_about(self) syntax | source code
get_default_field_attributes(self, type_, field) Returns the default field attributes | source code
update_window_menu(self, mainwin) | 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
| name = ``'``Camelot``'``
| sections = ``[``'``Relations``'``,` `'``Configuration``'``]``
| admins = ``{``}``
| auth_changed_signal = ``'``2sections_changed()``'`` This signal is emitted whenever the sections are changed, and the views should be updated
Inherited from `PyQt4.QtCore.QObject`: `staticMetaObject`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### get_sections(*args, **kwargs) | source code
Decorators: `@model_function`

### get_entities_and_queries_in_section(self, section) | source code
the entities in this section. Returns: a list of tuples of (admin, query) instances related to

### get_actions(self) | source code
that should be added to the menu and the icon bar for this application Returns: a list of camelot.admin.application_action.ApplicationAction objects

### get_name(self) | source code
Returns: the name of the application

### get_version(self) | source code
Returns: string representing version of the application

### get_icon(self) | source code
Returns: the QIcon that should be used for the application

### get_splashscreen(self) | source code
Returns: a QtGui.QPixmap to be used as splash screen

### get_help_url(self) | source code
Returns: a QUrl pointing to the index page for help

### get_whats_new(self) | source code
Returns: a widget that has a show() method

### get_affiliated_url(self) | source code
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. Returns: a QUrl pointing to an affiliated webpage

### get_remote_support_url(self) | source code
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. Returns: a QUrl pointing to a page to get remote support

### get_stylesheet(self) | source code
or None if no stylesheet needed Returns: the qt stylesheet to be used for this application as a string

### get_translator(self) | source code
Reimplement this method to add application specific translations to your application. Returns: a QTranslator that should be used to translate the application

### get_about(self) | source code
syntax Returns: the content of the About dialog, a string with html