1 /* This file is part of the KDE project
2 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
23 #include <QtTest/QTest>
24 #include "../phononnamespace.h"
25 #include <QtCore/QVariant>
30 char *toString(const Phonon::State
&state
)
33 case Phonon::LoadingState
:
34 return qstrdup("LoadingState");
35 case Phonon::StoppedState
:
36 return qstrdup("StoppedState");
37 case Phonon::PlayingState
:
38 return qstrdup("PlayingState");
39 case Phonon::BufferingState
:
40 return qstrdup("BufferingState");
41 case Phonon::PausedState
:
42 return qstrdup("PausedState");
43 case Phonon::ErrorState
:
44 return qstrdup("ErrorState");
50 char *toString(const QVariant::Type
&type
)
53 case QVariant::Invalid
:
54 return qstrdup("QVariant::Invalid");
55 case QVariant::BitArray
:
56 return qstrdup("QVariant::BitArray");
57 case QVariant::Bitmap
:
58 return qstrdup("QVariant::Bitmap");
60 return qstrdup("QVariant::Bool");
62 return qstrdup("QVariant::Brush");
63 case QVariant::ByteArray
:
64 return qstrdup("QVariant::ByteArray");
66 return qstrdup("QVariant::Char");
68 return qstrdup("QVariant::Color");
69 case QVariant::Cursor
:
70 return qstrdup("QVariant::Cursor");
72 return qstrdup("QVariant::Date");
73 case QVariant::DateTime
:
74 return qstrdup("QVariant::DateTime");
75 case QVariant::Double
:
76 return qstrdup("QVariant::Double");
78 return qstrdup("QVariant::Font");
80 return qstrdup("QVariant::Icon");
82 return qstrdup("QVariant::Image");
84 return qstrdup("QVariant::Int");
85 case QVariant::KeySequence
:
86 return qstrdup("QVariant::KeySequence");
88 return qstrdup("QVariant::Line");
90 return qstrdup("QVariant::LineF");
92 return qstrdup("QVariant::List");
93 case QVariant::Locale
:
94 return qstrdup("QVariant::Locale");
95 case QVariant::LongLong
:
96 return qstrdup("QVariant::LongLong");
98 return qstrdup("QVariant::Map");
99 case QVariant::Matrix
:
100 return qstrdup("QVariant::Matrix");
101 case QVariant::Transform
:
102 return qstrdup("QVariant::Transform");
103 case QVariant::Palette
:
104 return qstrdup("QVariant::Palette");
106 return qstrdup("QVariant::Pen");
107 case QVariant::Pixmap
:
108 return qstrdup("QVariant::Pixmap");
109 case QVariant::Point
:
110 return qstrdup("QVariant::Point");
111 case QVariant::PointF
:
112 return qstrdup("QVariant::PointF");
113 case QVariant::Polygon
:
114 return qstrdup("QVariant::Polygon");
116 return qstrdup("QVariant::Rect");
117 case QVariant::RectF
:
118 return qstrdup("QVariant::RectF");
119 case QVariant::RegExp
:
120 return qstrdup("QVariant::RegExp");
121 case QVariant::Region
:
122 return qstrdup("QVariant::Region");
124 return qstrdup("QVariant::Size");
125 case QVariant::SizeF
:
126 return qstrdup("QVariant::SizeF");
127 case QVariant::SizePolicy
:
128 return qstrdup("QVariant::SizePolicy");
129 case QVariant::String
:
130 return qstrdup("QVariant::String");
131 case QVariant::StringList
:
132 return qstrdup("QVariant::StringList");
133 case QVariant::TextFormat
:
134 return qstrdup("QVariant::TextFormat");
135 case QVariant::TextLength
:
136 return qstrdup("QVariant::TextLength");
138 return qstrdup("QVariant::Time");
140 return qstrdup("QVariant::UInt");
141 case QVariant::ULongLong
:
142 return qstrdup("QVariant::ULongLong");
144 return qstrdup("QVariant::Url");
145 case QVariant::UserType
:
146 return qstrdup("QVariant::UserType");
147 case QVariant::LastType
:
148 return qstrdup("QVariant::LastType");
154 #endif // QTESTHELPER_H