summaryrefslogtreecommitdiffstats
path: root/kate/kpybrowser/kpybrowser.h
blob: 8d2a64883fd3da83b74469e39728d0434b3992c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/***************************************************************************
                          kpybrowser.h  -  description
                             -------------------
    begin                : Fri Aug 24 15:11:58 MST 2001
    copyright            : (C) 2001 by Christian Bird
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KPYBROWSER_H
#define KPYBROWSER_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <kapplication.h>
#include <klistview.h>
#include <tqstring.h>
#include <tqvaluelist.h>
#include <tqtooltip.h>
#include <tqdict.h>
#include "pybrowsenode.h"


/** KPyBrowser is the base class of the project */
class KPyBrowser : public KListView
{
  Q_OBJECT
  
  public:
    /** construtor */
    KPyBrowser(TQWidget* parent=0, const char *name=0);
    /** destructor */
    ~KPyBrowser();
    void parseText(TQString &pytext);

        //used by KPBToolTip to dynamically create the needed tooltip
        void tip (const TQPoint &p, TQRect &r, TQString &str);

	private:
		PyBrowseNode *class_root, *function_root;

        //create a mapping of names to nodes
        TQDict<PyBrowseNode> node_dict;

	public slots:
		void nodeSelected(TQListViewItem *node);
	signals:
		void selected(TQString, int);
    private:
        class KPBToolTip : public TQToolTip
        {
            public:
                KPBToolTip(TQWidget *parent);
            protected:
                void maybeTip( const TQPoint & );
        };
        KPBToolTip* tooltip;
};

#endif