1 /************************************************************************
3 * Copyright 2010 Jakob Leben (jakob.leben@gmail.com)
5 * This file is part of SuperCollider Qt GUI.
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ************************************************************************/
36 #include "widgets/QcTreeWidget.h"
40 namespace QtCollider
{
44 bool toBool( PyrSlot
* );
45 int toInt( PyrSlot
* );
46 float toFloat( PyrSlot
* );
47 double toDouble( PyrSlot
* );
48 QString
toString( PyrSlot
* );
49 QPointF
toPoint( PyrSlot
* );
50 QRectF
toRect( PyrSlot
* );
51 QSizeF
toSize( PyrSlot
* );
52 QColor
toColor( PyrSlot
* );
53 QFont
toFont( PyrSlot
* );
54 QPalette
toPalette( PyrSlot
* );
55 VariantList
toVariantList( PyrSlot
* );
56 QObjectProxy
* toObjectProxy( PyrSlot
* );
57 QcTreeWidget::ItemPtr
toTreeWidgetItem( PyrSlot
* );
58 QVariant
toVariant( PyrSlot
* );
60 void setRect( PyrSlot
*, const QRectF
& );
61 void setPoint( PyrSlot
*, const QPointF
& );
62 void setSize( PyrSlot
*, const QSizeF
& );
63 void setString( PyrSlot
*, const QString
& );
64 void setColor( PyrSlot
*, const QColor
& );
65 void setPalette( PyrSlot
*, const QPalette
& );
66 void setQObject( PyrSlot
*, QObject
* );
67 void setTreeWidgetItem( PyrSlot
*, const QcTreeWidget::ItemPtr
& );
68 void setVariantList( PyrSlot
*, const VariantList
& );
69 bool setVariant( PyrSlot
*, const QVariant
& );
77 _type( QMetaType::Void
),
81 Variant( PyrSlot
*slot
)
86 QMetaType::destroy( _type
, _ptr
);
90 void setData( PyrSlot
* );
92 QGenericArgument
asGenericArgument() {
93 if( _type
!= QMetaType::Void
)
94 return QGenericArgument( QMetaType::typeName(_type
), _ptr
);
96 return QGenericArgument();
99 int type() { return _type
; }
107 } // namespace QtCollider