KDevelop API Documentation

ctagspart.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001 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 _CTAGSPART_H_
00013 #define _CTAGSPART_H_
00014 
00015 #include <qguardedptr.h>
00016 #include <kdialogbase.h>
00017 #include "kdevplugin.h"
00018 #include "occurestagsdlg.h"
00019 
00020 struct CTagsTagInfo
00021 {
00022     QString fileName;
00023     QString pattern;
00024     int lineNum;
00025     char kind;
00026 };
00027 
00028 typedef QValueList<CTagsTagInfo> CTagsTagInfoList;
00029 typedef QValueList<CTagsTagInfo>::Iterator CTagsTagInfoListIterator;
00030 typedef QValueList<CTagsTagInfo>::ConstIterator CTagsTagInfoListConstIterator;
00031 typedef QMap<QString,CTagsTagInfoList> CTagsMap;
00032 typedef QMap<QString,CTagsTagInfoList>::Iterator CTagsMapIterator;
00033 typedef QMap<QString,CTagsTagInfoList>::ConstIterator CTagsMapConstIterator;
00034 
00035 class QPopupMenu;
00036 class Context;
00037 class CTagsDialog;
00038 
00039 
00040 class CTagsPart : public KDevPlugin
00041 {
00042     Q_OBJECT
00043 
00044 public:
00045     CTagsPart( QObject *parent, const char *name, const QStringList & );
00046     ~CTagsPart();
00047 
00048     bool ensureTagsLoaded();
00049     bool loadTagsFile();
00050     bool createTagsFile();
00051 
00052     CTagsMap tags()
00053     { return *m_tags; }
00054     QStringList kindStrings()
00055     { return m_kindStrings; }
00056 
00057 private slots:
00058     void projectClosed();
00059     void contextMenu(QPopupMenu *popup, const Context *context);
00060     void slotSearchTags();
00061     void slotGotoDeclaration();
00062     void slotGotoDefinition();
00063     void slotGotoTag( QListBoxItem *item );
00064 
00065 private:
00066     void gotoTag(const QString &tag, const QString &kindChars);
00067     void gotoFinalTag( const QString &contextStr );
00068 
00069     CTagsDialog *m_dialog;
00070     CTagsMap *m_tags;
00071     QStringList m_kindStrings;
00072     QString m_contextString;
00073 
00074     OccuresTagsDlg *mOccuresTagsDlg;
00075 
00076 };
00077 
00078 #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:54 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003