1
/**********************************************************************
2
** Copyright (C) 2000 Trolltech AS. All rights reserved.
4
** This file is part of Qt Designer.
6
** This file may be distributed and/or modified under the terms of the
7
** GNU General Public License version 2 as published by the Free Software
8
** Foundation and appearing in the file LICENSE.GPL included in the
9
** packaging of this file.
11
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
12
** licenses may use this file in accordance with the Qt Commercial License
13
** Agreement provided with the Software.
15
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18
** See http://www.trolltech.com/gpl/ for GPL licensing information.
19
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
20
** information about Qt Commercial License Agreements.
22
** Contact info@trolltech.com if any conditions of this licensing are
25
**********************************************************************/
27
#ifndef SOURCEEDITOR_H
28
#define SOURCEEDITOR_H
30
#include "../interfaces/editorinterface.h"
32
#include <qguardedptr.h>
36
struct LanguageInterface;
40
class SourceEditor : public QVBox
45
SourceEditor( QWidget *parent, EditorInterface *iface, LanguageInterface *liface );
48
void setObject( QObject *fw, Project *p );
49
QObject *object() const { return obj; }
50
Project *project() const { return pro; }
51
void setFunction( const QString &func, const QString &clss = QString::null );
52
void setClass( const QString &clss );
55
void setModified( bool b );
56
bool isModified() const;
58
static QString sourceOfObject( QObject *fw, const QString &lang, EditorInterface *iface, LanguageInterface *lIface );
60
QString language() const;
61
void setLanguage( const QString &l );
66
bool editIsUndoAvailable();
67
bool editIsRedoAvailable();
73
void refresh( bool allowSave );
76
EditorInterface *editorInterface() const { return iFace; }
80
void saveBreakPoints();
82
void clearStackFrame();
83
void resetBreakPoints();
87
void checkTimeStamp();
89
SourceFile *sourceFile() const;
90
FormWindow *formWindow() const;
93
void closeEvent( QCloseEvent *e );
97
EditorInterface *iFace;
98
LanguageInterface *lIface;
99
QGuardedPtr<QObject> obj;
102
QGuardedPtr<QWidget> editor;