14 from .WebDatabasesDialog import WebDatabasesDialog |
14 from .WebDatabasesDialog import WebDatabasesDialog |
15 from .Ui_OfflineStorageConfigDialog import Ui_OfflineStorageConfigDialog |
15 from .Ui_OfflineStorageConfigDialog import Ui_OfflineStorageConfigDialog |
16 |
16 |
17 import Preferences |
17 import Preferences |
18 |
18 |
|
19 |
19 class OfflineStorageConfigDialog(QDialog, Ui_OfflineStorageConfigDialog): |
20 class OfflineStorageConfigDialog(QDialog, Ui_OfflineStorageConfigDialog): |
20 """ |
21 """ |
21 Class implementing a dialog to configure the offline storage. |
22 Class implementing a dialog to configure the offline storage. |
22 """ |
23 """ |
23 def __init__(self, parent = None): |
24 def __init__(self, parent=None): |
24 """ |
25 """ |
25 Constructor |
26 Constructor |
26 |
27 |
27 @param parent reference to the parent widget (QWidget) |
28 @param parent reference to the parent widget (QWidget) |
28 """ |
29 """ |
50 |
51 |
51 def storeData(self): |
52 def storeData(self): |
52 """ |
53 """ |
53 Public slot to store the configuration data. |
54 Public slot to store the configuration data. |
54 """ |
55 """ |
55 Preferences.setHelp("OfflineStorageDatabaseEnabled", |
56 Preferences.setHelp("OfflineStorageDatabaseEnabled", |
56 self.databaseEnabledCheckBox.isChecked()) |
57 self.databaseEnabledCheckBox.isChecked()) |
57 Preferences.setHelp("OfflineStorageDatabaseQuota", |
58 Preferences.setHelp("OfflineStorageDatabaseQuota", |
58 self.databaseQuotaSpinBox.value()) |
59 self.databaseQuotaSpinBox.value()) |
59 |
60 |
60 if self.applicationCacheGroup.isEnabled(): |
61 if self.applicationCacheGroup.isEnabled(): |
61 Preferences.setHelp("OfflineWebApplicationCacheEnabled", |
62 Preferences.setHelp("OfflineWebApplicationCacheEnabled", |
62 self.applicationCacheEnabledCheckBox.isChecked()) |
63 self.applicationCacheEnabledCheckBox.isChecked()) |
63 Preferences.setHelp("OfflineWebApplicationCacheQuota", |
64 Preferences.setHelp("OfflineWebApplicationCacheQuota", |
64 self.applicationCacheQuotaSpinBox.value()) |
65 self.applicationCacheQuotaSpinBox.value()) |
65 |
66 |
66 if self.localStorageGroup.isEnabled(): |
67 if self.localStorageGroup.isEnabled(): |
67 Preferences.setHelp("LocalStorageEnabled", |
68 Preferences.setHelp("LocalStorageEnabled", |
68 self.localStorageEnabledCheckBox.isChecked()) |
69 self.localStorageEnabledCheckBox.isChecked()) |
69 |
70 |
70 @pyqtSlot() |
71 @pyqtSlot() |
71 def on_showDatabasesButton_clicked(self): |
72 def on_showDatabasesButton_clicked(self): |
72 """ |
73 """ |