Qt 4.8
qdeclarativevaluetype.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtDeclarative module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
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.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "private/qdeclarativevaluetype_p.h"
43 
44 #include "private/qdeclarativemetatype_p.h"
45 #include "private/qfont_p.h"
46 
47 #include <QtGui/qapplication.h>
48 #include <QtCore/qdebug.h>
49 
51 
52 template<typename T>
53 int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
54 {
55  QByteArray name(T::staticMetaObject.className());
56 
57  QByteArray pointerName(name + '*');
58 
60  0,
61 
62  qRegisterMetaType<T *>(pointerName.constData()), 0, 0, 0,
63 
64  QString(),
65 
66  uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject,
67 
68  0, 0,
69 
70  0, 0, 0,
71 
72  0, 0,
73 
74  0,
75  0
76  };
77 
79 }
80 
82 {
83  // ### Optimize
84  for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii)
85  valueTypes[ii] = valueType(ii);
86 }
87 
89 {
90  for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii)
91  delete valueTypes[ii];
92 }
93 
95 {
96  if ((uint)idx < QVariant::UserType)
97  return true;
98  return false;
99 }
100 
102 {
103  qmlRegisterValueTypeEnums<QDeclarativeEasingValueType>("QtQuick",1,0,"Easing");
104  qmlRegisterValueTypeEnums<QDeclarativeFontValueType>("QtQuick",1,0,"Font");
105 }
106 
108 {
110  return;
111 
112  qmlRegisterValueTypeEnums<QDeclarativeEasingValueType>("Qt",4,7,"Easing");
113  qmlRegisterValueTypeEnums<QDeclarativeFontValueType>("Qt",4,7,"Font");
114 }
115 
117 {
118  QDeclarativeValueType *rv = 0;
119 
120  switch (t) {
121  case QVariant::Point:
123  break;
124  case QVariant::PointF:
126  break;
127  case QVariant::Size:
128  rv = new QDeclarativeSizeValueType;
129  break;
130  case QVariant::SizeF:
132  break;
133  case QVariant::Rect:
134  rv = new QDeclarativeRectValueType;
135  break;
136  case QVariant::RectF:
138  break;
139  case QVariant::Vector2D:
141  break;
142  case QVariant::Vector3D:
144  break;
145  case QVariant::Vector4D:
147  break;
150  break;
151  case QVariant::Matrix4x4:
153  break;
156  break;
157  case QVariant::Font:
158  rv = new QDeclarativeFontValueType;
159  break;
160  default:
161  break;
162  }
163 
164  Q_ASSERT(!rv || rv->metaObject()->propertyCount() < 32);
165  return rv;
166 }
167 
169 : QObject(parent)
170 {
171 }
172 
174 : QDeclarativeValueType(parent)
175 {
176 }
177 
179 {
180  void *a[] = { &point, 0 };
182 }
183 
184 void QDeclarativePointFValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
185 {
186  int status = -1;
187  void *a[] = { &point, 0, &status, &flags };
189 }
190 
192 {
193  return QVariant(point);
194 }
195 
197 {
199 }
200 
202 {
203  return point.x();
204 }
205 
207 {
208  return point.y();
209 }
210 
212 {
213  point.setX(x);
214 }
215 
217 {
218  point.setY(y);
219 }
220 
222 : QDeclarativeValueType(parent)
223 {
224 }
225 
227 {
228  void *a[] = { &point, 0 };
230 }
231 
232 void QDeclarativePointValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
233 {
234  int status = -1;
235  void *a[] = { &point, 0, &status, &flags };
237 }
238 
240 {
241  return QVariant(point);
242 }
243 
245 {
247 }
248 
250 {
251  return point.x();
252 }
253 
255 {
256  return point.y();
257 }
258 
260 {
261  point.setX(x);
262 }
263 
265 {
266  point.setY(y);
267 }
268 
270 : QDeclarativeValueType(parent)
271 {
272 }
273 
275 {
276  void *a[] = { &size, 0 };
278 }
279 
280 void QDeclarativeSizeFValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
281 {
282  int status = -1;
283  void *a[] = { &size, 0, &status, &flags };
285 }
286 
288 {
289  return QVariant(size);
290 }
291 
293 {
295 }
296 
298 {
299  return size.width();
300 }
301 
303 {
304  return size.height();
305 }
306 
308 {
309  size.setWidth(w);
310 }
311 
313 {
314  size.setHeight(h);
315 }
316 
318 : QDeclarativeValueType(parent)
319 {
320 }
321 
323 {
324  void *a[] = { &size, 0 };
326 }
327 
328 void QDeclarativeSizeValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
329 {
330  int status = -1;
331  void *a[] = { &size, 0, &status, &flags };
333 }
334 
336 {
337  return QVariant(size);
338 }
339 
341 {
343 }
344 
346 {
347  return size.width();
348 }
349 
351 {
352  return size.height();
353 }
354 
356 {
357  size.setWidth(w);
358 }
359 
361 {
362  size.setHeight(h);
363 }
364 
366 : QDeclarativeValueType(parent)
367 {
368 }
369 
371 {
372  void *a[] = { &rect, 0 };
374 }
375 
376 void QDeclarativeRectFValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
377 {
378  int status = -1;
379  void *a[] = { &rect, 0, &status, &flags };
381 }
382 
384 {
385  return QVariant(rect);
386 }
387 
389 {
391 }
392 
394 {
395  return rect.x();
396 }
397 
399 {
400  return rect.y();
401 }
402 
404 {
405  rect.moveLeft(x);
406 }
407 
409 {
410  rect.moveTop(y);
411 }
412 
414 {
415  return rect.width();
416 }
417 
419 {
420  return rect.height();
421 }
422 
424 {
425  rect.setWidth(w);
426 }
427 
429 {
430  rect.setHeight(h);
431 }
432 
434 : QDeclarativeValueType(parent)
435 {
436 }
437 
439 {
440  void *a[] = { &rect, 0 };
442 }
443 
444 void QDeclarativeRectValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
445 {
446  int status = -1;
447  void *a[] = { &rect, 0, &status, &flags };
449 }
450 
452 {
453  return QVariant(rect);
454 }
455 
457 {
459 }
460 
462 {
463  return rect.x();
464 }
465 
467 {
468  return rect.y();
469 }
470 
472 {
473  rect.moveLeft(x);
474 }
475 
477 {
478  rect.moveTop(y);
479 }
480 
482 {
483  return rect.width();
484 }
485 
487 {
488  return rect.height();
489 }
490 
492 {
493  rect.setWidth(w);
494 }
495 
497 {
498  rect.setHeight(h);
499 }
500 
502 : QDeclarativeValueType(parent)
503 {
504 }
505 
507 {
508  void *a[] = { &vector, 0 };
510 }
511 
512 void QDeclarativeVector2DValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
513 {
514  int status = -1;
515  void *a[] = { &vector, 0, &status, &flags };
517 }
518 
520 {
521  return QVariant(vector);
522 }
523 
525 {
527 }
528 
530 {
531  return vector.x();
532 }
533 
535 {
536  return vector.y();
537 }
538 
540 {
541  vector.setX(x);
542 }
543 
545 {
546  vector.setY(y);
547 }
548 
550 : QDeclarativeValueType(parent)
551 {
552 }
553 
555 {
556  void *a[] = { &vector, 0 };
558 }
559 
560 void QDeclarativeVector3DValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
561 {
562  int status = -1;
563  void *a[] = { &vector, 0, &status, &flags };
565 }
566 
568 {
569  return QVariant(vector);
570 }
571 
573 {
575 }
576 
578 {
579  return vector.x();
580 }
581 
583 {
584  return vector.y();
585 }
586 
588 {
589  return vector.z();
590 }
591 
593 {
594  vector.setX(x);
595 }
596 
598 {
599  vector.setY(y);
600 }
601 
603 {
604  vector.setZ(z);
605 }
606 
608 : QDeclarativeValueType(parent)
609 {
610 }
611 
613 {
614  void *a[] = { &vector, 0 };
616 }
617 
618 void QDeclarativeVector4DValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
619 {
620  int status = -1;
621  void *a[] = { &vector, 0, &status, &flags };
623 }
624 
626 {
627  return QVariant(vector);
628 }
629 
631 {
633 }
634 
636 {
637  return vector.x();
638 }
639 
641 {
642  return vector.y();
643 }
644 
646 {
647  return vector.z();
648 }
649 
651 {
652  return vector.w();
653 }
654 
656 {
657  vector.setX(x);
658 }
659 
661 {
662  vector.setY(y);
663 }
664 
666 {
667  vector.setZ(z);
668 }
669 
671 {
672  vector.setW(w);
673 }
674 
676 : QDeclarativeValueType(parent)
677 {
678 }
679 
681 {
682  void *a[] = { &quaternion, 0 };
684 }
685 
686 void QDeclarativeQuaternionValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
687 {
688  int status = -1;
689  void *a[] = { &quaternion, 0, &status, &flags };
691 }
692 
694 {
695  return QVariant(quaternion);
696 }
697 
699 {
701 }
702 
704 {
705  return quaternion.scalar();
706 }
707 
709 {
710  return quaternion.x();
711 }
712 
714 {
715  return quaternion.y();
716 }
717 
719 {
720  return quaternion.z();
721 }
722 
724 {
725  quaternion.setScalar(scalar);
726 }
727 
729 {
730  quaternion.setX(x);
731 }
732 
734 {
735  quaternion.setY(y);
736 }
737 
739 {
740  quaternion.setZ(z);
741 }
742 
744 : QDeclarativeValueType(parent)
745 {
746 }
747 
749 {
750  void *a[] = { &matrix, 0 };
752 }
753 
754 void QDeclarativeMatrix4x4ValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
755 {
756  int status = -1;
757  void *a[] = { &matrix, 0, &status, &flags };
759 }
760 
762 {
763  return QVariant(matrix);
764 }
765 
767 {
769 }
770 
772 : QDeclarativeValueType(parent)
773 {
774 }
775 
777 {
778  void *a[] = { &easing, 0 };
780 }
781 
782 void QDeclarativeEasingValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
783 {
784  int status = -1;
785  void *a[] = { &easing, 0, &status, &flags };
787 }
788 
790 {
791  return QVariant(easing);
792 }
793 
795 {
797 }
798 
800 {
802 }
803 
805 {
806  return easing.amplitude();
807 }
808 
810 {
811  return easing.overshoot();
812 }
813 
815 {
816  return easing.period();
817 }
818 
820 {
822 }
823 
825 {
826  easing.setAmplitude(amplitude);
827 }
828 
830 {
831  easing.setOvershoot(overshoot);
832 }
833 
835 {
836  easing.setPeriod(period);
837 }
838 
840 : QDeclarativeValueType(parent), pixelSizeSet(false), pointSizeSet(false)
841 {
842 }
843 
845 {
846  void *a[] = { &font, 0 };
848  pixelSizeSet = false;
849  pointSizeSet = false;
850 }
851 
852 void QDeclarativeFontValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
853 {
854  int status = -1;
855  void *a[] = { &font, 0, &status, &flags };
857 }
858 
860 {
861  return QVariant(font);
862 }
863 
865 {
867 }
868 
869 
871 {
872  return font.family();
873 }
874 
876 {
877  font.setFamily(family);
878 }
879 
881 {
882  return font.bold();
883 }
884 
886 {
887  font.setBold(b);
888 }
889 
891 {
893 }
894 
896 {
898 }
899 
901 {
902  return font.italic();
903 }
904 
906 {
907  font.setItalic(b);
908 }
909 
911 {
912  return font.underline();
913 }
914 
916 {
917  font.setUnderline(b);
918 }
919 
921 {
922  return font.overline();
923 }
924 
926 {
927  font.setOverline(b);
928 }
929 
931 {
932  return font.strikeOut();
933 }
934 
936 {
937  font.setStrikeOut(b);
938 }
939 
941 {
942  if (font.pointSizeF() == -1) {
943  if (dpi.isNull)
944  dpi = qt_defaultDpi();
945  return font.pixelSize() * qreal(72.) / qreal(dpi);
946  }
947  return font.pointSizeF();
948 }
949 
951 {
952  if (pixelSizeSet) {
953  qWarning() << "Both point size and pixel size set. Using pixel size.";
954  return;
955  }
956 
957  if (size >= 0.0) {
958  pointSizeSet = true;
959  font.setPointSizeF(size);
960  } else {
961  pointSizeSet = false;
962  }
963 }
964 
966 {
967  if (font.pixelSize() == -1) {
968  if (dpi.isNull)
969  dpi = qt_defaultDpi();
970  return (font.pointSizeF() * dpi) / qreal(72.);
971  }
972  return font.pixelSize();
973 }
974 
976 {
977  if (size >0) {
978  if (pointSizeSet)
979  qWarning() << "Both point size and pixel size set. Using pixel size.";
980  font.setPixelSize(size);
981  pixelSizeSet = true;
982  } else {
983  pixelSizeSet = false;
984  }
985 }
986 
988 {
990 }
991 
993 {
995 }
996 
998 {
999  return font.letterSpacing();
1000 }
1001 
1003 {
1005 }
1006 
1008 {
1009  return font.wordSpacing();
1010 }
1011 
1013 {
1014  font.setWordSpacing(size);
1015 }
1016 
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
virtual void read(QObject *, int)
void setWordSpacing(qreal spacing)
Sets the word spacing for the font to spacing.
Definition: qfont.cpp:1757
void moveTop(qreal pos)
Moves the rectangle vertically, leaving the rectangle&#39;s top line at the given y coordinate.
Definition: qrect.h:691
virtual void read(QObject *, int)
void setCapitalization(Capitalization)
Sets the capitalization of the text in this font to caps.
Definition: qfont.cpp:1798
qreal y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:667
The QVector3D class represents a vector or vertex in 3D space.
Definition: qvector3d.h:60
void setHeight(int h)
Sets the height of the rectangle to the given height.
Definition: qrect.h:445
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
int type
Definition: qmetatype.cpp:239
double qreal
Definition: qglobal.h:1193
qreal overshoot() const
Returns the overshoot.
FontWeight weight() const
unsigned char c[8]
Definition: qnumeric_p.h:62
void setHeight(qreal h)
Sets the height of the rectangle to the given height.
Definition: qrect.h:787
qreal x() const
Returns the x coordinate of this quaternion&#39;s vector.
Definition: qquaternion.h:156
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QDeclarativeSizeValueType(QObject *parent=0)
virtual void setValue(QVariant value)
void setZ(qreal z)
Sets the z coordinate of this quaternion&#39;s vector to the given z coordinate.
Definition: qquaternion.h:163
The QEasingCurve class provides easing curves for controlling animation.
Definition: qeasingcurve.h:55
virtual void read(QObject *, int)
virtual void setValue(QVariant value)
void moveLeft(int pos)
Moves the rectangle horizontally, leaving the rectangle&#39;s left edge at the given x coordinate...
Definition: qrect.h:350
qreal period() const
Returns the period.
void moveLeft(qreal pos)
Moves the rectangle horizontally, leaving the rectangle&#39;s left edge at the given x coordinate...
Definition: qrect.h:689
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
bool underline() const
Returns true if underline has been set; otherwise returns false.
Definition: qfont.cpp:1320
void setUnderline(bool)
If enable is true, sets underline on; otherwise sets underline off.
Definition: qfont.cpp:1331
static int metacall(QObject *, Call, int, void **)
qreal width() const
Returns the width.
Definition: qsize.h:284
void setX(qreal x)
Sets the x coordinate of this quaternion&#39;s vector to the given x coordinate.
Definition: qquaternion.h:161
int pixelSize() const
Returns the pixel size of the font if it was set with setPixelSize().
Definition: qfont.cpp:1178
static QDeclarativeValueType * valueType(int)
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
qreal w() const
Returns the w coordinate of this point.
Definition: qvector4d.h:161
void setY(qreal y)
Sets the y coordinate of this point to the given y coordinate.
Definition: qpoint.h:297
void setCapitalization(Capitalization)
The QVector4D class represents a vector or vertex in 4D space.
Definition: qvector4d.h:60
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
qreal height() const
Returns the height.
Definition: qsize.h:287
virtual void read(QObject *, int)
Capitalization capitalization() const
Returns the current capitalization type of the font.
Definition: qfont.cpp:1819
virtual void setValue(QVariant value)
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
virtual void read(QObject *, int)
static LibLoadStatus status
Definition: qlocale_icu.cpp:69
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
virtual void read(QObject *, int)
Weight
Qt uses a weighting scale from 0 to 99 similar to, but not the same as, the scales used in Windows or...
Definition: qfont.h:103
long ASN1_INTEGER_get ASN1_INTEGER * a
virtual void setValue(QVariant value)
virtual void setValue(QVariant value)
qreal x() const
Returns the x coordinate of this point.
Definition: qvector3d.h:161
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
virtual void read(QObject *, int)
int propertyCount() const
Returns the number of properties in this class, including the number of properties provided by each b...
QDeclarativeFontValueType(QObject *parent=0)
The QString class provides a Unicode character string.
Definition: qstring.h:83
void setHeight(int h)
Sets the height to the given height.
Definition: qsize.h:135
void setItalic(bool b)
Sets the style() of the font to QFont::StyleItalic if enable is true; otherwise the style is set to Q...
Definition: qfont.h:360
void setWidth(qreal w)
Sets the width to the given width.
Definition: qsize.h:290
void setX(qreal x)
Sets the x coordinate of this point to the given x coordinate.
Definition: qvector2d.h:149
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
Capitalization
Rendering option for text this font applies to.
Definition: qfont.h:129
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
The QSizeF class defines the size of a two-dimensional object using floating point precision...
Definition: qsize.h:202
QDeclarativeRectValueType(QObject *parent=0)
qreal amplitude() const
Returns the amplitude.
const char * className
Definition: qwizard.cpp:137
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
void setFamily(const QString &)
Sets the family name of the font.
Definition: qfont.cpp:924
void setWidth(int w)
Sets the width to the given width.
Definition: qsize.h:132
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
QDeclarativeVector2DValueType(QObject *parent=0)
qreal scalar() const
Returns the scalar component of this quaternion.
Definition: qquaternion.h:159
int width() const
Returns the width.
Definition: qsize.h:126
Type type() const
Returns the type of the easing curve.
void setPeriod(qreal period)
Sets the period to period.
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
qreal pointSizeF() const
Returns the point size of the font.
Definition: qfont.cpp:1142
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
void setBold(bool)
If enable is true sets the font&#39;s weight to QFont::Bold ; otherwise sets the weight to QFont::Normal...
Definition: qfont.h:352
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
void setScalar(qreal scalar)
Sets the scalar component of this quaternion to scalar.
Definition: qquaternion.h:164
virtual void read(QObject *, int)
bool overline() const
Returns true if overline has been set; otherwise returns false.
Definition: qfont.cpp:1344
QDeclarativeValueType * valueTypes[QVariant::UserType - 1]
void setStrikeOut(bool)
If enable is true, sets strikeout on; otherwise sets strikeout off.
Definition: qfont.cpp:1378
qreal x() const
Returns the x coordinate of this point.
Definition: qvector4d.h:158
void setZ(qreal z)
Sets the z coordinate of this point to the given z coordinate.
Definition: qvector4d.h:165
virtual void setValue(QVariant value)
qreal height() const
Returns the height of the rectangle.
Definition: qrect.h:710
const char * name
QDeclarativeMatrix4x4ValueType(QObject *parent=0)
Q_CORE_EXPORT void qWarning(const char *,...)
void setX(qreal x)
Sets the x coordinate of this point to the given x coordinate.
Definition: qvector3d.h:165
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition: qmatrix4x4.h:63
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
The QVector2D class represents a vector or vertex in 2D space.
Definition: qvector2d.h:60
virtual void setValue(QVariant value)
unsigned int uint
Definition: qglobal.h:996
void setOvershoot(qreal overshoot)
Sets the overshoot to overshoot.
qreal x() const
Returns the x coordinate of this point.
Definition: qvector2d.h:146
qreal width() const
Returns the width of the rectangle.
Definition: qrect.h:707
int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *)
qreal z() const
Returns the z coordinate of this point.
Definition: qvector3d.h:163
void setY(qreal y)
Sets the y coordinate of this point to the given y coordinate.
Definition: qvector2d.h:150
qreal wordSpacing() const
Returns the word spacing for the font.
Definition: qfont.cpp:1735
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
virtual void read(QObject *, int)
qreal y() const
Returns the y coordinate of this quaternion&#39;s vector.
Definition: qquaternion.h:157
void setW(qreal w)
Sets the w coordinate of this point to the given w coordinate.
Definition: qvector4d.h:166
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
bool bold() const
Returns true if weight() is a value greater than QFont::Normal ; otherwise returns false...
Definition: qfont.h:348
virtual void setValue(QVariant value)
QDeclarativePointFValueType(QObject *parent=0)
void setY(int y)
Sets the y coordinate of this point to the given y coordinate.
Definition: qpoint.h:137
virtual void setValue(QVariant value)
QDeclarativeValueType(QObject *parent=0)
virtual void read(QObject *, int)
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
qreal x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:664
void setX(qreal x)
Sets the x coordinate of this point to the given x coordinate.
Definition: qvector4d.h:163
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
QString family() const
Returns the requested font family name, i.e.
Definition: qfont.cpp:906
Q_GUI_EXPORT int qt_defaultDpi()
Definition: qfont.cpp:240
void setOverline(bool)
If enable is true, sets overline on; otherwise sets overline off.
Definition: qfont.cpp:1354
void setZ(qreal z)
Sets the z coordinate of this point to the given z coordinate.
Definition: qvector3d.h:167
qreal z() const
Returns the z coordinate of this quaternion&#39;s vector.
Definition: qquaternion.h:158
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
qreal letterSpacing() const
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
virtual void read(QObject *, int)
virtual void setValue(QVariant value)
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QDeclarativeEasingValueType(QObject *parent=0)
Capitalization capitalization() const
qreal y() const
Returns the y coordinate of this point.
Definition: qvector3d.h:162
void setWidth(int w)
Sets the width of the rectangle to the given width.
Definition: qrect.h:442
virtual void setValue(QVariant value)
void setWeight(int)
Sets the weight the font to weight, which should be a value from the QFont::Weight enumeration...
Definition: qfont.cpp:1278
int height() const
Returns the height.
Definition: qsize.h:129
qreal y() const
Returns the y coordinate of this point.
Definition: qvector2d.h:147
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
int weight() const
Returns the weight of the font which is one of the enumerated values from QFont::Weight.
Definition: qfont.cpp:1248
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Definition: qquaternion.h:59
T qvariant_cast(const QVariant &)
Definition: qvariant.h:571
virtual void read(QObject *, int)
void setAmplitude(qreal amplitude)
Sets the amplitude to amplitude.
QDeclarativeVector4DValueType(QObject *parent=0)
int y() const
Returns the y coordinate of this point.
Definition: qpoint.h:131
void setX(qreal x)
Sets the x coordinate of this point to the given x coordinate.
Definition: qpoint.h:292
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287
QDeclarativeRectFValueType(QObject *parent=0)
void setPointSizeF(qreal)
Sets the point size to pointSize.
Definition: qfont.cpp:1121
QDeclarativePointValueType(QObject *parent=0)
void setHeight(qreal h)
Sets the height to the given height.
Definition: qsize.h:293
QDeclarativeQuaternionValueType(QObject *parent=0)
bool italic() const
Returns true if the style() of the font is not QFont::StyleNormal.
Definition: qfont.h:355
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
void setWidth(qreal w)
Sets the width of the rectangle to the given width.
Definition: qrect.h:784
Type
The type of easing curve.
Definition: qeasingcurve.h:60
int x() const
Returns the x coordinate of this point.
Definition: qpoint.h:128
virtual void read(QObject *, int)
void setLetterSpacing(SpacingType type, qreal spacing)
Sets the letter spacing for the font to spacing and the type of spacing to type.
Definition: qfont.cpp:1696
virtual void setValue(QVariant value)
void moveTop(int pos)
Moves the rectangle vertically, leaving the rectangle&#39;s top edge at the given y coordinate.
Definition: qrect.h:353
void setPixelSize(int)
Sets the font size to pixelSize pixels.
Definition: qfont.cpp:1156
void setY(qreal y)
Sets the y coordinate of this point to the given y coordinate.
Definition: qvector4d.h:164
bool strikeOut() const
Returns true if strikeout has been set; otherwise returns false.
Definition: qfont.cpp:1367
QDeclarativeSizeFValueType(QObject *parent=0)
qreal z() const
Returns the z coordinate of this point.
Definition: qvector4d.h:160
QDeclarativeNullableValue< int > dpi
void setY(qreal y)
Sets the y coordinate of this quaternion&#39;s vector to the given y coordinate.
Definition: qquaternion.h:162
void setX(int x)
Sets the x coordinate of this point to the given x coordinate.
Definition: qpoint.h:134
static Type type()
Returns the type of application (Tty , GuiClient, or GuiServer).
void setY(qreal y)
Sets the y coordinate of this point to the given y coordinate.
Definition: qvector3d.h:166
qreal y() const
Returns the y coordinate of this point.
Definition: qvector4d.h:159
QString family() const
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
void setType(Type type)
Sets the type of the easing curve to type.
QDeclarativeVector3DValueType(QObject *parent=0)
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
virtual void setValue(QVariant value)
virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags)
qreal letterSpacing() const
Returns the letter spacing for the font.
Definition: qfont.cpp:1677