Exemplo n.º 1
0
    def _build_photo_path(
            self,
            composition,
            composer_id,
            document_parent_table,
            document_type,
            doc_id,
            doc_name
    ):
        pic_item = composition.getComposerItemById(composer_id)

        if pic_item is None:
            return

        extensions = doc_name.rsplit(".", 1)
        if len(extensions) < 2:
            return

        network_ph_path = network_document_path()
        if not network_ph_path:
            return

        img_extension = extensions[1]
        profile_name = self._current_profile.name.replace(' ', '_').lower()
        abs_path = u'{0}/{1}/{2}/{3}/{4}.{5}'.format(
            network_ph_path,
            profile_name,
            document_parent_table,
            document_type,
            doc_id,
            img_extension
        )

        if QFile.exists(abs_path):
            self._composeritem_value_handler(pic_item, abs_path)
Exemplo n.º 2
0
    def _build_photo_path(self, composition, composer_id,
                          document_parent_table, document_type, doc_id,
                          doc_name):
        pic_item = composition.getComposerItemById(composer_id)

        if pic_item is None:
            return

        extensions = doc_name.rsplit(".", 1)
        if len(extensions) < 2:
            return

        network_ph_path = network_document_path()
        if not network_ph_path:
            return

        img_extension = extensions[1]
        profile_name = self._current_profile.name.replace(' ', '_').lower()
        abs_path = u'{0}/{1}/{2}/{3}/{4}.{5}'.format(network_ph_path,
                                                     profile_name,
                                                     document_parent_table,
                                                     document_type, doc_id,
                                                     img_extension)

        if QFile.exists(abs_path):
            self._composeritem_value_handler(pic_item, abs_path)
Exemplo n.º 3
0
    def __init__(self, title='', parent=None):
        self._title = title
        self._parent = parent

        # Set default manager for document viewing
        self._doc_view_manager = DocumentViewManager(self._parent)
        self._doc_view_manager.setWindowTitle(self._title)
        self._network_doc_path = network_document_path()
        self._network_manager = NetworkFileManager(self._network_doc_path)
Exemplo n.º 4
0
    def __init__(self, title='', parent=None):
        self._title = title
        self._parent = parent

        # Set default manager for document viewing
        self._doc_view_manager = DocumentViewManager(self._parent)
        self._doc_view_manager.setWindowTitle(self._title)
        self._network_doc_path = network_document_path()
        self._network_manager = NetworkFileManager(self._network_doc_path)