43 lines
827 B
C++
43 lines
827 B
C++
#ifndef DATACOPYDIALOG_H
|
|
#define DATACOPYDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QVector>
|
|
#include "NewTypes.h"
|
|
|
|
namespace Ui
|
|
{
|
|
class DataCopyDialog;
|
|
}
|
|
|
|
class DataCopyDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DataCopyDialog(const QVector<byte_t>* data, QWidget* parent = 0);
|
|
~DataCopyDialog();
|
|
|
|
private slots:
|
|
void on_comboType_currentIndexChanged(int index);
|
|
void on_buttonCopy_clicked();
|
|
|
|
private:
|
|
Ui::DataCopyDialog* ui;
|
|
const QVector<byte_t>* mData;
|
|
|
|
enum DataType
|
|
{
|
|
DataCByte = 0,
|
|
DataCWord,
|
|
DataCDword,
|
|
DataCString,
|
|
DataCUnicodeString,
|
|
};
|
|
|
|
void printData(DataType type);
|
|
QString printEscapedString(bool & bPrevWasHex, int ch, const char* hexFormat);
|
|
};
|
|
|
|
#endif // DATACOPYDIALOG_H
|