KDevelop API Documentation

texttoolswidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2002 by Bernd Gehrmann                                  *
00003  *   bernd@kdevelop.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  ***************************************************************************/
00011 
00012 #ifndef _TEXTTOOLSWIDGET_H_
00013 #define _TEXTTOOLSWIDGET_H_
00014 
00015 #include <klistview.h>
00016 #include <qstringlist.h>
00017 
00018 class TextToolsPart;
00019 class QTimer;
00020 namespace KParts { class Part; }
00021 namespace KTextEditor { class EditInterface; }
00022 
00023 
00024 class TextToolsWidget : public KListView
00025 {
00026     Q_OBJECT
00027 
00028 public:
00029     enum Mode { HTML, Docbook, LaTeX };
00030     
00031     TextToolsWidget( TextToolsPart *part, QWidget *parent=0, const char *name=0 );
00032     ~TextToolsWidget();
00033 
00034     void setMode(Mode mode, KParts::Part *part);
00035     void stop();
00036 
00037 private slots:
00038     void slotItemPressed(int button, QListViewItem *item);
00039     void slotReturnPressed(QListViewItem *item);
00040     void slotContextMenu(KListView *, QListViewItem *item, const QPoint &p);
00041 
00042     void startTimer();
00043     void parseXML();
00044     void parseLaTeX();
00045 
00046 private:
00047     TextToolsPart *m_part;
00048     QTimer *m_timer;
00049     QString m_cachedText;
00050     KTextEditor::EditInterface *m_editIface;
00051     QStringList m_relevantTags, m_emptyTags;
00052 };
00053 
00054 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:58 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003