- Timestamp:
- Apr 26, 2010, 1:02:23 AM (15 years ago)
- Location:
- trunk/src/gui/kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r659 r705 941 941 if (!qt_try_modal(widget, &qmsg, rc)) 942 942 return rc; 943 } 944 945 if (widget->xtra()) { // send through widget filter list 946 foreach(QWidget::PmEventFilter *filter, widget->xtra()->pmEventFilters) { 947 if (filter->pmEventFilter(&qmsg, &rc)) 948 return rc; 949 } 943 950 } 944 951 -
trunk/src/gui/kernel/qwidget.h
r651 r705 604 604 HPS getPS() const; 605 605 void releasePS(HPS) const; 606 607 struct PmEventFilter { 608 virtual bool pmEventFilter(QMSG *message, MRESULT *result) = 0; 609 }; 610 void addPmEventFilter(PmEventFilter *filter); 611 void removePmEventFilter(PmEventFilter *filter); 606 612 #else 607 613 Qt::HANDLE handle() const; -
trunk/src/gui/kernel/qwidget_p.h
r651 r705 277 277 uint receiveNativePaintEvents : 1; 278 278 279 #elif defined(Q_WS_PM) // <----------------------------------------------------- PM 280 QList<QWidget::PmEventFilter*> pmEventFilters; 279 281 #endif 280 282 }; -
trunk/src/gui/kernel/qwidget_pm.cpp
r693 r705 1778 1778 } 1779 1779 1780 /*! 1781 Adds the PM event filter to this widget. This is functionally equivalent to 1782 overriding the QWidget::pmEvent() virtual method. 1783 1784 Note that the event filters added with this method are called before 1785 QWidget::pmEvent() and may prevent Qt from further event processing 1786 including passing it to QWidget::pmEvent(). The order in which these filters 1787 are called corresponds to the order they are added to this widget. 1788 1789 \warning This function is not portable and exists only on OS/2. 1790 */ 1791 void QWidget::addPmEventFilter(PmEventFilter *filter) 1792 { 1793 Q_D(QWidget); 1794 d->createExtra(); 1795 d->extra->pmEventFilters.prepend(filter); 1796 } 1797 1798 /*! 1799 Removes the PM event filter added with addPmEventFilter() from this widget. 1800 1801 \warning This function is not portable and exists only on OS/2. 1802 */ 1803 void QWidget::removePmEventFilter(PmEventFilter *filter) 1804 { 1805 Q_D(QWidget); 1806 if (d->extra) 1807 d->extra->pmEventFilters.removeOne(filter); 1808 } 1809 1780 1810 void QWidgetPrivate::hide_sys() 1781 1811 {
Note:
See TracChangeset
for help on using the changeset viewer.