equal
deleted
inserted
replaced
180 #endif |
180 #endif |
181 |
181 |
182 } |
182 } |
183 void init(); |
183 void init(); |
184 |
184 |
|
185 static QMenuPrivate *get(QMenu *m) { return m->d_func(); } |
185 int scrollerHeight() const; |
186 int scrollerHeight() const; |
186 |
187 |
187 //item calculations |
188 //item calculations |
188 mutable uint itemsDirty : 1; |
189 mutable uint itemsDirty : 1; |
189 mutable uint maxIconWidth, tabWidth; |
190 mutable uint maxIconWidth, tabWidth; |
190 QRect actionRect(QAction *) const; |
191 QRect actionRect(QAction *) const; |
191 |
192 |
192 mutable QVector<QRect> actionRects; |
193 mutable QVector<QRect> actionRects; |
193 mutable QWidgetList widgetItems; |
194 mutable QHash<QAction *, QWidget *> widgetItems; |
194 void updateActionRects() const; |
195 void updateActionRects() const; |
195 QRect popupGeometry(const QWidget *widget) const; |
196 QRect popupGeometry(const QWidget *widget) const; |
196 QRect popupGeometry(int screen = -1) const; |
197 QRect popupGeometry(int screen = -1) const; |
197 mutable uint ncols : 4; //4 bits is probably plenty |
198 mutable uint ncols : 4; //4 bits is probably plenty |
198 uint collapsibleSeparators : 1; |
199 uint collapsibleSeparators : 1; |
213 static QBasicTimer menuDelayTimer; |
214 static QBasicTimer menuDelayTimer; |
214 enum SelectionReason { |
215 enum SelectionReason { |
215 SelectedFromKeyboard, |
216 SelectedFromKeyboard, |
216 SelectedFromElsewhere |
217 SelectedFromElsewhere |
217 }; |
218 }; |
|
219 QWidget *topCausedWidget() const; |
218 QAction *actionAt(QPoint p) const; |
220 QAction *actionAt(QPoint p) const; |
219 void setFirstActionActive(); |
221 void setFirstActionActive(); |
220 void setCurrentAction(QAction *, int popup = -1, SelectionReason reason = SelectedFromElsewhere, bool activateFirst = false); |
222 void setCurrentAction(QAction *, int popup = -1, SelectionReason reason = SelectedFromElsewhere, bool activateFirst = false); |
221 void popupAction(QAction *, int, bool); |
223 void popupAction(QAction *, int, bool); |
222 void setSyncAction(); |
224 void setSyncAction(); |
288 |
290 |
289 void _q_actionTriggered(); |
291 void _q_actionTriggered(); |
290 void _q_actionHovered(); |
292 void _q_actionHovered(); |
291 |
293 |
292 bool hasMouseMoved(const QPoint &globalPos); |
294 bool hasMouseMoved(const QPoint &globalPos); |
|
295 |
|
296 void updateLayoutDirection(); |
|
297 |
293 |
298 |
294 //menu fading/scrolling effects |
299 //menu fading/scrolling effects |
295 bool doChildEffects; |
300 bool doChildEffects; |
296 |
301 |
297 #ifdef Q_WS_MAC |
302 #ifdef Q_WS_MAC |