Eneboo - Documentación para desarrolladores
src/qt/tools/designer/interfaces/languageinterface.h
Ir a la documentación de este archivo.
00001  /**********************************************************************
00002 ** Copyright (C) 2000-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 LANGUAGEINTERFACE_H
00028 #define LANGUAGEINTERFACE_H
00029 
00030 //
00031 //  W A R N I N G  --  PRIVATE INTERFACES
00032 //  --------------------------------------
00033 //
00034 // This file and the interfaces declared in the file are not
00035 // public. It exists for internal purpose. This header file and
00036 // interfaces may change from version to version (even binary
00037 // incompatible) without notice, or even be removed.
00038 //
00039 // We mean it.
00040 //
00041 //
00042 
00043 #include <private/qcom_p.h>
00044 #include <qvaluelist.h>
00045 #include <qstringlist.h>
00046 #include <qmap.h>
00047 #include <qstrlist.h>
00048 
00049 // {f208499a-6f69-4883-9219-6e936e55a330}
00050 #ifndef IID_Language
00051 #define IID_Language QUuid( 0xf208499a, 0x6f69, 0x4883, 0x92, 0x19, 0x6e, 0x93, 0x6e, 0x55, 0xa3, 0x30 )
00052 #endif
00053 
00054 struct LanguageInterface : public QUnknownInterface
00055 {
00056     struct Function
00057     {
00058         QString name;
00059         QString body;
00060         QString returnType;
00061         QString comments;
00062         int start;
00063         int end;
00064         QString access;
00065         bool operator==( const Function &f ) const {
00066             return ( name == f.name &&
00067                      body == f.body &&
00068                      returnType == f.returnType &&
00069                      comments == f.comments );
00070         }
00071     };
00072 
00073     struct Connection
00074     {
00075         QString sender;
00076         QString signal;
00077         QString slot;
00078         bool operator==( const Connection &c ) const {
00079             return ( sender == c.sender &&
00080                      signal == c.signal &&
00081                      slot == c.slot );
00082         }
00083     };
00084 
00085     enum Support
00086     {
00087         ReturnType,
00088         ConnectionsToCustomSlots,
00089         CompressProject
00090     };
00091 
00092     virtual void functions( const QString &code, QValueList<Function> *funcs ) const = 0;
00093     virtual void connections( const QString &code, QValueList<Connection> *connections ) const = 0;
00094     virtual QString createFunctionStart( const QString &className, const QString &func,
00095                                          const QString &returnType, const QString &access ) = 0;
00096     virtual QString createArguments( const QString &cpp_signature ) = 0;
00097     virtual QString createEmptyFunction() = 0;
00098     virtual QStringList definitions() const = 0;
00099     virtual QStringList definitionEntries( const QString &definition, QUnknownInterface *designerIface ) const = 0;
00100     virtual void setDefinitionEntries( const QString &definition, const QStringList &entries, QUnknownInterface *designerIface ) = 0;
00101     virtual bool supports( Support s ) const = 0;
00102     virtual QStringList fileFilterList() const = 0;
00103     virtual QStringList fileExtensionList() const = 0;
00104     virtual void preferedExtensions( QMap<QString, QString> &extensionMap ) const = 0;
00105     virtual QString projectKeyForExtension( const QString &extension ) const = 0;
00106     virtual void sourceProjectKeys( QStringList &keys ) const = 0;
00107     virtual QString cleanSignature( const QString &sig ) = 0;
00108     virtual void loadFormCode( const QString &form, const QString &filename,
00109                                QValueList<Function> &functions,
00110                                QStringList &vars,
00111                                QValueList<Connection> &connections ) = 0;
00112     virtual QString formCodeExtension() const = 0;
00113 
00114     virtual bool canConnect( const QString &signal, const QString &slot ) = 0;
00115 
00116     virtual     void compressProject( const QString &projectFile, const QString &compressedFile,
00117                                       bool withWarning ) = 0;
00118     virtual QString uncompressProject( const QString &projectFile, const QString &destDir ) = 0;
00119     virtual QString aboutText() const = 0;
00120 
00121     virtual void addConnection( const QString &sender, const QString &signal,
00122                                 const QString &receiver, const QString &slot,
00123                                 QString *code ) = 0;
00124     virtual void removeConnection( const QString &sender, const QString &signal,
00125                                    const QString &receiver, const QString &slot,
00126                                    QString *code ) = 0;
00127     virtual QStrList signalNames( QObject *obj ) const = 0;
00128 
00129 };
00130 
00131 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'