Changeset 561 for trunk/demos/pathstroke

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

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/demos/pathstroke/main.cpp

    r2 r561  
    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 demonstration applications 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**
     
    5858    pathStrokeWidget.setStyle(arthurStyle);
    5959    QList<QWidget *> widgets = qFindChildren<QWidget *>(&pathStrokeWidget);
    60     foreach (QWidget *w, widgets)
     60    foreach (QWidget *w, widgets)
    6161        w->setStyle(arthurStyle);
     62
     63
    6264
    6365    if (smallScreen)
     
    6668        pathStrokeWidget.show();
    6769
     70
     71
     72
    6873    return app.exec();
    6974}
  • trunk/demos/pathstroke/pathstroke.cpp

    r2 r561  
    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 demonstration applications 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**
     
    403403    m_wasAnimated = true;
    404404    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     405
    405406}
    406407
     
    511512    Q_ASSERT(m_points.size() == m_vectors.size());
    512513    for (int i=0; i<m_points.size(); ++i) {
    513 
    514         if (i == m_activePoint)
    515             continue;
    516 
    517514        QPointF pos = m_points.at(i);
    518515        QPointF vec = m_vectors.at(i);
     
    533530void PathStrokeRenderer::mousePressEvent(QMouseEvent *e)
    534531{
     532
     533
    535534    setDescriptionEnabled(false);
    536535    m_activePoint = -1;
     
    557556void PathStrokeRenderer::mouseMoveEvent(QMouseEvent *e)
    558557{
     558
     559
    559560    // If we've moved more then 25 pixels, assume user is dragging
    560561    if (!m_mouseDrag && QPoint(m_mousePress - e->pos()).manhattanLength() > 25)
     
    569570void PathStrokeRenderer::mouseReleaseEvent(QMouseEvent *)
    570571{
     572
     573
    571574    m_activePoint = -1;
    572575    setAnimation(m_wasAnimated);
     
    587590}
    588591
     592
     593
     594
     595
     596
     597
     598
     599
     600
     601
     602
     603
     604
     605
     606
     607
     608
     609
     610
     611
     612
     613
     614
     615
     616
     617
     618
     619
     620
     621
     622
     623
     624
     625
     626
     627
     628
     629
     630
     631
     632
     633
     634
     635
     636
     637
     638
     639
     640
     641
     642
     643
     644
     645
     646
     647
     648
     649
     650
     651
     652
     653
     654
     655
     656
     657
     658
     659
     660
     661
     662
     663
     664
     665
     666
     667
     668
     669
     670
     671
     672
     673
     674
     675
    589676void PathStrokeRenderer::setAnimation(bool animation)
    590677{
  • trunk/demos/pathstroke/pathstroke.h

    r2 r561  
    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 demonstration applications 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**
     
    6161    void mouseReleaseEvent(QMouseEvent *e);
    6262    void timerEvent(QTimerEvent *e);
     63
    6364
    6465    QSize sizeHint() const { return QSize(500, 500); }
     
    119120    QPoint m_mousePress;
    120121    bool m_mouseDrag;
     122
     123
    121124};
    122125
  • trunk/demos/pathstroke/pathstroke.pro

    r2 r561  
    1919INSTALLS += target sources
    2020
     21
     22
     23
     24
Note: See TracChangeset for help on using the changeset viewer.