• 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
vcseventmodel.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_VCSEVENTMODEL_H
22 #define KDEVPLATFORM_VCSEVENTMODEL_H
23 
24 #include <QAbstractTableModel>
25 #include <QScopedPointer>
26 
27 #include <vcs/vcsexport.h>
28 
29 class QUrl;
30 class KJob;
31 
32 namespace KDevelop
33 {
34 class VcsRevision;
35 class IBasicVersionControl;
36 class VcsEvent;
37 class VcsEventLogModelPrivate;
38 class VcsBasicEventModelPrivate;
39 
45 class KDEVPLATFORMVCS_EXPORT VcsBasicEventModel : public QAbstractTableModel
46 {
47 Q_OBJECT
48 public:
49  enum Column {
50  RevisionColumn,
51  SummaryColumn,
52  AuthorColumn,
53  DateColumn,
54  ColumnCount,
55  };
56 
57  explicit VcsBasicEventModel(QObject* parent);
58  ~VcsBasicEventModel() override;
59  int rowCount(const QModelIndex& = QModelIndex()) const override;
60  int columnCount(const QModelIndex& parent = QModelIndex()) const override;
61  QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const override;
62  QVariant headerData(int, Qt::Orientation, int role = Qt::DisplayRole) const override;
63  KDevelop::VcsEvent eventForIndex(const QModelIndex&) const;
64 
65 protected:
66  void addEvents(const QList<KDevelop::VcsEvent>&);
67 
68 private:
69  const QScopedPointer<class VcsBasicEventModelPrivate> d_ptr;
70  Q_DECLARE_PRIVATE(VcsBasicEventModel)
71 };
72 
78 class KDEVPLATFORMVCS_EXPORT VcsEventLogModel : public VcsBasicEventModel
79 {
80 Q_OBJECT
81 public:
82 
83  VcsEventLogModel(KDevelop::IBasicVersionControl* iface, const KDevelop::VcsRevision& rev, const QUrl& url, QObject* parent);
84  ~VcsEventLogModel() override;
85 
87  void fetchMore(const QModelIndex& parent) override;
88  bool canFetchMore(const QModelIndex& parent) const override;
89 
90 private Q_SLOTS:
91  void jobReceivedResults( KJob* job );
92 
93 private:
94  const QScopedPointer<class VcsEventLogModelPrivate> d_ptr;
95  Q_DECLARE_PRIVATE(VcsEventLogModel)
96 };
97 
98 }
99 
100 #endif
KDevelop::VcsBasicEventModel::Column
Column
Definition: vcseventmodel.h:48
QUrl
KDevelop::IBasicVersionControl
This is the basic interface that all Version Control or Source Code Management plugins need to implem...
Definition: ibasicversioncontrol.h:52
KDevelop::VcsRevision
Encapsulates a vcs revision number, date or range of revisions.
Definition: vcsrevision.h:66
QList< KDevelop::VcsEvent >
KDevelop::VcsEvent
Small container class that contains information about a single revision.
Definition: vcsevent.h:96
QObject
KJob
QAbstractTableModel
QScopedPointer< class VcsBasicEventModelPrivate >
KDevelop
Definition: dvcsevent.h:33
QModelIndex
QVariant
KDevelop::VcsBasicEventModel
This is a generic model to store a list of VcsEvents.
Definition: vcseventmodel.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:38:30 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