Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+63
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Asset
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Fröbel, SLSE, 2017-11-30
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "avm_export.h"
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
class InstrumentationAsset;
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
class MountingPoint;
|
||||
|
||||
/**
|
||||
* Part of the data model used by the AssetAssignmentManager.
|
||||
* @author Christian Fröbel
|
||||
*/
|
||||
class AVM_COMMON_EXPORT Asset : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Asset(const InfrastructureManagement::InstrumentationAsset &asset);
|
||||
~Asset();
|
||||
|
||||
const InfrastructureManagement::InstrumentationAsset &data() const { return *m_data; }
|
||||
|
||||
/** Emits the changed() signal. */
|
||||
void update(const InfrastructureManagement::InstrumentationAsset &data);
|
||||
|
||||
bool isMounted() const { return m_mountingPoint != nullptr; }
|
||||
|
||||
/** May only be called when mounted. */
|
||||
MountingPoint *mountingPoint() const;
|
||||
|
||||
void mount(MountingPoint *mountingPoint);
|
||||
void unmount();
|
||||
|
||||
signals:
|
||||
void changed(Asset *asset);
|
||||
|
||||
private:
|
||||
std::unique_ptr<InfrastructureManagement::InstrumentationAsset> m_data;
|
||||
MountingPoint *m_mountingPoint{nullptr}; // null if not mounted
|
||||
};
|
||||
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
|
||||
Reference in new issue
Block a user