QtPdCom  1.5.2
MessageItem.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * Copyright (C) 2022 Florian Pose <fp@igh.de>
4 *
5 * This file is part of the QtPdCom library.
6 *
7 * The QtPdCom library is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * The QtPdCom library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 * License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with the QtPdCom Library. If not, see <http://www.gnu.org/licenses/>.
19 *
20 ****************************************************************************/
21
22#ifndef PD_MESSAGE_ITEM
23#define PD_MESSAGE_ITEM
24
25#include "MessageModelImpl.h"
26
27#include <QObject>
28
29/****************************************************************************/
30
31namespace QtPdCom {
32
33bool seqNoLessThan(uint32_t, uint32_t);
34
35/****************************************************************************/
36
38{
39 MessageItem() = delete;
41
42 Message::Type getType() const;
43 QString getText(const QString &) const;
44 QString getDescription(const QString &) const;
45 QString getTimeString() const;
46 QString getResetTimeString() const;
47 bool isActive() const;
48
49 static bool seqNoLessThan(const MessageItem *, const MessageItem *);
50 static bool setTimeLessThan(const MessageItem *, const MessageItem *);
51 static bool levelNoLessThan(const MessageItem *, const MessageItem *);
52 static bool lessThan(const MessageItem *, const MessageItem *);
53
56
57 quint32 seqNo;
58
59 quint64 const setTime;
60 quint64 resetTime;
61};
62
63/****************************************************************************/
64
65}
66
67#endif
68
69/****************************************************************************/
Definition MessageModelImpl.h:42
friend class Message
Definition MessageModelImpl.h:46
bool(* lessThan)(const MessageItem *, const MessageItem *)
Definition MessageModelImpl.h:95
Type
Message type.
Definition Message.h:47
Definition BroadcastModel.h:32
bool seqNoLessThan(uint32_t a, uint32_t b)
Definition MessageItem.cpp:29
Definition MessageItem.h:38
QString getDescription(const QString &) const
Definition MessageItem.cpp:65
bool isActive() const
Definition MessageItem.cpp:92
quint32 seqNo
Definition MessageItem.h:57
Message::Type getType() const
Definition MessageItem.cpp:50
QString getTimeString() const
Definition MessageItem.cpp:73
static bool seqNoLessThan(const MessageItem *, const MessageItem *)
Definition MessageItem.cpp:99
MessageModel::Impl *const modelImpl
Definition MessageItem.h:55
QString getResetTimeString() const
Definition MessageItem.cpp:80
QString getText(const QString &) const
Definition MessageItem.cpp:57
Message *const message
Definition MessageItem.h:54
static bool levelNoLessThan(const MessageItem *, const MessageItem *)
Definition MessageItem.cpp:117
quint64 resetTime
Definition MessageItem.h:60
static bool setTimeLessThan(const MessageItem *, const MessageItem *)
Definition MessageItem.cpp:107
quint64 const setTime
Definition MessageItem.h:59