Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
SceneServer.h
Go to the documentation of this file.
1#pragma once
2#include <QPainter>
5
6namespace sf::xgl
7{
8
12class _SCN_CLASS SceneServer final : public QObject
13{
14 Q_OBJECT
15
16 public:
20 explicit SceneServer(QObject* parent = nullptr);
21
25 ~SceneServer() override;
26
31
35 [[nodiscard]] QList<QPair<QString, QString>> getImplementationNames() const;
36
40 [[nodiscard]] const QString& getImplementationName() const;
41
45 [[nodiscard]] bool isAvailable() const;
46
50 void setImplementationName(const QString& name);
54 [[nodiscard]] const QStringList& getImplementationProperties();
55
59 void setImplementationProperties(const QStringList& props);
60
64 // ReSharper disable once CppFunctionIsNotImplemented
65 Q_SIGNAL void changed(SceneServer* server);
66
71
72 protected:
77 bool createImplementation(const std::string& name);
78
79 private:
83 [[nodiscard]] std::string currentImplementationName() const;
87 QString _implementationName;
91 SceneInterface* _implementation;
95 QStringList _implementationProperties;
96
98};
99
100}// namespace sf::xgl
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:14
Base class for the interface.
Definition SceneInterface.h:25
Definition SceneServerPropertyPage.h:16
Server for color palettes used in images for coloring on basis of index.
Definition SceneServer.h:13
SceneServer(QObject *parent=nullptr)
Constructor.
void addPropertyPages(PropertySheetDialog *sheet)
Adds property pages of the select palette.
const QString & getImplementationName() const
Gets the name of the desired implementation.
bool isAvailable() const
Returns true when an implementation is available.
QList< QPair< QString, QString > > getImplementationNames() const
Gets the names of all available implementations names and descriptions in pairs.
void setImplementationName(const QString &name)
Sets the name of the desired implementation.
void setImplementationProperties(const QStringList &props)
Sets the name of the desired implementation.
const QStringList & getImplementationProperties()
Gets the name of the desired implementation.
SceneInterface * getImplementation() const
Gets the current scene from the server.
Q_SIGNAL void changed(SceneServer *server)
Signal for when the palette changes.
bool createImplementation(const std::string &name)
Creates implementation by registered name.
~SceneServer() override
Destructor.
Definition DemoRenderer.h:6
#define _SCN_CLASS
Definition scn/iface/global.h:35