7 Module implementing a tool bar populated from a QAbstractItemModel. |
7 Module implementing a tool bar populated from a QAbstractItemModel. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import pyqtSignal, Qt, QModelIndex, QPoint, QEvent |
10 from PyQt4.QtCore import pyqtSignal, Qt, QModelIndex, QPoint, QEvent |
11 from PyQt4.QtGui import QApplication, QDrag, QPixmap, QToolBar, QIcon, QToolButton |
11 from PyQt4.QtGui import QApplication, QDrag, QPixmap, QToolBar, QIcon, QToolButton |
12 |
|
13 from .E5ModelMenu import E5ModelMenu |
|
14 |
12 |
15 |
13 |
16 class E5ModelToolBar(QToolBar): |
14 class E5ModelToolBar(QToolBar): |
17 """ |
15 """ |
18 Class implementing a tool bar populated from a QAbstractItemModel. |
16 Class implementing a tool bar populated from a QAbstractItemModel. |
146 """ |
144 """ |
147 Protected method to create the menu for a tool bar action. |
145 Protected method to create the menu for a tool bar action. |
148 |
146 |
149 @return menu for a tool bar action (E5ModelMenu) |
147 @return menu for a tool bar action (E5ModelMenu) |
150 """ |
148 """ |
|
149 from .E5ModelMenu import E5ModelMenu |
151 return E5ModelMenu(self) |
150 return E5ModelMenu(self) |
152 |
151 |
153 def eventFilter(self, obj, evt): |
152 def eventFilter(self, obj, evt): |
154 """ |
153 """ |
155 Public method to handle event for other objects. |
154 Public method to handle event for other objects. |