6.135. sibl_gui.components.core.templatesOutliner.templatesOutliner

templatesOutliner.py

Platform:
Windows, Linux, Mac Os X.
Description:
Defines the TemplatesOutliner Component Interface class.

Others:

6.135.1. Module Attributes

sibl_gui.components.core.templatesOutliner.templatesOutliner.LOGGER
sibl_gui.components.core.templatesOutliner.templatesOutliner.COMPONENT_UI_FILE

6.135.2. Classes

class sibl_gui.components.core.templatesOutliner.templatesOutliner.TemplatesOutliner(parent=None, name=None, *args, **kwargs)[source]

Bases: manager.qwidgetComponent.QWidgetComponent

It defines methods for Database Templates management.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • name (unicode) – Component name.
  • *args (*) – Arguments.
  • **kwargs (**) – Keywords arguments.
refreshNodes

This signal is emited by the TemplatesOutliner class when TemplatesOutliner.model class property model Nodes needs to be refreshed. ( pyqtSignal )

uiResourcesDirectory[source]

Property for self.__uiResourcesDirectory attribute.

Returns:self.__uiResourcesDirectory.
Return type:unicode
uiSoftwareAffixe[source]

Property for self.__uiSoftwareAffixe attribute.

Returns:self.__uiSoftwareAffixe.
Return type:unicode
uiUnknownSoftwareImage[source]

Property for self.__uiUnknownSoftwareImage attribute.

Returns:self.__uiUnknownSoftwareImage.
Return type:unicode
dockArea[source]

Property for self.__dockArea attribute.

Returns:self.__dockArea.
Return type:int
engine[source]

Property for self.__engine attribute.

Returns:self.__engine.
Return type:QObject
settings[source]

Property for self.__settings attribute.

Returns:self.__settings.
Return type:QSettings
settingsSection[source]

Property for self.__settingsSection attribute.

Returns:self.__settingsSection.
Return type:unicode
settingsSeparator[source]

Property for self.__settingsSeparator attribute.

Returns:self.__settingsSeparator.
Return type:unicode
scriptEditor[source]

Property for self.__scriptEditor attribute.

Returns:self.__scriptEditor.
Return type:QWidget
database[source]

Property for self.__database attribute.

Returns:self.__database.
Return type:object
model[source]

Property for self.__model attribute.

Returns:self.__model.
Return type:TemplatesModel
view[source]

Property for self.__view attribute.

Returns:self.__view.
Return type:QWidget
headers[source]

Property for self.__headers attribute.

Returns:self.__headers.
Return type:OrderedDict
extension[source]

Property for self.__extension attribute.

Returns:self.__extension.
Return type:unicode
defaultCollections[source]

Property for self.__defaultCollections attribute.

Returns:self.__defaultCollections.
Return type:dict
factoryCollection[source]

Property for self.__factoryCollection attribute.

Returns:self.__factoryCollection.
Return type:unicode
userCollection[source]

Property for self.__userCollection attribute.

Returns:self.__userCollection.
Return type:unicode
templatesInformationsDefaultText[source]

Property for self.__templatesInformationsDefaultText attribute.

Returns:self.__templatesInformationsDefaultText.
Return type:unicode
treeViewInnerMargins[source]

Property for self.__treeViewInnerMargins attribute.

Returns:self.__treeViewInnerMargins.
Return type:int
templatesInformationsText[source]

Property for self.__templatesInformationsText attribute.

Returns:self.__templatesInformationsText.
Return type:unicode
activate(engine)[source]

Activates the Component.

Parameters:engine (QObject) – Engine to attach the Component to.
Returns:Method success.
Return type:bool
deactivate()[source]

Deactivates the Component.

initializeUi()[source]

Initializes the Component ui.

Returns:Method success.
Return type:bool
uninitializeUi()[source]

Uninitializes the Component ui.

addWidget()[source]

Adds the Component Widget to the engine.

Returns:Method success.
Return type:bool
removeWidget()[source]

Removes the Component Widget from the engine.

onStartup()[source]

Defines the slot triggered by Framework startup.

