4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing a delegate for the special list widget for GreaseMonkey scripts. |
7 Module implementing a delegate for the special list widget for GreaseMonkey scripts. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 from PyQt4.QtCore import Qt, QSize, QRect |
12 from PyQt4.QtCore import Qt, QSize, QRect |
11 from PyQt4.QtGui import QStyle, QStyledItemDelegate, QApplication, QFontMetrics, \ |
13 from PyQt4.QtGui import QStyle, QStyledItemDelegate, QApplication, QFontMetrics, \ |
12 QPalette, QFont, QStyleOptionViewItemV4 |
14 QPalette, QFont, QStyleOptionViewItemV4 |
13 |
15 |
29 """ |
31 """ |
30 Constructor |
32 Constructor |
31 |
33 |
32 @param parent reference to the parent object (QObject) |
34 @param parent reference to the parent object (QObject) |
33 """ |
35 """ |
34 super().__init__(parent) |
36 super(GreaseMonkeyConfigurationListDelegate, self).__init__(parent) |
35 |
37 |
36 self.__removePixmap = UI.PixmapCache.getIcon("greaseMonkeyTrash.png").pixmap( |
38 self.__removePixmap = UI.PixmapCache.getIcon("greaseMonkeyTrash.png").pixmap( |
37 GreaseMonkeyConfigurationListDelegate.RemoveIconSize) |
39 GreaseMonkeyConfigurationListDelegate.RemoveIconSize) |
38 self.__rowHeight = 0 |
40 self.__rowHeight = 0 |
39 self.__padding = 0 |
41 self.__padding = 0 |