1 /* This file is part of KDevelop
2 Copyright 2005 Roberto Raggi <roberto@kdevelop.org>
3 Copyright 2007 Andreas Pakulat <apaku@gmx.de>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef KDEVPROJECTTREEVIEW_H
22 #define KDEVPROJECTTREEVIEW_H
24 #include <QtGui/QTreeView>
28 class QItemSelectionModel
;
31 class ProjectManagerViewPlugin
;
36 class ProjectFolderItem
;
37 class ProjectFileItem
;
38 class ProjectTargetItem
;
39 class ProjectBaseItem
;
42 class ProjectTreeView
: public QTreeView
46 ProjectTreeView( ProjectManagerViewPlugin
*plugin
, QWidget
*parent
);
47 virtual ~ProjectTreeView();
49 ProjectManagerViewPlugin
*plugin() const;
50 KDevelop::ProjectModel
*projectModel() const;
52 KDevelop::ProjectFolderItem
*currentFolderItem() const;
53 KDevelop::ProjectFileItem
*currentFileItem() const;
54 KDevelop::ProjectTargetItem
*currentTargetItem() const;
58 void activateUrl( const KUrl
&url
);
61 void slotActivated( const QModelIndex
&index
);
62 void popupContextMenu( const QPoint
&pos
);
63 void openProjectConfig();
66 virtual void mouseReleaseEvent( QMouseEvent
* );
69 class ProjectTreeViewPrivate
* const d
;
70 KDevelop::IProject
* m_ctxProject
;
71 bool mouseClickChangesSelection
;
72 bool rightButtonClicked
;
75 #endif // KDEVPROJECTMANAGER_H