summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qabstractpagesetupdialog.cpp8
-rw-r--r--src/gui/dialogs/qabstractpagesetupdialog.h8
-rw-r--r--src/gui/dialogs/qabstractpagesetupdialog_p.h8
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp8
-rw-r--r--src/gui/dialogs/qabstractprintdialog.h8
-rw-r--r--src/gui/dialogs/qabstractprintdialog_p.h8
-rw-r--r--src/gui/dialogs/qcolordialog.cpp148
-rw-r--r--src/gui/dialogs/qcolordialog.h8
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm8
-rw-r--r--src/gui/dialogs/qcolordialog_p.h8
-rw-r--r--src/gui/dialogs/qdialog.cpp89
-rw-r--r--src/gui/dialogs/qdialog.h16
-rw-r--r--src/gui/dialogs/qdialog_p.h8
-rw-r--r--src/gui/dialogs/qdialogsbinarycompat_win.cpp8
-rw-r--r--src/gui/dialogs/qerrormessage.cpp40
-rw-r--r--src/gui/dialogs/qerrormessage.h8
-rw-r--r--src/gui/dialogs/qfiledialog.cpp8
-rw-r--r--src/gui/dialogs/qfiledialog.h8
-rw-r--r--src/gui/dialogs/qfiledialog.ui8
-rw-r--r--src/gui/dialogs/qfiledialog_embedded.ui8
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm8
-rw-r--r--src/gui/dialogs/qfiledialog_p.h8
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp8
-rw-r--r--src/gui/dialogs/qfileinfogatherer.cpp8
-rw-r--r--src/gui/dialogs/qfileinfogatherer_p.h8
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp14
-rw-r--r--src/gui/dialogs/qfilesystemmodel.h8
-rw-r--r--src/gui/dialogs/qfilesystemmodel_p.h21
-rw-r--r--src/gui/dialogs/qfontdialog.cpp24
-rw-r--r--src/gui/dialogs/qfontdialog.h8
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm8
-rw-r--r--src/gui/dialogs/qfontdialog_p.h8
-rw-r--r--src/gui/dialogs/qfscompleter_p.h8
-rw-r--r--src/gui/dialogs/qinputdialog.cpp8
-rw-r--r--src/gui/dialogs/qinputdialog.h8
-rw-r--r--src/gui/dialogs/qmessagebox.cpp17
-rw-r--r--src/gui/dialogs/qmessagebox.h8
-rw-r--r--src/gui/dialogs/qnspanelproxy_mac.mm23
-rw-r--r--src/gui/dialogs/qpagesetupdialog.cpp8
-rw-r--r--src/gui/dialogs/qpagesetupdialog.h8
-rw-r--r--src/gui/dialogs/qpagesetupdialog_mac.mm8
-rw-r--r--src/gui/dialogs/qpagesetupdialog_unix.cpp8
-rw-r--r--src/gui/dialogs/qpagesetupdialog_unix_p.h8
-rw-r--r--src/gui/dialogs/qpagesetupdialog_win.cpp8
-rw-r--r--src/gui/dialogs/qprintdialog.h8
-rw-r--r--src/gui/dialogs/qprintdialog.qdoc8
-rw-r--r--src/gui/dialogs/qprintdialog_mac.mm8
-rw-r--r--src/gui/dialogs/qprintdialog_qws.cpp8
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp8
-rw-r--r--src/gui/dialogs/qprintdialog_win.cpp16
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp8
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.h8
-rw-r--r--src/gui/dialogs/qprogressdialog.cpp55
-rw-r--r--src/gui/dialogs/qprogressdialog.h8
-rw-r--r--src/gui/dialogs/qsidebar.cpp8
-rw-r--r--src/gui/dialogs/qsidebar_p.h8
-rw-r--r--src/gui/dialogs/qwizard.cpp86
-rw-r--r--src/gui/dialogs/qwizard.h8
-rw-r--r--src/gui/dialogs/qwizard_win.cpp8
-rw-r--r--src/gui/dialogs/qwizard_win_p.h8
60 files changed, 655 insertions, 278 deletions
diff --git a/src/gui/dialogs/qabstractpagesetupdialog.cpp b/src/gui/dialogs/qabstractpagesetupdialog.cpp
index e321621..a88739a 100644
--- a/src/gui/dialogs/qabstractpagesetupdialog.cpp
+++ b/src/gui/dialogs/qabstractpagesetupdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qabstractpagesetupdialog.h b/src/gui/dialogs/qabstractpagesetupdialog.h
index f087a0f..44e2506 100644
--- a/src/gui/dialogs/qabstractpagesetupdialog.h
+++ b/src/gui/dialogs/qabstractpagesetupdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qabstractpagesetupdialog_p.h b/src/gui/dialogs/qabstractpagesetupdialog_p.h
index 85996c4..b775b2f 100644
--- a/src/gui/dialogs/qabstractpagesetupdialog_p.h
+++ b/src/gui/dialogs/qabstractpagesetupdialog_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index 9be2d8c..6983cfd 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qabstractprintdialog.h b/src/gui/dialogs/qabstractprintdialog.h
index 6b4cda7..2dbc4f1 100644
--- a/src/gui/dialogs/qabstractprintdialog.h
+++ b/src/gui/dialogs/qabstractprintdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qabstractprintdialog_p.h b/src/gui/dialogs/qabstractprintdialog_p.h
index aa926e1..0edd0df 100644
--- a/src/gui/dialogs/qabstractprintdialog_p.h
+++ b/src/gui/dialogs/qabstractprintdialog_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp
index 354de1d..a7df999 100644
--- a/src/gui/dialogs/qcolordialog.cpp
+++ b/src/gui/dialogs/qcolordialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -63,6 +63,10 @@
#include "qspinbox.h"
#include "qdialogbuttonbox.h"
+#ifdef Q_WS_S60
+#include "private/qt_s60_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
//////////// QWellArray BEGIN
@@ -1066,12 +1070,33 @@ QColorShower::QColorShower(QColorDialog *parent)
QGridLayout *gl = new QGridLayout(this);
gl->setMargin(gl->spacing());
lab = new QColorShowLabel(this);
+
+#ifdef Q_WS_S60
+ QS60Data s60Data = QS60Data();
+ const bool nonTouchUI = !s60Data.hasTouchscreen;
+#endif
+
+
#ifndef Q_WS_WINCE
+#ifdef Q_WS_S60
+ lab->setMinimumHeight(60);
+#endif
lab->setMinimumWidth(60);
#else
lab->setMinimumWidth(20);
#endif
+
+// In S60, due to small screen and different screen layouts need to re-arrange the widgets.
+// For QVGA screens only the comboboxes and color label are visible.
+// For nHD screens only color and luminence pickers and color label are visible.
+#ifndef Q_WS_S60
gl->addWidget(lab, 0, 0, -1, 1);
+#else
+ if (nonTouchUI)
+ gl->addWidget(lab, 0, 0, 1, -1);
+ else
+ gl->addWidget(lab, 0, 0, -1, 1);
+#endif
connect(lab, SIGNAL(colorDropped(QRgb)), this, SIGNAL(newCol(QRgb)));
connect(lab, SIGNAL(colorDropped(QRgb)), this, SLOT(setRgb(QRgb)));
@@ -1082,8 +1107,18 @@ QColorShower::QColorShower(QColorDialog *parent)
lblHue->setBuddy(hEd);
#endif
lblHue->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#ifndef Q_WS_S60
gl->addWidget(lblHue, 0, 1);
gl->addWidget(hEd, 0, 2);
+#else
+ if (nonTouchUI) {
+ gl->addWidget(lblHue, 1, 0);
+ gl->addWidget(hEd, 2, 0);
+ } else {
+ lblHue->hide();
+ hEd->hide();
+ }
+#endif
sEd = new QColSpinBox(this);
lblSat = new QLabel(this);
@@ -1091,8 +1126,18 @@ QColorShower::QColorShower(QColorDialog *parent)
lblSat->setBuddy(sEd);
#endif
lblSat->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#ifndef Q_WS_S60
gl->addWidget(lblSat, 1, 1);
gl->addWidget(sEd, 1, 2);
+#else
+ if (nonTouchUI) {
+ gl->addWidget(lblSat, 1, 1);
+ gl->addWidget(sEd, 2, 1);
+ } else {
+ lblSat->hide();
+ sEd->hide();
+ }
+#endif
vEd = new QColSpinBox(this);
lblVal = new QLabel(this);
@@ -1100,8 +1145,18 @@ QColorShower::QColorShower(QColorDialog *parent)
lblVal->setBuddy(vEd);
#endif
lblVal->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#ifndef Q_WS_S60
gl->addWidget(lblVal, 2, 1);
gl->addWidget(vEd, 2, 2);
+#else
+ if (nonTouchUI) {
+ gl->addWidget(lblVal, 1, 2);
+ gl->addWidget(vEd, 2, 2);
+ } else {
+ lblVal->hide();
+ vEd->hide();
+ }
+#endif
rEd = new QColSpinBox(this);
lblRed = new QLabel(this);
@@ -1109,8 +1164,18 @@ QColorShower::QColorShower(QColorDialog *parent)
lblRed->setBuddy(rEd);
#endif
lblRed->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#ifndef Q_WS_S60
gl->addWidget(lblRed, 0, 3);
gl->addWidget(rEd, 0, 4);
+#else
+ if (nonTouchUI) {
+ gl->addWidget(lblRed, 3, 0);
+ gl->addWidget(rEd, 4, 0);
+ } else {
+ lblRed->hide();
+ rEd->hide();
+ }
+#endif
gEd = new QColSpinBox(this);
lblGreen = new QLabel(this);
@@ -1118,8 +1183,18 @@ QColorShower::QColorShower(QColorDialog *parent)
lblGreen->setBuddy(gEd);
#endif
lblGreen->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#ifndef Q_WS_S60
gl->addWidget(lblGreen, 1, 3);
gl->addWidget(gEd, 1, 4);
+#else
+ if (nonTouchUI) {
+ gl->addWidget(lblGreen, 3, 1);
+ gl->addWidget(gEd, 4, 1);
+ } else {
+ lblGreen->hide();
+ gEd->hide();
+ }
+#endif
bEd = new QColSpinBox(this);
lblBlue = new QLabel(this);
@@ -1127,8 +1202,18 @@ QColorShower::QColorShower(QColorDialog *parent)
lblBlue->setBuddy(bEd);
#endif
lblBlue->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#ifndef Q_WS_S60
gl->addWidget(lblBlue, 2, 3);
gl->addWidget(bEd, 2, 4);
+#else
+ if (nonTouchUI) {
+ gl->addWidget(lblBlue, 3, 2);
+ gl->addWidget(bEd, 4, 2);
+ } else {
+ lblBlue->hide();
+ bEd->hide();
+ }
+#endif
alphaEd = new QColSpinBox(this);
alphaLab = new QLabel(this);
@@ -1136,8 +1221,18 @@ QColorShower::QColorShower(QColorDialog *parent)
alphaLab->setBuddy(alphaEd);
#endif
alphaLab->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+#ifndef Q_WS_S60
gl->addWidget(alphaLab, 3, 1, 1, 3);
gl->addWidget(alphaEd, 3, 4);
+#else
+ if (nonTouchUI) {
+ gl->addWidget(alphaLab, 1, 3, 3, 1);
+ gl->addWidget(alphaEd, 4, 3);
+ } else {
+ alphaLab->hide();
+ alphaEd->hide();
+ }
+#endif
alphaEd->hide();
alphaLab->hide();
@@ -1369,7 +1464,7 @@ void QColorDialogPrivate::init(const QColor &initial)
leftLay = 0;
-#if defined(Q_WS_WINCE)
+#if (defined(Q_WS_WINCE) || defined(Q_WS_S60))
smallDisplay = true;
const int lumSpace = 20;
#else
@@ -1399,6 +1494,11 @@ void QColorDialogPrivate::init(const QColor &initial)
}
#endif
+#if defined(Q_WS_S60)
+ QS60Data s60Data = QS60Data();
+ const bool nonTouchUI = !s60Data.hasTouchscreen;
+#endif
+
if (!smallDisplay) {
standard = new QColorWell(q, 6, 8, stdrgb);
lblBasicColors = new QLabel(q);
@@ -1429,8 +1529,16 @@ void QColorDialogPrivate::init(const QColor &initial)
leftLay->addWidget(addCusBt);
} else {
// better color picker size for small displays
+#ifdef Q_WS_S60
+ QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+ pWidth = pHeight = qMin(screenSize.width(), screenSize.height());
+ pHeight -= 20;
+ if(screenSize.height() > screenSize.width())
+ pWidth -= 20;
+#else
pWidth = 150;
pHeight = 100;
+#endif
custom = 0;
standard = 0;
}
@@ -1446,13 +1554,35 @@ void QColorDialogPrivate::init(const QColor &initial)
cp = new QColorPicker(q);
cp->setFrameStyle(QFrame::Panel + QFrame::Sunken);
+
+#if defined(Q_WS_S60)
+ if (!nonTouchUI) {
+ pickLay->addWidget(cp);
+ cLay->addSpacing(lumSpace);
+ } else {
+ cp->hide();
+ }
+#else
cLay->addSpacing(lumSpace);
cLay->addWidget(cp);
+#endif
cLay->addSpacing(lumSpace);
lp = new QColorLuminancePicker(q);
+#if defined(Q_WS_S60)
+ QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+ const int minDimension = qMin(screenSize.height(), screenSize.width());
+ //set picker to be finger-usable
+ int pickerWidth = !nonTouchUI ? minDimension/9 : minDimension/12;
+ lp->setFixedWidth(pickerWidth);
+ if (!nonTouchUI)
+ pickLay->addWidget(lp);
+ else
+ lp->hide();
+#else
lp->setFixedWidth(20);
pickLay->addWidget(lp);
+#endif
QObject::connect(cp, SIGNAL(newCol(int,int)), lp, SLOT(setCol(int,int)));
QObject::connect(lp, SIGNAL(newHsv(int,int,int)), q, SLOT(_q_newHsv(int,int,int)));
@@ -1463,7 +1593,13 @@ void QColorDialogPrivate::init(const QColor &initial)
QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb)));
QObject::connect(cs, SIGNAL(currentColorChanged(const QColor&)),
q, SIGNAL(currentColorChanged(const QColor&)));
+#if defined(Q_WS_S60)
+ if (!nonTouchUI)
+ pWidth -= cp->size().width();
+ topLay->addWidget(cs);
+#else
rightLay->addWidget(cs);
+#endif
buttons = new QDialogButtonBox(q);
mainLay->addWidget(buttons);
@@ -1875,7 +2011,7 @@ void QColorDialog::done(int result)
Q_D(QColorDialog);
QDialog::done(result);
if (result == Accepted) {
- d->selectedQColor = d->currentQColor();
+ d->selectedQColor = d->currentQColor();
emit colorSelected(d->selectedQColor);
} else {
d->selectedQColor = QColor();
diff --git a/src/gui/dialogs/qcolordialog.h b/src/gui/dialogs/qcolordialog.h
index c26e585..deed0d6 100644
--- a/src/gui/dialogs/qcolordialog.h
+++ b/src/gui/dialogs/qcolordialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 71869b2..f6b88bb 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qcolordialog_p.h b/src/gui/dialogs/qcolordialog_p.h
index e755bb1..c7cabfb 100644
--- a/src/gui/dialogs/qcolordialog_p.h
+++ b/src/gui/dialogs/qcolordialog_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index 6f80046..7df49fa 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -65,11 +65,19 @@ extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp
#elif defined(Q_WS_X11)
# include "../kernel/qt_x11_p.h"
#elif defined(Q_OS_SYMBIAN)
-# include "qfiledialog.h"
-# include "qmenubar.h"
+# include "qfiledialog.h"
+# include "qfontdialog.h"
+# include "qcolordialog.h"
+# include "qwizard.h"
+# include "qmenubar.h"
#endif
+
+#if defined(Q_WS_S60)
+#include "private/qt_s60_p.h"
+#endif
+
#ifndef SPI_GETSNAPTODEFBUTTON
-# define SPI_GETSNAPTODEFBUTTON 95
+# define SPI_GETSNAPTODEFBUTTON 95
#endif
QT_BEGIN_NAMESPACE
@@ -370,7 +378,7 @@ void QDialogPrivate::resetModalitySetByOpen()
resetModalityTo = -1;
}
-#ifdef Q_WS_WINCE
+#if defined(Q_WS_WINCE) || defined(Q_WS_S60)
#ifdef Q_WS_WINCE_WM
void QDialogPrivate::_q_doneAction()
{
@@ -385,10 +393,15 @@ void QDialogPrivate::_q_doneAction()
bool QDialog::event(QEvent *e)
{
bool result = QWidget::event(e);
+#ifdef Q_WS_WINCE
if (e->type() == QEvent::OkRequest) {
accept();
result = true;
}
+#else
+ if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize ))
+ adjustPosition(parentWidget());
+#endif
return result;
}
#endif
@@ -499,8 +512,9 @@ int QDialog::exec()
menuBar = new QMenuBar(this);
#endif
- if (qobject_cast<QFileDialog *>(this))
- showFullScreen();
+ if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) ||
+ qobject_cast<QColorDialog *>(this) || qobject_cast<QWizard *>(this))
+ showMaximized();
else
#endif // Q_OS_SYMBIAN
@@ -816,6 +830,12 @@ void QDialog::adjustPosition(QWidget* w)
return;
#endif
+#ifdef Q_WS_S60
+ if (s60AdjustedPosition())
+ //dialog has already been positioned
+ return;
+#endif
+
QPoint p(0, 0);
int extraw = 0, extrah = 0, scrn = 0;
if (w)
@@ -879,6 +899,44 @@ void QDialog::adjustPosition(QWidget* w)
move(p);
}
+#if defined(Q_WS_S60)
+/*! \internal */
+bool QDialog::s60AdjustedPosition()
+{
+ QPoint p;
+ const QSize mainAreaSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
+ const int statusPaneHeight = (S60->screenHeightInPixels - mainAreaSize.height())>>1;
+ const bool doS60Positioning = !(isFullScreen()||isMaximized());
+ if (doS60Positioning) {
+ // naive way to deduce screen orientation
+ if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
+ p.setY(S60->screenHeightInPixels-height()-qt_TSize2QSize(S60->buttonGroupContainer()->Size()).height());
+ p.setX(0);
+ } else {
+ const int scrollbarWidth = style()->pixelMetric(QStyle::PM_ScrollBarExtent);
+ TRect cbaRect = TRect();
+ AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
+ AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+ switch (cbaLocation) {
+ case AknLayoutUtils::EAknCbaLocationBottom:
+ p.setY(S60->screenHeightInPixels - height()-cbaRect.Height());
+ p.setX((S60->screenWidthInPixels - width())>>1);
+ break;
+ case AknLayoutUtils::EAknCbaLocationRight:
+ p.setY((S60->screenHeightInPixels - height())>>1);
+ p.setX(qMax(0,S60->screenWidthInPixels-width()-scrollbarWidth-cbaRect.Width()));
+ break;
+ case AknLayoutUtils::EAknCbaLocationLeft:
+ p.setY((S60->screenHeightInPixels - height())>>1);
+ p.setX(qMax(0,scrollbarWidth+cbaRect.Width()));
+ break;
+ }
+ }
+ move(p);
+ }
+ return doS60Positioning;
+}
+#endif
/*!
\obsolete
@@ -1038,8 +1096,17 @@ QSize QDialog::sizeHint() const
return QSize(qMax(QWidget::sizeHint().width(), d->extension->sizeHint().width()),
QWidget::sizeHint().height());
}
-
+#if defined(Q_WS_S60)
+ // if size is not fixed, try to adjust it according to S60 layoutting
+ if (minimumSize() != maximumSize()) {
+ // In S60, dialogs are always the width of screen (in portrait, regardless of current layout)
+ return QSize(qMax(S60->screenHeightInPixels, S60->screenWidthInPixels), QWidget::sizeHint().height());
+ } else {
+ return QWidget::sizeHint();
+ }
+#else
return QWidget::sizeHint();
+#endif //Q_WS_S60
}
diff --git a/src/gui/dialogs/qdialog.h b/src/gui/dialogs/qdialog.h
index bd12006..694bff7 100644
--- a/src/gui/dialogs/qdialog.h
+++ b/src/gui/dialogs/qdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -107,7 +107,7 @@ public Q_SLOTS:
protected:
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0);
-#ifdef Q_WS_WINCE
+#if defined(Q_WS_WINCE) || defined(Q_WS_S60)
bool event(QEvent *e);
#endif
void keyPressEvent(QKeyEvent *);
@@ -119,11 +119,15 @@ protected:
#endif
bool eventFilter(QObject *, QEvent *);
void adjustPosition(QWidget*);
-
private:
Q_DECLARE_PRIVATE(QDialog)
Q_DISABLE_COPY(QDialog)
+#if defined(Q_WS_S60)
+ bool s60AdjustedPosition();
+#endif
+
+
#ifdef Q_WS_WINCE_WM
Q_PRIVATE_SLOT(d_func(), void _q_doneAction())
#endif
diff --git a/src/gui/dialogs/qdialog_p.h b/src/gui/dialogs/qdialog_p.h
index a90d6e6..0859232 100644
--- a/src/gui/dialogs/qdialog_p.h
+++ b/src/gui/dialogs/qdialog_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qdialogsbinarycompat_win.cpp b/src/gui/dialogs/qdialogsbinarycompat_win.cpp
index ba0928b..54ed840 100644
--- a/src/gui/dialogs/qdialogsbinarycompat_win.cpp
+++ b/src/gui/dialogs/qdialogsbinarycompat_win.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qerrormessage.cpp b/src/gui/dialogs/qerrormessage.cpp
index 650599b..436ef94 100644
--- a/src/gui/dialogs/qerrormessage.cpp
+++ b/src/gui/dialogs/qerrormessage.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -68,6 +68,13 @@ extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp
#include "qguifunctions_wince.h"
#endif
+#if defined(QT_SOFTKEYS_ENABLED)
+#include <qaction.h>
+#ifdef Q_WS_S60
+#include "private/qt_s60_p.h"
+#endif
+#endif
+
QT_BEGIN_NAMESPACE
class QErrorMessagePrivate : public QDialogPrivate
@@ -78,6 +85,9 @@ public:
QCheckBox * again;
QTextEdit * errors;
QLabel * icon;
+#ifdef QT_SOFTKEYS_ENABLED
+ QAction *okAction;
+#endif
QQueue<QPair<QString, QString> > pending;
QSet<QString> doNotShow;
QSet<QString> doNotShowType;
@@ -124,8 +134,15 @@ QSize QErrorMessageTextView::sizeHint() const
else
return QSize(300, 100);
#else
+
+#ifdef Q_WS_S60
+ const int smallerDimension = qMin(S60->screenHeightInPixels, S60->screenWidthInPixels);
+ // In S60 layout data, error messages seem to be one third of the screen height (in portrait) minus two.
+ return QSize(smallerDimension, smallerDimension/3-2);
+#else
return QSize(250, 75);
-#endif
+#endif //Q_WS_S60
+#endif //Q_WS_WINCE
}
/*!
@@ -228,6 +245,12 @@ QErrorMessage::QErrorMessage(QWidget * parent)
Q_D(QErrorMessage);
QGridLayout * grid = new QGridLayout(this);
d->icon = new QLabel(this);
+#ifdef QT_SOFTKEYS_ENABLED
+ d->okAction = new QAction(this);
+ d->okAction->setSoftKeyRole(QAction::PositiveSoftKey);
+ connect(d->okAction, SIGNAL(triggered()), this, SLOT(accept()));
+ addAction(d->okAction);
+#endif
#ifndef QT_NO_MESSAGEBOX
d->icon->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
d->icon->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
@@ -239,7 +262,8 @@ QErrorMessage::QErrorMessage(QWidget * parent)
d->again->setChecked(true);
grid->addWidget(d->again, 1, 1, Qt::AlignTop);
d->ok = new QPushButton(this);
-#ifdef Q_WS_WINCE
+
+#if defined(Q_WS_WINCE) || defined(Q_WS_S60)
d->ok->setFixedSize(0,0);
#endif
connect(d->ok, SIGNAL(clicked()), this, SLOT(accept()));
@@ -372,7 +396,6 @@ void QErrorMessage::showMessage(const QString &message, const QString &type)
show();
}
-
/*!
\reimp
*/
@@ -389,6 +412,9 @@ void QErrorMessagePrivate::retranslateStrings()
{
again->setText(QErrorMessage::tr("&Show this message again"));
ok->setText(QErrorMessage::tr("&OK"));
+#ifdef QT_SOFTKEYS_ENABLED
+ okAction->setText(ok->text());
+#endif
}
/*!
diff --git a/src/gui/dialogs/qerrormessage.h b/src/gui/dialogs/qerrormessage.h
index b81559a..57fb522 100644
--- a/src/gui/dialogs/qerrormessage.h
+++ b/src/gui/dialogs/qerrormessage.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 709a95a..14f19f2 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfiledialog.h b/src/gui/dialogs/qfiledialog.h
index b3cde50..5c2fdf4 100644
--- a/src/gui/dialogs/qfiledialog.h
+++ b/src/gui/dialogs/qfiledialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfiledialog.ui b/src/gui/dialogs/qfiledialog.ui
index 0be94b9..05c5a9f 100644
--- a/src/gui/dialogs/qfiledialog.ui
+++ b/src/gui/dialogs/qfiledialog.ui
@@ -2,6 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -21,10 +22,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfiledialog_embedded.ui b/src/gui/dialogs/qfiledialog_embedded.ui
index f134f64..de17bad 100644
--- a/src/gui/dialogs/qfiledialog_embedded.ui
+++ b/src/gui/dialogs/qfiledialog_embedded.ui
@@ -2,6 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -21,10 +22,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index e54c016..3a4ecce 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h
index 4482bc0..54fc0e0 100644
--- a/src/gui/dialogs/qfiledialog_p.h
+++ b/src/gui/dialogs/qfiledialog_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index 2dfe389..b59c28b 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp
index 6b8cfea..76d87ae 100644
--- a/src/gui/dialogs/qfileinfogatherer.cpp
+++ b/src/gui/dialogs/qfileinfogatherer.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h
index 1ca52fa..b722410 100644
--- a/src/gui/dialogs/qfileinfogatherer_p.h
+++ b/src/gui/dialogs/qfileinfogatherer_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index 0f50ff6..b9012c7 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -1104,6 +1104,8 @@ void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent
qStableSort(values.begin(), values.end(), ms);
// First update the new visible list
indexNode->visibleChildren.clear();
+ //No more dirty item we reset our internal dirty index
+ indexNode->dirtyChildrenIndex = -1;
for (int i = 0; i < values.count(); ++i) {
indexNode->visibleChildren.append(values.at(i).first->fileName);
values.at(i).first->isVisible = true;
@@ -1706,6 +1708,10 @@ void QFileSystemModelPrivate::addVisibleFiles(QFileSystemNode *parentNode, const
if (!indexHidden) {
q->beginInsertRows(parent, parentNode->visibleChildren.count() , parentNode->visibleChildren.count() + newFiles.count() - 1);
}
+
+ if (parentNode->dirtyChildrenIndex == -1)
+ parentNode->dirtyChildrenIndex = parentNode->visibleChildren.count();
+
for (int i = 0; i < newFiles.count(); ++i) {
parentNode->visibleChildren.append(newFiles.at(i));
parentNode->children[newFiles.at(i)]->isVisible = true;
diff --git a/src/gui/dialogs/qfilesystemmodel.h b/src/gui/dialogs/qfilesystemmodel.h
index 76b0478..4a3c892 100644
--- a/src/gui/dialogs/qfilesystemmodel.h
+++ b/src/gui/dialogs/qfilesystemmodel.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfilesystemmodel_p.h b/src/gui/dialogs/qfilesystemmodel_p.h
index 372796f..175159f 100644
--- a/src/gui/dialogs/qfilesystemmodel_p.h
+++ b/src/gui/dialogs/qfilesystemmodel_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -84,7 +84,7 @@ public:
{
public:
QFileSystemNode(const QString &filename = QString(), QFileSystemNode *p = 0)
- : fileName(filename), populatedChildren(false), isVisible(false), parent(p), info(0) {}
+ : fileName(filename), populatedChildren(false), isVisible(false), dirtyChildrenIndex(-1), parent(p), info(0) {}
~QFileSystemNode() {
QHash<QString, QFileSystemNode*>::const_iterator i = children.constBegin();
while (i != children.constEnd()) {
@@ -194,6 +194,7 @@ public:
bool isVisible;
QHash<QString,QFileSystemNode *> children;
QList<QString> visibleChildren;
+ int dirtyChildrenIndex;
QFileSystemNode *parent;
@@ -237,7 +238,15 @@ public:
void sortChildren(int column, const QModelIndex &parent);
inline int translateVisibleLocation(QFileSystemNode *parent, int row) const {
- return (sortOrder == Qt::AscendingOrder) ? row : parent->visibleChildren.count() - row - 1;
+ if (sortOrder == Qt::AscendingOrder)
+ return row;
+ if (parent->dirtyChildrenIndex == -1 || row < parent->dirtyChildrenIndex)
+ if (parent->dirtyChildrenIndex != -1)
+ return parent->dirtyChildrenIndex - row - 1;
+ else
+ return parent->visibleChildren.count() - row - 1;
+ else
+ return row;
}
inline static QString myComputer() {
diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp
index 30afde3..60fae27 100644
--- a/src/gui/dialogs/qfontdialog.cpp
+++ b/src/gui/dialogs/qfontdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -65,6 +65,10 @@
#include <private/qdialog_p.h>
#include <private/qfont_p.h>
+#if defined(Q_WS_S60)
+#include <QtGui/qdesktopwidget.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QFontListView : public QListView
@@ -312,6 +316,8 @@ void QFontDialogPrivate::init()
#if defined(Q_WS_WINCE)
q->resize(180, 120);
+#elif defined(Q_WS_S60)
+ q->resize(QApplication::desktop()->availableGeometry(QCursor::pos()).size());
#else
q->resize(500, 360);
#endif // Q_WS_WINCE
@@ -596,6 +602,8 @@ void QFontDialogPrivate::updateStyles()
}
if (!found)
styleList->setCurrentItem(0);
+ } else {
+ styleList->setCurrentItem(0);
}
styleEdit->setText(styleList->currentText());
@@ -768,7 +776,11 @@ void QFontDialogPrivate::retranslateStrings()
familyAccel->setText(QFontDialog::tr("&Font"));
styleAccel->setText(QFontDialog::tr("Font st&yle"));
sizeAccel->setText(QFontDialog::tr("&Size"));
+#ifndef Q_WS_S60
+ // Removed the title due to lack of screen estate in small S60 screen.
+ // The effects are descriptive without a title (strikeout, underline).
effects->setTitle(QFontDialog::tr("Effects"));
+#endif
strikeout->setText(QFontDialog::tr("Stri&keout"));
underline->setText(QFontDialog::tr("&Underline"));
sample->setTitle(QFontDialog::tr("Sample"));
@@ -792,7 +804,7 @@ void QFontDialog::changeEvent(QEvent *e)
\property QFontDialog::currentFont
\brief the current font of the dialog.
-*/
+*/
/*!
\since 4.5
@@ -816,7 +828,7 @@ void QFontDialog::setCurrentFont(const QFont &font)
d->updateFamilies();
#ifdef Q_WS_MAC
- if (d->delegate)
+ if (d->delegate)
QFontDialogPrivate::setFont(d->delegate, font);
#endif
}
diff --git a/src/gui/dialogs/qfontdialog.h b/src/gui/dialogs/qfontdialog.h
index de0fc9e..f35fcc8 100644
--- a/src/gui/dialogs/qfontdialog.h
+++ b/src/gui/dialogs/qfontdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index f4963f3..dacb54c 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfontdialog_p.h b/src/gui/dialogs/qfontdialog_p.h
index d2750fa..c03ca04 100644
--- a/src/gui/dialogs/qfontdialog_p.h
+++ b/src/gui/dialogs/qfontdialog_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qfscompleter_p.h b/src/gui/dialogs/qfscompleter_p.h
index 5894ea1..cb1b427 100644
--- a/src/gui/dialogs/qfscompleter_p.h
+++ b/src/gui/dialogs/qfscompleter_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index 5b3a339..86213b4 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qinputdialog.h b/src/gui/dialogs/qinputdialog.h
index dd833ae..84857ab 100644
--- a/src/gui/dialogs/qinputdialog.h
+++ b/src/gui/dialogs/qinputdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index e37ae83..a318c43 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -310,6 +310,15 @@ void QMessageBoxPrivate::updateSize()
}
width = hardLimit;
}
+#ifdef Q_WS_S60
+ // in S60 portait messageBoxes should always occupy maximum width
+ if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width()){
+ width = hardLimit;
+ } else {
+ // in landscape the messageBoxes should be of same width as in portrait
+ width = qMin(QApplication::desktop()->size().height(), hardLimit);
+ }
+#endif
}
if (informativeLabel) {
diff --git a/src/gui/dialogs/qmessagebox.h b/src/gui/dialogs/qmessagebox.h
index 5aea38f..fcc0b81 100644
--- a/src/gui/dialogs/qmessagebox.h
+++ b/src/gui/dialogs/qmessagebox.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qnspanelproxy_mac.mm b/src/gui/dialogs/qnspanelproxy_mac.mm
index a576a00..4f6ff90 100644
--- a/src/gui/dialogs/qnspanelproxy_mac.mm
+++ b/src/gui/dialogs/qnspanelproxy_mac.mm
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -144,14 +144,21 @@ void macStartIntercept(SEL originalSel, SEL fakeSel, Class baseClass, Class prox
#endif
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ // The following code replaces the _implementation_ for the selector we want to hack
+ // (originalSel) with the implementation found in proxyClass. Then it creates
+ // a new 'backup' method inside baseClass containing the old, original,
+ // implementation (fakeSel). You can let the proxy implementation of originalSel
+ // call fakeSel if needed (similar approach to calling a super class implementation).
+ // fakeSel must also be implemented in proxyClass, as the signature is used
+ // as template for the method one we add into baseClass.
+ // NB: You will typically never create any instances of proxyClass; we use it
+ // only for stealing its contents and put it into baseClass.
Method originalMethod = class_getInstanceMethod(baseClass, originalSel);
Method newMethod = class_getInstanceMethod(proxyClass, originalSel);
Method fakeMethod = class_getInstanceMethod(proxyClass, fakeSel);
- IMP originalCtorImp = method_setImplementation(originalMethod,
- method_getImplementation(newMethod));
- class_addMethod(baseClass, fakeSel, originalCtorImp,
- method_getTypeEncoding(fakeMethod));
+ IMP originalImp = method_setImplementation(originalMethod, method_getImplementation(newMethod));
+ class_addMethod(baseClass, fakeSel, originalImp, method_getTypeEncoding(fakeMethod));
#endif
}
}
diff --git a/src/gui/dialogs/qpagesetupdialog.cpp b/src/gui/dialogs/qpagesetupdialog.cpp
index a8b0a59..2cd20de 100644
--- a/src/gui/dialogs/qpagesetupdialog.cpp
+++ b/src/gui/dialogs/qpagesetupdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qpagesetupdialog.h b/src/gui/dialogs/qpagesetupdialog.h
index 5b49318..8b81125 100644
--- a/src/gui/dialogs/qpagesetupdialog.h
+++ b/src/gui/dialogs/qpagesetupdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qpagesetupdialog_mac.mm b/src/gui/dialogs/qpagesetupdialog_mac.mm
index 18a26cf..276a11d 100644
--- a/src/gui/dialogs/qpagesetupdialog_mac.mm
+++ b/src/gui/dialogs/qpagesetupdialog_mac.mm
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qpagesetupdialog_unix.cpp b/src/gui/dialogs/qpagesetupdialog_unix.cpp
index 140d03a..eadbcad 100644
--- a/src/gui/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/gui/dialogs/qpagesetupdialog_unix.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qpagesetupdialog_unix_p.h b/src/gui/dialogs/qpagesetupdialog_unix_p.h
index 3b85c70..2ffd98b 100644
--- a/src/gui/dialogs/qpagesetupdialog_unix_p.h
+++ b/src/gui/dialogs/qpagesetupdialog_unix_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qpagesetupdialog_win.cpp b/src/gui/dialogs/qpagesetupdialog_win.cpp
index 8819dfd..bb53702 100644
--- a/src/gui/dialogs/qpagesetupdialog_win.cpp
+++ b/src/gui/dialogs/qpagesetupdialog_win.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprintdialog.h b/src/gui/dialogs/qprintdialog.h
index cf8eea9..192bcec 100644
--- a/src/gui/dialogs/qprintdialog.h
+++ b/src/gui/dialogs/qprintdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprintdialog.qdoc b/src/gui/dialogs/qprintdialog.qdoc
index 7dabbfe..21dfe51 100644
--- a/src/gui/dialogs/qprintdialog.qdoc
+++ b/src/gui/dialogs/qprintdialog.qdoc
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprintdialog_mac.mm b/src/gui/dialogs/qprintdialog_mac.mm
index 7b0440b..a7587b1 100644
--- a/src/gui/dialogs/qprintdialog_mac.mm
+++ b/src/gui/dialogs/qprintdialog_mac.mm
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprintdialog_qws.cpp b/src/gui/dialogs/qprintdialog_qws.cpp
index 3546175..37f01be 100644
--- a/src/gui/dialogs/qprintdialog_qws.cpp
+++ b/src/gui/dialogs/qprintdialog_qws.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index cb19511..7daa273 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp
index 2d4190e..f66c27f 100644
--- a/src/gui/dialogs/qprintdialog_win.cpp
+++ b/src/gui/dialogs/qprintdialog_win.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -131,8 +131,8 @@ static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent,
if (d->ep->printToFile)
pd->Flags |= PD_PRINTTOFILE;
- Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
- pd->hwndOwner = parent ? parent->winId() : 0;
+ Q_ASSERT(parent != 0 && parent->testAttribute(Qt::WA_WState_Created));
+ pd->hwndOwner = parent->winId();
pd->lpPageRanges[0].nFromPage = qMax(pdlg->fromPage(), pdlg->minPage());
pd->lpPageRanges[0].nToPage = (pdlg->toPage() > 0) ? qMin(pdlg->toPage(), pdlg->maxPage()) : 1;
pd->nCopies = d->ep->num_copies;
@@ -212,6 +212,10 @@ int QPrintDialogPrivate::openWindowsPrintDialogModally()
else
parent = QApplication::activeWindow();
+ // If there is no window, fall back to the print dialog itself
+ if (parent == 0)
+ parent = q;
+
QWidget modal_widget;
modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
modal_widget.setParent(parent, Qt::Window);
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp
index f5702e0..4cb0c93 100644
--- a/src/gui/dialogs/qprintpreviewdialog.cpp
+++ b/src/gui/dialogs/qprintpreviewdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprintpreviewdialog.h b/src/gui/dialogs/qprintpreviewdialog.h
index 4fd31e6..32c5609 100644
--- a/src/gui/dialogs/qprintpreviewdialog.h
+++ b/src/gui/dialogs/qprintpreviewdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp
index 655e5aa..5fb10bf 100644
--- a/src/gui/dialogs/qprogressdialog.cpp
+++ b/src/gui/dialogs/qprogressdialog.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -57,6 +57,14 @@
#include <private/qdialog_p.h>
#include <limits.h>
+#if defined(QT_SOFTKEYS_ENABLED)
+#include <qaction.h>
+#endif
+#ifdef Q_WS_S60
+#include <QtGui/qdesktopwidget.h>
+#endif
+
+
QT_BEGIN_NAMESPACE
// If the operation is expected to take this long (as predicted by
@@ -77,6 +85,9 @@ public:
#ifndef QT_NO_SHORTCUT
escapeShortcut(0),
#endif
+#ifdef QT_SOFTKEYS_ENABLED
+ cancelAction(0),
+#endif
useDefaultCancelText(false)
{
}
@@ -103,6 +114,9 @@ public:
#ifndef QT_NO_SHORTCUT
QShortcut *escapeShortcut;
#endif
+#ifdef QT_SOFTKEYS_ENABLED
+ QAction *cancelAction;
+#endif
bool useDefaultCancelText;
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
@@ -410,6 +424,10 @@ void QProgressDialog::setCancelButton(QPushButton *cancelButton)
{
Q_D(QProgressDialog);
delete d->cancel;
+#ifdef QT_SOFTKEYS_ENABLED
+ delete d->cancelAction;
+ d->cancelAction = 0;
+#endif
d->cancel = cancelButton;
if (cancelButton) {
if (cancelButton->parentWidget() == this) {
@@ -431,7 +449,16 @@ void QProgressDialog::setCancelButton(QPushButton *cancelButton)
int h = qMax(isVisible() ? height() : 0, sizeHint().height());
resize(w, h);
if (cancelButton)
+#if !defined(QT_SOFTKEYS_ENABLED)
cancelButton->show();
+#else
+ {
+ d->cancelAction = new QAction(cancelButton->text(), this);
+ d->cancelAction->setSoftKeyRole(QAction::NegativeSoftKey);
+ connect(d->cancelAction, SIGNAL(triggered()), this, SIGNAL(canceled()));
+ addAction(d->cancelAction);
+ }
+#endif
}
/*!
@@ -448,10 +475,14 @@ void QProgressDialog::setCancelButtonText(const QString &cancelButtonText)
d->useDefaultCancelText = false;
if (!cancelButtonText.isNull()) {
- if (d->cancel)
+ if (d->cancel) {
d->cancel->setText(cancelButtonText);
- else
+#ifdef QT_SOFTKEYS_ENABLED
+ d->cancelAction->setText(cancelButtonText);
+#endif
+ } else {
setCancelButton(new QPushButton(cancelButtonText, this));
+ }
} else {
setCancelButton(0);
}
@@ -701,7 +732,14 @@ QSize QProgressDialog::sizeHint() const
int h = margin * 2 + bh.height() + sh.height() + spacing;
if (d->cancel)
h += d->cancel->sizeHint().height() + spacing;
+#ifdef Q_WS_S60
+ if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width())
+ return QSize(qMax(QApplication::desktop()->size().width(), sh.width() + 2 * margin), h);
+ else
+ return QSize(qMax(QApplication::desktop()->size().height(), sh.width() + 2 * margin), h);
+#else
return QSize(qMax(200, sh.width() + 2 * margin), h);
+#endif
}
/*!\reimp
@@ -718,10 +756,11 @@ void QProgressDialog::resizeEvent(QResizeEvent *)
void QProgressDialog::changeEvent(QEvent *ev)
{
Q_D(QProgressDialog);
- if (ev->type() == QEvent::StyleChange)
+ if (ev->type() == QEvent::StyleChange) {
d->layout();
- else if (ev->type() == QEvent::LanguageChange)
+ } else if (ev->type() == QEvent::LanguageChange) {
d->retranslateStrings();
+ }
QDialog::changeEvent(ev);
}
diff --git a/src/gui/dialogs/qprogressdialog.h b/src/gui/dialogs/qprogressdialog.h
index df33466..1ff4fa2 100644
--- a/src/gui/dialogs/qprogressdialog.h
+++ b/src/gui/dialogs/qprogressdialog.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qsidebar.cpp b/src/gui/dialogs/qsidebar.cpp
index edbbc8c..396889d 100644
--- a/src/gui/dialogs/qsidebar.cpp
+++ b/src/gui/dialogs/qsidebar.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qsidebar_p.h b/src/gui/dialogs/qsidebar_p.h
index 68df111..8866cf9 100644
--- a/src/gui/dialogs/qsidebar_p.h
+++ b/src/gui/dialogs/qsidebar_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qwizard.cpp b/src/gui/dialogs/qwizard.cpp
index a81a31b..0f6d353 100644
--- a/src/gui/dialogs/qwizard.cpp
+++ b/src/gui/dialogs/qwizard.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -75,6 +75,10 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp
#include <string.h> // for memset()
+#ifdef QT_SOFTKEYS_ENABLED
+#include "qaction.h"
+#endif
+
QT_BEGIN_NAMESPACE
// These fudge terms were needed a few places to obtain pixel-perfect results
@@ -244,7 +248,7 @@ bool QWizardLayoutInfo::operator==(const QWizardLayoutInfo &other)
return topLevelMarginLeft == other.topLevelMarginLeft
&& topLevelMarginRight == other.topLevelMarginRight
&& topLevelMarginTop == other.topLevelMarginTop
- && topLevelMarginBottom == other.topLevelMarginBottom
+ && topLevelMarginBottom == other.topLevelMarginBottom
&& childMarginLeft == other.childMarginLeft
&& childMarginRight == other.childMarginRight
&& childMarginTop == other.childMarginTop
@@ -328,7 +332,7 @@ bool QWizardHeader::vistaDisabled() const
bool styleDisabled = false;
QWizard *wiz = parentWidget() ? qobject_cast <QWizard *>(parentWidget()->parentWidget()) : 0;
if (wiz) {
- // Designer dosen't support the Vista style for Wizards. This property is used to turn
+ // Designer dosen't support the Vista style for Wizards. This property is used to turn
// off the Vista style.
const QVariant v = wiz->property("_q_wizard_vista_off");
styleDisabled = v.isValid() && v.toBool();
@@ -523,8 +527,12 @@ public:
, maximumWidth(QWIDGETSIZE_MAX)
, maximumHeight(QWIDGETSIZE_MAX)
{
- for (int i = 0; i < QWizard::NButtons; ++i)
+ for (int i = 0; i < QWizard::NButtons; ++i) {
btns[i] = 0;
+#ifdef QT_SOFTKEYS_ENABLED
+ softKeys[i] = 0;
+#endif
+ }
#if !defined(QT_NO_STYLE_WINDOWSVISTA)
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)
@@ -609,6 +617,9 @@ public:
QLabel *titleLabel;
QLabel *subTitleLabel;
QWizardRuler *bottomRuler;
+#ifdef QT_SOFTKEYS_ENABLED
+ mutable QAction *softKeys[QWizard::NButtons];
+#endif
QVBoxLayout *pageVBoxLayout;
QHBoxLayout *buttonLayout;
@@ -634,9 +645,9 @@ static QString buttonDefaultText(int wstyle, int which, const QWizardPrivate *wi
#endif
const bool macStyle = (wstyle == QWizard::MacStyle);
switch (which) {
- case QWizard::BackButton:
+ case QWizard::BackButton:
return macStyle ? QWizard::tr("Go Back") : QWizard::tr("< &Back");
- case QWizard::NextButton:
+ case QWizard::NextButton:
if (macStyle)
return QWizard::tr("Continue");
else
@@ -959,12 +970,12 @@ void QWizardPrivate::recreateLayout(const QWizardLayoutInfo &info)
if (modern) {
mainLayout->setMargin(0);
mainLayout->setSpacing(0);
- pageVBoxLayout->setContentsMargins(deltaMarginLeft, deltaMarginTop,
+ pageVBoxLayout->setContentsMargins(deltaMarginLeft, deltaMarginTop,
deltaMarginRight, deltaMarginBottom);
- buttonLayout->setContentsMargins(info.topLevelMarginLeft, info.topLevelMarginTop,
+ buttonLayout->setContentsMargins(info.topLevelMarginLeft, info.topLevelMarginTop,
info.topLevelMarginRight, info.topLevelMarginBottom);
} else {
- mainLayout->setContentsMargins(info.topLevelMarginLeft, info.topLevelMarginTop,
+ mainLayout->setContentsMargins(info.topLevelMarginLeft, info.topLevelMarginTop,
info.topLevelMarginRight, info.topLevelMarginBottom);
mainLayout->setHorizontalSpacing(info.hspacing);
mainLayout->setVerticalSpacing(info.vspacing);
@@ -1212,7 +1223,7 @@ void QWizardPrivate::updateLayout()
QSpacerItem *bottomSpacer = pageVBoxLayout->itemAt(pageVBoxLayout->count() - 1)->spacerItem();
Q_ASSERT(bottomSpacer);
bottomSpacer->changeSize(0, 0, QSizePolicy::Ignored, expandPage ? QSizePolicy::Ignored : QSizePolicy::MinimumExpanding);
- pageVBoxLayout->invalidate();
+ pageVBoxLayout->invalidate();
}
if (info.header) {
@@ -1327,6 +1338,29 @@ bool QWizardPrivate::ensureButton(QWizard::WizardButton which) const
#endif
if (which < QWizard::NStandardButtons)
pushButton->setText(buttonDefaultText(wizStyle, which, this));
+
+#ifdef QT_SOFTKEYS_ENABLED
+ QAction *softKey = new QAction(pushButton->text(), antiFlickerWidget);
+ QAction::SoftKeyRole softKeyRole;
+ switch(which) {
+ case QWizard::NextButton:
+ case QWizard::FinishButton:
+ case QWizard::CancelButton:
+ softKeyRole = QAction::NegativeSoftKey;
+ break;
+ case QWizard::BackButton:
+ case QWizard::CommitButton:
+ case QWizard::HelpButton:
+ case QWizard::CustomButton1:
+ case QWizard::CustomButton2:
+ case QWizard::CustomButton3:
+ default:
+ softKeyRole = QAction::PositiveSoftKey;
+ break;
+ }
+ softKey->setSoftKeyRole(softKeyRole);
+ softKeys[which] = softKey;
+#endif
connectButton(which);
}
return true;
@@ -1340,6 +1374,10 @@ void QWizardPrivate::connectButton(QWizard::WizardButton which) const
} else {
QObject::connect(btns[which], SIGNAL(clicked()), q, SLOT(_q_emitCustomButtonClicked()));
}
+
+#ifdef QT_SOFTKEYS_ENABLED
+ QObject::connect(softKeys[which], SIGNAL(triggered()), btns[which], SIGNAL(clicked()));
+#endif
}
void QWizardPrivate::updateButtonTexts()
@@ -1353,6 +1391,9 @@ void QWizardPrivate::updateButtonTexts()
btns[i]->setText(buttonCustomTexts.value(i));
else if (i < QWizard::NStandardButtons)
btns[i]->setText(buttonDefaultText(wizStyle, i, this));
+#ifdef QT_SOFTKEYS_ENABLED
+ softKeys[i]->setText(btns[i]->text());
+#endif
}
}
}
@@ -1595,6 +1636,19 @@ void QWizardPrivate::_q_updateButtonStates()
}
#endif
+#ifdef QT_SOFTKEYS_ENABLED
+ QAbstractButton *wizardButton;
+ for (int i = 0; i < QWizard::NButtons; ++i) {
+ wizardButton = btns[i];
+ if (wizardButton && !wizardButton->testAttribute(Qt::WA_WState_Hidden)) {
+ wizardButton->hide();
+ q->addAction(softKeys[i]);
+ } else {
+ q->removeAction(softKeys[i]);
+ }
+ }
+#endif
+
enableUpdates();
}
@@ -2788,7 +2842,11 @@ QSize QWizard::sizeHint() const
{
Q_D(const QWizard);
QSize result = d->mainLayout->totalSizeHint();
+#ifdef Q_WS_S60
+ QSize extra(QApplication::desktop()->availableGeometry(QCursor::pos()).size());
+#else
QSize extra(500, 360);
+#endif
if (d->wizStyle == MacStyle && d->current != -1) {
QSize pixmap(currentPage()->pixmap(BackgroundPixmap).size());
extra.setWidth(616);
@@ -3389,7 +3447,7 @@ bool QWizardPage::validatePage()
changes. This ensures that QWizard updates the enabled or disabled state of
its buttons. An example of the reimplementation is
available \l{http://qt.nokia.com/doc/qq/qq22-qwizard.html#validatebeforeitstoolate}
- {here}.
+ {here}.
\sa completeChanged(), isFinalPage()
*/
diff --git a/src/gui/dialogs/qwizard.h b/src/gui/dialogs/qwizard.h
index 23cd7ab..3deea59 100644
--- a/src/gui/dialogs/qwizard.h
+++ b/src/gui/dialogs/qwizard.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp
index e094b3b..aa38ddc 100644
--- a/src/gui/dialogs/qwizard_win.cpp
+++ b/src/gui/dialogs/qwizard_win.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h
index c35716a..7de3ee1 100644
--- a/src/gui/dialogs/qwizard_win_p.h
+++ b/src/gui/dialogs/qwizard_win_p.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -20,10 +21,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.