change eol to lf, set 4 space tab
This commit is contained in:
parent
7b94e714a3
commit
a6772a32f6
78
HexTool.pro
78
HexTool.pro
@ -1,39 +1,39 @@
|
|||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
#
|
#
|
||||||
# Project created by QtCreator 2018-01-16T08:53:27
|
# Project created by QtCreator 2018-01-16T08:53:27
|
||||||
#
|
#
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
QT += core gui
|
QT += core gui
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
TARGET = HexTool
|
TARGET = HexTool
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
# any feature of Qt which as been marked as deprecated (the exact warnings
|
# any feature of Qt which as been marked as deprecated (the exact warnings
|
||||||
# depend on your compiler). Please consult the documentation of the
|
# depend on your compiler). Please consult the documentation of the
|
||||||
# deprecated API in order to know how to port your code away from it.
|
# deprecated API in order to know how to port your code away from it.
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
# You can also make your code fail to compile if you use deprecated APIs.
|
# You can also make your code fail to compile if you use deprecated APIs.
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
|
||||||
SOURCES += main.cpp\
|
SOURCES += main.cpp\
|
||||||
mainwindow.cpp \
|
mainwindow.cpp \
|
||||||
data.cpp
|
data.cpp
|
||||||
|
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
data.h
|
data.h
|
||||||
|
|
||||||
FORMS += mainwindow.ui
|
FORMS += mainwindow.ui
|
||||||
|
|
||||||
DISTFILES +=
|
DISTFILES +=
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
icon.qrc
|
icon.qrc
|
||||||
RC_FILE = icon.rc
|
RC_FILE = icon.rc
|
||||||
|
176
data.cpp
176
data.cpp
@ -1,88 +1,88 @@
|
|||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
|
||||||
Data::Data(QString &in, bool cap)
|
Data::Data(QString &in, bool cap)
|
||||||
{
|
{
|
||||||
this->txt = in;
|
this->txt = in;
|
||||||
this->cap = cap;
|
this->cap = cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Data::Data(int len, bool cap)
|
Data::Data(int len, bool cap)
|
||||||
{
|
{
|
||||||
QByteArray rand;
|
QByteArray rand;
|
||||||
QTime cur = QTime::currentTime();
|
QTime cur = QTime::currentTime();
|
||||||
qsrand(cur.second() * 1000 + cur.msec());
|
qsrand(cur.second() * 1000 + cur.msec());
|
||||||
while (len--) rand.append(qrand() % 256);
|
while (len--) rand.append(qrand() % 256);
|
||||||
this->txt = QString(rand.toHex());
|
this->txt = QString(rand.toHex());
|
||||||
this->cap = cap;
|
this->cap = cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Data::to_hex()
|
void Data::to_hex()
|
||||||
{
|
{
|
||||||
this->txt = QString(this->txt.toLocal8Bit().toHex());
|
this->txt = QString(this->txt.toLocal8Bit().toHex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Data::clean()
|
void Data::clean()
|
||||||
{
|
{
|
||||||
this->txt = this->txt.toLower().replace(QRegExp("(0x)|[^0-9a-fA-F\n]"), "");
|
this->txt = this->txt.toLower().replace(QRegExp("(0x)|[^0-9a-fA-F\n]"), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString Data::get_ascii()
|
QString Data::get_ascii()
|
||||||
{
|
{
|
||||||
return QString(QByteArray::fromHex(this->txt.toLocal8Bit()));
|
return QString(QByteArray::fromHex(this->txt.toLocal8Bit()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString Data::get(int unit, enum format fmt)
|
QString Data::get(int unit, enum format fmt)
|
||||||
{
|
{
|
||||||
QStringList work;
|
QStringList work;
|
||||||
|
|
||||||
if (this->cap) this->txt = this->txt.toUpper();
|
if (this->cap) this->txt = this->txt.toUpper();
|
||||||
|
|
||||||
if (0 > unit) {
|
if (0 > unit) {
|
||||||
work = this->txt.split('\n');
|
work = this->txt.split('\n');
|
||||||
} else {
|
} else {
|
||||||
this->txt.replace("\n", "");
|
this->txt.replace("\n", "");
|
||||||
|
|
||||||
if (unit) {
|
if (unit) {
|
||||||
unit *= 2;
|
unit *= 2;
|
||||||
for (int i = 0; i < this->txt.size(); i += unit) {
|
for (int i = 0; i < this->txt.size(); i += unit) {
|
||||||
work << this->txt.mid(i, unit);
|
work << this->txt.mid(i, unit);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
work << this->txt;
|
work << this->txt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString st;
|
QString st;
|
||||||
|
|
||||||
switch (fmt) {
|
switch (fmt) {
|
||||||
case Data::seq:
|
case Data::seq:
|
||||||
return work.join('\n');
|
return work.join('\n');
|
||||||
case Data::space:
|
case Data::space:
|
||||||
st = "\\1 ";
|
st = "\\1 ";
|
||||||
break;
|
break;
|
||||||
case Data::prefix:
|
case Data::prefix:
|
||||||
st = "0x\\1, ";
|
st = "0x\\1, ";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList::iterator pick;
|
QStringList::iterator pick;
|
||||||
for (pick = work.begin(); pick != work.end(); pick++) {
|
for (pick = work.begin(); pick != work.end(); pick++) {
|
||||||
if ((*pick).size() & 1) (*pick) += "0";
|
if ((*pick).size() & 1) (*pick) += "0";
|
||||||
(*pick).replace(QRegExp("([0-9a-fA-F]{2})"), st);
|
(*pick).replace(QRegExp("([0-9a-fA-F]{2})"), st);
|
||||||
(*pick).replace(QRegExp(" +$"), "");
|
(*pick).replace(QRegExp(" +$"), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return work.join('\n');
|
return work.join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
46
data.h
46
data.h
@ -1,23 +1,23 @@
|
|||||||
#ifndef DATA_H
|
#ifndef DATA_H
|
||||||
#define DATA_H
|
#define DATA_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class Data
|
class Data
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum format { seq, space, prefix };
|
enum format { seq, space, prefix };
|
||||||
bool cap;
|
bool cap;
|
||||||
|
|
||||||
Data(QString &in, bool cap);
|
Data(QString &in, bool cap);
|
||||||
Data(int len, bool cap);
|
Data(int len, bool cap);
|
||||||
void clean();
|
void clean();
|
||||||
void to_hex();
|
void to_hex();
|
||||||
QString get_ascii();
|
QString get_ascii();
|
||||||
QString get(int unit, enum format fmt);
|
QString get(int unit, enum format fmt);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString txt;
|
QString txt;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DATA_H
|
#endif // DATA_H
|
||||||
|
10
icon.qrc
10
icon.qrc
@ -1,5 +1,5 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/new/icon">
|
<qresource prefix="/new/icon">
|
||||||
<file>hex.ico</file>
|
<file>hex.ico</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
26
main.cpp
26
main.cpp
@ -1,13 +1,13 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
248
mainwindow.cpp
248
mainwindow.cpp
@ -1,124 +1,124 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
const int maxlen = 65536;
|
const int maxlen = 65536;
|
||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
ui(new Ui::MainWindow)
|
ui(new Ui::MainWindow)
|
||||||
{
|
{
|
||||||
this->bpl = 16;
|
this->bpl = 16;
|
||||||
this->fmt = Data::prefix;
|
this->fmt = Data::prefix;
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowIcon(QIcon("hex.ico"));
|
setWindowIcon(QIcon("hex.ico"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::unify_rand(QPlainTextEdit *to)
|
void MainWindow::unify_rand(QPlainTextEdit *to)
|
||||||
{
|
{
|
||||||
int len = ui->ln_rand_byte->text().toInt();
|
int len = ui->ln_rand_byte->text().toInt();
|
||||||
if (len > maxlen) return;
|
if (len > maxlen) return;
|
||||||
|
|
||||||
Data d(len, ui->cb_cap->isChecked());
|
Data d(len, ui->cb_cap->isChecked());
|
||||||
to->setPlainText(d.get(this->bpl, this->fmt));
|
to->setPlainText(d.get(this->bpl, this->fmt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::unify_trns(QPlainTextEdit *from, QPlainTextEdit *to)
|
void MainWindow::unify_trns(QPlainTextEdit *from, QPlainTextEdit *to)
|
||||||
{
|
{
|
||||||
QString get = from->toPlainText();
|
QString get = from->toPlainText();
|
||||||
Data d(get, ui->cb_cap->isChecked());
|
Data d(get, ui->cb_cap->isChecked());
|
||||||
if (ui->rb_trans_hex->isChecked()) {
|
if (ui->rb_trans_hex->isChecked()) {
|
||||||
d.to_hex();
|
d.to_hex();
|
||||||
to->setPlainText(d.get(this->bpl, this->fmt));
|
to->setPlainText(d.get(this->bpl, this->fmt));
|
||||||
} else {
|
} else {
|
||||||
to->setPlainText(d.get_ascii());
|
to->setPlainText(d.get_ascii());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::unify_fmt(QPlainTextEdit *from, QPlainTextEdit *to)
|
void MainWindow::unify_fmt(QPlainTextEdit *from, QPlainTextEdit *to)
|
||||||
{
|
{
|
||||||
QString get = from->toPlainText();
|
QString get = from->toPlainText();
|
||||||
Data d(get, ui->cb_cap->isChecked());
|
Data d(get, ui->cb_cap->isChecked());
|
||||||
d.clean();
|
d.clean();
|
||||||
to->setPlainText(d.get(this->bpl, this->fmt));
|
to->setPlainText(d.get(this->bpl, this->fmt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_rb_bl_set_clicked()
|
void MainWindow::on_rb_bl_set_clicked()
|
||||||
{
|
{
|
||||||
this->bpl = ui->ln_bl_byte->text().toInt();
|
this->bpl = ui->ln_bl_byte->text().toInt();
|
||||||
ui->ln_bl_byte->setEnabled(true);
|
ui->ln_bl_byte->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_rb_bl_none_clicked()
|
void MainWindow::on_rb_bl_none_clicked()
|
||||||
{
|
{
|
||||||
this->bpl = 0;
|
this->bpl = 0;
|
||||||
ui->ln_bl_byte->setDisabled(true);
|
ui->ln_bl_byte->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_rb_bl_keep_clicked()
|
void MainWindow::on_rb_bl_keep_clicked()
|
||||||
{
|
{
|
||||||
this->bpl = -1;
|
this->bpl = -1;
|
||||||
ui->ln_bl_byte->setDisabled(true);
|
ui->ln_bl_byte->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_rb_fmt_prfx_clicked()
|
void MainWindow::on_rb_fmt_prfx_clicked()
|
||||||
{
|
{
|
||||||
this->fmt = Data::prefix;
|
this->fmt = Data::prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_rb_fmt_space_clicked()
|
void MainWindow::on_rb_fmt_space_clicked()
|
||||||
{
|
{
|
||||||
this->fmt = Data::space;
|
this->fmt = Data::space;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_rb_fmt_seq_clicked()
|
void MainWindow::on_rb_fmt_seq_clicked()
|
||||||
{
|
{
|
||||||
this->fmt = Data::seq;
|
this->fmt = Data::seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_fmt_left_clicked()
|
void MainWindow::on_btn_fmt_left_clicked()
|
||||||
{
|
{
|
||||||
unify_fmt(ui->txt_right, ui->txt_left);
|
unify_fmt(ui->txt_right, ui->txt_left);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_fmt_right_clicked()
|
void MainWindow::on_btn_fmt_right_clicked()
|
||||||
{
|
{
|
||||||
unify_fmt(ui->txt_left, ui->txt_right);
|
unify_fmt(ui->txt_left, ui->txt_right);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_trans_left_clicked()
|
void MainWindow::on_btn_trans_left_clicked()
|
||||||
{
|
{
|
||||||
unify_trns(ui->txt_right, ui->txt_left);
|
unify_trns(ui->txt_right, ui->txt_left);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_trans_right_clicked()
|
void MainWindow::on_btn_trans_right_clicked()
|
||||||
{
|
{
|
||||||
unify_trns(ui->txt_left, ui->txt_right);
|
unify_trns(ui->txt_left, ui->txt_right);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_rand_left_clicked()
|
void MainWindow::on_btn_rand_left_clicked()
|
||||||
{
|
{
|
||||||
unify_rand(ui->txt_left);
|
unify_rand(ui->txt_left);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_rand_right_clicked()
|
void MainWindow::on_btn_rand_right_clicked()
|
||||||
{
|
{
|
||||||
unify_rand(ui->txt_right);
|
unify_rand(ui->txt_right);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_ln_bl_byte_editingFinished()
|
void MainWindow::on_ln_bl_byte_editingFinished()
|
||||||
{
|
{
|
||||||
this->bpl = ui->ln_bl_byte->text().toInt();
|
this->bpl = ui->ln_bl_byte->text().toInt();
|
||||||
}
|
}
|
||||||
|
102
mainwindow.h
102
mainwindow.h
@ -1,57 +1,45 @@
|
|||||||
#ifndef MAINWINDOW_H
|
#ifndef MAINWINDOW_H
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QtWidgets/QPlainTextEdit>
|
#include <QtWidgets/QPlainTextEdit>
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = 0);
|
explicit MainWindow(QWidget *parent = 0);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_rb_bl_set_clicked();
|
void on_rb_bl_set_clicked();
|
||||||
|
void on_rb_bl_none_clicked();
|
||||||
void on_rb_bl_none_clicked();
|
void on_rb_bl_keep_clicked();
|
||||||
|
void on_rb_fmt_prfx_clicked();
|
||||||
void on_rb_bl_keep_clicked();
|
void on_rb_fmt_space_clicked();
|
||||||
|
void on_rb_fmt_seq_clicked();
|
||||||
void on_rb_fmt_prfx_clicked();
|
void on_btn_fmt_left_clicked();
|
||||||
|
void on_btn_fmt_right_clicked();
|
||||||
void on_rb_fmt_space_clicked();
|
void on_btn_trans_left_clicked();
|
||||||
|
void on_btn_trans_right_clicked();
|
||||||
void on_rb_fmt_seq_clicked();
|
void on_btn_rand_left_clicked();
|
||||||
|
void on_btn_rand_right_clicked();
|
||||||
void on_btn_fmt_left_clicked();
|
void on_ln_bl_byte_editingFinished();
|
||||||
|
|
||||||
void on_btn_fmt_right_clicked();
|
private:
|
||||||
|
Ui::MainWindow *ui;
|
||||||
void on_btn_trans_left_clicked();
|
int bpl;
|
||||||
|
bool cap;
|
||||||
void on_btn_trans_right_clicked();
|
Data::format fmt;
|
||||||
|
void unify_rand(QPlainTextEdit *to);
|
||||||
void on_btn_rand_left_clicked();
|
void unify_trns(QPlainTextEdit *from, QPlainTextEdit *to);
|
||||||
|
void unify_fmt(QPlainTextEdit *from, QPlainTextEdit *to);
|
||||||
void on_btn_rand_right_clicked();
|
};
|
||||||
|
|
||||||
void on_ln_bl_byte_editingFinished();
|
#endif // MAINWINDOW_H
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::MainWindow *ui;
|
|
||||||
int bpl;
|
|
||||||
bool cap;
|
|
||||||
Data::format fmt;
|
|
||||||
void unify_rand(QPlainTextEdit *to);
|
|
||||||
void unify_trns(QPlainTextEdit *from, QPlainTextEdit *to);
|
|
||||||
void unify_fmt(QPlainTextEdit *from, QPlainTextEdit *to);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
|
||||||
|
844
mainwindow.ui
844
mainwindow.ui
@ -1,422 +1,422 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>MainWindow</class>
|
<class>MainWindow</class>
|
||||||
<widget class="QMainWindow" name="MainWindow">
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1120</width>
|
<width>1120</width>
|
||||||
<height>700</height>
|
<height>700</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>1120</width>
|
<width>1120</width>
|
||||||
<height>700</height>
|
<height>700</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>1120</width>
|
<width>1120</width>
|
||||||
<height>700</height>
|
<height>700</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>十六进制数据整理工具</string>
|
<string>十六进制数据整理工具</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralWidget">
|
<widget class="QWidget" name="centralWidget">
|
||||||
<widget class="QPlainTextEdit" name="txt_left">
|
<widget class="QPlainTextEdit" name="txt_left">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>350</width>
|
<width>350</width>
|
||||||
<height>680</height>
|
<height>680</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPlainTextEdit" name="txt_right">
|
<widget class="QPlainTextEdit" name="txt_right">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>500</x>
|
<x>500</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>610</width>
|
<width>610</width>
|
||||||
<height>680</height>
|
<height>680</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="plainText">
|
<property name="plainText">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="gb_rand">
|
<widget class="QGroupBox" name="gb_rand">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>370</x>
|
<x>370</x>
|
||||||
<y>570</y>
|
<y>570</y>
|
||||||
<width>120</width>
|
<width>120</width>
|
||||||
<height>111</height>
|
<height>111</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>生成随机数</string>
|
<string>生成随机数</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QPushButton" name="btn_rand_left">
|
<widget class="QPushButton" name="btn_rand_left">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>50</y>
|
<y>50</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>←生成</string>
|
<string>←生成</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>20</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>91</width>
|
<width>91</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="hl_rand">
|
<layout class="QHBoxLayout" name="hl_rand">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="ln_rand_byte">
|
<widget class="QLineEdit" name="ln_rand_byte">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>50</width>
|
<width>50</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>100</string>
|
<string>100</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>字节</string>
|
<string>字节</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="btn_rand_right">
|
<widget class="QPushButton" name="btn_rand_right">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>40</x>
|
||||||
<y>80</y>
|
<y>80</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>生成→</string>
|
<string>生成→</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="gb_pf">
|
<widget class="QGroupBox" name="gb_pf">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>370</x>
|
<x>370</x>
|
||||||
<y>160</y>
|
<y>160</y>
|
||||||
<width>120</width>
|
<width>120</width>
|
||||||
<height>131</height>
|
<height>131</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>格式选项</string>
|
<string>格式选项</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="verticalLayoutWidget_2">
|
<widget class="QWidget" name="verticalLayoutWidget_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>109</width>
|
<width>109</width>
|
||||||
<height>71</height>
|
<height>71</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_fmt">
|
<layout class="QVBoxLayout" name="vl_fmt">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_fmt_prfx">
|
<widget class="QRadioButton" name="rb_fmt_prfx">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>每字节带前导0x</string>
|
<string>每字节带前导0x</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_fmt_space">
|
<widget class="QRadioButton" name="rb_fmt_space">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>每字节空格</string>
|
<string>每字节空格</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_fmt_seq">
|
<widget class="QRadioButton" name="rb_fmt_seq">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>每行连续输出</string>
|
<string>每行连续输出</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="cb_cap">
|
<widget class="QCheckBox" name="cb_cap">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>110</y>
|
<y>110</y>
|
||||||
<width>71</width>
|
<width>71</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>输出大写</string>
|
<string>输出大写</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="gb_trans">
|
<widget class="QGroupBox" name="gb_trans">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>370</x>
|
<x>370</x>
|
||||||
<y>410</y>
|
<y>410</y>
|
||||||
<width>120</width>
|
<width>120</width>
|
||||||
<height>141</height>
|
<height>141</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>ASCII转换</string>
|
<string>ASCII转换</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="verticalLayoutWidget_3">
|
<widget class="QWidget" name="verticalLayoutWidget_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>101</width>
|
<width>101</width>
|
||||||
<height>41</height>
|
<height>41</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_trans_hex">
|
<widget class="QRadioButton" name="rb_trans_hex">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>转为十六进制</string>
|
<string>转为十六进制</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_trans_ascii">
|
<widget class="QRadioButton" name="rb_trans_ascii">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>转为ASCII</string>
|
<string>转为ASCII</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="btn_trans_left">
|
<widget class="QPushButton" name="btn_trans_left">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>80</y>
|
<y>80</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>←转换</string>
|
<string>←转换</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="btn_trans_right">
|
<widget class="QPushButton" name="btn_trans_right">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>40</x>
|
||||||
<y>110</y>
|
<y>110</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>转换→</string>
|
<string>转换→</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="gb_bl">
|
<widget class="QGroupBox" name="gb_bl">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>370</x>
|
<x>370</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>120</width>
|
<width>120</width>
|
||||||
<height>121</height>
|
<height>121</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>换行选项</string>
|
<string>换行选项</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="verticalLayoutWidget">
|
<widget class="QWidget" name="verticalLayoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>103</width>
|
<width>103</width>
|
||||||
<height>91</height>
|
<height>91</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_bl">
|
<layout class="QVBoxLayout" name="vl_bl">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_bl_set">
|
<widget class="QRadioButton" name="rb_bl_set">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>增加换行</string>
|
<string>增加换行</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="hl_bl">
|
<layout class="QHBoxLayout" name="hl_bl">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
<enum>Qt::DefaultContextMenu</enum>
|
<enum>Qt::DefaultContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Plain</enum>
|
<enum>QFrame::Plain</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>每</string>
|
<string>每</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="ln_bl_byte">
|
<widget class="QLineEdit" name="ln_bl_byte">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>27</width>
|
<width>27</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>16</string>
|
<string>16</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="maxLength">
|
||||||
<number>128</number>
|
<number>128</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>字节换行</string>
|
<string>字节换行</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_bl_none">
|
<widget class="QRadioButton" name="rb_bl_none">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>不换行</string>
|
<string>不换行</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="rb_bl_keep">
|
<widget class="QRadioButton" name="rb_bl_keep">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>保留原行</string>
|
<string>保留原行</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>370</x>
|
<x>370</x>
|
||||||
<y>310</y>
|
<y>310</y>
|
||||||
<width>120</width>
|
<width>120</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>格式整理</string>
|
<string>格式整理</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QPushButton" name="btn_fmt_right">
|
<widget class="QPushButton" name="btn_fmt_right">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>40</x>
|
||||||
<y>50</y>
|
<y>50</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>整理→</string>
|
<string>整理→</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" name="btn_fmt_left">
|
<widget class="QPushButton" name="btn_fmt_left">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>75</width>
|
<width>75</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>←整理</string>
|
<string>←整理</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user