• 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
KoLineStyleModel_p.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  * SPDX-FileCopyrightText: 2007 Jan Hambrecht <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 #ifndef KOLINESTYLEMODEL_H
7 #define KOLINESTYLEMODEL_H
8 
9 #include <QAbstractListModel>
10 
11 #include <QVector>
12 
14 class KoLineStyleModel : public QAbstractListModel
15 {
16 public:
17  explicit KoLineStyleModel(QObject *parent = 0);
18  ~KoLineStyleModel() override {}
19  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
20  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
21 
23  bool addCustomStyle(const QVector<qreal> &style);
25  int setLineStyle(Qt::PenStyle style, const QVector<qreal> &dashes);
26 private:
27  QList<QVector<qreal> > m_styles;
28  QVector<qreal> m_tempStyle;
29  bool m_hasTempStyle;
30 };
31 
32 #endif
KoLineStyleModel::setLineStyle
int setLineStyle(Qt::PenStyle style, const QVector< qreal > &dashes)
selects the given style
Definition: KoLineStyleModel.cpp:63
QAbstractListModel
QList
KoLineStyleModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition: KoLineStyleModel.cpp:22
QObject
KoLineStyleModel::addCustomStyle
bool addCustomStyle(const QVector< qreal > &style)
adds the given style to the model
Definition: KoLineStyleModel.cpp:54
KoLineStyleModel
The line style model managing the style data.
Definition: KoLineStyleModel_p.h:14
KoLineStyleModel::KoLineStyleModel
KoLineStyleModel(QObject *parent=0)
Definition: KoLineStyleModel.cpp:11
KoLineStyleModel::~KoLineStyleModel
~KoLineStyleModel() override
Definition: KoLineStyleModel_p.h:18
KoLineStyleModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition: KoLineStyleModel.cpp:27
QAbstractListModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
QModelIndex
QVector< qreal >
QVariant
QObject::parent
QObject * parent() const
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