Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgShelveDataDialog.py

changeset 3291
58e95eea9b6d
child 3292
2feabde31912
equal deleted inserted replaced
3290:dbb53746813f 3291:58e95eea9b6d
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2014 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter the data for a shelve operation.
8 """
9
10 from PyQt4.QtCore import QDateTime
11 from PyQt4.QtGui import QDialog
12
13 from .Ui_HgShelveDataDialog import Ui_HgShelveDataDialog
14
15
16 class HgShelveDataDialog(QDialog, Ui_HgShelveDataDialog):
17 """
18 Class implementing a dialog to enter the data for a shelve operation.
19 """
20 def __init__(self, parent=None):
21 """
22 Constructor
23
24 @param parent reference to the parent widget (QWidget)
25 """
26 super().__init__(parent)
27 self.setupUi(self)
28
29 self.dateTimeEdit.setDateTime(QDateTime.currentDateTime())
30
31 def getData(self):
32 """
33 Public method to get the user data.
34
35 @return tuple containing the name (string), date (QDateTime),
36 message (string) and a flag indicating to add/remove
37 new/missing files (boolean)
38 """
39 return (
40 self.nameEdit.text(),
41 self.dateTimeEdit.dateTime(),
42 self.messageEdit.toPlainText(),
43 self.addRemoveCheckBox.isChecked(),
44 )

eric ide

mercurial