LeechCraft Monocle  0.6.70-16373-g319c272718
Modular document viewer for LeechCraft
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 
14 namespace LC::Monocle
15 {
16  template<typename T>
17  struct TOCEntryT;
18 
21  template<typename T>
22  using TOCEntryLevelT = QVector<TOCEntryT<T>>;
23 
26  template<typename T>
27  struct TOCEntryT
28  {
32 
35  QString Name_;
36 
40  };
41 
44 
47 
53  class IHaveTOC
54  {
55  public:
58  virtual ~IHaveTOC () {}
59 
67  virtual TOCEntryLevel_t GetTOC () = 0;
68  };
69 }
70 
71 Q_DECLARE_INTERFACE (LC::Monocle::IHaveTOC,
72  "org.LeechCraft.Monocle.IHaveTOC/1.0")
QVector< TOCEntryT< T > > TOCEntryLevelT
A list of table of contents entries.
Definition: ihavetoc.h:22
Interface for documents supporting table of contents.
Definition: ihavetoc.h:53
A single table of contents entry.
Definition: ihavetoc.h:17
TOCEntryLevelT< NavigationAction > TOCEntryLevel_t
Definition: ihavetoc.h:42
T Navigation_
The navigation action corresponding to this entry.
Definition: ihavetoc.h:31
QString Name_
The human-readable name of the entry.
Definition: ihavetoc.h:35
TOCEntryLevelT< QByteArray > TOCEntryIDLevel
Definition: ihavetoc.h:45
virtual ~IHaveTOC()
Virtual destructor.
Definition: ihavetoc.h:58
virtual TOCEntryLevel_t GetTOC()=0
Returns the root level of the TOC.
TOCEntryLevelT< T > ChildLevel_
Child items of this entry.
Definition: ihavetoc.h:39