E5Gui/E5SideBar.py

changeset 96
9624a110667d
parent 55
b5c84934de9c
child 137
9b3f3e8fc798
equal deleted inserted replaced
95:261bc03812fd 96:9624a110667d
152 @return flag indicating, if the event was handled (boolean) 152 @return flag indicating, if the event was handled (boolean)
153 """ 153 """
154 if obj == self.__tabBar: 154 if obj == self.__tabBar:
155 if evt.type() == QEvent.MouseButtonPress: 155 if evt.type() == QEvent.MouseButtonPress:
156 pos = evt.pos() 156 pos = evt.pos()
157 index = -1
158 for i in range(self.__tabBar.count()): 157 for i in range(self.__tabBar.count()):
159 if self.__tabBar.tabRect(i).contains(pos): 158 if self.__tabBar.tabRect(i).contains(pos):
160 index = i
161 break 159 break
162 160
163 if i == self.__tabBar.currentIndex(): 161 if i == self.__tabBar.currentIndex():
164 if self.isMinimized(): 162 if self.isMinimized():
165 self.expand() 163 self.expand()
478 if state.isEmpty(): 476 if state.isEmpty():
479 return False 477 return False
480 478
481 data = QByteArray(state) 479 data = QByteArray(state)
482 stream = QDataStream(data, QIODevice.ReadOnly) 480 stream = QDataStream(data, QIODevice.ReadOnly)
483 version = stream.readUInt16() 481 stream.readUInt16() # version
484 minimized = stream.readBool() 482 minimized = stream.readBool()
485 483
486 if minimized: 484 if minimized:
487 self.shrink() 485 self.shrink()
488 486

eric ide

mercurial