Warning, file /office/calligra/qtquick/CQTextToCModel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * This file is part of the KDE project
0003  *
0004  * SPDX-FileCopyrightText: 2013 Dan Leinir Turthra Jensen <admin@leinir.dk>
0005  *
0006  * SPDX-License-Identifier: LGPL-2.0-or-later
0007  *
0008  */
0009 
0010 #ifndef CQTEXTTOCMODEL_H
0011 #define CQTEXTTOCMODEL_H
0012 
0013 #include <QAbstractListModel>
0014 
0015 class CQTextToCModel : public QAbstractListModel
0016 {
0017     Q_OBJECT
0018     Q_PROPERTY(QObject* canvas READ canvas WRITE setCanvas NOTIFY canvasChanged);
0019 public:
0020     enum TextToCModelRoleNames {
0021         Title = Qt::UserRole + 1,
0022         Level,
0023         PageNumber
0024     };
0025     explicit CQTextToCModel(QObject* parent = 0);
0026     virtual ~CQTextToCModel();
0027     virtual QVariant data(const QModelIndex& index, int role) const;
0028     virtual int rowCount(const QModelIndex& parent) const;
0029 
0030 
0031     QObject* canvas() const;
0032     void setCanvas(QObject* newCanvas);
0033 Q_SIGNALS:
0034     void canvasChanged();
0035 
0036 private Q_SLOTS:
0037     void requestGeneration();
0038     void startDoneTimer();
0039     void timeout();
0040     void updateToC();
0041 
0042 private:
0043     class Private;
0044     Private* const d;
0045 };
0046 
0047 #endif // CQTEXTTOCMODEL_H