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

KritaWidgets

  • sources
  • kfour-appscomplete
  • krita
  • libs
  • widgets
KoMarkerModel.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  * SPDX-FileCopyrightText: 2011 Thorsten Zachmann <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 #ifndef KOMARKERMODEL_H
8 #define KOMARKERMODEL_H
9 
10 #include <KoFlake.h>
11 #include <QAbstractListModel>
12 #include <QExplicitlySharedDataPointer>
13 
14 
15 class KoMarker;
16 
17 class KoMarkerModel : public QAbstractListModel
18 {
19 public:
20  KoMarkerModel(const QList<KoMarker*> markers, KoFlake::MarkerPosition position, QObject *parent = 0);
21  ~KoMarkerModel() override;
22 
23  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
24  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
25 
26  int markerIndex(KoMarker *marker) const;
27 
28  // returns index of the newly added temporary marker
29  int addTemporaryMarker(KoMarker *marker);
30  // removes a temporary marker added by \ref addTemporaryMarker
31  void removeTemporaryMarker();
32 
33  int temporaryMarkerPosition() const;
34 
35  QVariant marker(int index, int role = Qt::UserRole) const;
36  KoFlake::MarkerPosition position() const;
37 
38 private:
39  QList<QExplicitlySharedDataPointer<KoMarker>> m_markers;
40  KoFlake::MarkerPosition m_markerPosition;
41  int m_temporaryMarkerPosition;
42 };
43 
44 #endif /* KOMARKERMODEL_H */
KoMarkerModel::markerIndex
int markerIndex(KoMarker *marker) const
Definition: KoMarkerModel.cpp:54
KoMarkerModel::position
KoFlake::MarkerPosition position() const
Definition: KoMarkerModel.cpp:113
KoMarkerModel::KoMarkerModel
KoMarkerModel(const QList< KoMarker * > markers, KoFlake::MarkerPosition position, QObject *parent=0)
Definition: KoMarkerModel.cpp:15
QAbstractListModel
KoMarkerModel
Definition: KoMarkerModel.h:17
QList
KoMarkerModel::temporaryMarkerPosition
int temporaryMarkerPosition() const
Definition: KoMarkerModel.cpp:89
KoMarkerModel::removeTemporaryMarker
void removeTemporaryMarker()
Definition: KoMarkerModel.cpp:79
QObject
KoMarkerModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition: KoMarkerModel.cpp:29
KoMarkerModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition: KoMarkerModel.cpp:35
KoMarkerModel::marker
QVariant marker(int index, int role=Qt::UserRole) const
Definition: KoMarkerModel.cpp:94
QAbstractListModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
KoMarkerModel::~KoMarkerModel
~KoMarkerModel() override
Definition: KoMarkerModel.cpp:25
QModelIndex
QVariant
QObject::parent
QObject * parent() const
KoMarkerModel::addTemporaryMarker
int addTemporaryMarker(KoMarker *marker)
Definition: KoMarkerModel.cpp:64
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 11:48:22 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KritaWidgets

Skip menu "KritaWidgets"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

krita API Reference

Skip menu "krita API Reference"
  • libs
  •   KritaBasicFlakes
  •   brush
  •   KritaUndo2
  •   KritaFlake
  •   image
  •   KritaPlugin
  •   Krita
  •   KritaPigment
  •   KritaResources
  •   KritaStore
  •   ui
  •   KritaWidgets
  •   KritaWidgetUtils
  • plugins
  •   Assitants
  •   Extensions
  •   Filters
  •   Generators
  •   Formats
  •           src
  •   PaintOps
  •     libpaintop

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