1 | /**********************************************************************
|
---|
2 | ** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
|
---|
3 | **
|
---|
4 | ** This file is part of Qt Designer.
|
---|
5 | **
|
---|
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.
|
---|
10 | **
|
---|
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.
|
---|
14 | **
|
---|
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.
|
---|
17 | **
|
---|
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.
|
---|
21 | **
|
---|
22 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
23 | ** not clear to you.
|
---|
24 | **
|
---|
25 | **********************************************************************/
|
---|
26 |
|
---|
27 | #ifndef EDITORINTERFACE_H
|
---|
28 | #define EDITORINTERFACE_H
|
---|
29 |
|
---|
30 | //
|
---|
31 | // W A R N I N G -- PRIVATE INTERFACES
|
---|
32 | // --------------------------------------
|
---|
33 | //
|
---|
34 | // This file and the interfaces declared in the file are not
|
---|
35 | // public. It exists for internal purpose. This header file and
|
---|
36 | // interfaces may change from version to version (even binary
|
---|
37 | // incompatible) without notice, or even be removed.
|
---|
38 | //
|
---|
39 | // We mean it.
|
---|
40 | //
|
---|
41 | //
|
---|
42 |
|
---|
43 | #include <private/qcom_p.h>
|
---|
44 | #include <qmap.h>
|
---|
45 | #include <qvaluelist.h>
|
---|
46 |
|
---|
47 | class QWidget;
|
---|
48 | class QObjectList;
|
---|
49 | class QObject;
|
---|
50 |
|
---|
51 | // {8668161a-6037-4220-86b6-ccaa20127df8}
|
---|
52 | #ifndef IID_Editor
|
---|
53 | #define IID_Editor QUuid( 0x8668161a, 0x6037, 0x4220, 0x86, 0xb6, 0xcc, 0xaa, 0x20, 0x12, 0x7d, 0xf8 )
|
---|
54 | #endif
|
---|
55 |
|
---|
56 | struct EditorInterface : public QUnknownInterface
|
---|
57 | {
|
---|
58 | enum Mode
|
---|
59 | {
|
---|
60 | Editing,
|
---|
61 | Debugging
|
---|
62 | };
|
---|
63 |
|
---|
64 | virtual QWidget *editor( bool readOnly,
|
---|
65 | QWidget *parent,
|
---|
66 | QUnknownInterface *designerIface ) = 0;
|
---|
67 |
|
---|
68 | virtual void setText( const QString &txt ) = 0;
|
---|
69 | virtual QString text() const = 0;
|
---|
70 | virtual bool isUndoAvailable() const = 0;
|
---|
71 | virtual bool isRedoAvailable() const = 0;
|
---|
72 | virtual void undo() = 0;
|
---|
73 | virtual void redo() = 0;
|
---|
74 | virtual void cut() = 0;
|
---|
75 | virtual void copy() = 0;
|
---|
76 | virtual void paste() = 0;
|
---|
77 | virtual void selectAll() = 0;
|
---|
78 | virtual bool find( const QString &expr, bool cs, bool wo, bool forward, bool startAtCursor ) = 0;
|
---|
79 | virtual bool replace( const QString &find, const QString &replace, bool cs, bool wo, bool forward, bool startAtCursor, bool replaceAll ) = 0;
|
---|
80 | virtual void gotoLine( int line ) = 0;
|
---|
81 | virtual void indent() = 0;
|
---|
82 | virtual void scrollTo( const QString &txt, const QString &first ) = 0;
|
---|
83 | virtual void splitView() = 0;
|
---|
84 | virtual void setContext( QObject *this_ ) = 0;
|
---|
85 | virtual void setError( int line ) = 0;
|
---|
86 | virtual void setStep( int line ) = 0;
|
---|
87 | virtual void setStackFrame( int line ) = 0;
|
---|
88 | virtual void clearStep() = 0;
|
---|
89 | virtual void clearStackFrame() = 0;
|
---|
90 | virtual void readSettings() = 0;
|
---|
91 | virtual void setModified( bool m ) = 0;
|
---|
92 | virtual bool isModified() const = 0;
|
---|
93 | virtual int numLines() const = 0;
|
---|
94 | virtual void breakPoints( QValueList<uint> &l ) const = 0;
|
---|
95 | virtual void setBreakPoints( const QValueList<uint> &l ) = 0;
|
---|
96 | virtual void setMode( Mode m ) = 0;
|
---|
97 |
|
---|
98 | virtual void onBreakPointChange( QObject *receiver, const char *slot ) = 0;
|
---|
99 |
|
---|
100 | };
|
---|
101 |
|
---|
102 | #endif
|
---|