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/widgets/qdatetimeedit.cpp

    r2 r561  
    1 /****************************************************************************)
     1/****************************************************************************
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    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
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7676
    7777  \ingroup basicwidgets
    78   \mainclass
     78
    7979
    8080  QDateTimeEdit allows the user to edit dates by using the keyboard or
     
    221221  \brief the QDateTime that is set in the QDateTimeEdit
    222222
     223
     224
     225
    223226  By default, this property contains a date that refers to January 1,
    224227  2000 and a time of 00:00:00 and 0 milliseconds.
     
    240243        if (!(d->sections & DateSections_Mask))
    241244            setDateRange(datetime.date(), datetime.date());
    242         d->setValue(QVariant(datetime), EmitIfChanged);
     245        d->setValue(Q), EmitIfChanged);
    243246    }
    244247}
     
    933936    \brief the current timespec used by the date time edit.
    934937    \since 4.4
    935 
    936     All dates/passed to the date time edit will be converted to this
    937     timespec.
    938938*/
    939939
     
    10871087                //hide cursor
    10881088                d->edit->d_func()->setCursorVisible(false);
    1089                 if (d->edit->d_func()->cursorTimer > 0)
    1090                     killTimer(d->edit->d_func()->cursorTimer);
    1091                 d->edit->d_func()->cursorTimer = 0;
    1092 
     1089                d->edit->d_func()->control->setCursorBlinkPeriod(0);
    10931090                d->setSelected(0);
    10941091            }
     
    11111108            //hide cursor
    11121109            d->edit->d_func()->setCursorVisible(false);
    1113             if (d->edit->d_func()->cursorTimer > 0)
    1114                 killTimer(d->edit->d_func()->cursorTimer);
    1115             d->edit->d_func()->cursorTimer = 0;
    1116 
     1110            d->edit->d_func()->control->setCursorBlinkPeriod(0);
    11171111            d->setSelected(0);
    11181112            oldCurrent = 0;
     
    11271121    case Qt::Key_Right:
    11281122        if (event->key() == Qt::Key_Left || event->key() == Qt::Key_Right) {
     1123
    11291124#ifdef QT_KEYPAD_NAVIGATION
    1130             if (!QApplication::keypadNavigationEnabled() || !hasEditFocus()) {
    1131                 select = false;
    1132                 break;
    1133             }
    1134 #else
    1135             if (!(event->modifiers() & Qt::ControlModifier)) {
     1125                QApplication::keypadNavigationEnabled() && !hasEditFocus()
     1126                || !QApplication::keypadNavigationEnabled() &&
     1127#endif
     1128                !(event->modifiers() & Qt::ControlModifier)) {
    11361129                select = false;
    11371130                break;
    11381131            }
    11391132#ifdef Q_WS_MAC
    1140             else {
     1133            else
     1134#ifdef QT_KEYPAD_NAVIGATION
     1135                if (!QApplication::keypadNavigationEnabled())
     1136#endif
     1137            {
    11411138                select = (event->modifiers() & Qt::ShiftModifier);
    11421139                break;
    11431140            }
    11441141#endif
    1145 #endif // QT_KEYPAD_NAVIGATION
    11461142        }
    11471143        // else fall through
     
    15111507
    15121508  \ingroup basicwidgets
    1513   \mainclass
     1509
    15141510
    15151511  Many of the properties and functions provided by QTimeEdit are implemented in
     
    15731569
    15741570  \ingroup basicwidgets
    1575   \mainclass
     1571
    15761572
    15771573  Many of the properties and functions provided by QDateEdit are implemented in
     
    16481644    currentSectionIndex = FirstSectionIndex;
    16491645
    1650     layoutDirection = QApplication::layoutDirection();
    16511646    first.type = FirstSection;
    16521647    last.type = LastSection;
     
    19351930/*!
    19361931  \internal
    1937   \reimp
    19381932*/
    19391933
     
    19461940/*!
    19471941  \internal
    1948   \reimp
    19491942
    19501943  This function's name is slightly confusing; it is not to be confused
     
    21042097/*!
    21052098  \internal
    2106   \reimp
    21072099*/
    21082100
     
    21342126/*!
    21352127  \internal
    2136   \reimp
    21372128*/
    21382129
     
    22792270    optCombo.init(this);
    22802271    optCombo.editable = true;
     2272
    22812273    optCombo.subControls = opt.subControls;
    22822274    optCombo.activeSubControls = opt.activeSubControls;
     
    23912383#endif
    23922384    updateTimeSpec();
     2385
    23932386    setLayoutItemMargins(QStyle::SE_DateTimeEditLayoutItem);
    23942387}
Note: See TracChangeset for help on using the changeset viewer.