Skip to content

Commit

Permalink
Added function to HEX-editor to move the cursor to the entered address
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbigmdm committed Apr 11, 2024
1 parent 1790308 commit 3c579b5
Show file tree
Hide file tree
Showing 34 changed files with 2,134 additions and 1,141 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Ver. 1.3.5 - Added function to HEX-editor to move the cursor to the entered address.
- Ver. 1.3.4 - Bugfix: wrong read/write data in last addresses of M95040, AT25040, 25AA040, CAT25C04 chips.
- Ver. 1.3.3 - Small refinements to the interface. Added chips to the database. Added status register form for 95xxx, 25xxx chips.
- Ver. 1.3.2 - Bugfix: the hex editor plugin is not resized when the form is resized. Added dynamic polling of the programmer status (connected / not connected).
Expand Down
3 changes: 3 additions & 0 deletions IMSProg_programmer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ dialogsp.cpp
dialogrp.cpp
dialogsfdp.cpp
dialogsr.cpp
dialogsetaddr.cpp
searchdialog.cpp
dialoginfo.cpp
bitbang_microwire.c
Expand All @@ -92,6 +93,7 @@ dialogrp.h
dialogsfdp.h
dialogsr.h
dialoginfo.h
dialogsetaddr.h
searchdialog.h
bitbang_microwire.h
ch341a_gpio.h
Expand All @@ -115,6 +117,7 @@ dialogsp.ui
dialogrp.ui
dialogsfdp.ui
dialogsr.ui
dialogsetaddr.ui
dialoginfo.ui
searchdialog.ui
dialogabout.ui
Expand Down
9 changes: 6 additions & 3 deletions IMSProg_programmer/IMSProg.pro
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ SOURCES += \
dialogabout.cpp \
dialoginfo.cpp \
dialogsfdp.cpp \
dialogsr.cpp
dialogsr.cpp \
dialogsetaddr.cpp

HEADERS += \
mainwindow.h \
Expand Down Expand Up @@ -77,7 +78,8 @@ HEADERS += \
dialogabout.h \
dialoginfo.h \
dialogsfdp.h \
dialogsr.h
dialogsr.h \
dialogsetaddr.h

FORMS += \
mainwindow.ui \
Expand All @@ -87,7 +89,8 @@ FORMS += \
dialogabout.ui \
dialoginfo.ui \
dialogsfdp.ui \
dialogsr.ui
dialogsr.ui \
dialogsetaddr.ui

TRANSLATIONS += language/chipProgrammer_ru_RU.ts \
language/chipProgrammer_es_ES.ts \
Expand Down
2 changes: 1 addition & 1 deletion IMSProg_programmer/dialogabout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DialogAbout::DialogAbout(QWidget *parent) :
ui->label_7->setTextFormat(Qt::RichText);
ui->label_7->setTextInteractionFlags(Qt::TextBrowserInteraction);
ui->label_7->setOpenExternalLinks(true);
ui->label_8->setText("V1.3.4");
ui->label_8->setText("V1.3.5");
}

DialogAbout::~DialogAbout()
Expand Down
44 changes: 44 additions & 0 deletions IMSProg_programmer/dialogsetaddr.cpp
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;
}
42 changes: 42 additions & 0 deletions IMSProg_programmer/dialogsetaddr.h
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
115 changes: 115 additions & 0 deletions IMSProg_programmer/dialogsetaddr.ui
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 removed IMSProg_programmer/img/CH341_icons.psd
Binary file not shown.
Binary file removed IMSProg_programmer/img/CH341_icons64.psd
Binary file not shown.
Binary file added IMSProg_programmer/img/goto64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified IMSProg_programmer/language/chipProgrammer_de_DE.qm
Binary file not shown.
Loading

0 comments on commit 3c579b5

Please sign in to comment.