LeechCraft Monocle
0.6.70-18450-gabe19ee3b0
Modular document viewer for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
idocument.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <memory>
12
#include <QImage>
13
#include <QMetaType>
14
#include <QStringList>
15
#include <QDateTime>
16
#include "
ilink.h
"
17
18
class
QUrl;
19
20
template
<
typename
>
21
class
QFuture
;
22
23
namespace
LC::Monocle
24
{
29
struct
DocumentInfo
30
{
33
QString
Title_
;
36
QString
Subject_
;
39
QString
Description_
;
42
QString
Author_
;
43
46
QStringList
Genres_
;
49
QStringList
Keywords_
;
50
53
QDateTime
Date_
;
54
};
55
56
class
DocumentSignals;
57
80
class
IDocument
81
{
82
public
:
85
virtual
~IDocument
() =
default
;
86
96
virtual
QObject*
GetBackendPlugin
()
const
= 0;
97
105
virtual
QObject*
GetQObject
() = 0;
106
114
virtual
bool
IsValid
()
const
= 0;
115
120
virtual
DocumentInfo
GetDocumentInfo
()
const
= 0;
121
126
virtual
int
GetNumPages
()
const
= 0;
127
140
virtual
QSize
GetPageSize
(
int
page)
const
= 0;
141
159
virtual
QFuture<QImage>
RenderPage
(
int
page,
double
xScale,
double
yScale) = 0;
160
173
virtual
QList<ILink_ptr>
GetPageLinks
(
int
page) = 0;
174
183
virtual
QUrl
GetDocURL
()
const
= 0;
184
192
virtual
const
DocumentSignals*
GetDocumentSignals
()
const
= 0;
193
};
194
197
typedef
std::shared_ptr<IDocument>
IDocument_ptr
;
198
}
199
200
201
Q_DECLARE_INTERFACE (
LC::Monocle::IDocument
,
202
"org.LeechCraft.Monocle.IDocument/1.0"
)
LC::Monocle::IDocument
Basic interface for documents.
Definition
idocument.h:81
LC::Monocle::IDocument::~IDocument
virtual ~IDocument()=default
Virtual destructor.
LC::Monocle::IDocument::RenderPage
virtual QFuture< QImage > RenderPage(int page, double xScale, double yScale)=0
Renders the given page at the given scale.
LC::Monocle::IDocument::GetDocumentSignals
virtual const DocumentSignals * GetDocumentSignals() const =0
Returns the type-safe connector for various document signals.
LC::Monocle::IDocument::GetNumPages
virtual int GetNumPages() const =0
Returns the number of pages in this document.
LC::Monocle::IDocument::IsValid
virtual bool IsValid() const =0
Returns whether this document is valid.
LC::Monocle::IDocument::GetPageSize
virtual QSize GetPageSize(int page) const =0
Returns the size in points of the given page.
LC::Monocle::IDocument::GetBackendPlugin
virtual QObject * GetBackendPlugin() const =0
Returns the parent backend plugin.
LC::Monocle::IDocument::GetQObject
virtual QObject * GetQObject()=0
Returns this object as a QObject.
LC::Monocle::IDocument::GetDocURL
virtual QUrl GetDocURL() const =0
Returns the URL of the document.
LC::Monocle::IDocument::GetDocumentInfo
virtual DocumentInfo GetDocumentInfo() const =0
Returns the document metadata.
LC::Monocle::IDocument::GetPageLinks
virtual QList< ILink_ptr > GetPageLinks(int page)=0
Returns the links found at the given page.
QFuture
Definition
idocument.h:21
ilink.h
LC::Monocle
Definition
coordsbase.h:15
LC::Monocle::IDocument_ptr
std::shared_ptr< IDocument > IDocument_ptr
Shared pointer to a document.
Definition
idocument.h:197
LC::Monocle::DocumentInfo
Document metadata.
Definition
idocument.h:30
LC::Monocle::DocumentInfo::Author_
QString Author_
The author of the document.
Definition
idocument.h:42
LC::Monocle::DocumentInfo::Date_
QDateTime Date_
Date this document was created.
Definition
idocument.h:53
LC::Monocle::DocumentInfo::Keywords_
QStringList Keywords_
Keywords corresponding to this document.
Definition
idocument.h:49
LC::Monocle::DocumentInfo::Genres_
QStringList Genres_
Genres of this document.
Definition
idocument.h:46
LC::Monocle::DocumentInfo::Subject_
QString Subject_
The subject line of this document.
Definition
idocument.h:36
LC::Monocle::DocumentInfo::Title_
QString Title_
Document title.
Definition
idocument.h:33
LC::Monocle::DocumentInfo::Description_
QString Description_
Description of the document.
Definition
idocument.h:39
src
plugins
monocle
interfaces
monocle
idocument.h
Generated by
1.17.0