Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

tagsview.h

00001 /***************************************************************************
00002                           tagsview.h  -  view entries of a tags file
00003                              -------------------
00004     begin                : Tue Sep 16 12:23:49 CEST 2003
00005     copyright            : (C) 2003 by Heiko Köhler
00006     email                : heicom@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef __TAGSVIEW_H__
00019 #define __TAGSVIEW_H__
00020 
00021 #include "readtags.h"
00022 #include <qlistview.h>
00023 #include <qpopupmenu.h>
00024 
00025 // forward declaration for friend declaration in TagItem
00026 class TagsView;
00027 
00029 class KindItem : public QListViewItem
00030 {
00031 public:
00032     KindItem( QString name, QListView *parent );
00033     QString className() { return "KindItem"; }
00034 };
00035 
00037 class TagItem : public QListViewItem
00038 {
00039     friend class TagsView;
00040 public:
00041     TagItem( QString name, QString file, QString pattern, KindItem *parent );
00042     QString className() { return "TagItem"; }
00043 private:
00044     QString name;
00045     QString file;
00046     QString pattern;
00047 };
00048 
00049 class TagsView : public QListView
00050 {
00051     Q_OBJECT
00052 public:
00053     TagsView(QWidget *parent=0, const char *name=0);
00055     void readTagsFile(tagFile *tags);
00056 signals:
00057     /* * emitted when jumping to tag in source is requested */
00058     void jump(QString fileName, QString pattern);
00060     void buildTagsFile();
00061 protected slots:
00062     void slotBuildTagsFile();
00063 protected:
00065     void contentsMousePressEvent( QMouseEvent *e );
00067     void contextMenuEvent( QContextMenuEvent *e );
00068 private:
00070     QPopupMenu *contextMenu;
00071 };
00072 
00073 #endif

Generated on Sun May 2 20:02:58 2004 by doxygen 1.3.2