Changeset 561 for trunk/src/gui/dialogs/qfontdialog.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/dialogs/qfontdialog.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 66 66 #include <private/qfont_p.h> 67 67 68 #if defined(Q_WS_S60) 69 #include <QtGui/qdesktopwidget.h> 70 #endif 71 68 72 QT_BEGIN_NAMESPACE 69 73 … … 113 117 /*! 114 118 \class QFontDialog 115 \ingroup dialogs 116 \ingroup text 117 \mainclass 119 \ingroup standard-dialogs 120 118 121 \brief The QFontDialog class provides a dialog widget for selecting a font. 119 122 … … 312 315 QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject())); 313 316 314 #if defined(Q_ OS_WINCE)317 #if defined(Q_WS_WINCE) 315 318 q->resize(180, 120); 319 #elif defined(Q_WS_S60) 320 q->resize(QApplication::desktop()->availableGeometry(QCursor::pos()).size()); 316 321 #else 317 322 q->resize(500, 360); 318 #endif // Q_ OS_WINCE323 #endif // Q_WS_WINCE 319 324 320 325 sizeEdit->installEventFilter(q); … … 338 343 QFontDialog::~QFontDialog() 339 344 { 345 #ifdef Q_WS_MAC 346 Q_D(QFontDialog); 347 if (d->delegate) { 348 QFontDialogPrivate::closeCocoaFontPanel(d->delegate); 349 QFontDialogPrivate::sharedFontPanelAvailable = true; 350 return; 351 } 352 #endif 340 353 } 341 354 … … 494 507 Q_Q(QFontDialog); 495 508 496 familyList->blockSignals(true);497 498 509 enum match_t { MATCH_NONE = 0, MATCH_LAST_RESORT = 1, MATCH_APP = 2, MATCH_FAMILY = 3 }; 499 510 … … 549 560 familyEdit->selectAll(); 550 561 551 familyList->blockSignals(false);552 562 updateStyles(); 553 563 } … … 560 570 { 561 571 Q_Q(QFontDialog); 562 563 styleList->blockSignals(true);564 565 572 QStringList styles = fdb.styles(familyList->currentText()); 566 573 styleList->model()->setStringList(styles); … … 596 603 if (!found) 597 604 styleList->setCurrentItem(0); 605 } else { 606 styleList->setCurrentItem(0); 598 607 } 599 608 … … 606 615 } 607 616 608 styleList->blockSignals(false);609 610 617 updateSizes(); 611 618 } … … 620 627 { 621 628 Q_Q(QFontDialog); 622 623 sizeList->blockSignals(true);624 629 625 630 if (!familyList->currentText().isEmpty()) { … … 652 657 } 653 658 654 sizeList->blockSignals(false);655 659 _q_updateSample(); 656 660 } … … 773 777 styleAccel->setText(QFontDialog::tr("Font st&yle")); 774 778 sizeAccel->setText(QFontDialog::tr("&Size")); 779 #ifndef Q_WS_S60 780 // Removed the title due to lack of screen estate in small S60 screen. 781 // The effects are descriptive without a title (strikeout, underline). 775 782 effects->setTitle(QFontDialog::tr("Effects")); 783 #endif 776 784 strikeout->setText(QFontDialog::tr("Stri&keout")); 777 785 underline->setText(QFontDialog::tr("&Underline")); … … 797 805 \property QFontDialog::currentFont 798 806 \brief the current font of the dialog. 799 */ 807 */ 800 808 801 809 /*! … … 821 829 822 830 #ifdef Q_WS_MAC 823 if (d->delegate) 831 if (d->delegate) 824 832 QFontDialogPrivate::setFont(d->delegate, font); 825 833 #endif … … 933 941 \overload 934 942 935 Opens the dialog and connects its accepted() signal to the slot specified943 Opens the dialog and connects its fontSelected() signal to the slot specified 936 944 by \a receiver and \a member. 937 945 … … 941 949 { 942 950 Q_D(QFontDialog); 943 connect(this, SIGNAL(fontSelected( const QFont&)), receiver, member);951 connect(this, SIGNAL(fontSelected(QFont)), receiver, member); 944 952 d->receiverToDisconnectOnClose = receiver; 945 953 d->memberToDisconnectOnClose = member; … … 1031 1039 } 1032 1040 if (d->receiverToDisconnectOnClose) { 1033 disconnect(this, SIGNAL(fontSelected( const QFont&)),1041 disconnect(this, SIGNAL(fontSelected(QFont)), 1034 1042 d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose); 1035 1043 d->receiverToDisconnectOnClose = 0;
Note:
See TracChangeset
for help on using the changeset viewer.