Skip to content

Commit 8f7f34a

Browse files
committed
GUI: refactor finished
1 parent 0f8e199 commit 8f7f34a

File tree

93 files changed

+322
-217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+322
-217
lines changed

x64_dbg_gui/Project/Src/BasicView/AbstractTableView.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "AbstractTableView.h"
2+
#include <QStyleOptionButton>
3+
#include "Configuration.h"
24

35
AbstractTableView::AbstractTableView(QWidget* parent) : QAbstractScrollArea(parent)
46
{

x64_dbg_gui/Project/Src/BasicView/AbstractTableView.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#ifndef ABSTRACTTABLEVIEW_H
22
#define ABSTRACTTABLEVIEW_H
33

4+
#include <QScrollBar>
5+
#include <QAbstractScrollArea>
6+
#include <QPushButton>
7+
#include <QApplication>
8+
#include <QMouseEvent>
9+
#include <QPainter>
10+
#include "NewTypes.h"
11+
412
//Hacky class that fixes a really annoying cursor problem
513
class AbstractTableScrollBar : public QScrollBar
614
{

x64_dbg_gui/Project/Src/BasicView/Disassembly.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "Disassembly.h"
2+
#include "Configuration.h"
3+
#include "Bridge.h"
24

35
Disassembly::Disassembly(QWidget* parent) : AbstractTableView(parent)
46
{

x64_dbg_gui/Project/Src/BasicView/Disassembly.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef DISASSEMBLY_H
22
#define DISASSEMBLY_H
33

4+
#include "AbstractTableView.h"
5+
#include "QBeaEngine.h"
6+
#include "MemoryPage.h"
7+
48
class Disassembly : public AbstractTableView
59
{
610
Q_OBJECT

x64_dbg_gui/Project/Src/BasicView/HexDump.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#include "HexDump.h"
2+
#include <sstream>
3+
#include "Configuration.h"
4+
#include "Bridge.h"
25

36
HexDump::HexDump(QWidget* parent) : AbstractTableView(parent)
47
{

x64_dbg_gui/Project/Src/BasicView/HexDump.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef _HEXDUMP_H
22
#define _HEXDUMP_H
33

4+
#include "AbstractTableView.h"
5+
#include "RichTextPainter.h"
6+
#include "MemoryPage.h"
7+
48
class HexDump : public AbstractTableView
59
{
610
Q_OBJECT

x64_dbg_gui/Project/Src/BasicView/HistoryLineEdit.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef HISTORYLINEEDIT_H
22
#define HISTORYLINEEDIT_H
33

4+
#include <QLineEdit>
5+
#include <QKeyEvent>
6+
47
class HistoryLineEdit : public QLineEdit
58
{
69
Q_OBJECT

x64_dbg_gui/Project/Src/BasicView/ReferenceView.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#include "ReferenceView.h"
2+
#include <QMessageBox>
3+
#include "Configuration.h"
4+
#include "Bridge.h"
25

36
ReferenceView::ReferenceView()
47
{

x64_dbg_gui/Project/Src/BasicView/ReferenceView.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef REFERENCEVIEW_H
22
#define REFERENCEVIEW_H
33

4+
#include <QProgressBar>
5+
#include "SearchListView.h"
6+
47
class ReferenceView : public SearchListView
58
{
69
Q_OBJECT

x64_dbg_gui/Project/Src/BasicView/SearchListView.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#ifndef SEARCHLISTVIEW_H
22
#define SEARCHLISTVIEW_H
33

4+
#include <QWidget>
5+
#include <QMenu>
6+
#include <QVBoxLayout>
7+
#include <QLineEdit>
8+
#include "SearchListViewTable.h"
9+
410
namespace Ui
511
{
612
class SearchListView;

x64_dbg_gui/Project/Src/BasicView/SearchListViewTable.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "SearchListViewTable.h"
2+
#include "Configuration.h"
3+
#include "RichTextPainter.h"
24

35
SearchListViewTable::SearchListViewTable(StdTable* parent) : StdTable(parent)
46
{

x64_dbg_gui/Project/Src/BasicView/SearchListViewTable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef SEARCHLISTVIEWTABLE_H
22
#define SEARCHLISTVIEWTABLE_H
33

4+
#include "StdTable.h"
5+
46
class SearchListViewTable : public StdTable
57
{
68
Q_OBJECT

x64_dbg_gui/Project/Src/BasicView/ShortcutEdit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void ShortcutEdit::keyPressEvent(QKeyEvent* event)
5656
QString KeyText = QKeySequence(keyInt).toString(QKeySequence::NativeText) ;
5757
for(int i = 0; i < KeyText.length(); i++)
5858
{
59-
if(KeyText[i].toAscii() == 0)
59+
if(KeyText[i].toLatin1() == 0)
6060
{
6161
setText("");
6262
keyInt = -1;

x64_dbg_gui/Project/Src/BasicView/ShortcutEdit.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef SHORTCUTEDIT_H
22
#define SHORTCUTEDIT_H
33

4+
#include <QLineEdit>
5+
#include <QKeySequence>
6+
#include <QKeyEvent>
7+
48
class ShortcutEdit : public QLineEdit
59
{
610
Q_OBJECT

x64_dbg_gui/Project/Src/BasicView/StdTable.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "StdTable.h"
2+
#include "Bridge.h"
23

34
StdTable::StdTable(QWidget* parent) : AbstractTableView(parent)
45
{

x64_dbg_gui/Project/Src/BasicView/StdTable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef STDTABLE_H
22
#define STDTABLE_H
33

4+
#include "AbstractTableView.h"
5+
46
class StdTable : public AbstractTableView
57
{
68
Q_OBJECT

x64_dbg_gui/Project/Src/Bridge/Bridge.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#include "Bridge.h"
2+
#include <QClipboard>
3+
#include "QBeaEngine.h"
4+
#include "main.h"
5+
#include "Exports.h"
26

37
/************************************************************************************
48
Global Variables

x64_dbg_gui/Project/Src/Bridge/Bridge.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#ifndef BRIDGE_H
22
#define BRIDGE_H
33

4+
#include <QObject>
5+
#include <QMutex>
6+
#include "Imports.h"
7+
#include "NewTypes.h"
8+
#include "SearchListView.h"
9+
410
class Bridge : public QObject
511
{
612
Q_OBJECT

x64_dbg_gui/Project/Src/Disassembler/BeaTokenizer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "BeaTokenizer.h"
2+
#include "Configuration.h"
23

34
//variables
45
QMap<BeaTokenizer::BeaTokenType, BeaTokenizer::BeaTokenColor> BeaTokenizer::colorNamesMap;

x64_dbg_gui/Project/Src/Disassembler/BeaTokenizer.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#ifndef BEATOKENIZER_H
22
#define BEATOKENIZER_H
33

4+
#include <QMap>
5+
#include <QSet>
6+
#include "RichTextPainter.h"
7+
#include "BeaEngine.h"
8+
#include "NewTypes.h"
9+
410
class BeaTokenizer : RichTextPainter
511
{
612
public:

x64_dbg_gui/Project/Src/Disassembler/QBeaEngine.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef QBEAENGINE_H
22
#define QBEAENGINE_H
33

4+
#include <QString>
5+
#include "NewTypes.h"
6+
#include "BeaTokenizer.h"
7+
48
typedef struct _Instruction_t
59
{
610
QString instStr;

x64_dbg_gui/Project/Src/Global/NewTypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef NEWTYPES_H
22
#define NEWTYPES_H
33

4+
#include "Imports.h"
5+
46
typedef short int16;
57
typedef unsigned short uint16;
68

x64_dbg_gui/Project/Src/Gui/AppearanceDialog.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#include "AppearanceDialog.h"
22
#include "ui_AppearanceDialog.h"
3+
#include <QColorDialog>
4+
#include <QFontDialog>
5+
#include <QMessageBox>
6+
#include "Configuration.h"
37

48
AppearanceDialog::AppearanceDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AppearanceDialog)
59
{

x64_dbg_gui/Project/Src/Gui/AppearanceDialog.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef APPEARANCEDIALOG_H
22
#define APPEARANCEDIALOG_H
33

4+
#include <QDialog>
5+
#include <QMap>
6+
47
namespace Ui
58
{
69
class AppearanceDialog;

x64_dbg_gui/Project/Src/Gui/AttachDialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "AttachDialog.h"
22
#include "ui_AttachDialog.h"
3+
#include <QMenu>
34

45
AttachDialog::AttachDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AttachDialog)
56
{

x64_dbg_gui/Project/Src/Gui/AttachDialog.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef ATTACHDIALOG_H
22
#define ATTACHDIALOG_H
33

4+
#include <QDialog>
5+
46
namespace Ui
57
{
68
class AttachDialog;

x64_dbg_gui/Project/Src/Gui/BreakpointsView.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#include "BreakpointsView.h"
2+
#include "Configuration.h"
3+
#include "Bridge.h"
4+
#include "Breakpoints.h"
25

36
BreakpointsView::BreakpointsView(QWidget* parent) : QWidget(parent)
47
{

x64_dbg_gui/Project/Src/Gui/BreakpointsView.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#ifndef BREAKPOINTSVIEW_H
22
#define BREAKPOINTSVIEW_H
33

4+
#include <QWidget>
5+
#include <QVBoxLayout>
6+
#include <QSplitter>
7+
#include "StdTable.h"
8+
49
class BreakpointsView : public QWidget
510
{
611
Q_OBJECT

x64_dbg_gui/Project/Src/Gui/CPUDisassembly.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#include "CPUDisassembly.h"
2+
#include <QMessageBox>
3+
#include <QClipboard>
4+
#include "Configuration.h"
5+
#include "Bridge.h"
6+
#include "LineEditDialog.h"
7+
#include "WordEditDialog.h"
8+
#include "HexEditDialog.h"
29

310
CPUDisassembly::CPUDisassembly(QWidget* parent) : Disassembly(parent)
411
{

x64_dbg_gui/Project/Src/Gui/CPUDisassembly.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef CPUDISASSEMBLY_H
22
#define CPUDISASSEMBLY_H
33

4+
#include "Disassembly.h"
5+
#include "GotoDialog.h"
6+
47
class CPUDisassembly : public Disassembly
58
{
69
Q_OBJECT

x64_dbg_gui/Project/Src/Gui/CPUDump.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#include "CPUDump.h"
2+
#include <QMessageBox>
3+
#include <QClipboard>
4+
#include "Configuration.h"
5+
#include "Bridge.h"
6+
#include "LineEditDialog.h"
7+
#include "HexEditDialog.h"
28

39
CPUDump::CPUDump(QWidget* parent) : HexDump(parent)
410
{

x64_dbg_gui/Project/Src/Gui/CPUDump.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef CPUDUMP_H
22
#define CPUDUMP_H
33

4+
#include "HexDump.h"
5+
#include "GotoDialog.h"
6+
47
class CPUDump : public HexDump
58
{
69
Q_OBJECT

x64_dbg_gui/Project/Src/Gui/CPUInfoBox.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "CPUInfoBox.h"
2+
#include "Bridge.h"
23

34
CPUInfoBox::CPUInfoBox(StdTable* parent) : StdTable(parent)
45
{

x64_dbg_gui/Project/Src/Gui/CPUInfoBox.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef INFOBOX_H
22
#define INFOBOX_H
33

4+
#include "StdTable.h"
5+
46
class CPUInfoBox : public StdTable
57
{
68
Q_OBJECT

x64_dbg_gui/Project/Src/Gui/CPUSideBar.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "CPUSideBar.h"
2+
#include "Configuration.h"
3+
#include "Breakpoints.h"
24

35
CPUSideBar::CPUSideBar(CPUDisassembly* Ptr, QWidget* parent) : QAbstractScrollArea(parent)
46
{

x64_dbg_gui/Project/Src/Gui/CPUSideBar.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef CPUSIDEBAR_H
22
#define CPUSIDEBAR_H
33

4+
#include <QAbstractScrollArea>
5+
#include "CPUDisassembly.h"
6+
47
class CPUSideBar : public QAbstractScrollArea
58
{
69
Q_OBJECT

x64_dbg_gui/Project/Src/Gui/CPUStack.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#include "CPUStack.h"
2+
#include <QClipboard>
3+
#include "Configuration.h"
4+
#include "Bridge.h"
5+
#include "HexEditDialog.h"
6+
#include "WordEditDialog.h"
27

38
CPUStack::CPUStack(QWidget* parent) : HexDump(parent)
49
{

x64_dbg_gui/Project/Src/Gui/CPUStack.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef CPUSTACK_H
22
#define CPUSTACK_H
33

4+
#include "HexDump.h"
5+
#include "GotoDialog.h"
6+
47
class CPUStack : public HexDump
58
{
69
Q_OBJECT

x64_dbg_gui/Project/Src/Gui/CPUWidget.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#ifndef CPUWIDGET_H
22
#define CPUWIDGET_H
33

4+
#include <QWidget>
5+
#include <QTabWidget>
6+
#include "CPUSideBar.h"
7+
#include "CPUDisassembly.h"
8+
#include "CPUDump.h"
9+
#include "CPUStack.h"
10+
#include "RegistersView.h"
11+
#include "CPUInfoBox.h"
12+
413
namespace Ui
514
{
615
class CPUWidget;

x64_dbg_gui/Project/Src/Gui/CalculatorDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void CalculatorDialog::on_txtAscii_textEdited(const QString & arg1)
221221
return;
222222
}
223223
ui->txtAscii->setStyleSheet("");
224-
ui->txtExpression->setText(QString().sprintf("%X", text[0].toAscii()));
224+
ui->txtExpression->setText(QString().sprintf("%X", text[0].toLatin1()));
225225
ui->txtAscii->setCursorPosition(1);
226226
}
227227

x64_dbg_gui/Project/Src/Gui/CalculatorDialog.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef CALCULATORDIALOG_H
22
#define CALCULATORDIALOG_H
33

4+
#include <QDialog>
5+
#include <QThread>
6+
#include "NewTypes.h"
7+
48
namespace Ui
59
{
610
class CalculatorDialog;

0 commit comments

Comments
 (0)