4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to select a list of guards. |
7 Module implementing a dialog to select a list of guards. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 from PyQt4.QtGui import QDialog, QDialogButtonBox, QListWidgetItem, QAbstractItemView |
12 from PyQt4.QtGui import QDialog, QDialogButtonBox, QListWidgetItem, QAbstractItemView |
11 |
13 |
12 from .Ui_HgQueuesGuardsSelectionDialog import Ui_HgQueuesGuardsSelectionDialog |
14 from .Ui_HgQueuesGuardsSelectionDialog import Ui_HgQueuesGuardsSelectionDialog |
13 |
15 |
23 @param guards list of guards to select from (list of strings) |
25 @param guards list of guards to select from (list of strings) |
24 @keyparam activeGuards list of active guards (list of strings) |
26 @keyparam activeGuards list of active guards (list of strings) |
25 @param listOnly flag indicating to only list the guards (boolean) |
27 @param listOnly flag indicating to only list the guards (boolean) |
26 @param parent reference to the parent widget (QWidget) |
28 @param parent reference to the parent widget (QWidget) |
27 """ |
29 """ |
28 super().__init__(parent) |
30 super(HgQueuesGuardsSelectionDialog, self).__init__(parent) |
29 self.setupUi(self) |
31 self.setupUi(self) |
30 |
32 |
31 for guard in guards: |
33 for guard in guards: |
32 itm = QListWidgetItem(guard, self.guardsList) |
34 itm = QListWidgetItem(guard, self.guardsList) |
33 if activeGuards is not None and guard in activeGuards: |
35 if activeGuards is not None and guard in activeGuards: |