AssistantEric/ConfigurationPages/CallTipsEricPage.py

Sat, 19 May 2012 18:32:26 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 19 May 2012 18:32:26 +0200
changeset 54
89d28458ff40
parent 50
005b6127b978
child 65
71f50b4cc169
permissions
-rw-r--r--

Added support for auto-completions and calltips for sources compiled from form files.

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

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

"""
Module implementing the Eric Calltips configuration page.
"""

from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase
from .Ui_CallTipsEricPage import Ui_CallTipsEricPage


class CallTipsEricPage(ConfigurationPageBase, Ui_CallTipsEricPage):
    """
    Class implementing the Eric Calltips configuration page.
    """
    def __init__(self, plugin):
        """
        Constructor
        
        @param plugin reference to the plugin object
        """
        ConfigurationPageBase.__init__(self)
        self.setupUi(self)
        self.setObjectName("CallTipsEricPage")
        
        self.__plugin = plugin
        
        # set initial values
        self.calltipsCheckBox.setChecked(\
            self.__plugin.getPreferences("CalltipsEnabled"))
        self.ctContextCheckBox.setChecked(\
            self.__plugin.getPreferences("CallTipsContextShown"))
        self.hierarchyCheckBox.setChecked(
            self.__plugin.getPreferences("CallTipsFollowHierarchy"))
        
    def save(self):
        """
        Public slot to save the Eric Calltips configuration.
        """
        self.__plugin.setPreferences("CalltipsEnabled",
            self.calltipsCheckBox.isChecked())
        self.__plugin.setPreferences("CallTipsContextShown",
            self.ctContextCheckBox.isChecked())
        self.__plugin.setPreferences("CallTipsFollowHierarchy",
            self.hierarchyCheckBox.isChecked())

eric ide

mercurial