Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/dialogs/qfontdialog.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    6666#include <private/qfont_p.h>
    6767
     68#if defined(Q_WS_S60)
     69#include <QtGui/qdesktopwidget.h>
     70#endif
     71
    6872QT_BEGIN_NAMESPACE
    6973
     
    113117/*!
    114118  \class QFontDialog
    115   \ingroup dialogs
    116   \ingroup text
    117   \mainclass
     119  \ingroup standard-dialogs
     120
    118121  \brief The QFontDialog class provides a dialog widget for selecting a font.
    119122
     
    312315    QObject::connect(buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
    313316
    314 #if defined(Q_OS_WINCE)
     317#if defined(Q_WS_WINCE)
    315318    q->resize(180, 120);
     319#elif defined(Q_WS_S60)
     320    q->resize(QApplication::desktop()->availableGeometry(QCursor::pos()).size());
    316321#else
    317322    q->resize(500, 360);
    318 #endif // Q_OS_WINCE
     323#endif // Q_WS_WINCE
    319324
    320325    sizeEdit->installEventFilter(q);
     
    338343QFontDialog::~QFontDialog()
    339344{
     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
    340353}
    341354
     
    494507    Q_Q(QFontDialog);
    495508
    496     familyList->blockSignals(true);
    497 
    498509    enum match_t { MATCH_NONE = 0, MATCH_LAST_RESORT = 1, MATCH_APP = 2, MATCH_FAMILY = 3 };
    499510
     
    549560        familyEdit->selectAll();
    550561
    551     familyList->blockSignals(false);
    552562    updateStyles();
    553563}
     
    560570{
    561571    Q_Q(QFontDialog);
    562 
    563     styleList->blockSignals(true);
    564 
    565572    QStringList styles = fdb.styles(familyList->currentText());
    566573    styleList->model()->setStringList(styles);
     
    596603            if (!found)
    597604                styleList->setCurrentItem(0);
     605        } else {
     606            styleList->setCurrentItem(0);
    598607        }
    599608
     
    606615    }
    607616
    608     styleList->blockSignals(false);
    609 
    610617    updateSizes();
    611618}
     
    620627{
    621628    Q_Q(QFontDialog);
    622 
    623     sizeList->blockSignals(true);
    624629
    625630    if (!familyList->currentText().isEmpty()) {
     
    652657    }
    653658
    654     sizeList->blockSignals(false);
    655659    _q_updateSample();
    656660}
     
    773777    styleAccel->setText(QFontDialog::tr("Font st&yle"));
    774778    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).
    775782    effects->setTitle(QFontDialog::tr("Effects"));
     783#endif
    776784    strikeout->setText(QFontDialog::tr("Stri&keout"));
    777785    underline->setText(QFontDialog::tr("&Underline"));
     
    797805    \property QFontDialog::currentFont
    798806    \brief the current font of the dialog.
    799 */   
     807*/
    800808
    801809/*!
     
    821829
    822830#ifdef Q_WS_MAC
    823     if (d->delegate) 
     831    if (d->delegate)
    824832        QFontDialogPrivate::setFont(d->delegate, font);
    825833#endif
     
    933941    \overload
    934942
    935     Opens the dialog and connects its accepted() signal to the slot specified
     943    Opens the dialog and connects its fontSelected() signal to the slot specified
    936944    by \a receiver and \a member.
    937945
     
    941949{
    942950    Q_D(QFontDialog);
    943     connect(this, SIGNAL(fontSelected(const QFont&)), receiver, member);
     951    connect(this, SIGNAL(fontSelected(QFont)), receiver, member);
    944952    d->receiverToDisconnectOnClose = receiver;
    945953    d->memberToDisconnectOnClose = member;
     
    10311039    }
    10321040    if (d->receiverToDisconnectOnClose) {
    1033         disconnect(this, SIGNAL(fontSelected(const QFont&)),
     1041        disconnect(this, SIGNAL(fontSelected(QFont)),
    10341042                   d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose);
    10351043        d->receiverToDisconnectOnClose = 0;
Note: See TracChangeset for help on using the changeset viewer.