You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
278 lines
9.2 KiB
278 lines
9.2 KiB
15 years ago
|
/**********************************************************************
|
||
|
** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
|
||
|
**
|
||
14 years ago
|
** This file is part of TQt Designer.
|
||
15 years ago
|
**
|
||
|
** This file may be distributed and/or modified under the terms of the
|
||
|
** GNU General Public License version 2 as published by the Free Software
|
||
|
** Foundation and appearing in the file LICENSE.GPL included in the
|
||
|
** packaging of this file.
|
||
|
**
|
||
14 years ago
|
** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
|
||
|
** licenses may use this file in accordance with the TQt Commercial License
|
||
15 years ago
|
** Agreement provided with the Software.
|
||
|
**
|
||
|
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||
|
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||
|
**
|
||
|
** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
||
|
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
||
14 years ago
|
** information about TQt Commercial License Agreements.
|
||
15 years ago
|
**
|
||
|
** Contact info@trolltech.com if any conditions of this licensing are
|
||
|
** not clear to you.
|
||
|
**
|
||
|
**********************************************************************/
|
||
|
|
||
|
#ifndef DESIGNERAPPIFACE_H
|
||
|
#define DESIGNERAPPIFACE_H
|
||
|
|
||
|
#include "../interfaces/designerinterface.h"
|
||
|
#include "project.h"
|
||
|
|
||
|
class FormWindow;
|
||
|
class MainWindow;
|
||
|
class Project;
|
||
|
class OutputWindow;
|
||
|
class SourceFile;
|
||
|
|
||
|
class DesignerInterfaceImpl : public DesignerInterface
|
||
|
{
|
||
|
public:
|
||
|
DesignerInterfaceImpl( MainWindow *mw );
|
||
|
|
||
|
DesignerProject *currentProject() const;
|
||
|
DesignerFormWindow *currentForm() const;
|
||
|
DesignerSourceFile *currentSourceFile() const;
|
||
15 years ago
|
TQPtrList<DesignerProject> projectList() const;
|
||
|
void showStatusMessage( const TQString &, int ms = 0 ) const;
|
||
15 years ago
|
DesignerDock *createDock() const;
|
||
|
DesignerOutputDock *outputDock() const;
|
||
15 years ago
|
void setModified( bool b, TQWidget *window );
|
||
15 years ago
|
void updateFunctionList();
|
||
|
|
||
15 years ago
|
void onProjectChange( TQObject *receiver, const char *slot );
|
||
|
void onFormChange( TQObject *receiver, const char *slot );
|
||
15 years ago
|
|
||
|
bool singleProjectMode() const;
|
||
15 years ago
|
void showError( TQWidget *widget, int line, const TQString &message );
|
||
15 years ago
|
void runFinished();
|
||
15 years ago
|
void showStackFrame( TQWidget *w, int line );
|
||
|
void showDebugStep( TQWidget *w, int line );
|
||
15 years ago
|
void runProjectPrecondition();
|
||
15 years ago
|
void runProjectPostcondition( TQObjectList *l );
|
||
15 years ago
|
|
||
|
|
||
14 years ago
|
TQRESULT queryInterface( const TQUuid &uuid, TQUnknownInterface** iface );
|
||
|
TQ_REFCOUNT
|
||
15 years ago
|
|
||
|
private:
|
||
|
MainWindow *mainWindow;
|
||
|
|
||
|
};
|
||
|
|
||
|
class DesignerProjectImpl: public DesignerProject
|
||
|
{
|
||
|
public:
|
||
|
DesignerProjectImpl( Project *pr );
|
||
|
|
||
15 years ago
|
TQPtrList<DesignerFormWindow> formList() const;
|
||
|
TQStringList formNames() const;
|
||
|
TQString formFileName( const TQString &form ) const;
|
||
15 years ago
|
void addForm( DesignerFormWindow * );
|
||
|
void removeForm( DesignerFormWindow * );
|
||
15 years ago
|
TQString fileName() const;
|
||
|
void setFileName( const TQString & );
|
||
|
TQString projectName() const;
|
||
|
void setProjectName( const TQString & );
|
||
|
TQString databaseFile() const;
|
||
|
void setDatabaseFile( const TQString & );
|
||
15 years ago
|
void setupDatabases() const;
|
||
15 years ago
|
TQPtrList<DesignerDatabase> databaseConnections() const;
|
||
15 years ago
|
void addDatabase( DesignerDatabase * );
|
||
|
void removeDatabase( DesignerDatabase * );
|
||
|
void save() const;
|
||
15 years ago
|
void setLanguage( const TQString & );
|
||
|
TQString language() const;
|
||
|
void setCustomSetting( const TQString &key, const TQString &value );
|
||
|
TQString customSetting( const TQString &key ) const;
|
||
15 years ago
|
DesignerPixmapCollection *pixmapCollection() const;
|
||
15 years ago
|
void breakPoints( TQMap<TQString, TQValueList<uint> > &bps ) const;
|
||
|
TQString breakPointCondition( TQObject *o, int line ) const;
|
||
|
void setBreakPointCondition( TQObject *o, int line, const TQString &condition );
|
||
15 years ago
|
void clearAllBreakpoints() const;
|
||
15 years ago
|
void setIncludePath( const TQString &platform, const TQString &path );
|
||
|
void setLibs( const TQString &platform, const TQString &path );
|
||
|
void setDefines( const TQString &platform, const TQString &path );
|
||
|
void setConfig( const TQString &platform, const TQString &config );
|
||
|
void setTemplate( const TQString &t );
|
||
|
TQString config( const TQString &platform ) const;
|
||
|
TQString libs( const TQString &platform ) const;
|
||
|
TQString defines( const TQString &platform ) const;
|
||
|
TQString includePath( const TQString &platform ) const;
|
||
|
TQString templte() const;
|
||
|
bool isGenericObject( TQObject *o ) const;
|
||
15 years ago
|
|
||
|
private:
|
||
|
Project *project;
|
||
|
|
||
|
};
|
||
|
|
||
14 years ago
|
#ifndef TQT_NO_SQL
|
||
15 years ago
|
class TQSqlDatabase;
|
||
15 years ago
|
|
||
|
class DesignerDatabaseImpl: public DesignerDatabase
|
||
|
{
|
||
|
public:
|
||
|
DesignerDatabaseImpl( DatabaseConnection *d );
|
||
|
|
||
15 years ago
|
TQString name() const;
|
||
|
void setName( const TQString & );
|
||
|
TQString driver() const;
|
||
|
void setDriver( const TQString & );
|
||
|
TQString database() const;
|
||
|
void setDatabase( const TQString & );
|
||
|
TQString userName() const;
|
||
|
void setUserName( const TQString & );
|
||
|
TQString password() const;
|
||
|
void setPassword( const TQString & );
|
||
|
TQString hostName() const;
|
||
|
void setHostName( const TQString & );
|
||
|
TQStringList tables() const;
|
||
|
void setTables( const TQStringList & );
|
||
|
TQMap<TQString, TQStringList> fields() const;
|
||
|
void setFields( const TQMap<TQString, TQStringList> & );
|
||
15 years ago
|
void open( bool suppressDialog = TRUE ) const;
|
||
|
void close() const;
|
||
15 years ago
|
TQSqlDatabase* connection();
|
||
15 years ago
|
private:
|
||
|
DatabaseConnection *db;
|
||
|
|
||
|
};
|
||
|
#endif
|
||
|
|
||
|
class DesignerPixmapCollectionImpl : public DesignerPixmapCollection
|
||
|
{
|
||
|
public:
|
||
|
DesignerPixmapCollectionImpl( PixmapCollection *coll );
|
||
15 years ago
|
void addPixmap( const TQPixmap &p, const TQString &name, bool force );
|
||
|
TQPixmap pixmap( const TQString &name ) const;
|
||
15 years ago
|
|
||
|
private:
|
||
|
PixmapCollection *pixCollection;
|
||
|
|
||
|
};
|
||
|
|
||
|
class DesignerFormWindowImpl: public DesignerFormWindow
|
||
|
{
|
||
|
public:
|
||
|
DesignerFormWindowImpl( FormWindow *fw );
|
||
|
|
||
15 years ago
|
TQString name() const;
|
||
|
void setName( const TQString &n );
|
||
|
TQString fileName() const;
|
||
|
void setFileName( const TQString & );
|
||
15 years ago
|
void save() const;
|
||
|
bool isModified() const;
|
||
15 years ago
|
void insertWidget( TQWidget * );
|
||
14 years ago
|
TQWidget *create( const char *className, TQWidget *parent, const char *name );
|
||
15 years ago
|
void removeWidget( TQWidget * );
|
||
|
TQWidgetList widgets() const;
|
||
15 years ago
|
void undo();
|
||
|
void redo();
|
||
|
void cut();
|
||
|
void copy();
|
||
|
void paste();
|
||
|
void adjustSize();
|
||
|
void editConnections();
|
||
|
void checkAccels();
|
||
14 years ago
|
void layoutH();
|
||
|
void layoutV();
|
||
|
void layoutHSplit();
|
||
|
void layoutVSplit();
|
||
|
void layoutG();
|
||
|
void layoutHContainer( TQWidget* w );
|
||
|
void layoutVContainer( TQWidget* w );
|
||
|
void layoutGContainer( TQWidget* w );
|
||
15 years ago
|
void breakLayout();
|
||
15 years ago
|
void selectWidget( TQWidget * );
|
||
15 years ago
|
void selectAll();
|
||
|
void clearSelection();
|
||
15 years ago
|
bool isWidgetSelected( TQWidget * ) const;
|
||
|
TQWidgetList selectedWidgets() const;
|
||
|
TQWidget *currentWidget() const;
|
||
|
TQWidget *form() const;
|
||
|
void setCurrentWidget( TQWidget * );
|
||
|
TQPtrList<TQAction> actionList() const;
|
||
|
TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
|
||
14 years ago
|
TQObject* parent, const char* name = 0, bool toggle = FALSE );
|
||
15 years ago
|
void addAction( TQAction * );
|
||
|
void removeAction( TQAction * );
|
||
15 years ago
|
void preview() const;
|
||
15 years ago
|
void addFunction( const TQCString &function, const TQString& specifier, const TQString &access,
|
||
|
const TQString &type, const TQString &language, const TQString &returnType );
|
||
|
void addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot );
|
||
|
void setProperty( TQObject *o, const char *property, const TQVariant &value );
|
||
|
TQVariant property( TQObject *o, const char *property ) const;
|
||
|
void setPropertyChanged( TQObject *o, const char *property, bool changed );
|
||
|
bool isPropertyChanged( TQObject *o, const char *property ) const;
|
||
|
void setColumnFields( TQObject *o, const TQMap<TQString, TQString> & );
|
||
|
TQStringList implementationIncludes() const;
|
||
|
TQStringList declarationIncludes() const;
|
||
|
void setImplementationIncludes( const TQStringList &lst );
|
||
|
void setDeclarationIncludes( const TQStringList &lst );
|
||
|
TQStringList forwardDeclarations() const;
|
||
|
void setForwardDeclarations( const TQStringList &lst );
|
||
|
TQStringList signalList() const;
|
||
|
void setSignalList( const TQStringList &lst );
|
||
|
void addMenu( const TQString &text, const TQString &name );
|
||
|
void addMenuAction( const TQString &menu, TQAction *a );
|
||
|
void addMenuSeparator( const TQString &menu );
|
||
|
void addToolBar( const TQString &text, const TQString &name );
|
||
|
void addToolBarAction( const TQString &tb, TQAction *a );
|
||
|
void addToolBarSeparator( const TQString &tb );
|
||
|
|
||
|
void onModificationChange( TQObject *receiver, const char *slot );
|
||
15 years ago
|
|
||
|
private:
|
||
|
FormWindow *formWindow;
|
||
|
|
||
|
};
|
||
|
|
||
|
class DesignerDockImpl: public DesignerDock
|
||
|
{
|
||
|
public:
|
||
|
DesignerDockImpl();
|
||
|
|
||
15 years ago
|
TQDockWindow *dockWindow() const;
|
||
15 years ago
|
};
|
||
|
|
||
|
class DesignerOutputDockImpl: public DesignerOutputDock
|
||
|
{
|
||
|
public:
|
||
|
DesignerOutputDockImpl( OutputWindow *ow );
|
||
|
|
||
15 years ago
|
TQWidget *addView( const TQString &pageName );
|
||
|
void appendDebug( const TQString & );
|
||
15 years ago
|
void clearDebug();
|
||
15 years ago
|
void appendError( const TQString &, int );
|
||
15 years ago
|
void clearError();
|
||
|
|
||
|
private:
|
||
|
OutputWindow *outWin;
|
||
|
|
||
|
};
|
||
|
|
||
|
class DesignerSourceFileImpl : public DesignerSourceFile
|
||
|
{
|
||
|
public:
|
||
|
DesignerSourceFileImpl( SourceFile *e );
|
||
15 years ago
|
TQString fileName() const;
|
||
15 years ago
|
|
||
|
private:
|
||
|
SourceFile *ed;
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif
|