PluginManager/PluginDetailsDialog.py

Thu, 01 Jan 2015 13:11:59 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 01 Jan 2015 13:11:59 +0100
changeset 4021
195a471c327b
parent 3656
441956d8fce5
child 4278
ccd1e13cb9bd
permissions
-rw-r--r--

Updated copyright for 2015.

# -*- coding: utf-8 -*-

# Copyright (c) 2007 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#


"""
Module implementing the Plugin Details Dialog.
"""

from __future__ import unicode_literals

from PyQt5.QtWidgets import QDialog
from PyQt5.QtCore import pyqtSlot

from .Ui_PluginDetailsDialog import Ui_PluginDetailsDialog


class PluginDetailsDialog(QDialog, Ui_PluginDetailsDialog):
    """
    Class implementing the Plugin Details Dialog.
    """
    def __init__(self, details, parent=None):
        """
        Constructor
        
        @param details dictionary containing the info to be displayed
        @param parent parent of this dialog (QWidget)
        """
        super(PluginDetailsDialog, self).__init__(parent)
        self.setupUi(self)
        
        self.__autoactivate = details["autoactivate"]
        self.__active = details["active"]
        
        self.moduleNameEdit.setText(details["moduleName"])
        self.moduleFileNameEdit.setText(details["moduleFileName"])
        self.pluginNameEdit.setText(details["pluginName"])
        self.versionEdit.setText(details["version"])
        self.authorEdit.setText(details["author"])
        self.descriptionEdit.setText(details["description"])
        self.errorEdit.setText(details["error"])
        self.autoactivateCheckBox.setChecked(details["autoactivate"])
        self.activeCheckBox.setChecked(details["active"])
    
    @pyqtSlot()
    def on_activeCheckBox_clicked(self):
        """
        Private slot called, when the activeCheckBox was clicked.
        """
        self.activeCheckBox.setChecked(self.__active)
    
    @pyqtSlot()
    def on_autoactivateCheckBox_clicked(self):
        """
        Private slot called, when the autoactivateCheckBox was clicked.
        """
        self.autoactivateCheckBox.setChecked(self.__autoactivate)

eric ide

mercurial