LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
iquarkcomponentprovider.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 <vector>
12
#include <utility>
13
#include <memory>
14
#include <QString>
15
#include <QUrl>
16
#include <QVariant>
17
#include <
util/sys/paths.h
>
18
19
class
QQuickImageProvider;
20
21
namespace
LC
22
{
50
class
QuarkComponent
51
{
52
public
:
62
QUrl
Url_
;
63
66
QList<QPair<QString, QObject*>
>
DynamicProps_
;
67
70
std::vector<std::pair<QString, std::unique_ptr<QObject>>>
ContextProps_
;
71
77
QList<QPair<QString, QVariant>
>
StaticProps_
;
78
85
QList<QPair<QString, QQuickImageProvider*>
>
ImageProviders_
;
86
89
QuarkComponent
() =
default
;
90
98
QuarkComponent
(
QuarkComponent
&& other) =
default
;
99
108
QuarkComponent
&
operator=
(
QuarkComponent
&& other) =
default
;
109
125
QuarkComponent
(
const
QString& subdir,
const
QString& filename)
126
:
Url_
(
Util
::GetSysPathUrl (
Util
::SysPath::QML, subdir, filename))
127
{
128
}
129
};
130
133
typedef
std::shared_ptr<QuarkComponent>
QuarkComponent_ptr
;
134
137
typedef
QList<QuarkComponent_ptr>
QuarkComponents_t
;
138
}
139
142
class
Q_DECL_EXPORT
IQuarkComponentProvider
143
{
144
public
:
147
virtual
~IQuarkComponentProvider
() {}
148
164
virtual
LC::QuarkComponents_t
GetComponents
()
const
= 0;
165
};
166
167
Q_DECLARE_INTERFACE (
IQuarkComponentProvider
,
"org.Deviant.LeechCraft.IQuarkComponentProvider/1.0"
)
IQuarkComponentProvider
Interface for plugins providing quark components.
Definition
iquarkcomponentprovider.h:143
IQuarkComponentProvider::GetComponents
virtual LC::QuarkComponents_t GetComponents() const =0
Returns the list of quarks provided by this plugin.
IQuarkComponentProvider::~IQuarkComponentProvider
virtual ~IQuarkComponentProvider()
Virtual destructor.
Definition
iquarkcomponentprovider.h:147
LC::QuarkComponent::StaticProps_
QList< QPair< QString, QVariant > > StaticProps_
Statis properties to be exposed to the engine.
Definition
iquarkcomponentprovider.h:77
LC::QuarkComponent::QuarkComponent
QuarkComponent(QuarkComponent &&other)=default
Move-constructs this quark component from other.
LC::QuarkComponent::QuarkComponent
QuarkComponent(const QString &subdir, const QString &filename)
Initializes a quark component for the given file path.
Definition
iquarkcomponentprovider.h:125
LC::QuarkComponent::operator=
QuarkComponent & operator=(QuarkComponent &&other)=default
Move-assigns this quark component from other.
LC::QuarkComponent::QuarkComponent
QuarkComponent()=default
Initializes a null quark component.
LC::QuarkComponent::DynamicProps_
QList< QPair< QString, QObject * > > DynamicProps_
Dynamic properties to be exposed to the engine.
Definition
iquarkcomponentprovider.h:66
LC::QuarkComponent::Url_
QUrl Url_
URL of the main QML of this file.
Definition
iquarkcomponentprovider.h:62
LC::QuarkComponent::ContextProps_
std::vector< std::pair< QString, std::unique_ptr< QObject > > > ContextProps_
Context-depended properties to be exposed to the engine.
Definition
iquarkcomponentprovider.h:70
LC::QuarkComponent::ImageProviders_
QList< QPair< QString, QQuickImageProvider * > > ImageProviders_
The image providers to be exposed to the engine.
Definition
iquarkcomponentprovider.h:85
QList
Definition
ianrulesstorage.h:14
LC::Util
Definition
icoreproxy.h:34
LC
Definition
constants.h:15
LC::QuarkComponent_ptr
std::shared_ptr< QuarkComponent > QuarkComponent_ptr
A shared pointer to a quark.
Definition
iquarkcomponentprovider.h:133
LC::QuarkComponents_t
QList< QuarkComponent_ptr > QuarkComponents_t
A list of quarks pointers.
Definition
iquarkcomponentprovider.h:137
paths.h
src
interfaces
iquarkcomponentprovider.h
Generated by
1.17.0