/* Klat - A LaTeX editor for KDE Copyright (C) 2002-2004 Jori Liesenborgs (jori@lumumba.luc.ac.be) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef KLATEDITWIDGET_H #define KLATEDITWIDGET_H #include #include #include #include class QString; class QEvent; class KlatDocumentNode; class KlatToolTab; class KListView; class KListViewItem; class KlatEditWidget : public QFrame { Q_OBJECT public: KlatEditWidget(QWidget *parent); ~KlatEditWidget(); int cursorLine() { return view->cursorLine(); } int cursorColumn() { return view->cursorColumn(); } int cursorColumnReal() { return view->cursorColumnReal(); } void insertText(int row,int col,const QString &str) { doc->insertText(row,col,str); } void setCursorPositionReal(int row,int col) { view->setCursorPositionReal(row,col); } KURL url() { return doc->url(); } bool save() { return doc->save(); } bool saveAs(const KURL &url) { return doc->saveAs(url); } void undo() { doc->undo(); } void redo() { doc->redo(); } void copy() { view->copy(); } void cut() { view->cut(); } void paste() { view->paste(); } bool isModified() { return doc->isModified(); } void find() { view->find(); } void findAgain(bool f) { view->findAgain(f); } void findPrev() { view->findPrev(); } void replace() { view->replace(); } void gotoLine() { view->gotoLine(); } void setFocus() { view->setFocus(); } void spelling() { doc->spellcheck(); } static void configDialog(); void readConfig() { doc->readConfig(); } signals: void cursorPositionChanged(); public slots: bool openURL(const KURL &url); private slots: void slotCursorPositionChanged(); private: void resizeEvent(QResizeEvent *); void selectLaTeXHighlighting(); Kate::Document *doc; Kate::View *view; }; #endif // KLATEDITWIDGET_H