swift
Loading...
Searching...
No Matches
loghistory.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2020 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_LOGHISTORY_H
7#define SWIFT_MISC_LOGHISTORY_H
8
9#include <QObject>
10
11#include "misc/logpattern.h"
17
18namespace swift::misc
19{
23 class SWIFT_MISC_EXPORT CLogHistory : public shared_state::CListJournal<CStatusMessageList>
24 {
26 SWIFT_SHARED_STATE_CHANNEL("swift.log.history")
27
28 public:
30 CLogHistory(QObject *parent = nullptr);
31 };
32
37 {
39 SWIFT_SHARED_STATE_CHANNEL("swift.log.history")
40
41 public:
44 };
45
49 class SWIFT_MISC_EXPORT CLogHistoryReplica : public shared_state::CListObserver<CStatusMessageList, CLogPattern>
50 {
52 SWIFT_SHARED_STATE_CHANNEL("swift.log.history")
53
54 public:
57
58 signals:
61
64
65 private:
66 void onElementAdded(const CStatusMessage &msg) final;
67 void onElementsReplaced(const CStatusMessageList &msgs) final;
68 };
69} // namespace swift::misc
70
71#endif // SWIFT_MISC_LOGHISTORY_H
CLogHistory(QObject *parent=nullptr)
Constructor.
void elementAdded(const swift::misc::CStatusMessage &msg)
Signal emitted for each new log message.
CLogHistoryReplica(QObject *parent=nullptr)
Constructor.
void onElementsReplaced(const CStatusMessageList &msgs) final
Called when the whole list is updated wholesale.
void elementsReplaced(const swift::misc::CStatusMessageList &msgs)
Signal emitted when the whole history is updated wholesale.
CLogHistorySource(QObject *parent=nullptr)
Constructor.
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
Base class for an object that shares state with a corresponding CListObserver subclass object.
Definition listjournal.h:53
Base class for an object that shares state with a corresponding CListObserver subclass object.
Definition listmutator.h:50
Base class for an object that shares state with a corresponding CListMutator subclass object.
#define SWIFT_SHARED_STATE_CHANNEL(ID)
Put this macro in the private section of a class to set the channel of its child endpoints.
Definition datalink.h:27
Free functions in swift::misc.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
#define SWIFT_MISC_EXPORT
Export a class or function from the library.