Eneboo - Documentación para desarrolladores
src/qt/tools/designer/shared/widgetdatabase.h
Ir a la documentación de este archivo.
00001 /**********************************************************************
00002 ** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
00003 **
00004 ** This file is part of Qt Designer.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00012 ** licenses may use this file in accordance with the Qt Commercial License
00013 ** Agreement provided with the Software.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00019 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00020 **   information about Qt Commercial License Agreements.
00021 **
00022 ** Contact info@trolltech.com if any conditions of this licensing are
00023 ** not clear to you.
00024 **
00025 **********************************************************************/
00026 
00027 #ifndef WIDGETDATABASE_H
00028 #define WIDGETDATABASE_H
00029 
00030 #include <qiconset.h>
00031 #include <qstring.h>
00032 #include "../interfaces/widgetinterface.h" // up here for GCC 2.7.* compatibility
00033 #include <private/qpluginmanager_p.h>
00034 
00035 
00036 extern QPluginManager<WidgetInterface> *widgetManager();
00037 
00038 struct WidgetDatabaseRecord
00039 {
00040     WidgetDatabaseRecord();
00041     ~WidgetDatabaseRecord();
00042     QString iconSet, name, group, toolTip, whatsThis, includeFile;
00043     uint isContainer : 1;
00044     uint isForm : 1;
00045     uint isCommon : 1;
00046     uint isPlugin : 1;
00047     QIconSet *icon;
00048     int nameCounter;
00049 };
00050 
00051 class WidgetDatabase : public Qt
00052 {
00053 public:
00054     WidgetDatabase();
00055     static void setupDataBase( int id );
00056     static void setupPlugins();
00057 
00058     static int count();
00059     static int startCustom();
00060 
00061     static QIconSet iconSet( int id );
00062     static QString className( int id );
00063     static QString group( int id );
00064     static QString toolTip( int id );
00065     static QString whatsThis( int id );
00066     static QString includeFile( int id );
00067     static bool isForm( int id );
00068     static bool isContainer( int id );
00069     static bool isCommon( int id );
00070 
00071     static int idFromClassName( const QString &name );
00072     static QString createWidgetName( int id );
00073 
00074     static WidgetDatabaseRecord *at( int index );
00075     static void insert( int index, WidgetDatabaseRecord *r );
00076     static void append( WidgetDatabaseRecord *r );
00077 
00078     static QString widgetGroup( const QString &g );
00079     static QString widgetGroup( int i );
00080     static int numWidgetGroups();
00081     static bool isGroupVisible( const QString &g );
00082     static bool isGroupEmpty( const QString &grp );
00083 
00084     static int addCustomWidget( WidgetDatabaseRecord *r );
00085     static bool isCustomWidget( int id );
00086     static bool isCustomPluginWidget( int id );
00087 
00088     static bool isWhatsThisLoaded();
00089     static void loadWhatsThis( const QString &docPath );
00090 
00091     static bool hasWidget( const QString &name );
00092     static void customWidgetClassNameChanged( const QString &oldName, const QString &newName );
00093 
00094 };
00095 
00096 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'