Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 FLScriptEditor.h 00003 ------------------- 00004 begin : mie mar 3 2004 00005 copyright : (C) 2004-2005 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef FLSCRIPTEDITOR_H 00020 #define FLSCRIPTEDITOR_H 00021 00022 #include <qdialog.h> 00023 #include <qseditor.h> 00024 #include <qtextedit.h> 00025 #include <qradiobutton.h> 00026 #include <qcheckbox.h> 00027 #include <qcombobox.h> 00028 00029 #include "FLWidgetScriptEditor.h" 00030 00031 #ifdef QSDEBUGGER 00032 class QSReplaceText; 00033 class QSPreferencesContainer; 00034 class PreferencesBase; 00035 #endif 00036 00042 class FL_EXPORT FLScriptEditor : public FLWidgetScriptEditor 00043 { 00044 00045 Q_OBJECT 00046 00047 public: 00048 00057 FLScriptEditor(const QString &nFS, QWidget *parent = 0, const char *name = 0); 00058 00062 ~FLScriptEditor(); 00063 00067 void setCode(const QString &c); 00068 00072 QString code() const; 00073 00074 protected slots: 00075 00081 bool find(const QString &expr); 00082 00086 bool reFind(); 00087 00093 void gotoLine(const QString &line); 00094 00098 void showReplace(); 00099 00103 void editReplace(); 00104 00108 void editReplaceAll(); 00109 00113 void editPreferences(); 00114 00118 void savePreferences(); 00119 00120 protected: 00121 00125 void keyPressEvent(QKeyEvent *e); 00126 00127 private: 00128 00135 void editReplace(bool all); 00136 00140 QSEditor *ed; 00141 00145 QString lastSearch; 00146 00147 #ifdef QSDEBUGGER 00148 00151 QSReplaceText *replaceText; 00152 00156 PreferencesBase *qsaEditorSyntax; 00157 00161 QSPreferencesContainer *preferencesContainer; 00162 #endif 00163 }; 00164 00165 #endif