eric6/Plugins/VcsPlugins/vcsPySvn/SvnRelocateDialog.py

changeset 6942
2602857055c5
parent 6645
ad476851d7e0
child 7229
53054eb5b15a
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2015 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter the data to relocate the workspace.
8 """
9
10 from __future__ import unicode_literals
11
12 from PyQt5.QtWidgets import QDialog
13
14 from .Ui_SvnRelocateDialog import Ui_SvnRelocateDialog
15
16
17 class SvnRelocateDialog(QDialog, Ui_SvnRelocateDialog):
18 """
19 Class implementing a dialog to enter the data to relocate the workspace.
20 """
21 def __init__(self, currUrl, parent=None):
22 """
23 Constructor
24
25 @param currUrl current repository URL (string)
26 @param parent parent widget (QWidget)
27 """
28 super(SvnRelocateDialog, self).__init__(parent)
29 self.setupUi(self)
30
31 self.currUrlLabel.setText(currUrl)
32 self.newUrlEdit.setText(currUrl)
33
34 msh = self.minimumSizeHint()
35 self.resize(max(self.width(), msh.width()), msh.height())
36
37 def getData(self):
38 """
39 Public slot used to retrieve the data entered into the dialog.
40
41 @return the new repository URL (string) and an indication, if
42 the relocate is inside the repository (boolean)
43 """
44 return self.newUrlEdit.text(), self.insideCheckBox.isChecked()

eric ide

mercurial