Added reindent/hex view for Applesoft Viewer & HRGC info widget

This commit is contained in:
Mark Long 2016-10-13 16:18:46 -05:00
parent f26af738c4
commit 4e104cd5fb
18 changed files with 1213 additions and 22 deletions

View File

@ -54,7 +54,8 @@ SOURCES += \
src/util/charset.cpp \
src/ui/widgets/characterwidget.cpp \
src/ui/viewers/applesoftfiledetailviewer.cpp \
src/ui/widgets/hexconverter.cpp
src/ui/widgets/hexconverter.cpp \
src/ui/widgets/hrcgcontrolsinfo.cpp
HEADERS += \
@ -89,7 +90,8 @@ HEADERS += \
src/util/charset.h \
src/ui/viewers/charsetviewer.h \
src/ui/viewers/applesoftfiledetailviewer.h \
src/ui/widgets/hexconverter.h
src/ui/widgets/hexconverter.h \
src/ui/widgets/hrcgcontrolsinfo.h
FORMS += \
src/ui/catalogwidget.ui \
@ -99,4 +101,5 @@ FORMS += \
src/ui/viewers/hexdumpviewer.ui \
src/ui/viewers/texthexdumpviewer.ui \
src/ui/viewers/applesoftfiledetailviewer.ui \
src/ui/widgets/hexconverter.ui
src/ui/widgets/hexconverter.ui \
src/ui/widgets/hrcgcontrolsinfo.ui

View File

