-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added function to HEX-editor to move the cursor to the entered address
- Loading branch information
Showing
34 changed files
with
2,134 additions
and
1,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (C) 2024 Mikhail Medvedev <e-ink-reader@yandex.ru> | ||
* | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
#include "dialogsetaddr.h" | ||
#include "ui_dialogsetaddr.h" | ||
#include <QValidator> | ||
#include <QRegExp> | ||
#include <QString> | ||
|
||
DialogSetAddr::DialogSetAddr(QWidget *parent) : | ||
QDialog(parent), | ||
ui(new Ui::DialogSetAddr) | ||
{ | ||
ui->setupUi(this); | ||
QRegExp reHex( "[A-Fa-f0-9]{1,8}" ); | ||
QRegExpValidator *validator = new QRegExpValidator(reHex, this); | ||
ui->lineEditStart->setValidator(validator); | ||
} | ||
|
||
DialogSetAddr::~DialogSetAddr() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void DialogSetAddr::on_pushButton_clicked() | ||
{ | ||
bool ok; | ||
QString str = ui->lineEditStart->text(); | ||
qint64 inputAddr = str.toUInt(&ok, 16); | ||
emit sendAddr3(inputAddr); | ||
DialogSetAddr::close(); | ||
//return inputAddr; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (C) 2024 Mikhail Medvedev <e-ink-reader@yandex.ru> | ||
* | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
#ifndef DIALOGSETADDR_H | ||
#define DIALOGSETADDR_H | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { | ||
class DialogSetAddr; | ||
} | ||
|
||
class DialogSetAddr : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit DialogSetAddr(QWidget *parent = nullptr); | ||
~DialogSetAddr(); | ||
|
||
private slots: | ||
void on_pushButton_clicked(); | ||
|
||
signals: | ||
void sendAddr3(qint64); | ||
|
||
private: | ||
Ui::DialogSetAddr *ui; | ||
}; | ||
|
||
#endif // DIALOGSETADDR_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>DialogSetAddr</class> | ||
<widget class="QDialog" name="DialogSetAddr"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>272</width> | ||
<height>99</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Goto address</string> | ||
</property> | ||
<property name="windowIcon"> | ||
<iconset resource="recource.qrc"> | ||
<normaloff>:/res/img/write64.png</normaloff>:/res/img/write64.png</iconset> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string>All values in HEX format!</string> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignCenter</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<layout class="QFormLayout" name="formLayout"> | ||
<property name="horizontalSpacing"> | ||
<number>13</number> | ||
</property> | ||
<item row="0" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>Address:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1"> | ||
<widget class="QLineEdit" name="lineEditStart"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>120</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<weight>75</weight> | ||
<bold>true</bold> | ||
</font> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true"/> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<layout class="QFormLayout" name="formLayout_2"> | ||
<property name="horizontalSpacing"> | ||
<number>31</number> | ||
</property> | ||
<property name="verticalSpacing"> | ||
<number>9</number> | ||
</property> | ||
<item row="0" column="1"> | ||
<widget class="QPushButton" name="pushButton"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>90</width> | ||
<height>25</height> | ||
</size> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">QPushButton{ | ||
color: rgb(255, 255, 255); | ||
background-color: rgb(120, 183, 140); | ||
border-radius: 20px; | ||
border: 2px solid #094065;border-radius:8px;font-weight:600; | ||
} | ||
QPushButton::pressed{background-color: rgb(115, 210, 22);}</string> | ||
</property> | ||
<property name="text"> | ||
<string>Go to</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="0"> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>128</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources> | ||
<include location="recource.qrc"/> | ||
</resources> | ||
<connections/> | ||
</ui> |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.