|
40 | 40 | class cacheTreeWidget(QTreeWidget): |
41 | 41 | """docstring for cacheTableView""" |
42 | 42 |
|
43 | | - mouseReleased = QtCore.Signal(QtCore.QPoint) |
44 | | - keyPressed = QtCore.Signal(QKeyEvent) |
| 43 | + mouseReleased = Signal(QPoint) |
| 44 | + keyPressed = Signal(QKeyEvent) |
45 | 45 |
|
46 | 46 | HEADER_SETTING = Define.HEADER_SETTING |
47 | 47 |
|
48 | 48 | def __init__(self, parent=None): |
49 | 49 | super(cacheTreeWidget, self).__init__(parent) |
50 | 50 | self.initSettings() |
51 | | - self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) |
| 51 | + self.setContextMenuPolicy(Qt.CustomContextMenu) |
52 | 52 |
|
53 | 53 | def initSettings(self): |
54 | 54 | self._cache_nodes = core.houManager.getCacheList() |
@@ -106,7 +106,7 @@ def section(self, key): |
106 | 106 | def showCellMenu(self, pos): |
107 | 107 | """Create menu for right click on the tree widget and show. |
108 | 108 |
|
109 | | - :param pos: <QtCore.QPoint> mouse click position. |
| 109 | + :param pos: <QPoint> mouse click position. |
110 | 110 | """ |
111 | 111 |
|
112 | 112 | cellMenu = QMenu(self) |
@@ -158,7 +158,7 @@ def showCellMenu(self, pos): |
158 | 158 | cellMenu.addAction(debug) |
159 | 159 |
|
160 | 160 |
|
161 | | - cellMenu.exec_(self.mapToGlobal(QtCore.QPoint(pos.x(), pos.y() + self.header().height()))) |
| 161 | + cellMenu.exec_(self.mapToGlobal(QPoint(pos.x(), pos.y() + self.header().height()))) |
162 | 162 |
|
163 | 163 |
|
164 | 164 | def setData(self): |
@@ -192,7 +192,7 @@ def setData(self): |
192 | 192 | if len(pathTokens) > 0: |
193 | 193 | self._setChildItem(topItem, pathTokens, path, cache_path, rwtype, editable, status) |
194 | 194 |
|
195 | | - self.sortItems(self.section("node"), QtCore.Qt.AscendingOrder) |
| 195 | + self.sortItems(self.section("node"), Qt.AscendingOrder) |
196 | 196 | self.expandAll() |
197 | 197 | self.blockSignals(False) |
198 | 198 | self._setHeaderWidth() |
@@ -364,8 +364,8 @@ def switchRwVisible(self): |
364 | 364 |
|
365 | 365 |
|
366 | 366 | def showNodesToggle(self, rwtype): |
367 | | - ritems = self.findItems("read", QtCore.Qt.MatchExactly | QtCore.Qt.MatchRecursive, self.section("rwtype")) |
368 | | - witems = self.findItems("write", QtCore.Qt.MatchExactly | QtCore.Qt.MatchRecursive, self.section("rwtype")) |
| 367 | + ritems = self.findItems("read", Qt.MatchExactly | Qt.MatchRecursive, self.section("rwtype")) |
| 368 | + witems = self.findItems("write", Qt.MatchExactly | Qt.MatchRecursive, self.section("rwtype")) |
369 | 369 |
|
370 | 370 | for ritem in ritems: |
371 | 371 |
|
|
0 commit comments