eric6/Helpviewer/Sync/SyncDirectorySettingsPage.py

branch
maintenance
changeset 7286
7eb04391adf7
parent 7226
babe80d84a3e
parent 7285
1ff497f33f31
child 7287
1c17f2191bdd
equal deleted inserted replaced
7226:babe80d84a3e 7286:7eb04391adf7
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2012 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the synchronization shared directory settings wizard page.
8 """
9
10 from __future__ import unicode_literals
11
12 from PyQt5.QtWidgets import QWizardPage
13
14 from E5Gui.E5PathPicker import E5PathPickerModes
15
16 from .Ui_SyncDirectorySettingsPage import Ui_SyncDirectorySettingsPage
17
18 import Preferences
19
20
21 class SyncDirectorySettingsPage(QWizardPage, Ui_SyncDirectorySettingsPage):
22 """
23 Class implementing the shared directory host settings wizard page.
24 """
25 def __init__(self, parent=None):
26 """
27 Constructor
28
29 @param parent reference to the parent widget (QWidget)
30 """
31 super(SyncDirectorySettingsPage, self).__init__(parent)
32 self.setupUi(self)
33
34 self.directoryPicker.setMode(E5PathPickerModes.DirectoryMode)
35 self.directoryPicker.setText(Preferences.getHelp("SyncDirectoryPath"))
36
37 self.directoryPicker.textChanged.connect(self.completeChanged)
38
39 def nextId(self):
40 """
41 Public method returning the ID of the next wizard page.
42
43 @return next wizard page ID (integer)
44 """
45 # save the settings
46 Preferences.setHelp("SyncDirectoryPath", self.directoryPicker.text())
47
48 from . import SyncGlobals
49 return SyncGlobals.PageCheck
50
51 def isComplete(self):
52 """
53 Public method to check the completeness of the page.
54
55 @return flag indicating completeness (boolean)
56 """
57 return self.directoryPicker.text() != ""

eric ide

mercurial