35 |
35 |
36 def __init__(self, parent=None): |
36 def __init__(self, parent=None): |
37 """ |
37 """ |
38 Constructor |
38 Constructor |
39 |
39 |
40 @param parent reference to the parent object (QObject) |
40 @param parent reference to the parent object |
|
41 @type QObject |
41 """ |
42 """ |
42 super().__init__(parent) |
43 super().__init__(parent) |
43 |
44 |
44 self.__removePixmap = EricPixmapCache.getIcon("greaseMonkeyTrash").pixmap( |
45 self.__removePixmap = EricPixmapCache.getIcon("greaseMonkeyTrash").pixmap( |
45 GreaseMonkeyConfigurationListDelegate.RemoveIconSize |
46 GreaseMonkeyConfigurationListDelegate.RemoveIconSize |
49 |
50 |
50 def padding(self): |
51 def padding(self): |
51 """ |
52 """ |
52 Public method to get the padding used. |
53 Public method to get the padding used. |
53 |
54 |
54 @return padding used (integer) |
55 @return padding used |
|
56 @rtype int |
55 """ |
57 """ |
56 return self.__padding |
58 return self.__padding |
57 |
59 |
58 def paint(self, painter, option, index): |
60 def paint(self, painter, option, index): |
59 """ |
61 """ |
60 Public method to paint the specified list item. |
62 Public method to paint the specified list item. |
61 |
63 |
62 @param painter painter object to paint to (QPainter) |
64 @param painter painter object to paint to |
63 @param option style option used for painting (QStyleOptionViewItem) |
65 @type QPainter |
64 @param index model index of the item (QModelIndex) |
66 @param option style option used for painting |
|
67 @type QStyleOptionViewItem |
|
68 @param index model index of the item |
|
69 @type QModelIndex |
65 """ |
70 """ |
66 opt = QStyleOptionViewItem(option) |
71 opt = QStyleOptionViewItem(option) |
67 self.initStyleOption(opt, index) |
72 self.initStyleOption(opt, index) |
68 |
73 |
69 widget = opt.widget |
74 widget = opt.widget |
208 |
213 |
209 def sizeHint(self, option, index): |
214 def sizeHint(self, option, index): |
210 """ |
215 """ |
211 Public method to get a size hint for the specified list item. |
216 Public method to get a size hint for the specified list item. |
212 |
217 |
213 @param option style option used for painting (QStyleOptionViewItem) |
218 @param option style option used for painting |
214 @param index model index of the item (QModelIndex) |
219 @type QStyleOptionViewItem |
215 @return size hint (QSize) |
220 @param index model index of the item |
|
221 @type QModelIndex |
|
222 @return size hint |
|
223 @rtype QSize |
216 """ |
224 """ |
217 if not self.__rowHeight: |
225 if not self.__rowHeight: |
218 opt = QStyleOptionViewItem(option) |
226 opt = QStyleOptionViewItem(option) |
219 self.initStyleOption(opt, index) |
227 self.initStyleOption(opt, index) |
220 |
228 |