kexi

kexieditor.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Lucijan Busch <lucijan@gmx.at>
00003    Copyright (C) 2004-2005 Jaroslaw Staniek <js@iidea.pl>
00004    Copyright (C) 2005 Cedric Pasteur <cedric.pasteur@free.fr>
00005 
00006    This program is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this program; see the file COPYING.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KEXIEDITOR_H
00023 #define KEXIEDITOR_H
00024 
00025 #include <qwidget.h>
00026 #include "kexiviewbase.h"
00027 
00028 class KTextEdit;
00029 class KexiEditorPrivate;
00030 
00031 namespace KTextEditor
00032 {
00033     class Document;
00034     class View;
00035 }
00036 
00038 
00039 class KEXIEXTWIDGETS_EXPORT KexiEditor : public KexiViewBase
00040 {
00041     Q_OBJECT
00042 
00043     public:
00044 
00055         KexiEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
00056 
00060         virtual ~KexiEditor();
00061 
00066         static bool isAdvancedEditor();
00067 
00071         QString text();
00072 
00081         void setHighlightMode(const QString& highlightmodename);
00082 
00087         void jump(int character);
00088         
00092         void setCursorPosition(int line, int col);
00093         
00098         void clearUndoRedo();
00099 
00100     public slots:
00102         void setText(const QString &text);
00104         void slotConfigureEditor();
00105 
00106     protected:
00108         virtual void updateActions(bool activated);
00109 
00110     signals:
00112         void textChanged();
00113 
00114     private:
00116         KexiEditorPrivate *d;
00117 };
00118 
00119 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys