25#include "medianode_p.h"
26#include "medianodedestructionhandler_p.h"
32 MediaNode::MediaNode(MediaNodePrivate &dd)
38bool MediaNode::isValid()
const
40 return const_cast<MediaNodePrivate *
>(k_ptr)->backendObject() !=
nullptr;
45 return k_ptr->inputPaths;
50 return k_ptr->outputPaths;
53 MediaNode::~MediaNode()
58 QObject *MediaNodePrivate::backendObject()
60 if (!m_backendObject && Factory::backend()) {
61 createBackendObject();
63 return m_backendObject;
66 MediaNodePrivate::~MediaNodePrivate()
68 for (
int i = 0 ; i < handlers.count(); ++i) {
69 handlers.at(i)->phononObjectDestroyed(
this);
71 Factory::deregisterFrontendObject(
this);
72 delete m_backendObject;
73 m_backendObject =
nullptr;
76void MediaNodePrivate::deleteBackendObject()
78 if (m_backendObject && aboutToDeleteBackendObject()) {
79 delete m_backendObject;
80 m_backendObject =
nullptr;
84 MediaNodePrivate::MediaNodePrivate(MediaNodePrivate::CastId _castId) : castId(_castId),
85 m_backendObject(nullptr)
87 Factory::registerFrontendObject(
this);
90 void MediaNodePrivate::addDestructionHandler(MediaNodeDestructionHandler *handler)
92 handlers.append(handler);
95 void MediaNodePrivate::removeDestructionHandler(MediaNodeDestructionHandler *handler)
97 handlers.removeAll(handler);
100 void MediaNodePrivate::addOutputPath(
const Path &p)
102 outputPaths.append(p);
105 void MediaNodePrivate::addInputPath(
const Path &p)
107 inputPaths.append(p);
110 void MediaNodePrivate::removeOutputPath(
const Path &p)
112 int ret = outputPaths.removeAll(p);
117 void MediaNodePrivate::removeInputPath(
const Path &p)
119 int ret = inputPaths.removeAll(p);
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:17 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.