summaryrefslogtreecommitdiffstats
path: root/parts/classview/classviewpart.h
blob: ffa1cc1f101436b3eefac498b9fbcc38e1e1c3f6 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
 *  Copyright (C) 2003 Roberto Raggi (roberto@kdevelop.org)
 *
 *  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
 *  Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; see the file COPYING.LIB.  If not, write to
 *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 *  Boston, MA 02110-1301, USA.
 *
 */

#ifndef __KDEVPART_CLASSVIEW_H__
#define __KDEVPART_CLASSVIEW_H__

#include "kdevlanguagesupport.h"
#include "viewcombos.h"

#include <tqguardedptr.h>
#include <tqmap.h>

#include <kdevplugin.h>

#include <codemodel.h>
#include <codebrowserfrontend.h>

using namespace Extensions;

namespace KParts { class Part; }
namespace KTextEditor
{
    class Document;
    class View;
    class EditInterface;
    class SelectionInterface;
    class ViewCursorInterface;
}


class ClassViewWidget;
class KListViewAction;
class QListViewItem;
class KToolBarPopupAction;
class NamespaceItem;
class Navigator;
class HierarchyDialog;
class ClassViewPart : public Extensions::KDevCodeBrowserFrontend
{
    Q_OBJECT
public:
    ClassViewPart(TQObject *parent, const char *name, const TQStringList &);
    virtual ~ClassViewPart();

    bool langHasFeature(KDevLanguageSupport::Features feature);
    
    KListViewAction *m_functionsnav;
    Navigator *navigator;

    inline ClassViewWidget* widget() {
        return &( *m_widget );
    }
    
    virtual bool jumpedToItem( ItemDom item );
    
private slots:
    void slotProjectOpened();
    void slotProjectClosed();
    void graphicalClassView();
    void refresh();
    void slotFocusNavbar();

    void activePartChanged(KParts::Part*);

private:
    void setupActions();

    TQGuardedPtr<ClassViewWidget> m_widget;

    TQString m_activeFileName;
    KTextEditor::Document* m_activeDocument;
    KTextEditor::View* m_activeView;
    KTextEditor::SelectionInterface* m_activeSelection;
    KTextEditor::EditInterface* m_activeEditor;
    KTextEditor::ViewCursorInterface* m_activeViewCursor;

    HierarchyDialog* m_hierarchyDlg;
    friend class Navigator;
};


#endif