|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2016 - 2021 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 PyQt5.QtWidgets import QDialog |
|
11 |
|
12 from .Ui_ClearPrivateDataDialog import Ui_ClearPrivateDataDialog |
|
13 |
|
14 |
|
15 class ClearPrivateDataDialog(QDialog, Ui_ClearPrivateDataDialog): |
|
16 """ |
|
17 Class implementing a dialog to select which private data to clear. |
|
18 """ |
|
19 def __init__(self, parent=None): |
|
20 """ |
|
21 Constructor |
|
22 |
|
23 @param parent reference to the parent widget |
|
24 @type QWidget |
|
25 """ |
|
26 super().__init__(parent) |
|
27 self.setupUi(self) |
|
28 |
|
29 msh = self.minimumSizeHint() |
|
30 self.resize(max(self.width(), msh.width()), msh.height()) |
|
31 |
|
32 def getData(self): |
|
33 """ |
|
34 Public method to get the data from the dialog. |
|
35 |
|
36 @return flags indicating which data to clear |
|
37 (recent files, recent projects, recent multi projects, |
|
38 debug histories, shell histories, VCS histories) |
|
39 @rtype tuple of bool |
|
40 """ |
|
41 return ( |
|
42 self.filesCheckBox.isChecked(), |
|
43 self.projectsCheckBox.isChecked(), |
|
44 self.multiProjectsCheckBox.isChecked(), |
|
45 self.debugCheckBox.isChecked(), |
|
46 self.shellCheckBox.isChecked(), |
|
47 self.vcsCheckBox.isChecked(), |
|
48 self.pluginsCheckBox.isChecked(), |
|
49 ) |