31 lines
687 B
C++
31 lines
687 B
C++
#pragma once
|
|
#include <QWidget>
|
|
#include <QScrollArea>
|
|
#include <QVBoxLayout>
|
|
#include <QHBoxLayout>
|
|
#include <QPushButton>
|
|
#include <QLineEdit>
|
|
#include <QMap>
|
|
#include <QString>
|
|
|
|
#include "tagpanel.h"
|
|
|
|
// TagWidget is the side-panel that receives tagDetected() signals from the
|
|
// SerialWorker and creates/updates one TagPanel per unique tag.
|
|
class TagWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit TagWidget(QWidget *parent = nullptr);
|
|
|
|
public slots:
|
|
void handleTag(const QString &tag, const QString &value);
|
|
void clearAll();
|
|
void removeTag(const QString &tag);
|
|
|
|
private:
|
|
QVBoxLayout *m_panelLayout = nullptr;
|
|
QMap<QString, TagPanel*> m_panels;
|
|
};
|