Changeset View
Changeset View
Standalone View
Standalone View
ui/signaturemodel.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2018 by Chinmoy Ranjan Pradhan <chinmoyrp65@gmail.com * | ||||
3 | * * | ||||
4 | * This program is free software; you can redistribute it and/or modify * | ||||
5 | * it under the terms of the GNU General Public License as published by * | ||||
6 | * the Free Software Foundation; either version 2 of the License, or * | ||||
7 | * (at your option) any later version. * | ||||
8 | ***************************************************************************/ | ||||
9 | | ||||
10 | #ifndef SIGNATUREMODEL_H | ||||
11 | #define SIGNATUREMODEL_H | ||||
12 | | ||||
13 | #include <QAbstractItemModel> | ||||
14 | | ||||
15 | namespace Okular { | ||||
16 | class Document; | ||||
17 | } | ||||
18 | | ||||
19 | class SignatureModelPrivate; | ||||
20 | | ||||
21 | class SignatureModel : public QAbstractItemModel | ||||
22 | { | ||||
23 | Q_OBJECT | ||||
24 | | ||||
25 | public: | ||||
26 | enum { | ||||
27 | FormIdRole = Qt::UserRole + 1000, | ||||
28 | PageRole | ||||
29 | }; | ||||
30 | | ||||
31 | explicit SignatureModel( Okular::Document *doc, QObject *parent = nullptr ); | ||||
32 | virtual ~SignatureModel(); | ||||
33 | | ||||
34 | int columnCount( const QModelIndex &parent = QModelIndex() ) const override; | ||||
35 | QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override; | ||||
36 | bool hasChildren( const QModelIndex &parent = QModelIndex() ) const override; | ||||
37 | QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override; | ||||
38 | QModelIndex parent( const QModelIndex &index ) const override; | ||||
39 | int rowCount( const QModelIndex &parent = QModelIndex() ) const override; | ||||
40 | | ||||
41 | private: | ||||
42 | Q_DECLARE_PRIVATE( SignatureModel ) | ||||
43 | QScopedPointer<SignatureModelPrivate> d_ptr; | ||||
44 | }; | ||||
45 | | ||||
46 | | ||||
47 | | ||||
48 | #endif |