LeechCraft Monocle
0.6.70-18450-gabe19ee3b0
Modular document viewer for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
ihavetextcontent.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 <QtPlugin>
12
#include "
coordsbase.h
"
13
14
class
QString;
15
16
namespace
LC::Monocle
17
{
18
enum class
NextSpaceKind
: std::uint8_t
19
{
20
None
,
21
Space
,
22
NewLine
,
23
NewPara
,
24
};
25
26
struct
TextBox
27
{
28
QString
Text_
;
29
PageRelativeRectBase
Rect_
;
30
NextSpaceKind
NextSpaceKind_
;
31
32
std::optional<QVector<PageRelativeRectBase>>
Letters_
{};
33
};
34
40
class
IHaveTextContent
41
{
42
protected
:
43
virtual
~IHaveTextContent
() =
default
;
44
public
:
56
virtual
QString
GetTextContent
(
int
page,
const
PageRelativeRectBase
& rect) = 0;
57
58
virtual
QVector<TextBox>
GetTextBoxes
(
int
page) = 0;
59
};
60
}
61
62
63
Q_DECLARE_INTERFACE (
LC::Monocle::IHaveTextContent
,
64
"org.LeechCraft.Monocle.IHaveTextContent/1.0"
)
LC::Monocle::IHaveTextContent
Interface for documents supporting querying text contents.
Definition
ihavetextcontent.h:41
LC::Monocle::IHaveTextContent::~IHaveTextContent
virtual ~IHaveTextContent()=default
LC::Monocle::IHaveTextContent::GetTextContent
virtual QString GetTextContent(int page, const PageRelativeRectBase &rect)=0
Returns the text in the given rectangle.
LC::Monocle::IHaveTextContent::GetTextBoxes
virtual QVector< TextBox > GetTextBoxes(int page)=0
coordsbase.h
LC::Monocle
Definition
coordsbase.h:15
LC::Monocle::NextSpaceKind
NextSpaceKind
Definition
ihavetextcontent.h:19
LC::Monocle::NextSpaceKind::NewLine
@ NewLine
Definition
ihavetextcontent.h:22
LC::Monocle::NextSpaceKind::None
@ None
Definition
ihavetextcontent.h:20
LC::Monocle::NextSpaceKind::Space
@ Space
Definition
ihavetextcontent.h:21
LC::Monocle::NextSpaceKind::NewPara
@ NewPara
Definition
ihavetextcontent.h:23
LC::Monocle::PageRelativeRectBase
Definition
coordsbase.h:209
LC::Monocle::TextBox
Definition
ihavetextcontent.h:27
LC::Monocle::TextBox::NextSpaceKind_
NextSpaceKind NextSpaceKind_
Definition
ihavetextcontent.h:30
LC::Monocle::TextBox::Rect_
PageRelativeRectBase Rect_
Definition
ihavetextcontent.h:29
LC::Monocle::TextBox::Text_
QString Text_
Definition
ihavetextcontent.h:28
LC::Monocle::TextBox::Letters_
std::optional< QVector< PageRelativeRectBase > > Letters_
Definition
ihavetextcontent.h:32
src
plugins
monocle
interfaces
monocle
ihavetextcontent.h
Generated by
1.17.0