Preferences/ConfigurationPages/MultiProjectPage.py

Wed, 19 Oct 2011 19:42:58 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 19 Oct 2011 19:42:58 +0200
changeset 1373
b3b3c99dba01
parent 1131
7781e396c903
child 1509
c0b5e693b0eb
permissions
-rw-r--r--

Made tasks manager forget about global file tasks when file is closed (configurable via configuration dialog).

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

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

"""
Module implementing the Multi Project configuration page.
"""

from .ConfigurationPageBase import ConfigurationPageBase
from .Ui_MultiProjectPage import Ui_MultiProjectPage

import Preferences


class MultiProjectPage(ConfigurationPageBase, Ui_MultiProjectPage):
    """
    Class implementing the Multi Project configuration page.
    """
    def __init__(self):
        """
        Constructor
        """
        super().__init__()
        self.setupUi(self)
        self.setObjectName("MultiProjectPage")
        
        # set initial values
        self.openMasterAutomaticallyCheckBox.setChecked(
            Preferences.getMultiProject("OpenMasterAutomatically"))
        self.multiProjectTimestampCheckBox.setChecked(
            Preferences.getMultiProject("XMLTimestamp"))
        self.multiProjectRecentSpinBox.setValue(
            Preferences.getMultiProject("RecentNumber"))
        
    def save(self):
        """
        Public slot to save the Project configuration.
        """
        Preferences.setMultiProject("OpenMasterAutomatically",
            self.openMasterAutomaticallyCheckBox.isChecked())
        Preferences.setMultiProject("XMLTimestamp",
            self.multiProjectTimestampCheckBox.isChecked())
        Preferences.setMultiProject("RecentNumber",
            self.multiProjectRecentSpinBox.value())
    

def create(dlg):
    """
    Module function to create the configuration page.
    
    @param dlg reference to the configuration dialog
    """
    page = MultiProjectPage()
    return page

eric ide

mercurial