qtobject.h
1/***************************************************************************
2 * qtobject.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_API_TQTOBJECT_H
21#define KROSS_API_TQTOBJECT_H
22
23#include "class.h"
24
25#include <tqstring.h>
26#include <tqobject.h>
27
28// Forward-declaration of the builtin TQt TQUObject struct.
29struct TQUObject;
30
31namespace Kross { namespace Api {
32
33 // Forward declarations.
34 class Object;
35 class Variant;
36 class ScriptContainer;
37 class ScriptContrainer;
38
45 class QtObject : public Kross::Api::Class<QtObject>
46 {
47 public:
48
52 typedef TDESharedPtr<QtObject> Ptr;
53
63 QtObject(TQObject* object, const TQString& name = TQString());
64
68 virtual ~QtObject();
69
71 virtual const TQString getClassName() const;
72
78 TQObject* getObject();
79
90 static TQUObject* toTQUObject(const TQString& signature, List::Ptr arguments);
91
92 private:
94 TQObject* m_object;
95
96 // TQProperty's
97
106
107 // Slots
108
115
116 // Signals
117
124
129
130 };
131
132}}
133
134#endif
135
From Event inherited template-class to represent class-structures.
Definition class.h:45
TDESharedPtr< List > Ptr
Shared pointer to implement reference-counting.
Definition list.h:44
TDESharedPtr< Object > Ptr
Shared pointer to implement reference-counting.
Definition object.h:57
Class to wrap TQObject or inherited instances.
Definition qtobject.h:46
virtual const TQString getClassName() const
Definition qtobject.cpp:81
TQObject * getObject()
Return the TQObject instance this class wraps.
Definition qtobject.cpp:86
virtual ~QtObject()
Destructor.
Definition qtobject.cpp:77
TDESharedPtr< QtObject > Ptr
Shared pointer to implement reference-counting.
Definition qtobject.h:52
static TQUObject * toTQUObject(const TQString &signature, List::Ptr arguments)
Build a TQt TQUObject struct out of the TQt signal or slot signature and the passed List arguments.
Definition qtobject.cpp:91
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:31