27 |
27 |
28 def getData(self): |
28 def getData(self): |
29 """ |
29 """ |
30 Public method to get the data from the dialog. |
30 Public method to get the data from the dialog. |
31 |
31 |
32 @return tuple of flags indicating which data to clear (browsing history, |
32 @return tuple with flags indicating which data to clear (browsing history, |
33 search history, favicons, disk cache, cookies, passwords, web |
33 search history, favicons, disk cache, cookies, passwords, web |
34 databases, downloads) (list of boolean) |
34 databases, downloads, flash) and the selected history period in milliseconds |
|
35 (tuple of booleans and integer) |
35 """ |
36 """ |
|
37 index = self.historyCombo.currentIndex() |
|
38 if index == 0: |
|
39 # last hour |
|
40 historyPeriod = 60 * 60 * 1000 |
|
41 elif index == 1: |
|
42 # last day |
|
43 historyPeriod = 24 * 60 * 60 * 1000 |
|
44 elif index == 2: |
|
45 # last week |
|
46 historyPeriod = 7 * 24 * 60 * 60 * 1000 |
|
47 elif index == 3: |
|
48 # last four weeks |
|
49 historyPeriod = 4 * 7 * 24 * 60 * 60 * 1000 |
|
50 elif index == 4: |
|
51 # clear all |
|
52 historyPeriod = 0 |
|
53 |
36 return (self.historyCheckBox.isChecked(), |
54 return (self.historyCheckBox.isChecked(), |
37 self.searchCheckBox.isChecked(), |
55 self.searchCheckBox.isChecked(), |
38 self.iconsCheckBox.isChecked(), |
56 self.iconsCheckBox.isChecked(), |
39 self.cacheCheckBox.isChecked(), |
57 self.cacheCheckBox.isChecked(), |
40 self.cookiesCheckBox.isChecked(), |
58 self.cookiesCheckBox.isChecked(), |
41 self.passwordsCheckBox.isChecked(), |
59 self.passwordsCheckBox.isChecked(), |
42 self.databasesCheckBox.isChecked(), |
60 self.databasesCheckBox.isChecked(), |
43 self.downloadsCheckBox.isChecked()) |
61 self.downloadsCheckBox.isChecked(), |
|
62 self.flashCookiesCheckBox.isChecked(), |
|
63 historyPeriod) |