1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
56 #include <QtGui/qaccessible.h> |
56 #include <QtGui/qaccessible.h> |
57 #include <QtGui/qicon.h> |
57 #include <QtGui/qicon.h> |
58 #include <QtGui/qtextdocument.h> |
58 #include <QtGui/qtextdocument.h> |
59 #include <QtGui/qapplication.h> |
59 #include <QtGui/qapplication.h> |
60 #include <QtGui/qtextedit.h> |
60 #include <QtGui/qtextedit.h> |
|
61 #include <QtGui/qtextbrowser.h> |
61 #include <QtGui/qmenu.h> |
62 #include <QtGui/qmenu.h> |
62 #include "qdialog_p.h" |
63 #include "qdialog_p.h" |
63 #include <QtGui/qfont.h> |
64 #include <QtGui/qfont.h> |
64 #include <QtGui/qfontmetrics.h> |
65 #include <QtGui/qfontmetrics.h> |
65 #include <QtGui/qclipboard.h> |
66 #include <QtGui/qclipboard.h> |
186 #endif |
187 #endif |
187 bool compatMode; |
188 bool compatMode; |
188 bool autoAddOkButton; |
189 bool autoAddOkButton; |
189 QAbstractButton *detectedEscapeButton; |
190 QAbstractButton *detectedEscapeButton; |
190 QLabel *informativeLabel; |
191 QLabel *informativeLabel; |
191 #ifdef Q_OS_SYMBIAN |
192 #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) |
192 QTextEdit *textEdit; |
193 QTextBrowser *textBrowser; |
193 #endif |
194 #endif |
194 QPointer<QObject> receiverToDisconnectOnClose; |
195 QPointer<QObject> receiverToDisconnectOnClose; |
195 QByteArray memberToDisconnectOnClose; |
196 QByteArray memberToDisconnectOnClose; |
196 QByteArray signalToDisconnectOnClose; |
197 QByteArray signalToDisconnectOnClose; |
197 }; |
198 }; |
1724 "use such applications in combination with software subject to the " |
1725 "use such applications in combination with software subject to the " |
1725 "terms of the GNU GPL version 3.0 or where you are otherwise willing " |
1726 "terms of the GNU GPL version 3.0 or where you are otherwise willing " |
1726 "to comply with the terms of the GNU GPL version 3.0.</p>" |
1727 "to comply with the terms of the GNU GPL version 3.0.</p>" |
1727 "<p>Please see <a href=\"http://qt.nokia.com/products/licensing\">qt.nokia.com/products/licensing</a> " |
1728 "<p>Please see <a href=\"http://qt.nokia.com/products/licensing\">qt.nokia.com/products/licensing</a> " |
1728 "for an overview of Qt licensing.</p>" |
1729 "for an overview of Qt licensing.</p>" |
1729 "<p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p>" |
1730 "<p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p>" |
1730 "<p>Qt is a Nokia product. See <a href=\"http://qt.nokia.com/\">qt.nokia.com</a> " |
1731 "<p>Qt is a Nokia product. See <a href=\"http://qt.nokia.com/\">qt.nokia.com</a> " |
1731 "for more information.</p>" |
1732 "for more information.</p>" |
1732 ); |
1733 ); |
1733 QMessageBox *msgBox = new QMessageBox(parent); |
1734 QMessageBox *msgBox = new QMessageBox(parent); |
1734 msgBox->setAttribute(Qt::WA_DeleteOnClose); |
1735 msgBox->setAttribute(Qt::WA_DeleteOnClose); |
2460 // apply a smaller font the information label on the mac |
2461 // apply a smaller font the information label on the mac |
2461 label->setFont(qt_app_fonts_hash()->value("QTipLabel")); |
2462 label->setFont(qt_app_fonts_hash()->value("QTipLabel")); |
2462 #endif |
2463 #endif |
2463 label->setWordWrap(true); |
2464 label->setWordWrap(true); |
2464 QGridLayout *grid = static_cast<QGridLayout *>(layout()); |
2465 QGridLayout *grid = static_cast<QGridLayout *>(layout()); |
2465 #ifdef Q_OS_SYMBIAN |
2466 #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) |
2466 label->hide(); |
2467 label->hide(); |
2467 QTextEdit *textEdit = new QTextEdit(this); |
2468 QTextBrowser *textBrowser = new QTextBrowser(this); |
2468 textEdit->setReadOnly(true); |
2469 textBrowser->setOpenExternalLinks(true); |
2469 grid->addWidget(textEdit, 1, 1, 1, 1); |
2470 grid->addWidget(textBrowser, 1, 1, 1, 1); |
2470 d->textEdit = textEdit; |
2471 d->textBrowser = textBrowser; |
2471 #else |
2472 #else |
2472 grid->addWidget(label, 1, 1, 1, 1); |
2473 grid->addWidget(label, 1, 1, 1, 1); |
2473 #endif |
2474 #endif |
2474 d->informativeLabel = label; |
2475 d->informativeLabel = label; |
2475 } |
2476 } |
2476 d->informativeLabel->setText(text); |
2477 d->informativeLabel->setText(text); |
2477 |
2478 |
2478 #ifdef Q_OS_SYMBIAN |
2479 #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) |
2479 //We need to put the informative label inside textEdit to enable scrolling of long texts. |
2480 //We need to put the informative label inside textBrowser to enable scrolling of long texts. |
2480 d->textEdit->setText(d->informativeLabel->text()); |
2481 d->textBrowser->setText(d->informativeLabel->text()); |
2481 #endif |
2482 #endif |
2482 |
2483 |
2483 d->updateSize(); |
2484 d->updateSize(); |
2484 } |
2485 } |
2485 |
2486 |