equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
86 cleanup(); |
86 cleanup(); |
87 } |
87 } |
88 |
88 |
89 void QDesktopWidgetPrivate::init(QDesktopWidget *that) |
89 void QDesktopWidgetPrivate::init(QDesktopWidget *that) |
90 { |
90 { |
91 int screenCount=0; |
91 Q_UNUSED(that); |
|
92 // int screenCount=0; |
92 |
93 |
93 if (HAL::Get(0, HALData::EDisplayNumberOfScreens, screenCount) == KErrNone) |
94 // ### TODO: Implement proper multi-display support |
94 QDesktopWidgetPrivate::screenCount = screenCount; |
95 QDesktopWidgetPrivate::screenCount = 1; |
95 else |
96 // if (HAL::Get(0, HALData::EDisplayNumberOfScreens, screenCount) == KErrNone) |
96 QDesktopWidgetPrivate::screenCount = 0; |
97 // QDesktopWidgetPrivate::screenCount = screenCount; |
|
98 // else |
|
99 // QDesktopWidgetPrivate::screenCount = 0; |
97 |
100 |
98 rects = new QVector<QRect>(); |
101 rects = new QVector<QRect>(); |
99 workrects = new QVector<QRect>(); |
102 workrects = new QVector<QRect>(); |
100 |
103 |
101 rects->resize(QDesktopWidgetPrivate::screenCount); |
104 rects->resize(QDesktopWidgetPrivate::screenCount); |
102 workrects->resize(QDesktopWidgetPrivate::screenCount); |
105 workrects->resize(QDesktopWidgetPrivate::screenCount); |
103 |
|
104 // ### TODO: Implement proper multi-display support |
|
105 rects->resize(1); |
|
106 rects->replace(0, that->rect()); |
|
107 workrects->resize(1); |
|
108 workrects->replace(0, that->rect()); |
|
109 } |
106 } |
110 |
107 |
111 void QDesktopWidgetPrivate::cleanup() |
108 void QDesktopWidgetPrivate::cleanup() |
112 { |
109 { |
113 delete rects; |
110 delete rects; |