Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

qobjectcleanuphandler(3qt) [centos man page]

QObjectCleanupHandler(3qt)												QObjectCleanupHandler(3qt)

NAME
QObjectCleanupHandler - Watches the lifetime of multiple QObjects SYNOPSIS
#include <qobjectcleanuphandler.h> Inherits QObject. Public Members QObjectCleanupHandler () ~QObjectCleanupHandler () QObject * add ( QObject * object ) void remove ( QObject * object ) bool isEmpty () const void clear () DESCRIPTION
The QObjectCleanupHandler class watches the lifetime of multiple QObjects. A QObjectCleanupHandler is useful whenever you need to know when a number of QObjects that are owned by someone else have been deleted. This is important, for example, when referencing memory in an application that has been allocated in a shared library. Example: class FactoryComponent : public FactoryInterface, public QLibraryInterface { public: ... QObject *createObject(); bool init(); void cleanup(); bool canUnload() const; private: QObjectCleanupHandler objects; }; // allocate a new object, and add it to the cleanup handler QObject *FactoryComponent::createObject() { return objects.add( new QObject() ); } // QLibraryInterface implementation bool FactoryComponent::init() { return TRUE; } void FactoryComponent::cleanup() { } // it is only safe to unload the library when all QObject's have been destroyed bool FactoryComponent::canUnload() const { return objects.isEmpty(); } See also Object Model. MEMBER FUNCTION DOCUMENTATION
QObjectCleanupHandler::QObjectCleanupHandler () Constructs an empty QObjectCleanupHandler. QObjectCleanupHandler::~QObjectCleanupHandler () Destroys the cleanup handler. All objects in this cleanup handler will be deleted. QObject * QObjectCleanupHandler::add ( QObject * object ) Adds object to this cleanup handler and returns the pointer to the object. void QObjectCleanupHandler::clear () Deletes all objects in this cleanup handler. The cleanup handler becomes empty. bool QObjectCleanupHandler::isEmpty () const Returns TRUE if this cleanup handler is empty or if all objects in this cleanup handler have been destroyed; otherwise return FALSE. void QObjectCleanupHandler::remove ( QObject * object ) Removes the object from this cleanup handler. The object will not be destroyed. SEE ALSO
http://doc.trolltech.com/qobjectcleanuphandler.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qobjectcleanuphandler.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QObjectCleanupHandler(3qt)

Check Out this Related Man Page

QChildEvent(3qt)														  QChildEvent(3qt)

NAME
QChildEvent - Event parameters for child object events SYNOPSIS
#include <qevent.h> Inherits QEvent. Public Members QChildEvent ( Type type, QObject * child ) QObject * child () const bool inserted () const bool removed () const DESCRIPTION
The QChildEvent class contains event parameters for child object events. Child events are sent to objects when children are inserted or removed. A ChildRemoved event is sent immediately, but a ChildInserted event is posted (with QApplication::postEvent()). Note that if a child is removed immediately after it is inserted, the ChildInserted event may be suppressed, but the ChildRemoved event will always be sent. In this case there will be a ChildRemoved event without a corresponding ChildInserted event. The handler for these events is QObject::childEvent(). See also Event Classes. MEMBER FUNCTION DOCUMENTATION
QChildEvent::QChildEvent ( Type type, QObject * child ) Constructs a child event object. The child is the object that is to be removed or inserted. The type parameter must be either QEvent::ChildInserted or QEvent::ChildRemoved. QObject * QChildEvent::child () const Returns the child widget that was inserted or removed. bool QChildEvent::inserted () const Returns TRUE if the widget received a new child; otherwise returns FALSE. bool QChildEvent::removed () const Returns TRUE if the object lost a child; otherwise returns FALSE. SEE ALSO
http://doc.trolltech.com/qchildevent.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qchildevent.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QChildEvent(3qt)
Man Page