Add language independent abstract base classes for NavigationWidget and
[kdevelopdvcssupport.git] / outputview / ioutputviewmodel.h
blobcafa618d7e33d7edfd091b498922333d8924fa25
1 /***************************************************************************
2 * This file is part of KDevelop *
3 * Copyright 2007 Dukju Ahn <dukjuahn@gmail.com> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Library General Public License as *
7 * published by the Free Software Foundation; either version 2 of the *
8 * License, or (at your option) any later version. *
9 * *
10 * This program 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 *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Library General Public *
16 * License along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #ifndef IOUTPUTVIEWMODEL_H
22 #define IOUTPUTVIEWMODEL_H
24 #include "outputviewexport.h"
25 class QModelIndex;
27 namespace KDevelop
30 class KDEVPLATFORMOUTPUTVIEW_EXPORT IOutputViewModel
32 public:
33 virtual ~IOutputViewModel();
35 /**
36 * Called when the index @arg index was activated in output view.
38 virtual void activate( const QModelIndex& index ) = 0;
40 /**
41 * Called when the user wants to see next item. For example, in makebuilder it would be
42 * next error spot. In subversion plugin it would be the next conflicted item.
44 * @param currentIndex Currently selected index in active outputview. It can be invalid index
45 * if no item is selected or highlighted.
46 * @return Next model index that is to be highlighted and activated.
47 * Return invalid index if no appropriate item to highlight exists.
49 virtual QModelIndex nextHighlightIndex( const QModelIndex& currentIndex ) = 0;
51 /**
52 * Called when the user wants to see previous item. For example, in makebuilder it would be
53 * previous error spot. In subversion plugin it would be the previous conflicted item.
55 * @param currentIndex Currently selected index in active outputview. It can be invalid index
56 * if no item is selected or highlighted.
57 * @return Previous model index that is to be highlighted and activated.
58 * Return invalid index if no appropriate item to highlight exists.
60 virtual QModelIndex previousHighlightIndex( const QModelIndex& currentIndex ) = 0;
66 #endif