UI/ClearPrivateDataDialog.py

changeset 5108
f5cb9cb98e6a
child 5389
9b1c800daff3
equal deleted inserted replaced
5106:1ecc6c9abca5 5108:f5cb9cb98e6a
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2016 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to select which private data to clear.
8 """
9
10 from __future__ import unicode_literals
11
12 from PyQt5.QtWidgets import QDialog
13
14 from .Ui_ClearPrivateDataDialog import Ui_ClearPrivateDataDialog
15
16
17 class ClearPrivateDataDialog(QDialog, Ui_ClearPrivateDataDialog):
18 """
19 Class implementing a dialog to select which private data to clear.
20 """
21 def __init__(self, parent=None):
22 """
23 Constructor
24
25 @param parent reference to the parent widget
26 @type QWidget
27 """
28 super(ClearPrivateDataDialog, self).__init__(parent)
29 self.setupUi(self)
30
31 msh = self.minimumSizeHint()
32 self.resize(max(self.width(), msh.width()), msh.height())
33
34 def getData(self):
35 """
36 Public method to get the data from the dialog.
37
38 @return flags indicating which data to clear
39 (recent files, recent projects, recent multi projects,
40 debug histories, shell histories)
41 @rtype tuple of bool
42 """
43 return (
44 self.filesCheckBox.isChecked(),
45 self.projectsCheckBox.isChecked(),
46 self.multiProjectsCheckBox.isChecked(),
47 self.debugCheckBox.isChecked(),
48 self.shellCheckBox.isChecked(),
49 )

eric ide

mercurial