Changeset 1156 for branches/vendor/nokia/qt/current/demos/chip
- Timestamp:
- Nov 7, 2014, 5:23:02 PM (11 years ago)
- Location:
- branches/vendor/nokia/qt/current/demos/chip
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vendor/nokia/qt/current/demos/chip/chip.cpp
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the demonstration applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** -
branches/vendor/nokia/qt/current/demos/chip/chip.h
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the demonstration applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** -
branches/vendor/nokia/qt/current/demos/chip/main.cpp
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the demonstration applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** -
branches/vendor/nokia/qt/current/demos/chip/mainwindow.cpp
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the demonstration applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** -
branches/vendor/nokia/qt/current/demos/chip/mainwindow.h
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the demonstration applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** -
branches/vendor/nokia/qt/current/demos/chip/view.cpp
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the demonstration applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 49 49 #include <qmath.h> 50 50 51 52 53 54 55 56 57 58 59 60 61 62 63 51 64 View::View(const QString &name, QWidget *parent) 52 65 : QFrame(parent) 53 66 { 54 67 setFrameStyle(Sunken | StyledPanel); 55 graphicsView = new QGraphicsView;68 graphicsView = new ; 56 69 graphicsView->setRenderHint(QPainter::Antialiasing, false); 57 70 graphicsView->setDragMode(QGraphicsView::RubberBandDrag); 58 71 graphicsView->setOptimizationFlags(QGraphicsView::DontSavePainterState); 59 72 graphicsView->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate); 73 60 74 61 75 int size = style()->pixelMetric(QStyle::PM_ToolBarIconSize); … … 112 126 QHBoxLayout *labelLayout = new QHBoxLayout; 113 127 label = new QLabel(name); 128 129 130 131 132 133 134 135 136 114 137 antialiasButton = new QToolButton; 115 138 antialiasButton->setText(tr("Antialiasing")); … … 127 150 printButton->setIcon(QIcon(QPixmap(":/fileprint.png"))); 128 151 152 153 154 155 156 129 157 labelLayout->addWidget(label); 158 159 160 161 130 162 labelLayout->addStretch(); 131 163 labelLayout->addWidget(antialiasButton); … … 146 178 connect(graphicsView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled())); 147 179 connect(graphicsView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setResetButtonEnabled())); 180 181 148 182 connect(antialiasButton, SIGNAL(toggled(bool)), this, SLOT(toggleAntialiasing())); 149 183 connect(openGlButton, SIGNAL(toggled(bool)), this, SLOT(toggleOpenGL())); … … 159 193 QGraphicsView *View::view() const 160 194 { 161 return graphicsView;195 return ; 162 196 } 163 197 … … 187 221 graphicsView->setMatrix(matrix); 188 222 setResetButtonEnabled(); 223 224 225 226 227 228 229 230 189 231 } 190 232 … … 213 255 } 214 256 215 void View::zoomIn( )216 { 217 zoomSlider->setValue(zoomSlider->value() + 1);218 } 219 220 void View::zoomOut( )221 { 222 zoomSlider->setValue(zoomSlider->value() - 1);257 void View::zoomIn() 258 { 259 zoomSlider->setValue(zoomSlider->value() + ); 260 } 261 262 void View::zoomOut() 263 { 264 zoomSlider->setValue(zoomSlider->value() - ); 223 265 } 224 266 -
branches/vendor/nokia/qt/current/demos/chip/view.h
r844 r1156 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). 4 ** Contact: http://www.qt-project.org/legal 6 5 ** 7 6 ** This file is part of the demonstration applications of the Qt Toolkit. 8 7 ** 9 8 ** $QT_BEGIN_LICENSE:LGPL$ 10 ** Commercial Usage11 ** Licensees holding valid Qt Commerciallicenses may use this file in12 ** accordance with the Qt Commercial License Agreement provided with the9 ** Commercial Usage 10 ** Licensees holding valid licenses may use this file in 11 ** accordance with the greement provided with the 13 12 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 13 ** a written agreement between you and Digia. For licensing terms and 14 ** conditions see http://qt.digia.com/licensing. For further information 15 ** use the contact form at http://qt.digia.com/contact-us. 15 16 ** 16 17 ** GNU Lesser General Public License Usage … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 24 ** In addition, as a special exception, Nokia gives you certain additional25 ** rights. These rights are described in the Nokia Qt LGPL Exception25 ** In addition, as a special exception, ia gives you certain additional 26 ** rights. These rights are described in the ia Qt LGPL Exception 26 27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 28 ** … … 34 35 ** met: http://www.gnu.org/copyleft/gpl.html. 35 36 ** 36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at [email protected]. 37 ** 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 44 44 45 45 #include <QFrame> 46 46 47 47 QT_FORWARD_DECLARE_CLASS(QGraphicsView)48 48 QT_FORWARD_DECLARE_CLASS(QLabel) 49 49 QT_FORWARD_DECLARE_CLASS(QSlider) 50 50 QT_FORWARD_DECLARE_CLASS(QToolButton) 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 51 66 52 67 class View : public QFrame … … 58 73 QGraphicsView *view() const; 59 74 75 76 77 78 60 79 private slots: 61 80 void resetView(); 62 81 void setResetButtonEnabled(); 63 82 void setupMatrix(); 83 64 84 void toggleOpenGL(); 65 85 void toggleAntialiasing(); 66 86 void print(); 67 68 void zoomIn();69 void zoomOut();70 87 void rotateLeft(); 71 88 void rotateRight(); 72 89 73 90 private: 74 QGraphicsView *graphicsView;91 GraphicsView *graphicsView; 75 92 QLabel *label; 93 94 95 76 96 QToolButton *openGlButton; 77 97 QToolButton *antialiasButton;
Note:
See TracChangeset
for help on using the changeset viewer.
