Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Commit d525c41

Browse files
author
Takanori Kishikawa
committed
Remove QtCore instancing for each function.
1 parent 538ba46 commit d525c41

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

python2.7libs/CacheManager/cacheWidget.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@
4040
class cacheTreeWidget(QTreeWidget):
4141
"""docstring for cacheTableView"""
4242

43-
mouseReleased = QtCore.Signal(QtCore.QPoint)
44-
keyPressed = QtCore.Signal(QKeyEvent)
43+
mouseReleased = Signal(QPoint)
44+
keyPressed = Signal(QKeyEvent)
4545

4646
HEADER_SETTING = Define.HEADER_SETTING
4747

4848
def __init__(self, parent=None):
4949
super(cacheTreeWidget, self).__init__(parent)
5050
self.initSettings()
51-
self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
51+
self.setContextMenuPolicy(Qt.CustomContextMenu)
5252

5353
def initSettings(self):
5454
self._cache_nodes = core.houManager.getCacheList()
@@ -106,7 +106,7 @@ def section(self, key):
106106
def showCellMenu(self, pos):
107107
"""Create menu for right click on the tree widget and show.
108108
109-
:param pos: <QtCore.QPoint> mouse click position.
109+
:param pos: <QPoint> mouse click position.
110110
"""
111111

112112
cellMenu = QMenu(self)
@@ -158,7 +158,7 @@ def showCellMenu(self, pos):
158158
cellMenu.addAction(debug)
159159

160160

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())))
162162

163163

164164
def setData(self):
@@ -192,7 +192,7 @@ def setData(self):
192192
if len(pathTokens) > 0:
193193
self._setChildItem(topItem, pathTokens, path, cache_path, rwtype, editable, status)
194194

195-
self.sortItems(self.section("node"), QtCore.Qt.AscendingOrder)
195+
self.sortItems(self.section("node"), Qt.AscendingOrder)
196196
self.expandAll()
197197
self.blockSignals(False)
198198
self._setHeaderWidth()
@@ -364,8 +364,8 @@ def switchRwVisible(self):
364364

365365

366366
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"))
369369

370370
for ritem in ritems:
371371

0 commit comments

Comments
 (0)