LeechCraft Monocle 0.6.70-14794-g33744ae6ce
Modular document viewer for LeechCraft
Loading...
Searching...
No Matches
ihavetoc.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 <QMetaType>
12#include "ilink.h"
13
14namespace LC
15{
16namespace Monocle
17{
18 struct TOCEntry;
19
22 typedef QList<TOCEntry> TOCEntryLevel_t;
23
26 struct TOCEntry
27 {
35
38 QString Name_;
39
43 };
44
51 {
52 public:
55 virtual ~IHaveTOC () {}
56
64 virtual TOCEntryLevel_t GetTOC () = 0;
65 };
66}
67}
68
69Q_DECLARE_INTERFACE (LC::Monocle::IHaveTOC,
70 "org.LeechCraft.Monocle.IHaveTOC/1.0")
Interface for documents supporting table of contents.
Definition: ihavetoc.h:51
virtual TOCEntryLevel_t GetTOC()=0
Returns the root level of the TOC.
virtual ~IHaveTOC()
Virtual destructor.
Definition: ihavetoc.h:55
QList< TOCEntry > TOCEntryLevel_t
A list of table of contents entries.
Definition: ihavetoc.h:22
std::shared_ptr< ILink > ILink_ptr
Definition: ilink.h:89
Definition: iannotation.h:21
A single table of contents entry.
Definition: ihavetoc.h:27
TOCEntryLevel_t ChildLevel_
Child items of this entry.
Definition: ihavetoc.h:42
QString Name_
The human-readable name of the entry.
Definition: ihavetoc.h:38
ILink_ptr Link_
The link action corresponding to this entry.
Definition: ihavetoc.h:34