Eneboo - Documentación para desarrolladores
|
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 DESIGNERINTERFACE_H 00028 #define DESIGNERINTERFACE_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 <qptrlist.h> 00045 #include <qstring.h> 00046 #include <qmap.h> 00047 #include <qstringlist.h> 00048 #include <qwidgetlist.h> 00049 #include <qobjectlist.h> 00050 00051 struct DesignerProject; 00052 struct DesignerDatabase; 00053 struct DesignerFormWindow; 00054 struct DesignerDock; 00055 struct DesignerOutputDock; 00056 struct DesignerOutput; 00057 struct DesignerOutputError; 00058 struct DesignerPixmapCollection; 00059 struct DesignerSourceFile; 00060 00061 class QDockWindow; 00062 class QWidget; 00063 class QObject; 00064 class QAction; 00065 class QIconSet; 00066 class QSqlDatabase; 00067 00068 // {0e661da-f45c-4830-af47-03ec53eb1633} 00069 #ifndef IID_Designer 00070 #define IID_Designer QUuid( 0xa0e661da, 0xf45c, 0x4830, 0xaf, 0x47, 0x3, 0xec, 0x53, 0xeb, 0x16, 0x33 ) 00071 #endif 00072 00077 struct DesignerInterface : public QUnknownInterface 00078 { 00079 virtual DesignerProject *currentProject() const = 0; 00080 virtual DesignerFormWindow *currentForm() const = 0; 00081 virtual DesignerSourceFile *currentSourceFile() const = 0; 00082 virtual QPtrList<DesignerProject> projectList() const = 0; 00083 virtual void showStatusMessage( const QString &, int ms = 0 ) const = 0; 00084 virtual DesignerDock *createDock() const = 0; 00085 virtual DesignerOutputDock *outputDock() const = 0; 00086 virtual void setModified( bool b, QWidget *window ) = 0; 00087 virtual void updateFunctionList() = 0; 00088 00089 virtual void onProjectChange( QObject *receiver, const char *slot ) = 0; 00090 virtual void onFormChange( QObject *receiver, const char *slot ) = 0; 00091 00092 virtual bool singleProjectMode() const = 0; 00093 virtual void showError( QWidget *widget, int line, const QString &message ) = 0; 00094 virtual void runFinished() = 0; 00095 virtual void showStackFrame( QWidget *w, int line ) = 0; 00096 virtual void showDebugStep( QWidget *w, int line ) = 0; 00097 virtual void runProjectPrecondition() = 0; 00098 virtual void runProjectPostcondition( QObjectList *l ) = 0; 00099 00100 }; 00101 00102 struct DesignerProject 00103 { 00104 virtual QPtrList<DesignerFormWindow> formList() const = 0; 00105 virtual QStringList formNames() const = 0; 00106 virtual QString formFileName( const QString &form ) const = 0; 00107 virtual void addForm( DesignerFormWindow * ) = 0; 00108 virtual void removeForm( DesignerFormWindow * ) = 0; 00109 virtual QString fileName() const = 0; 00110 virtual void setFileName( const QString & ) = 0; 00111 virtual QString projectName() const = 0; 00112 virtual void setProjectName( const QString & ) = 0; 00113 virtual QString databaseFile() const = 0; 00114 virtual void setDatabaseFile( const QString & ) = 0; 00115 virtual void setupDatabases() const = 0; 00116 virtual QPtrList<DesignerDatabase> databaseConnections() const = 0; 00117 virtual void addDatabase( DesignerDatabase * ) = 0; 00118 virtual void removeDatabase( DesignerDatabase * ) = 0; 00119 virtual void save() const = 0; 00120 virtual void setLanguage( const QString & ) = 0; 00121 virtual QString language() const = 0; 00122 virtual void setCustomSetting( const QString &key, const QString &value ) = 0; 00123 virtual QString customSetting( const QString &key ) const = 0; 00124 virtual DesignerPixmapCollection *pixmapCollection() const = 0; 00125 virtual void breakPoints( QMap<QString, QValueList<uint> > &bps ) const = 0; 00126 virtual QString breakPointCondition( QObject *o, int line ) const = 0; 00127 virtual void setBreakPointCondition( QObject *o, int line, const QString &condition ) = 0; 00128 virtual void clearAllBreakpoints() const = 0; 00129 virtual void setIncludePath( const QString &platform, const QString &path ) = 0; 00130 virtual void setLibs( const QString &platform, const QString &path ) = 0; 00131 virtual void setDefines( const QString &platform, const QString &path ) = 0; 00132 virtual void setConfig( const QString &platform, const QString &config ) = 0; 00133 virtual void setTemplate( const QString &t ) = 0; 00134 virtual QString config( const QString &platform ) const = 0; 00135 virtual QString libs( const QString &platform ) const = 0; 00136 virtual QString defines( const QString &platform ) const = 0; 00137 virtual QString includePath( const QString &platform ) const = 0; 00138 virtual QString templte() const = 0; 00139 virtual bool isGenericObject( QObject *o ) const = 0; 00140 00141 }; 00142 00143 struct DesignerDatabase 00144 { 00145 virtual QString name() const = 0; 00146 virtual void setName( const QString & ) = 0; 00147 virtual QString driver() const = 0; 00148 virtual void setDriver( const QString & ) = 0; 00149 virtual QString database() const = 0; 00150 virtual void setDatabase( const QString & ) = 0; 00151 virtual QString userName() const = 0; 00152 virtual void setUserName( const QString & ) = 0; 00153 virtual QString password() const = 0; 00154 virtual void setPassword( const QString & ) = 0; 00155 virtual QString hostName() const = 0; 00156 virtual void setHostName( const QString & ) = 0; 00157 virtual QStringList tables() const = 0; 00158 virtual void setTables( const QStringList & ) = 0; 00159 virtual QMap<QString, QStringList> fields() const = 0; 00160 virtual void setFields( const QMap<QString, QStringList> & ) = 0; 00161 virtual void open( bool suppressDialog = FALSE ) const = 0; 00162 virtual void close() const = 0; 00163 virtual QSqlDatabase* connection() = 0; 00164 00165 }; 00166 00167 struct DesignerPixmapCollection 00168 { 00169 virtual void addPixmap( const QPixmap &p, const QString &name, bool force ) = 0; 00170 virtual QPixmap pixmap( const QString &name ) const = 0; 00171 }; 00172 00173 struct DesignerFormWindow 00174 { 00175 virtual QString name() const = 0; 00176 virtual void setName( const QString &n ) = 0; 00177 virtual QString fileName() const = 0; 00178 virtual void setFileName( const QString & ) = 0; 00179 virtual void save() const = 0; 00180 virtual bool isModified() const = 0; 00181 virtual void insertWidget( QWidget * ) = 0; 00182 virtual void removeWidget( QWidget * ) = 0; 00183 virtual QWidget *create( const char *className, QWidget *parent, const char *name ) = 0; 00184 virtual QWidgetList widgets() const = 0; 00185 virtual void undo() = 0; 00186 virtual void redo() = 0; 00187 virtual void cut() = 0; 00188 virtual void copy() = 0; 00189 virtual void paste() = 0; 00190 virtual void adjustSize() = 0; 00191 virtual void editConnections() = 0; 00192 virtual void checkAccels() = 0; 00193 virtual void layoutH() = 0; 00194 virtual void layoutV() = 0; 00195 virtual void layoutHSplit() = 0; 00196 virtual void layoutVSplit() = 0; 00197 virtual void layoutG() = 0; 00198 virtual void layoutHContainer( QWidget* w ) = 0; 00199 virtual void layoutVContainer( QWidget* w ) = 0; 00200 virtual void layoutGContainer( QWidget* w ) = 0; 00201 virtual void breakLayout() = 0; 00202 virtual void selectWidget( QWidget * w ) = 0; 00203 virtual void selectAll() = 0; 00204 virtual void clearSelection() = 0; 00205 virtual bool isWidgetSelected( QWidget * ) const = 0; 00206 virtual QWidgetList selectedWidgets() const = 0; 00207 virtual QWidget *currentWidget() const = 0; 00208 virtual QWidget *form() const = 0; 00209 virtual void setCurrentWidget( QWidget * ) = 0; 00210 virtual QPtrList<QAction> actionList() const = 0; 00211 virtual QAction *createAction( const QString& text, const QIconSet& icon, const QString& menuText, int accel, 00212 QObject* parent, const char* name = 0, bool toggle = FALSE ) = 0; 00213 virtual void addAction( QAction * ) = 0; 00214 virtual void removeAction( QAction * ) = 0; 00215 virtual void preview() const = 0; 00216 virtual void addFunction( const QCString &slot, const QString &specifier, const QString &access, 00217 const QString &type, const QString &language, const QString &returnType ) = 0; 00218 virtual void addConnection( QObject *sender, const char *signal, QObject *receiver, const char *slot ) = 0; 00219 virtual void setProperty( QObject *o, const char *property, const QVariant &value ) = 0; 00220 virtual QVariant property( QObject *o, const char *property ) const = 0; 00221 virtual void setPropertyChanged( QObject *o, const char *property, bool changed ) = 0; 00222 virtual bool isPropertyChanged( QObject *o, const char *property ) const = 0; 00223 virtual void setColumnFields( QObject *o, const QMap<QString, QString> & ) = 0; 00224 virtual QStringList implementationIncludes() const = 0; 00225 virtual QStringList declarationIncludes() const = 0; 00226 virtual void setImplementationIncludes( const QStringList &lst ) = 0; 00227 virtual void setDeclarationIncludes( const QStringList &lst ) = 0; 00228 virtual QStringList forwardDeclarations() const = 0; 00229 virtual void setForwardDeclarations( const QStringList &lst ) = 0; 00230 virtual QStringList signalList() const = 0; 00231 virtual void setSignalList( const QStringList &lst ) = 0; 00232 virtual void addMenu( const QString &text, const QString &name ) = 0; 00233 virtual void addMenuAction( const QString &menu, QAction *a ) = 0; 00234 virtual void addMenuSeparator( const QString &menu ) = 0; 00235 virtual void addToolBar( const QString &text, const QString &name ) = 0; 00236 virtual void addToolBarAction( const QString &tb, QAction *a ) = 0; 00237 virtual void addToolBarSeparator( const QString &tb ) = 0; 00238 00239 virtual void onModificationChange( QObject *receiver, const char *slot ) = 0; 00240 }; 00241 00242 struct DesignerSourceFile 00243 { 00244 virtual QString fileName() const = 0; 00245 }; 00246 00247 struct DesignerDock 00248 { 00249 virtual QDockWindow *dockWindow() const = 0; 00250 }; 00251 00252 struct DesignerOutputDock 00253 { 00254 virtual QWidget *addView( const QString &pageName ) = 0; 00255 virtual void appendDebug( const QString & ) = 0; 00256 virtual void clearDebug() = 0; 00257 virtual void appendError( const QString &, int ) = 0; 00258 virtual void clearError() = 0; 00259 }; 00260 00261 #endif