• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

kjsembed

qobject_binding.h File Reference

#include <QtCore/QObjectCleanupHandler>
#include <QtCore/QDebug>
#include <QtCore/QBool>
#include <kjs/function.h>
#include <kdemacros.h>
#include "binding_support.h"
#include "object_binding.h"

Go to the source code of this file.

Classes

class  KJSEmbed::QObjectBinding
class  KJSEmbed::SlotBinding

Namespaces

namespace  KJSEmbed

Defines

#define END_QOBJECT_METHOD
#define START_QOBJECT_METHOD(METHODNAME, TYPE)

Functions

KJSEMBED_EXPORT KJS::JSObject * KJSEmbed::createQObject (KJS::ExecState *exec, QObject *value, KJSEmbed::ObjectBinding::Ownership owner=KJSEmbed::ObjectBinding::JSOwned)

Define Documentation

#define END_QOBJECT_METHOD
Value:
} \
            else \
                KJS::throwError(exec, KJS::ReferenceError, QString("QO: The internal object died %1:%2.").arg(__FILE__).arg(__LINE__));\
        } \
        else \
           KJS::throwError(exec, KJS::ReferenceError, QString("QObject died."));\
        return result; \
}

End a variant method started by START_QOBJECT_METHOD.

Definition at line 60 of file qobject_binding.h.

#define START_QOBJECT_METHOD ( METHODNAME,
TYPE   ) 
Value:
KJS::JSValue *METHODNAME( KJS::ExecState *exec, KJS::JSObject *self, const KJS::List &args ) \
{ \
        Q_UNUSED( args ); \
        KJS::JSValue *result = KJS::jsNull(); \
        KJSEmbed::QObjectBinding *imp = KJSEmbed::extractBindingImp<KJSEmbed::QObjectBinding>(exec, self ); \
        if( imp ) \
        { \
            TYPE *object = imp->qobject<TYPE>(); \
            if( object ) \
            {

A simple pointer syle method.

This will extract the pointer, cast it to the native type and place it in "value". Any data that should be returned from this method should be placed into "result";

Definition at line 45 of file qobject_binding.h.

kjsembed

Skip menu "kjsembed"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal