Changeset 561 for trunk/demos/pathstroke
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
demos/pathstroke/main.cpp (modified) (5 diffs)
-
demos/pathstroke/pathstroke.cpp (modified) (9 diffs)
-
demos/pathstroke/pathstroke.h (modified) (5 diffs)
-
demos/pathstroke/pathstroke.pro (modified) (1 diff)
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/demos/pathstroke/main.cpp
r2 r561 2 2 ** 3 3 ** 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]) 5 6 ** 6 7 ** This file is part of the demonstration applications 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 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 58 58 pathStrokeWidget.setStyle(arthurStyle); 59 59 QList<QWidget *> widgets = qFindChildren<QWidget *>(&pathStrokeWidget); 60 foreach (QWidget *w, widgets) 60 foreach (QWidget *w, widgets) 61 61 w->setStyle(arthurStyle); 62 63 62 64 63 65 if (smallScreen) … … 66 68 pathStrokeWidget.show(); 67 69 70 71 72 68 73 return app.exec(); 69 74 } -
trunk/demos/pathstroke/pathstroke.cpp
r2 r561 2 2 ** 3 3 ** 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]) 5 6 ** 6 7 ** This file is part of the demonstration applications 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 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 403 403 m_wasAnimated = true; 404 404 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 405 405 406 } 406 407 … … 511 512 Q_ASSERT(m_points.size() == m_vectors.size()); 512 513 for (int i=0; i<m_points.size(); ++i) { 513 514 if (i == m_activePoint)515 continue;516 517 514 QPointF pos = m_points.at(i); 518 515 QPointF vec = m_vectors.at(i); … … 533 530 void PathStrokeRenderer::mousePressEvent(QMouseEvent *e) 534 531 { 532 533 535 534 setDescriptionEnabled(false); 536 535 m_activePoint = -1; … … 557 556 void PathStrokeRenderer::mouseMoveEvent(QMouseEvent *e) 558 557 { 558 559 559 560 // If we've moved more then 25 pixels, assume user is dragging 560 561 if (!m_mouseDrag && QPoint(m_mousePress - e->pos()).manhattanLength() > 25) … … 569 570 void PathStrokeRenderer::mouseReleaseEvent(QMouseEvent *) 570 571 { 572 573 571 574 m_activePoint = -1; 572 575 setAnimation(m_wasAnimated); … … 587 590 } 588 591 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 589 676 void PathStrokeRenderer::setAnimation(bool animation) 590 677 { -
trunk/demos/pathstroke/pathstroke.h
r2 r561 2 2 ** 3 3 ** 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]) 5 6 ** 6 7 ** This file is part of the demonstration applications 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 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 61 61 void mouseReleaseEvent(QMouseEvent *e); 62 62 void timerEvent(QTimerEvent *e); 63 63 64 64 65 QSize sizeHint() const { return QSize(500, 500); } … … 119 120 QPoint m_mousePress; 120 121 bool m_mouseDrag; 122 123 121 124 }; 122 125 -
trunk/demos/pathstroke/pathstroke.pro
r2 r561 19 19 INSTALLS += target sources 20 20 21 22 23 24
Note:
See TracChangeset
for help on using the changeset viewer.
