Eneboo - Documentación para desarrolladores
src/qt/include/private/qgpluginmanager_p.h
Ir a la documentación de este archivo.
00001 /**********************************************************************
00002 ** $Id: qt/qgpluginmanager_p.h   3.3.8   edited Jan 11 14:46 $
00003 **
00004 ** Definition of QGPluginManager class
00005 **
00006 ** Copyright (C) 2000-2007 Trolltech ASA.  All rights reserved.
00007 **
00008 ** This file is part of the tools module of the Qt GUI Toolkit.
00009 **
00010 ** This file may be distributed under the terms of the Q Public License
00011 ** as defined by Trolltech ASA of Norway and appearing in the file
00012 ** LICENSE.QPL included in the packaging of this file.
00013 **
00014 ** This file may be distributed and/or modified under the terms of the
00015 ** GNU General Public License version 2 as published by the Free Software
00016 ** Foundation and appearing in the file LICENSE.GPL included in the
00017 ** packaging of this file.
00018 **
00019 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00020 ** licenses may use this file in accordance with the Qt Commercial License
00021 ** Agreement provided with the Software.
00022 **
00023 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00024 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00025 **
00026 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00027 **   information about Qt Commercial License Agreements.
00028 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00029 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00030 **
00031 ** Contact info@trolltech.com if any conditions of this licensing are
00032 ** not clear to you.
00033 **
00034 **********************************************************************/
00035 
00036 #ifndef QGPLUGINMANAGER_P_H
00037 #define QGPLUGINMANAGER_P_H
00038 
00039 #ifndef QT_H
00040 #include "qdict.h"
00041 #include "qlibrary.h"
00042 #include "quuid.h"
00043 #include "qstringlist.h"
00044 #include "qcom_p.h"
00045 #endif // QT_H
00046 
00047 //
00048 //  W A R N I N G
00049 //  -------------
00050 //
00051 // This file is not part of the Qt API.  It exists for the convenience
00052 // of a number of Qt sources files.  This header file may change from
00053 // version to version without notice, or even be removed.
00054 //
00055 // We mean it.
00056 //
00057 //
00058 
00059 #ifndef QT_NO_COMPONENT
00060 
00061 #if defined(Q_TEMPLATEDLL)
00062 // MOC_SKIP_BEGIN
00063 //Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QLibrary>;
00064 // MOC_SKIP_END
00065 #endif
00066 
00067 class Q_EXPORT QGPluginManager
00068 {
00069 public:
00070     QGPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE );
00071     ~QGPluginManager();
00072 
00073     void addLibraryPath( const QString& path );
00074     const QLibrary* library( const QString& feature ) const;
00075     QStringList featureList() const;
00076 
00077     bool autoUnload() const;
00078     void setAutoUnload( bool );
00079 
00080 protected:
00081     bool enabled() const;
00082     bool addLibrary( QLibrary* plugin );
00083 
00084     QRESULT queryUnknownInterface(const QString& feature, QUnknownInterface** iface) const;
00085 
00086     QUuid interfaceId;
00087     QDict<QLibrary> plugDict;       // Dict to match feature with library
00088     QDict<QLibrary> libDict;        // Dict to match library file with library
00089     QStringList libList;
00090 
00091     uint casesens : 1;
00092     uint autounload : 1;
00093 };
00094 
00095 inline void QGPluginManager::setAutoUnload( bool unload )
00096 {
00097     autounload = unload;
00098 }
00099 
00100 inline bool QGPluginManager::autoUnload() const
00101 {
00102     return autounload;
00103 }
00104 
00105 #endif
00106 
00107 #endif //QGPLUGINMANAGER_P_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'