Changeset 605 for trunk/src/gui/kernel/qwindowdefs_pm.h
- Timestamp:
- Feb 26, 2010, 12:33:58 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qwindowdefs_pm.h
r603 r605 86 86 Q_GUI_EXPORT int qt_display_height(); 87 87 88 Q_GUI_EXPORT QWidget *q WidgetFromHWND(HWND hwnd);88 Q_GUI_EXPORT QWidget *qt_widget_from_hwnd(HWND hwnd); 89 89 90 // For printing non-quoted QString's with QDebug 91 struct Q_CORE_EXPORT QDbgStr: public QString 92 { 93 inline QDbgStr(const QString &str) : QString(str) {} 94 }; 90 // QDebug helpers for debugging various API types 95 91 96 Q_GUI_EXPORT QDbgStr qWidgetName(QWidget *w); 97 inline QDbgStr qWidgetName(HWND hwnd) 98 { return qWidgetName(qWidgetFromHWND(hwnd)); } 92 // don't drag qdebug.h but require it to be included first 93 #if defined(QDEBUG_H) && !defined(QT_NO_DEBUG_STREAM) 99 94 100 Q_CORE_EXPORT QDbgStr qStrHWND(HWND hwnd); 101 Q_CORE_EXPORT QDbgStr qStrHPS(HPS hps); 102 Q_CORE_EXPORT QDbgStr qStrHPOINTER(HPOINTER hptr); 103 Q_CORE_EXPORT QDbgStr qStrHRGN(HRGN hrgn); 104 105 Q_CORE_EXPORT QDbgStr qStrQMSG(const QMSG &qmsg); 95 struct QDebugHWND { HWND hwnd; }; 96 inline QDebugHWND qDebugHWND(HWND hwnd) { QDebugHWND d = { hwnd }; return d; } 97 QDebug operator<<(QDebug debug, const QDebugHWND &d); 106 98 107 99 // the following declarations require OS/2 types not defined here, 108 // we don't drag them in but require qt_os2.h to be included before100 // don't drag them in as well but require qt_os2.h to be included first 109 101 #if defined(QT_OS2_H) 110 102 111 Q_CORE_EXPORT QDbgStr qStrRECTL(const RECTL &rcl); 112 Q_CORE_EXPORT QDbgStr qStrSWP(const SWP &swp); 113 114 #endif // defined(QT_OS2_H) 115 116 // don't drag qdebug.h as well but require it to be included before 117 #if defined(QDEBUG_H) && !defined(QT_NO_DEBUG_STREAM) 118 119 // Prints a non-quoted QString 120 inline QDebug operator<<(QDebug dbg, const QDbgStr &str) 121 { dbg << str.toUtf8().constData(); return dbg; } 122 123 #if defined(QT_OS2_H) 124 125 inline QDebug operator<<(QDebug dbg, const RECTL &rcl) 126 { dbg << qStrRECTL(rcl); return dbg; } 127 128 inline QDebug operator<<(QDebug dbg, const SWP &swp) 129 { dbg << qStrSWP(swp); return dbg; } 103 QDebug operator<<(QDebug debug, const RECTL &rcl); 104 QDebug operator<<(QDebug debug, const SWP &swp); 105 QDebug operator<<(QDebug debug, const QMSG &qmsg); 130 106 131 107 #endif // defined(QT_OS2_H)
Note:
See TracChangeset
for help on using the changeset viewer.