@ -38,6 +38,7 @@ void ApplesoftFile::parse(quint16 start_address)
int idx = 0;
quint8 val = 0;
m_lines.clear();
quint16 current_address = start_address;
while (idx < m_data.length()) {

View File

@ -22,13 +22,63 @@ QString ApplesoftFormatter::formatText()
QString retval;
foreach (ApplesoftLine line, m_file->getLines()) {
QString linestring = QString("%1 ").arg(line.linenum,5,10,QChar(' '));
QString linestring = QString("%1 ").arg(line.linenum,5,10,QChar(' '));
int indentlevel = 1;
retval.append(linestring);
foreach (ApplesoftToken token, line.tokens)
QVectorIterator<ApplesoftToken> tokenIt(line.tokens);
ApplesoftToken previousToken;
bool firstToken = true;
while (tokenIt.hasNext())
{
ApplesoftToken token = tokenIt.next();
QString tokenstr = token.getRawPrintableString();
if (firstToken)
{
if (!tokenstr.startsWith(" "))
{
tokenstr.prepend(" ");
}
firstToken = false;
}
if (m_format_options.testFlag(ShowIntsAsHex)) {
if (token.getTokenId() == ApplesoftToken::IntegerTokenVal)
{
bool okToConvert = true;
if (previousToken.getTokenId() == ApplesoftToken::ASGoto ||
previousToken.getTokenId() == ApplesoftToken::ASGosub ||
previousToken.getTokenId() == ApplesoftToken::ASThen)
{
qDebug() << "previous token: " << uint16ToHex(tokenIt.peekPrevious().getTokenId());
okToConvert = false;
}
if (okToConvert)
{
quint32 ui32val = token.getIntegerValue();
if (ui32val < 256)
{
quint8 ui8 = ui32val;
tokenstr = "0x"+uint8ToHex(ui8);
}
else if (ui32val < 65536)
{
quint16 ui16 = ui32val;
tokenstr = "0x"+uint16ToHex(ui16);
}
else
{
tokenstr = "0x"+uint32ToHex(ui32val);
}
}
}
}
if (m_format_options.testFlag(BreakAfterReturn)) {
if (token.getTokenId() == ApplesoftToken::ASReturn)
{
@ -36,30 +86,68 @@ QString ApplesoftFormatter::formatText()
}
}
if (m_format_options.testFlag(ReindentCode))
{
if (token.getTokenId() == ':')
{
tokenstr += "\n";
for (int ind = 0; ind < indentlevel; ind++)
{
tokenstr += " ";
}
if (!tokenIt.peekNext().getRawPrintableString().startsWith(" "))
{
tokenstr += " ";
}
}
if (token.getTokenId() == ApplesoftToken::ASThen)
{
indentlevel++;
if (tokenIt.peekNext().getTokenId() != ApplesoftToken::IntegerTokenVal)
{
tokenstr += "\n";
for (int ind = 0; ind < indentlevel; ind++)
{
tokenstr += " ";
}
if (!tokenIt.peekNext().getRawPrintableString().startsWith(" "))
{
tokenstr += " ";
}
}
}
}
#define noDEBUGTOKENS
#ifdef DEBUGTOKENS
if (token.getTokenId() >= 0x80)
{
tokenstr = QString("{%1 (%2)}").arg(tokenstr).arg(uint16ToHex(token.getTokenId()));
// tokenstr = " __ ";
// tokenstr = " __ ";
}
#endif
// if (m_format_options.testFlag(ShowCtrlChars))
// if (m_format_options.testFlag(ShowCtrlChars))
{
tokenstr.replace(QChar(0x7f),QChar(0x2401));
for (int idx = 1; idx <= 0x1f; idx++) {
if (idx == '\n') continue;
tokenstr.replace(QChar(idx),QChar(idx+0x2400));
// tokenstr.replace(QChar(idx), QString("<%1>").arg(uint8ToHex(idx)));
// tokenstr.replace(QChar(idx), QString("<%1>").arg(uint8ToHex(idx)));
}
}
retval.append(tokenstr);
previousToken = token;
}
retval.append("\n");
if (m_format_options.testFlag(ReindentCode))
{
// retval.append("\n");
}
}

View File

@ -11,11 +11,16 @@ class ApplesoftFormatter : public QObject
public:
enum FormatOption {
NoOptions = 0x00,
FormatHTML = 0x01,
ShowCtrlChars = 0x02,
NoOptions = 0x00,
FormatHTML = 0x01,
ShowCtrlChars = 0x02,
BreakAfterReturn = 0x04,
PrettyFlags = 0x07,
PrettyFlags = ShowCtrlChars | BreakAfterReturn | FormatHTML,
ReindentCode = 0x08,
ShowIntsAsHex = 0x10,
AllFlags = 0xffffffff
};
Q_DECLARE_FLAGS(FormatOptions, FormatOption)
@ -24,6 +29,7 @@ public:
explicit ApplesoftFormatter(QObject *parent = 0);
void setFlags(FormatOptions options) { m_format_options = options; }
void setFile(ApplesoftFile *file);
FormatOptions flags() { return m_format_options; }
QString formatText();

View File

@ -110,7 +110,7 @@ QString ApplesoftToken::getHtmlPrintableString()
}
QString ApplesoftToken::getRawPrintableString()
QString ApplesoftToken::getRawPrintableString() const
{
if (m_token_id == 0x00) {
return "";

View File

@ -137,13 +137,14 @@ public:
QByteArray getByteStringValue() const { return m_payload.toByteArray(); }
QString getStringValue() const { return m_payload.toString(); }
quint32 getIntegerValue() const { return (quint32) (m_payload.toUInt() & 0xFFFFFFFF); }
quint16 getWordValue() const { return (quint16) (m_payload.toUInt() & 0xFFFF); }
quint8 getByteValue() const { return (quint8) (m_payload.toUInt() & 0xFF); }
TokenType getTokenType() const { return m_token_type; }
CommandType getCommandType() const { return m_command_type; }
QString getRawPrintableString();
QString getRawPrintableString() const;
static QString getStringForToken(quint8 token) {
if (m_tokens.size() == 0) { initializeTokenTable(); }

View File

@ -13,6 +13,7 @@
#include "texthexdumpviewer.h"
#include "charsetviewer.h"
#include "relocatablefile.h"
#include "hrcgcontrolsinfo.h"
#include <QFileDialog>
#include <QTextDocument>
@ -46,6 +47,9 @@ MainWindow::MainWindow(QWidget *parent) :
ui->catalogWidget, SLOT(unloadDisk(DiskFile*)));
m_hrcgDialog = new HRCGControlsInfo(this);
connect(ui->action_HRCG_Commands, SIGNAL(triggered()), m_hrcgDialog, SLOT(show()));
m_hexConverter = new HexConverter(this);
connect(ui->action_Hex_Converter, SIGNAL(triggered()), m_hexConverter, SLOT(show()));
}

View File

@ -8,6 +8,7 @@
#include "applesoftfile.h"
//#include "relocatablefile.h"
#include "hexconverter.h"
#include "hrcgcontrolsinfo.h"
namespace Ui {
@ -47,6 +48,7 @@ protected:
void openInCharSetViewer(BinaryFile *file);
private:
Ui::MainWindow *ui;
HRCGControlsInfo *m_hrcgDialog;
HexConverter *m_hexConverter;
DiskFile *m_disk;

View File

@ -63,8 +63,15 @@
</property>
<addaction name="action_Hex_Converter"/>
</widget>
<widget class="QMenu" name="menuDocs">
<property name="title">
<string>&amp;Misc</string>
</property>
<addaction name="action_HRCG_Commands"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menu_Util"/>
<addaction name="menuDocs"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QToolBar" name="toolBar">
@ -98,6 +105,11 @@
<string>&amp;Hex Converter...</string>
</property>
</action>
<action name="action_HRCG_Commands">
<property name="text">
<string>&amp;HRCG Commands</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@ -13,6 +13,7 @@ ApplesoftFileDetailViewer::ApplesoftFileDetailViewer(QWidget *parent) :
{
ui->setupUi(this);
ui->m_varView->setSortingEnabled(true);
}
ApplesoftFileDetailViewer::~ApplesoftFileDetailViewer()
@ -54,6 +55,7 @@ void ApplesoftFileDetailViewer::process()
int idx = 0;
foreach (QString key, keys)
{
vardata[key].removeDuplicates();
QString linenums = vardata[key].join(",");
quint16 vtype = vartypes[key];
QString vtname;
@ -75,10 +77,19 @@ void ApplesoftFileDetailViewer::process()
twi->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
ui->m_varView->setItem(idx,1,twi);
twi = new QTableWidgetItem(" ");
twi->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
ui->m_varView->setItem(idx,2,twi);
twi = new QTableWidgetItem(linenums);
twi->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
ui->m_varView->setItem(idx,2,twi);
ui->m_varView->setItem(idx,3,twi);
idx++;
}
ui->m_varView->resizeColumnToContents(0);
ui->m_varView->resizeColumnToContents(1);
ui->m_varView->resizeColumnToContents(2);
}

View File

@ -6,22 +6,42 @@
<rect>
<x>0</x>
<y>0</y>
<width>607</width>
<height>389</height>
<width>588</width>
<height>397</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Variables</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTableWidget" name="m_varView">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>Variable</string>
</property>
</column>
<column>
<property name="text">
<string>Type</string>
@ -29,7 +49,7 @@
</column>
<column>
<property name="text">
<string>Variable</string>
<string>Notes</string>
</property>
</column>
<column>

View File

@ -14,12 +14,17 @@ ApplesoftFileViewer::ApplesoftFileViewer(QWidget *parent) :
m_formatter = new ApplesoftFormatter(this);
//m_formatter->setFlags(ApplesoftFormatter::PrettyFlags | ApplesoftFormatter::BreakAfterReturn);
m_formatter->setFlags(ApplesoftFormatter::AllFlags);
m_formatter->setFlags(ApplesoftFormatter::PrettyFlags);
connect(ui->findButton,SIGNAL(clicked(bool)), SLOT(findText()));
m_isFirstFind = true;
ui->textArea->setUndoRedoEnabled(false);
ui->textArea->setUndoRedoEnabled(true);
connect(ui->intHexCB, SIGNAL(toggled(bool)), SLOT(setIntsAsHex(bool)));
connect(ui->intHexCB, SIGNAL(toggled(bool)), ui->findText,SLOT(clear()));
connect(ui->indentCode, SIGNAL(toggled(bool)), SLOT(setIndentCode(bool)));
connect(ui->indentCode, SIGNAL(toggled(bool)), ui->findText,SLOT(clear()));
connect(ui->varBrowserButton, SIGNAL(clicked(bool)), SLOT(launchVarBrowser()));
}
@ -29,6 +34,37 @@ ApplesoftFileViewer::~ApplesoftFileViewer()
delete ui;
}
void ApplesoftFileViewer::setIndentCode(bool enabled)
{
if (enabled)
{
m_formatter->setFlags(m_formatter->flags() | ApplesoftFormatter::ReindentCode);
}
else
{
m_formatter->setFlags(m_formatter->flags() & ~ApplesoftFormatter::ReindentCode);
}
reformatText();
}
void ApplesoftFileViewer::setIntsAsHex(bool enabled)
{
if (enabled)
{
m_formatter->setFlags(m_formatter->flags() | ApplesoftFormatter::ShowIntsAsHex);
}
else
{
m_formatter->setFlags(m_formatter->flags() & ~ApplesoftFormatter::ShowIntsAsHex);
}
reformatText();
}
void ApplesoftFileViewer::reformatText()
{
ui->textArea->setText(m_formatter->formatText());
}
void ApplesoftFileViewer::setFile(ApplesoftFile *file) {
m_file = file;
m_formatter->setFile(file);

View File

@ -17,7 +17,7 @@ public:
explicit ApplesoftFileViewer(QWidget *parent = 0);
~ApplesoftFileViewer();
void setFormatter(ApplesoftFormatter *formatter);
// void setFormatter(ApplesoftFormatter *formatter);
public slots:
void setFile(ApplesoftFile *m_file);
@ -26,8 +26,12 @@ public slots:
void findText();
protected:
protected slots:
void setIndentCode(bool enabled);
void setIntsAsHex(bool enabled);
void launchVarBrowser();
void reformatText();
private:
ApplesoftFile *m_file;

View File

@ -21,7 +21,7 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,0">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,0,0,0">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -47,6 +47,20 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="indentCode">
<property name="text">
<string>Indent Code</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="intHexCB">
<property name="text">
<string>Ints as Hex</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="varBrowserButton">
<property name="text">

View File

@ -0,0 +1,15 @@
#include "hrcgcontrolsinfo.h"
#include "ui_hrcgcontrolsinfo.h"
HRCGControlsInfo::HRCGControlsInfo(QWidget *parent) :
QDialog(parent),
ui(new Ui::HRCGControlsInfo)
{
ui->setupUi(this);
ui->tableWidget->resizeColumnsToContents();
}
HRCGControlsInfo::~HRCGControlsInfo()
{
delete ui;
}

View File

@ -0,0 +1,22 @@
#ifndef HRCGCONTROLSINFO_H
#define HRCGCONTROLSINFO_H
#include <QDialog>
namespace Ui {
class HRCGControlsInfo;
}
class HRCGControlsInfo : public QDialog
{
Q_OBJECT
public:
explicit HRCGControlsInfo(QWidget *parent = 0);
~HRCGControlsInfo();
private:
Ui::HRCGControlsInfo *ui;
};
#endif // HRCGCONTROLSINFO_H

View File

@ -0,0 +1,947 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>HRCGControlsInfo</class>
<widget class="QDialog" name="HRCGControlsInfo">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>507</width>
<height>620</height>
</rect>
</property>
<property name="windowTitle">
<string>HRCG Contols</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidget">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>20</number>
</attribute>
<attribute name="verticalHeaderMinimumSectionSize">
<number>20</number>
</attribute>
<row>
<property name="text">
<string>A</string>
</property>
</row>
<row>
<property name="text">
<string>B</string>
</property>
</row>
<row>
<property name="text">
<string>C</string>
</property>
</row>
<row>
<property name="text">
<string>D</string>
</property>
</row>
<row>
<property name="text">
<string>E</string>
</property>
</row>
<row>
<property name="text">
<string>F</string>
</property>
</row>
<row>
<property name="text">
<string>I</string>
</property>
</row>
<row>
<property name="text">
<string>K</string>
</property>
</row>
<row>
<property name="text">
<string>L</string>
</property>
</row>
<row>
<property name="text">
<string>N</string>
</property>
</row>
<row>
<property name="text">
<string>OA</string>
</property>
</row>
<row>
<property name="text">
<string>OB</string>
</property>
</row>
<row>
<property name="text">
<string>OC</string>
</property>
</row>
<row>
<property name="text">
<string>OD</string>
</property>
</row>
<row>
<property name="text">
<string>OO</string>
</property>
</row>
<row>
<property name="text">
<string>OP</string>
</property>
</row>
<row>
<property name="text">
<string>OR</string>
</property>
</row>
<row>
<property name="text">
<string>OS</string>
</property>
</row>
<row>
<property name="text">
<string>OT</string>
</property>
</row>
<row>
<property name="text">
<string>OW</string>
</property>
</row>
<row>
<property name="text">
<string>OY</string>
</property>
</row>
<row>
<property name="text">
<string>OZ</string>
</property>
</row>
<row>
<property name="text">
<string>P</string>
</property>
</row>
<row>
<property name="text">
<string>Q</string>
</property>
</row>
<row>
<property name="text">
<string>S</string>
</property>
</row>
<row>
<property name="text">
<string>V</string>
</property>
</row>
<row>
<property name="text">
<string>W</string>
</property>
</row>
<row>
<property name="text">
<string>Y</string>
</property>
</row>
<row>
<property name="text">
<string>Z</string>
</property>
</row>
<column>
<property name="text">
<string>Sequence</string>
</property>
</column>
<column>
<property name="text">
<string>Hex</string>
</property>
</column>
<column>
<property name="text">
<string>Decimal</string>
</property>
</column>
<column>
<property name="text">
<string>Chars</string>
</property>
</column>
<column>
<property name="text">
<string>Description</string>
</property>
</column>
<item row="0" column="0">
<property name="text">
<string>^A n</string>
</property>
</item>
<item row="0" column="1">
<property name="text">
<string>0x01 n</string>
</property>
</item>
<item row="0" column="2">
<property name="text">
<string>1 n</string>
</property>
</item>
<item row="0" column="3">
<property name="text">
<string>SOH</string>
</property>
</item>
<item row="0" column="4">
<property name="text">
<string>Select Character Set n</string>
</property>
</item>
<item row="1" column="0">
<property name="text">
<string>^B</string>
</property>
</item>
<item row="1" column="1">
<property name="text">
<string>0x02</string>
</property>
</item>
<item row="1" column="2">
<property name="text">
<string>2</string>
</property>
</item>
<item row="1" column="3">
<property name="text">
<string>STX</string>
</property>
</item>
<item row="1" column="4">
<property name="text">
<string>Begin Block Display</string>
</property>
</item>
<item row="2" column="0">
<property name="text">
<string>^C</string>
</property>
</item>
<item row="2" column="1">
<property name="text">
<string>0x03</string>
</property>
</item>
<item row="2" column="2">
<property name="text">
<string>3</string>
</property>
</item>
<item row="2" column="3">
<property name="text">
<string>ETX</string>
</property>
</item>
<item row="2" column="4">
<property name="text">
<string>Carriage Return</string>
</property>
</item>
<item row="3" column="0">
<property name="text">
<string>^D</string>
</property>
</item>
<item row="3" column="1">
<property name="text">
<string>0x04</string>
</property>
</item>
<item row="3" column="2">
<property name="text">
<string>4</string>
</property>
</item>
<item row="3" column="3">
<property name="text">
<string>EOT</string>
</property>
</item>
<item row="3" column="4">
<property name="text">
<string>Delimit Block Display</string>
</property>
</item>
<item row="4" column="0">
<property name="text">
<string>^E</string>
</property>
</item>
<item row="4" column="1">
<property name="text">
<string>0x05</string>
</property>
</item>
<item row="4" column="2">
<property name="text">
<string>5</string>
</property>
</item>
<item row="4" column="3">
<property name="text">
<string>ENQ</string>
</property>
</item>
<item row="4" column="4">
<property name="text">
<string>Clear to End of Line</string>
</property>
</item>
<item row="5" column="0">
<property name="text">
<string>^F</string>
</property>
</item>
<item row="5" column="1">
<property name="text">
<string>0x06</string>
</property>
</item>
<item row="5" column="2">
<property name="text">
<string>6</string>
</property>
</item>
<item row="5" column="3">
<property name="text">
<string>ACK</string>
</property>
</item>
<item row="5" column="4">
<property name="text">
<string>Clear to End of Screen</string>
</property>
</item>
<item row="6" column="0">
<property name="text">
<string>^I</string>
</property>
</item>
<item row="6" column="1">
<property name="text">
<string>0x09</string>
</property>
</item>
<item row="6" column="2">
<property name="text">
<string>9</string>
</property>
</item>
<item row="6" column="3">
<property name="text">
<string>HT</string>
</property>
</item>
<item row="6" column="4">
<property name="text">
<string>Inverse Video</string>
</property>
</item>
<item row="7" column="0">
<property name="text">
<string>^K</string>
</property>
</item>
<item row="7" column="1">
<property name="text">
<string>0x0B</string>
</property>
</item>
<item row="7" column="2">
<property name="text">
<string>11</string>
</property>
</item>
<item row="7" column="3">
<property name="text">
<string>VT</string>
</property>
</item>
<item row="7" column="4">
<property name="text">
<string>Caps Lock *</string>
</property>
</item>
<item row="8" column="0">
<property name="text">
<string>^L</string>
</property>
</item>
<item row="8" column="1">
<property name="text">
<string>0x0C</string>
</property>
</item>
<item row="8" column="2">
<property name="text">
<string>12</string>
</property>
</item>
<item row="8" column="3">
<property name="text">
<string>FF</string>
</property>
</item>
<item row="8" column="4">
<property name="text">
<string>Lower Case</string>
</property>
</item>
<item row="9" column="0">
<property name="text">
<string>^N</string>
</property>
</item>
<item row="9" column="1">
<property name="text">
<string>0x0E</string>
</property>
</item>
<item row="9" column="2">
<property name="text">
<string>14</string>
</property>
</item>
<item row="9" column="3">
<property name="text">
<string>SO</string>
</property>
</item>
<item row="9" column="4">
<property name="text">
<string>Normal Video *</string>
</property>
</item>
<item row="10" column="0">
<property name="text">
<string>^O ^A</string>
</property>
</item>
<item row="10" column="1">
<property name="text">
<string>0x0F 0x01</string>
</property>
</item>
<item row="10" column="2">
<property name="text">
<string>15 1</string>
</property>
</item>
<item row="10" column="3">
<property name="text">
<string>SI SOH</string>
</property>
</item>
<item row="10" column="4">
<property name="text">
<string>Primary is Page 1 *</string>
</property>
</item>
<item row="11" column="0">
<property name="text">
<string>^O ^B</string>
</property>
</item>
<item row="11" column="1">
<property name="text">
<string>0x0F 0x02</string>
</property>
</item>
<item row="11" column="2">
<property name="text">
<string>15 2</string>
</property>
</item>
<item row="11" column="3">
<property name="text">
<string>SI STX</string>
</property>
</item>
<item row="11" column="4">
<property name="text">
<string>Primary is Page 2</string>
</property>
</item>
<item row="12" column="0">
<property name="text">
<string>^O ^C</string>
</property>
</item>
<item row="12" column="1">
<property name="text">
<string>0x0F 0x03</string>
</property>
</item>
<item row="12" column="2">
<property name="text">
<string>15 3</string>
</property>
</item>
<item row="12" column="3">
<property name="text">
<string>SI ETX</string>
</property>
</item>
<item row="12" column="4">
<property name="text">
<string>Complement</string>
</property>
</item>
<item row="13" column="0">
<property name="text">
<string>^O ^D</string>
</property>
</item>
<item row="13" column="1">
<property name="text">
<string>0x0F 0x04</string>
</property>
</item>
<item row="13" column="2">
<property name="text">
<string>15 4</string>
</property>
</item>
<item row="13" column="3">
<property name="text">
<string>SI EOT</string>
</property>
</item>
<item row="13" column="4">
<property name="text">
<string>Display Primary</string>
</property>
</item>
<item row="14" column="0">
<property name="text">
<string>^O ^O</string>
</property>
</item>
<item row="14" column="1">
<property name="text">
<string>0x0F 0x0F</string>
</property>
</item>
<item row="14" column="2">
<property name="text">
<string>15 15</string>
</property>
</item>
<item row="14" column="3">
<property name="text">
<string>SI SI</string>
</property>
</item>
<item row="14" column="4">
<property name="text">
<string>Overstrike</string>
</property>
</item>
<item row="15" column="0">
<property name="text">
<string>^O ^P</string>
</property>
</item>
<item row="15" column="1">
<property name="text">
<string>0x0F 0x10</string>
</property>
</item>
<item row="15" column="2">
<property name="text">
<string>15 16</string>
</property>
</item>
<item row="15" column="3">
<property name="text">
<string>SI DLE</string>
</property>
</item>
<item row="15" column="4">
<property name="text">
<string>Print *</string>
</property>
</item>
<item row="16" column="0">
<property name="text">
<string>^O ^R</string>
</property>
</item>
<item row="16" column="1">
<property name="text">
<string>0x0F 0x12</string>
</property>
</item>
<item row="16" column="2">
<property name="text">
<string>15 18</string>
</property>
</item>
<item row="16" column="3">
<property name="text">
<string>SI DC2</string>
</property>
</item>
<item row="16" column="4">
<property name="text">
<string>Reverse Overlay</string>
</property>
</item>
<item row="17" column="0">
<property name="text">
<string>^O ^S</string>
</property>
</item>
<item row="17" column="1">
<property name="text">
<string>0x0F 0x13</string>
</property>
</item>
<item row="17" column="2">
<property name="text">
<string>15 19</string>
</property>
</item>
<item row="17" column="3">
<property name="text">
<string>SI DC3</string>
</property>
</item>
<item row="17" column="4">
<property name="text">
<string>Scroll *</string>
</property>
</item>
<item row="18" column="0">
<property name="text">
<string>^O ^T</string>
</property>
</item>
<item row="18" column="1">
<property name="text">
<string>0x0F 0x14</string>
</property>
</item>
<item row="18" column="2">
<property name="text">
<string>15 20</string>
</property>
</item>
<item row="18" column="3">
<property name="text">
<string>SI DC4</string>
</property>
</item>
<item row="18" column="4">
<property name="text">
<string>Transparent Overlay</string>
</property>
</item>
<item row="19" column="0">
<property name="text">
<string>^O ^W</string>
</property>
</item>
<item row="19" column="1">
<property name="text">
<string>0x0F 0x17</string>
</property>
</item>
<item row="19" column="2">
<property name="text">
<string>15 23</string>
</property>
</item>
<item row="19" column="3">
<property name="text">
<string>SI ETB</string>
</property>
</item>
<item row="19" column="4">
<property name="text">
<string>Wrap</string>
</property>
</item>
<item row="20" column="0">
<property name="text">
<string>^O ^Y</string>
</property>
</item>
<item row="20" column="1">
<property name="text">
<string>0x0F 0x18</string>
</property>
</item>
<item row="20" column="2">
<property name="text">
<string>15 25</string>
</property>
</item>
<item row="20" column="3">
<property name="text">
<string>SI EM</string>
</property>
</item>
<item row="20" column="4">
<property name="text">
<string>Call User Sub A</string>
</property>
</item>
<item row="21" column="0">
<property name="text">
<string>^O ^Z</string>
</property>
</item>
<item row="21" column="1">
<property name="text">
<string>0x0F 0x1A</string>
</property>
</item>
<item row="21" column="2">
<property name="text">
<string>15 26</string>
</property>
</item>
<item row="21" column="3">
<property name="text">
<string>SI SUB</string>
</property>
</item>
<item row="21" column="4">
<property name="text">
<string>Call User Sub B</string>
</property>
</item>
<item row="22" column="0">
<property name="text">
<string>^P</string>
</property>
</item>
<item row="22" column="1">
<property name="text">
<string>0x10</string>
</property>
</item>
<item row="22" column="2">
<property name="text">
<string>16</string>
</property>
</item>
<item row="22" column="3">
<property name="text">
<string>DLE</string>
</property>
</item>
<item row="22" column="4">
<property name="text">
<string>Clear Page</string>
</property>
</item>
<item row="23" column="0">
<property name="text">
<string>^Q</string>
</property>
</item>
<item row="23" column="1">
<property name="text">
<string>0x11</string>
</property>
</item>
<item row="23" column="2">
<property name="text">
<string>17</string>
</property>
</item>
<item row="23" column="3">
<property name="text">
<string>DC1</string>
</property>
</item>
<item row="23" column="4">
<property name="text">
<string>Home Cursor</string>
</property>
</item>
<item row="24" column="0">
<property name="text">
<string>^S</string>
</property>
</item>
<item row="24" column="1">
<property name="text">
<string>0x13</string>
</property>
</item>
<item row="24" column="2">
<property name="text">
<string>19</string>
</property>
</item>
<item row="24" column="3">
<property name="text">
<string>DC3</string>
</property>
</item>
<item row="24" column="4">
<property name="text">
<string>Shift</string>
</property>
</item>
<item row="25" column="0">
<property name="text">
<string>^V</string>
</property>
</item>
<item row="25" column="1">
<property name="text">
<string>0x16</string>
</property>
</item>
<item row="25" column="2">
<property name="text">
<string>22</string>
</property>
</item>
<item row="25" column="3">
<property name="text">
<string>SYN</string>
</property>
</item>
<item row="25" column="4">
<property name="text">
<string>Set Text Window (upper-left)</string>
</property>
</item>
<item row="26" column="0">
<property name="text">
<string>^W</string>
</property>
</item>
<item row="26" column="1">
<property name="text">
<string>0x17</string>
</property>
</item>
<item row="26" column="2">
<property name="text">
<string>23</string>
</property>
</item>
<item row="26" column="3">
<property name="text">
<string>ETB</string>
</property>
</item>
<item row="26" column="4">
<property name="text">
<string>Set Text Window (lower-right)</string>
</property>
</item>
<item row="27" column="0">
<property name="text">
<string>^Y</string>
</property>
</item>
<item row="27" column="1">
<property name="text">
<string>0x19</string>
</property>
</item>
<item row="27" column="2">
<property name="text">
<string>25</string>
</property>
</item>
<item row="27" column="3">
<property name="text">
<string>EM</string>
</property>
</item>
<item row="27" column="4">
<property name="text">
<string>Set Text Window (full screen) *</string>
</property>
</item>
<item row="28" column="0">
<property name="text">
<string>^Z</string>
</property>
</item>
<item row="28" column="1">
<property name="text">
<string>0x1A</string>
</property>
</item>
<item row="28" column="2">
<property name="text">
<string>26</string>
</property>
</item>
<item row="28" column="3">
<property name="text">
<string>SUB</string>
</property>
</item>
<item row="28" column="4">
<property name="text">
<string>Restore Default Parameters</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -63,6 +63,11 @@ inline QString uint16ToHex(quint16 val) {
return retval;
}
inline QString uint32ToHex(quint32 val) {
QString retval = QString("%1").arg(val,8,16,QChar('0')).toUpper();
return retval;
}