Changeset 134
- Timestamp:
- Aug 27, 2009, 2:02:17 AM (16 years ago)
- Location:
- trunk/src/gui/kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r133 r134 519 519 520 520 switch(msg) { 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 521 544 522 545 case WM_BUTTON1DOWN: -
trunk/src/gui/kernel/qdesktopwidget_pm.cpp
r95 r134 47 47 #include "qwidget_p.h" 48 48 49 50 49 51 QT_BEGIN_NAMESPACE 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 50 73 51 74 class QDesktopWidgetPrivate : public QWidgetPrivate 52 75 { 53 76 public: 77 54 78 }; 55 79 … … 71 95 QDesktopWidget::QDesktopWidget() 72 96 : QWidget(*new QDesktopWidgetPrivate, 0, Qt::Desktop) 73 97 { 74 98 setObjectName(QLatin1String("desktop")); 75 // @todo implement76 99 } 77 100 … … 87 110 int QDesktopWidget::primaryScreen() const 88 111 { 89 // @todo implement90 112 return 0; 91 113 } … … 93 115 int QDesktopWidget::numScreens() const 94 116 { 95 // @todo implement 96 return 0; 117 return 1; 97 118 } 98 119 … … 105 126 const QRect QDesktopWidget::availableGeometry(int screen) const 106 127 { 107 // @todo implement 108 return QRect(); 128 Q_D(const QDesktopWidget); 129 130 if (!d->workArea.isValid()) 131 const_cast<QDesktopWidget *>(this)->resizeEvent(0); 132 if (d->workArea.isValid()) 133 return d->workArea; 134 135 return geometry(); 109 136 } 110 137 111 138 const QRect QDesktopWidget::screenGeometry(int screen) const 112 139 { 113 // @todo implement 114 return QRect(); 140 return geometry(); 115 141 } 116 142 117 int QDesktopWidget::screenNumber(const QWidget * widget) const143 int QDesktopWidget::screenNumber(const QWidget *) const 118 144 { 119 // @todo implement120 145 return 0; 121 146 } 122 147 123 int QDesktopWidget::screenNumber(const QPoint & point) const148 int QDesktopWidget::screenNumber(const QPoint &) const 124 149 { 125 // @todo implement126 150 return 0; 127 151 } 128 152 129 void QDesktopWidget::resizeEvent(QResizeEvent * )153 void QDesktopWidget::resizeEvent(QResizeEvent *) 130 154 { 131 // @todo implement 155 Q_D(QDesktopWidget); 156 157 if (e == 0) { 158 // this is a Work Area Changed notification, see WM_SYSVALUECHANGED 159 // in qapplication_pm.cpp 160 typedef 161 BOOL (APIENTRY *WinQueryDesktopWorkArea_T) (HWND hwndDesktop, 162 PRECTL pwrcWorkArea); 163 static WinQueryDesktopWorkArea_T WinQueryDesktopWorkArea = 164 (WinQueryDesktopWorkArea_T) ~0; 165 166 if ((ULONG) WinQueryDesktopWorkArea == (ULONG) ~0) { 167 if (qt_DosQueryProcAddr("PMMERGE", 5469, 168 (PFN *) &WinQueryDesktopWorkArea)) 169 WinQueryDesktopWorkArea = NULL; 170 } 171 172 if (WinQueryDesktopWorkArea) { 173 RECTL rcl; 174 if (WinQueryDesktopWorkArea(HWND_DESKTOP, &rcl)) { 175 // flip y coordinates 176 d->workArea.setCoords(rcl.xLeft, height() - rcl.yTop, 177 rcl.xRight - 1, 178 height() - (rcl.yBottom + 1)); 179 } 180 } 181 182 emit workAreaResized(0); 183 return; 184 } 185 186 // otherwise nothing to do, the desktop cannot be dynamically resized 187 // on OS/2 132 188 } 133 189
Note:
See TracChangeset
for help on using the changeset viewer.