Don't keep compiling/run if something failed.
[kdevelopdvcssupport.git] / plugins / subversion / svnoutputmodel.h
blobfc16dcf7a62eda1b1f6b3a29ac98ac2ff3e77251
1 /***************************************************************************
2 * Copyright 2007 Dukju Ahn <dukjuahn@gmail.com> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 ***************************************************************************/
11 #ifndef SVN_OUTPUTMODEL_H
12 #define SVN_OUTPUTMODEL_H
14 #include <QAbstractItemModel>
15 #include <kurl.h>
16 #include <outputview/ioutputviewmodel.h>
17 #include <QStandardItemModel>
19 /**
20 * Model that is used by outputview notification.
21 * When activated, open the file. Depending on the result of update operation, it paints
22 * with corresponding color. For example, regarding conflicted item, it paints red color
23 * on that file.
25 * TODO Clearing the list by context menu.
28 class KDevSvnPlugin;
30 class SvnOutputItem : public QStandardItem
32 public:
33 explicit SvnOutputItem( const QString &path, const QString &msg );
34 virtual ~SvnOutputItem();
35 bool stopHere();
36 QString m_path;
37 QString m_msg;
38 bool m_stop;
41 class SvnOutputModel : public QStandardItemModel, public KDevelop::IOutputViewModel
43 Q_OBJECT
44 public:
45 enum UpdateType
47 Conflict
50 explicit SvnOutputModel( KDevSvnPlugin *part, QObject *parent = 0 );
51 ~SvnOutputModel();
53 // IOutputViewModel interfaces.
54 /// Open the file
55 void activate( const QModelIndex& index );
57 /// Highlight next conflicted item in list.
58 QModelIndex nextHighlightIndex( const QModelIndex& currentIndex );
60 /// Highlight previous conflicted item in list.
61 QModelIndex previousHighlightIndex( const QModelIndex& currentIndex );
63 private:
64 KDevSvnPlugin *m_part;
67 #endif