• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/vcs

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • vcs
  • models
vcsannotationmodel.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This file is part of KDevelop *
3  * Copyright 2007 Andreas Pakulat <[email protected]> *
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  ***************************************************************************/
20 
21 #ifndef KDEVPLATFORM_VCSANNOTATIONMODEL_H
22 #define KDEVPLATFORM_VCSANNOTATIONMODEL_H
23 
24 #include <vcs/vcsexport.h>
25 #include "../vcsrevision.h"
26 
27 #include <KTextEditor/AnnotationInterface>
28 
29 #include <QColor>
30 
31 class QUrl;
32 template<typename T> class QList;
33 
34 namespace KDevelop
35 {
36 
37 class VcsJob;
38 class VcsAnnotationLine;
39 class VcsAnnotationModelPrivate;
40 
41 class KDEVPLATFORMVCS_EXPORT VcsAnnotationModel : public KTextEditor::AnnotationModel
42 {
43 Q_OBJECT
44 public:
45  VcsAnnotationModel( VcsJob* job, const QUrl&, QObject*,
46  const QColor& foreground = QColor(Qt::black), const QColor& background = QColor(Qt::white) );
47  ~VcsAnnotationModel() override;
48 
49  VcsRevision revisionForLine(int line) const;
50 
51  QVariant data( int line, Qt::ItemDataRole role = Qt::DisplayRole ) const override;
52 
53  // given "role" argument is of type Qt::ItemDataRole and not int, we cannot use custom roles
54  // to access custom data, so providing a custom API instead
55  VcsAnnotationLine annotationLine(int line) const;
56 
57 private:
58  const QScopedPointer<class VcsAnnotationModelPrivate> d_ptr;
59  Q_DECLARE_PRIVATE(VcsAnnotationModel)
60  friend class VcsAnnotationModelPrivate;
61 };
62 
63 }
64 
65 #endif
KDevelop::VcsAnnotationModel
Definition: vcsannotationmodel.h:40
QColor
QUrl
KDevelop::VcsRevision
Encapsulates a vcs revision number, date or range of revisions.
Definition: vcsrevision.h:66
QList
Definition: vcsannotationmodel.h:31
QObject
KDevelop::VcsAnnotationLine
Annotation information for a line of a version controlled file.
Definition: vcsannotation.h:40
QScopedPointer< class VcsAnnotationModelPrivate >
KDevelop::VcsJob
This class provides an extension of KJob to get various VCS-specific information about the job.
Definition: vcsjob.h:43
KDevelop
Definition: dvcsevent.h:33
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 16 2021 23:36:06 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/vcs

Skip menu "kdevplatform/vcs"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal