Menu

[1f2bc6]: / dataItemWidget.h  Maximize  Restore  History

Download this file

42 lines (31 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* This application is free software and is released under the terms of
* the BSD license. See LICENSE file for details.
*
* Copyright (c) 2010 Volker Poplawski (volker@openbios.org)
*/
#ifndef DATAITEMWIDGET_H
#define DATAITEMWIDGET_H
#include <QtWidgets>
#include <QTextEdit>
#include "asterix.h"
class DataItemWidget : public QWidget
{
Q_OBJECT
public:
explicit DataItemWidget(QWidget *parent = 0);
void setDataItem(const AsterixBlock* block, const AsterixRecord* record, const AsterixDataItem* dataItem);
signals:
public slots:
void clear() {/* m_webView->setContent(QByteArray());*/ }
static QString printEnumeration(const UapField& uapField, int value);
static QString applyUnitAndScale(const UapField& uapField, int value);
protected:
QString printFields(const AsterixDataItem &dataItem);
QString printItemBitTable(const AsterixDataItem& dataItem, const UapField& uapField) const;
static QString renderBitTable(const uchar* data, int numbytes, int msb, int lsb, bool skipUnusedBytes = true);
QSize sizeHint() const { return QSize(100, 300); }
QString m_css;
QTextEdit* m_textedit;
};
#endif // DATAITEMWIDGET_H