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/qinputdialog.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**
     
    9696    QInputDialogSpinBox(QWidget *parent)
    9797        : QSpinBox(parent) {
    98         connect(lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(notifyTextChanged()));
     98        connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged()));
    9999        connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged()));
    100100    }
     
    131131    QInputDialogDoubleSpinBox(QWidget *parent = 0)
    132132        : QDoubleSpinBox(parent) {
    133         connect(lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(notifyTextChanged()));
     133        connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged()));
    134134        connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged()));
    135135    }
     
    246246        lineEdit = new QLineEdit(q);
    247247        lineEdit->hide();
    248         QObject::connect(lineEdit, SIGNAL(textChanged(const QString&)),
    249                          q, SLOT(_q_textChanged(const QString&)));
     248        QObject::connect(lineEdit, SIGNAL(textChanged(QString)),
     249                         q, SLOT(_q_textChanged(QString)));
    250250    }
    251251}
     
    257257        comboBox = new QComboBox(q);
    258258        comboBox->hide();
    259         QObject::connect(comboBox, SIGNAL(editTextChanged(const QString&)),
    260                          q, SLOT(_q_textChanged(const QString&)));
    261         QObject::connect(comboBox, SIGNAL(currentIndexChanged(const QString&)),
    262                          q, SLOT(_q_textChanged(const QString&)));
     259        QObject::connect(comboBox, SIGNAL(editTextChanged(QString)),
     260                         q, SLOT(_q_textChanged(QString)));
     261        QObject::connect(comboBox, SIGNAL(currentIndexChanged(QString)),
     262                         q, SLOT(_q_textChanged(QString)));
    263263    }
    264264}
     
    277277        listView->setCurrentIndex(QModelIndex()); // ###
    278278        QObject::connect(listView->selectionModel(),
    279                          SIGNAL(currentRowChanged(const QModelIndex&, const QModelIndex&)),
    280                          q, SLOT(_q_currentRowChanged(const QModelIndex&, const QModelIndex&)));
     279                         SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
     280                         q, SLOT(_q_currentRowChanged(QModelIndex,QModelIndex)));
    281281    }
    282282}
     
    308308    if (spinBox) {
    309309        QAbstractButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
    310         QObject::disconnect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)));
    311         QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)));
     310        QObject::connect(spinBox, SIGNAL(textChanged(bool)), okButton, SLOT(setEnabled(bool)), Qt::UniqueConnection);
    312311    }
    313312}
     
    427426    \brief The QInputDialog class provides a simple convenience dialog to get a
    428427    single value from the user.
    429     \ingroup dialogs
    430     \mainclass
     428    \ingroup standard-dialogs
     429
    431430
    432431    The input value can be a string, a number or an item from a list. A label
     
    10211020    \overload
    10221021
    1023     Opens the dialog and connects its accepted() signal to the slot specified
    1024     by \a receiver and \a member.
     1022    This function connects one of its signals to the slot specified by \a receiver
     1023    and \a member. The specific signal depends on the arguments that are specified
     1024    in \a member. These are:
     1025
     1026    \list
     1027      \o textValueSelected() if \a member has a QString for its first argument.
     1028      \o intValueSelected() if \a member has an int for its first argument.
     1029      \o doubleValueSelected() if \a member has a double for its first argument.
     1030      \o accepted() if \a member has NO arguments.
     1031    \endlist
    10251032
    10261033    The signal will be disconnected from the slot when the dialog is closed.
     
    11221129    \a flags.
    11231130
    1124     This function returns the text which has been entered in the line
    1125     edit. It will not return an empty string.
     1131    If the dialog is accepted, this function returns the text in the dialog's
     1132    line edit. If the dialog is rejected, a null QString is returned.
    11261133
    11271134    Use this static function like this:
     
    11521159        return dialog.textValue();
    11531160    } else {
    1154         return text;
     1161        return QString();
    11551162    }
    11561163}
     
    12431250    dialog.setWindowTitle(title);
    12441251    dialog.setLabelText(label);
     1252    dialog.setDoubleDecimals(decimals);
    12451253    dialog.setDoubleRange(min, max);
    12461254    dialog.setDoubleValue(value);
    1247     dialog.setDoubleDecimals(decimals);
    12481255
    12491256    int ret = dialog.exec();
Note: See TracChangeset for help on using the changeset viewer.