Helpviewer/HelpClearPrivateDataDialog.py

Sat, 09 Jan 2010 19:43:36 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 09 Jan 2010 19:43:36 +0000
changeset 42
23b45a742e17
parent 13
1af94a91f439
child 96
9624a110667d
permissions
-rw-r--r--

Fixed a bunch of issues including a workaround for a bug in the Python email package (s. EmailDialog.py).

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

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

"""
Module implementing a dialog to select which private data to clear.
"""

from PyQt4.QtGui import QDialog
from PyQt4.QtCore import pyqtSlot, qVersion

from .Ui_HelpClearPrivateDataDialog import Ui_HelpClearPrivateDataDialog

class HelpClearPrivateDataDialog(QDialog, Ui_HelpClearPrivateDataDialog):
    """
    Class implementing a dialog to select which private data to clear.
    """
    def __init__(self, parent = None):
        """
        Constructor
        
        @param parent reference to the parent widget (QWidget)
        """
        QDialog.__init__(self, parent)
        self.setupUi(self)
    
    def getData(self):
        """
        Public method to get the data from the dialog.
        
        @return tuple of flags indicating which data to clear (browsing history,
            search history, favicons, disk cache, cookies, passwords) (list of boolean)
        """
        return (self.historyCheckBox.isChecked(), 
                self.searchCheckBox.isChecked(), 
                self.iconsCheckBox.isChecked(), 
                self.cacheCheckBox.isChecked(), 
                self.cookiesCheckBox.isChecked(), 
                self.passwordsCheckBox.isChecked())

eric ide

mercurial