예제 #1
0
    def __init__(self, parent=None, flags=QtCore.Qt.WindowFlags(0), **kwargs):
        super(AboutDialog, self).__init__(parent, flags, **kwargs)
        self.setupUi(self)

        # Context menu actions
        qtsupport.setViewContextActions(self.versionsTableWidget)

        # Set icons
        logofile = qtsupport.geticonfile('GSDView.png', __name__)
        self.setLogo(logofile)

        # Set contents
        self.titleLabel.setText('%s v. %s' % (self.tr(info.name),
                                              info.version))

        description = '''<p>%s</p>
<p>Home Page: <a href="%s">%s</a>
<BR>
Project Page: <a href="http://sourceforge.net/projects/gsdview">http://sourceforge.net/projects/gsdview</a></p>
<par>
<p><span style="font-size:9pt; font-style:italic;">%s</span></p>
''' % (self.tr(info.description), info.website, info.website_label,
            info.copyright)
        self.aboutTextBrowser.setText(description)

        self.setPlatformInfo()
        self.setVersions()
예제 #2
0
    def __init__(self, parent=None, flags=QtCore.Qt.WindowFlags(0), **kwargs):
        super().__init__(parent, flags, **kwargs)
        self.setupUi(self)

        # Context menu actions
        qtsupport.setViewContextActions(self.versionsTableWidget)

        # Set icons
        logofile = qtsupport.geticonfile('GSDView.png', __name__)
        self.setLogo(logofile)

        # Set contents
        self.titleLabel.setText(f'{self.tr(info.name)} v. {info.version}')

        description = f'''<p>{self.tr(info.description)}</p>
<p>Home Page: <a href="{info.website}">{info.website_label}</a>
<BR>
Project Page: <a href="http://sourceforge.net/projects/gsdview">http://sourceforge.net/projects/gsdview</a></p>
<par>
<p><span style="font-size:9pt; font-style:italic;">{info.copyright}</span></p>
'''
        self.aboutTextBrowser.setText(description)

        self.setPlatformInfo()
        self.setVersions()
예제 #3
0
    def __init__(self,
                 pluginmanager,
                 parent=None,
                 flags=QtCore.Qt.WindowFlags(0),
                 **kwargs):
        super(PluginManagerGui, self).__init__(parent, flags, **kwargs)
        self.setupUi(self)

        # Set icons
        geticon = qtsupport.geticon
        self.addButton.setIcon(geticon('add.svg', __name__))
        self.removeButton.setIcon(geticon('remove.svg', __name__))
        self.editButton.setIcon(geticon('edit.svg', __name__))
        self.upButton.setIcon(geticon('go-up.svg', __name__))
        self.downButton.setIcon(geticon('go-down.svg', __name__))

        # Set plugin manager attribute
        self.pluginmanager = pluginmanager

        # Context menu
        qtsupport.setViewContextActions(self.pathListWidget)
        qtsupport.setViewContextActions(self.pluginsTableWidget)

        # @TODO: check edit triggers
        #int(self.pathListWidget.editTriggers() &
        #    self.pathListWidget.DoubleClicked)

        self.pathListWidget.itemSelectionChanged.connect(
            self.pathSelectionChanged)

        self.addButton.clicked.connect(self.addPathItem)
        self.removeButton.clicked.connect(self.removeSelectedPathItem)
        self.upButton.clicked.connect(self.moveSelectedPathItemsUp)
        self.downButton.clicked.connect(self.moveSelectedPathItemsDown)
        self.editButton.clicked.connect(self.editSelectedPathItem)
예제 #4
0
    def __init__(self, pluginmanager, parent=None,
                 flags=QtCore.Qt.WindowFlags(0), **kwargs):
        super(PluginManagerGui, self).__init__(parent, flags, **kwargs)
        self.setupUi(self)

        # Set icons
        geticon = qtsupport.geticon
        self.addButton.setIcon(geticon('add.svg', __name__))
        self.removeButton.setIcon(geticon('remove.svg', __name__))
        self.editButton.setIcon(geticon('edit.svg', __name__))
        self.upButton.setIcon(geticon('go-up.svg', __name__))
        self.downButton.setIcon(geticon('go-down.svg', __name__))

        # Set plugin manager attribute
        self.pluginmanager = pluginmanager

        # Context menu
        qtsupport.setViewContextActions(self.pathListWidget)
        qtsupport.setViewContextActions(self.pluginsTableWidget)

        # @TODO: check edit triggers
        #int(self.pathListWidget.editTriggers() &
        #    self.pathListWidget.DoubleClicked)

        self.pathListWidget.itemSelectionChanged.connect(
            self.pathSelectionChanged)

        self.addButton.clicked.connect(self.addPathItem)
        self.removeButton.clicked.connect(self.removeSelectedPathItem)
        self.upButton.clicked.connect(self.moveSelectedPathItemsUp)
        self.downButton.clicked.connect(self.moveSelectedPathItemsDown)
        self.editButton.clicked.connect(self.editSelectedPathItem)
예제 #5
0
    def __init__(self, parent=None, flags=QtCore.Qt.WindowFlags(0), **kwargs):
        # title = self.tr('Dataset Browser')
        super().__init__('Metadata Viewer', parent, flags, **kwargs)
        # self.setObjectName('metadataViewerPanel') # @TODO: check

        self.infoTable = QtWidgets.QTableWidget(5, 2, self)
        self.infoTable.verticalHeader().hide()
        self.infoTable.setHorizontalHeaderLabels(['Name', 'Value'])
        self.infoTable.horizontalHeader().setStretchLastSection(True)
        # self.tableWidget.horizontalHeader().hide()
        # @TODO: comment if you want allow the user to edit items
        self.infoTable.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.infoTable.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)

        qtsupport.setViewContextActions(self.infoTable)

        self.setWidget(self.infoTable)
예제 #6
0
파일: core.py 프로젝트: avalentino/gsdview
    def __init__(self, parent=None, flags=QtCore.Qt.WindowFlags(0), **kwargs):
        #title = self.tr('Dataset Browser')
        super(MetadataViewer, self).__init__('Metadata Viewer', parent, flags,
                                             **kwargs)
        #self.setObjectName('metadataViewerPanel') # @TODO: check

        self.infoTable = QtWidgets.QTableWidget(5, 2, self)
        self.infoTable.verticalHeader().hide()
        self.infoTable.setHorizontalHeaderLabels(['Name', 'Value'])
        self.infoTable.horizontalHeader().setStretchLastSection(True)
        #self.tableWidget.horizontalHeader().hide()
        # @TODO: comment if you want allow the uset to edit items
        self.infoTable.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.infoTable.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)

        qtsupport.setViewContextActions(self.infoTable)

        self.setWidget(self.infoTable)