Helpviewer/Sync/SyncHostTypePage.py

changeset 1626
a77c8ea8582c
child 1695
7b115f986d48
equal deleted inserted replaced
1625:4f03e45703e9 1626:a77c8ea8582c
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2012 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the synchronization host type wizard page.
8 """
9
10 from PyQt4.QtGui import QWizardPage
11
12 from . import SyncGlobals
13
14 from .Ui_SyncHostTypePage import Ui_SyncHostTypePage
15
16 import Preferences
17
18
19 class SyncHostTypePage(QWizardPage, Ui_SyncHostTypePage):
20 """
21 Class implementing the synchronization host type wizard page.
22 """
23 def __init__(self, parent=None):
24 """
25 Constructor
26
27 @param parent reference to the parent widget (QWidget)
28 """
29 super().__init__(parent)
30 self.setupUi(self)
31
32 if Preferences.getHelp("SyncType") == 0:
33 self.ftpRadioButton.setChecked(True)
34 else:
35 self.noneRadioButton.setChecked(True)
36
37 def nextId(self):
38 """
39 Public method returning the ID of the next wizard page.
40
41 @return next wizard page ID (integer)
42 """
43 # save the settings
44 if self.ftpRadioButton.isChecked():
45 Preferences.setHelp("SyncType", 0)
46 return SyncGlobals.PageFTPSettings
47 else:
48 Preferences.setHelp("SyncType", -1)
49 return SyncGlobals.PageCheck

eric ide

mercurial