/* 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 KLATEDITTAB_H #define KLATEDITTAB_H #include class KLibFactory; class KLibrary; class KURL; class KlatOutputTab; class KlatToolTab; class KlatEditWidget; class KProcess; class KShellProcess; class KListView; class QDropEvent; class QDragEnterEvent; class QFocusEvent; class KlatEditTab : public QTabWidget { Q_OBJECT public: KlatEditTab(QWidget *parent = 0); ~KlatEditTab(); void setOutputWidget(KlatOutputTab *w) { outputtab = w; } void setToolWidget(KlatToolTab *w) { tooltab = w; } void executeCommand(const QString &cmdline,bool savefirst); bool areAllDocumentsSaved(); signals: void signalCursorPositionChanged(int line,int col); void signalFileOpened(const KURL &url); void signalFileSaved(const KURL &url); public slots: void slotFileNew(); void slotFileOpen(); void slotFileSave(); void slotFileSaveAs(); void slotFileClose(); void slotEditUndo(); void slotEditRedo(); void slotEditCopy(); void slotEditCut(); void slotEditPaste(); void slotEditFind(); void slotEditFindNext(); void slotEditFindPrev(); void slotEditReplace(); void slotEditGotoLine(); void slotEditSpelling(); void slotConfigKateEditor(); void slotInsertString(const QString &str,int advance); void slotOpenURL(const KURL &url); void slotNextDocument(); void slotPrevDocument(); private slots: void slotProcessExited(KProcess *proc); void slotNewCursorPos(); void slotPageChanged(QWidget *w); private: void saveAsProcedure(KlatEditWidget *w); bool getFilenameAndPath(const KURL &url,QString *fname,QString *path = 0); QString getBaseName(const QString &fname); void dropEvent(QDropEvent *e); void dragEnterEvent(QDragEnterEvent *e); void setFocus(); KlatOutputTab *outputtab; KlatToolTab *tooltab; int counter; }; #endif // KLATEDITTAB_H