Returns:Method success.
Return type:bool
onClose()[source]

Defines the slot triggered by Framework close.

Returns:Method success.
Return type:bool
addTemplateUi()[source]

Adds an user defined Template to the Database.

Returns:Method success.
Return type:bool
Note:May require user interaction.
removeTemplatesUi()[source]

Removes user selected Templates from the Database.

Returns:Method success.
Return type:bool
Note:May require user interaction.
updateTemplateLocationUi(template)[source]

Updates given Template location.

Parameters:template (Template) – Template to update.
Returns:Method success.
Return type:bool
Note:May require user interaction.
importDefaultTemplatesUi()[source]

Imports default Templates into the Database.

Returns:Method success.
Return type:bool
Note:May require user interaction.
displayHelpFilesUi()[source]

Displays user selected Templates help files.

Returns:Method success.
Return type:bool
filterTemplatesVersionsUi()[source]

Filters Templates by versions.

Returns:Method success.
Return type:bool
Note:May require user interaction.
addTemplate(name, path, collectionId=None)[source]

Adds a Template to the Database.

Parameters:
  • name (unicode) – Template set name.
  • path (unicode) – Template set path.
  • collectionId (int) – Target Collection id.
Returns:

Method success.

Return type:

bool

addDirectory(directory, collectionId=None)[source]

Adds given directory Templates to the Database.

Parameters:
  • directory (unicode) – Templates directory.
  • collectionId (int) – Collection id.
Returns:

Method success.

Return type:

bool

addDefaultTemplates(forceImport=False)[source]

Adds default Templates Collections / Templates to the Database.

Parameters:forceImport (bool) – Force Templates import.
Returns:Method success.
Return type:bool
removeTemplate(template)[source]

Removes given Template from the Database.

Parameters:templates (list) – Template to remove.
Returns:Method success.
Return type:bool
templateExists(path)[source]

Returns if given Template path exists in the Database.

Parameters:name (unicode) – Template path.
Returns:Template exists.
Return type:bool
displayHelpFile(template)[source]

Displays given Templates help file.

Parameters:template (Template) – Template to display help file.
Returns:Method success.
Return type:bool
getCollections()[source]

Returns Database Templates Collections.

Returns:Database Templates Collections.
Return type:list
filterCollections(pattern, attribute, flags=2)[source]

Filters the Database Templates Collections on given attribute using given pattern.

Parameters:
  • pattern (unicode) – Filter pattern.
  • attribute (unicode) – Attribute to filter on.
  • flags (int) – Regex filtering flags.
Returns:

Filtered Database Templates Collections.

Return type:

list

getTemplates()[source]

Returns Database Templates.

Returns:Database Templates.
Return type:list
filterTemplates(pattern, attribute, flags=2)[source]

Filters the Database Templates on given attribute using given pattern.

Parameters:
  • pattern (unicode) – Filter pattern.
  • attribute (unicode) – Attribute to filter on.
  • flags (int) – Regex filtering flags.
Returns:

Filtered Database Templates.

Return type:

list

listTemplates()[source]

Lists Database Templates names.

Returns:Database Templates names.
Return type:list
setTemplates()[source]

Sets the Templates Model nodes.

getTemplateByName(name)[source]

Returns Database Template with given name.

Parameters:name (unicode) – Template name.
Returns:Database Template.
Return type:Template
Note:The filtering is actually performed on ‘title’ attributes instead of ‘name’ attributes.
getCollectionByName(name)[source]

Returns Templates Collection from given Collection name.

Parameters:collection (unicode) – Collection name.
Returns:Collection.
Return type:Collection
getCollectionId(collection)[source]

Returns given Collection id.

Parameters:collection (unicode) – Collection to get the id from.
Returns:Provided Collection id.
Return type:int
getSelectedNodes()[source]

Returns the View selected nodes.

Returns:View selected nodes.
Return type:dict
getSelectedTemplatesNodes()[source]

Returns the View selected Templates nodes.

Returns:View selected Templates nodes.
Return type:list
getSelectedTemplates()[source]

Returns the View selected Templates.

Returns:View selected Templates.
Return type:list