swift
Loading...
Searching...
No Matches
src
misc
identifiable.cpp
1
// SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
4
#include "
misc/identifiable.h
"
5
6
namespace
swift::misc
7
{
8
CIdentifiable::CIdentifiable
(
QObject
*
object
) : m_identifier(object->objectName())
9
{
10
// if the object name changes we update our originator
11
m_connection =
QObject::connect
(
object
, &
QObject::objectNameChanged
,
12
[
this
,
object
]() { m_identifier =
CIdentifier
(object->
objectName
()); });
13
}
14
15
CIdentifiable::~CIdentifiable
() {
QObject::disconnect
(m_connection); }
16
}
// namespace swift::misc
swift::misc::CIdentifiable::CIdentifiable
CIdentifiable()
Construct without a name.
Definition
identifiable.h:43
swift::misc::CIdentifiable::~CIdentifiable
~CIdentifiable()
Destructor.
Definition
identifiable.cpp:15
swift::misc::CIdentifier
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition
identifier.h:29
identifiable.h
swift::misc
Free functions in swift::misc.
Definition
aircraftmatcher.h:22
QObject
QObject::connect
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject::disconnect
bool disconnect(const QMetaObject::Connection &connection)
QObject::objectName
objectName
QObject::objectNameChanged
void objectNameChanged(const QString &objectName)
Generated on
for swift by
1.15.0