Eneboo - Documentación para desarrolladores
|
00001 /**************************************************************************** 00002 ** $Id: qsaeditor.h 1.1.5 edited 2006-02-23T15:39:57$ 00003 ** 00004 ** Copyright (C) 2001-2006 Trolltech AS. All rights reserved. 00005 ** 00006 ** This file is part of the Qt Script for Applications framework (QSA). 00007 ** 00008 ** This file may be distributed and/or modified under the terms of the 00009 ** GNU General Public License version 2 as published by the Free Software 00010 ** Foundation and appearing in the file LICENSE.GPL included in the 00011 ** packaging of this file. 00012 ** 00013 ** Licensees holding a valid Qt Script for Applications license may use 00014 ** this file in accordance with the Qt Script for Applications License 00015 ** Agreement provided with the Software. 00016 ** 00017 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00018 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00019 ** 00020 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 00021 ** information about QSA Commercial License Agreements. 00022 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00023 ** 00024 ** Contact info@trolltech.com if any conditions of this licensing are 00025 ** not clear to you. 00026 ** 00027 *****************************************************************************/ 00028 00029 #ifndef QUICKEDITOR_H 00030 #define QUICKEDITOR_H 00031 00032 #include <editor.h> 00033 00034 class QSInterpreter; 00035 00036 class CIndent; 00037 class EditorCompletion; 00038 class EditorBrowser; 00039 00040 class QSAEditorToolTip; 00041 00042 class QSAEditor : public Editor 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 QSAEditor( const QString &fn, QWidget *parent, const char *name ); 00048 ~QSAEditor(); 00049 00050 EditorCompletion *completionManager() { return completion; } 00051 EditorBrowser *browserManager() { return browser; } 00052 void configChanged(); 00053 void setDebugging( bool b ) { debugging = b; } 00054 bool isDebugging() const { return debugging; } 00055 void makeFunctionVisible( QTextParagraph *p ); 00056 void saveLineStates(); 00057 void loadLineStates(); 00058 void paste(); 00059 00060 void setInterpreter( QSInterpreter *ip ); 00061 QSInterpreter *interpreter() const { return interp; } 00062 00063 void clearError(); 00064 bool supportsBreakPoints() const { return FALSE; } // ### For now 00065 00066 public slots: 00067 void expandFunction( QTextParagraph *p ) { expandFunction( p, TRUE ); } 00068 void collapseFunction( QTextParagraph *p ) { collapseFunction( p, TRUE ); } 00069 void collapse( bool all /*else only functions*/ ); 00070 void expand( bool all /*else only functions*/ ); 00071 00072 private: 00073 QTextParagraph *expandFunction( QTextParagraph *p, bool recalc ); 00074 QTextParagraph *collapseFunction( QTextParagraph *p, bool recalc ); 00075 void doRecalc(); 00076 00077 private: 00078 QSInterpreter *interp; 00079 EditorCompletion *completion; 00080 EditorBrowser *browser; 00081 QSAEditorToolTip *tooltip; 00082 bool debugging; 00083 CIndent *indent; 00084 }; 00085 00086 #endif