mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
Fix SDB Browser docking problem and rename the whole thing (#1188)
* Fix sdbBrowser docking and renaming * Fix SdbBrowser docking and naming
This commit is contained in:
parent
bc974e432f
commit
b5a69357d6
@ -156,7 +156,6 @@ SOURCES += \
|
|||||||
widgets/ImportsWidget.cpp \
|
widgets/ImportsWidget.cpp \
|
||||||
widgets/Omnibar.cpp \
|
widgets/Omnibar.cpp \
|
||||||
widgets/RelocsWidget.cpp \
|
widgets/RelocsWidget.cpp \
|
||||||
widgets/SdbDock.cpp \
|
|
||||||
widgets/SectionsWidget.cpp \
|
widgets/SectionsWidget.cpp \
|
||||||
widgets/SegmentsWidget.cpp \
|
widgets/SegmentsWidget.cpp \
|
||||||
widgets/StringsWidget.cpp \
|
widgets/StringsWidget.cpp \
|
||||||
@ -228,7 +227,8 @@ SOURCES += \
|
|||||||
dialogs/WelcomeDialog.cpp \
|
dialogs/WelcomeDialog.cpp \
|
||||||
RunScriptTask.cpp \
|
RunScriptTask.cpp \
|
||||||
dialogs/EditMethodDialog.cpp \
|
dialogs/EditMethodDialog.cpp \
|
||||||
dialogs/LoadNewTypesDialog.cpp
|
dialogs/LoadNewTypesDialog.cpp \
|
||||||
|
widgets/SdbWidget.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
Cutter.h \
|
Cutter.h \
|
||||||
@ -262,7 +262,6 @@ HEADERS += \
|
|||||||
widgets/ImportsWidget.h \
|
widgets/ImportsWidget.h \
|
||||||
widgets/Omnibar.h \
|
widgets/Omnibar.h \
|
||||||
widgets/RelocsWidget.h \
|
widgets/RelocsWidget.h \
|
||||||
widgets/SdbDock.h \
|
|
||||||
widgets/SectionsWidget.h \
|
widgets/SectionsWidget.h \
|
||||||
widgets/SegmentsWidget.h \
|
widgets/SegmentsWidget.h \
|
||||||
widgets/StringsWidget.h \
|
widgets/StringsWidget.h \
|
||||||
@ -339,7 +338,8 @@ HEADERS += \
|
|||||||
RunScriptTask.h \
|
RunScriptTask.h \
|
||||||
common/Json.h \
|
common/Json.h \
|
||||||
dialogs/EditMethodDialog.h \
|
dialogs/EditMethodDialog.h \
|
||||||
dialogs/LoadNewTypesDialog.h
|
dialogs/LoadNewTypesDialog.h \
|
||||||
|
widgets/SdbWidget.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
dialogs/AboutDialog.ui \
|
dialogs/AboutDialog.ui \
|
||||||
@ -361,7 +361,6 @@ FORMS += \
|
|||||||
widgets/ExportsWidget.ui \
|
widgets/ExportsWidget.ui \
|
||||||
widgets/FunctionsWidget.ui \
|
widgets/FunctionsWidget.ui \
|
||||||
widgets/ImportsWidget.ui \
|
widgets/ImportsWidget.ui \
|
||||||
widgets/SdbDock.ui \
|
|
||||||
widgets/RelocsWidget.ui \
|
widgets/RelocsWidget.ui \
|
||||||
widgets/StringsWidget.ui \
|
widgets/StringsWidget.ui \
|
||||||
widgets/SymbolsWidget.ui \
|
widgets/SymbolsWidget.ui \
|
||||||
@ -400,7 +399,8 @@ FORMS += \
|
|||||||
dialogs/HexdumpRangeDialog.ui \
|
dialogs/HexdumpRangeDialog.ui \
|
||||||
dialogs/WelcomeDialog.ui \
|
dialogs/WelcomeDialog.ui \
|
||||||
dialogs/EditMethodDialog.ui \
|
dialogs/EditMethodDialog.ui \
|
||||||
dialogs/LoadNewTypesDialog.ui
|
dialogs/LoadNewTypesDialog.ui \
|
||||||
|
widgets/SdbWidget.ui
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
resources.qrc \
|
resources.qrc \
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
#include "widgets/FlagsWidget.h"
|
#include "widgets/FlagsWidget.h"
|
||||||
#include "widgets/VisualNavbar.h"
|
#include "widgets/VisualNavbar.h"
|
||||||
#include "widgets/Dashboard.h"
|
#include "widgets/Dashboard.h"
|
||||||
#include "widgets/SdbDock.h"
|
#include "widgets/SdbWidget.h"
|
||||||
#include "widgets/Omnibar.h"
|
#include "widgets/Omnibar.h"
|
||||||
#include "widgets/ConsoleWidget.h"
|
#include "widgets/ConsoleWidget.h"
|
||||||
#include "widgets/EntrypointWidget.h"
|
#include "widgets/EntrypointWidget.h"
|
||||||
@ -231,7 +231,7 @@ void MainWindow::initUI()
|
|||||||
ui->actionJupyter->setVisible(false);
|
ui->actionJupyter->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
dashboardDock = new Dashboard(this, ui->actionDashboard);
|
dashboardDock = new Dashboard(this, ui->actionDashboard);
|
||||||
sdbDock = new SdbDock(this, ui->actionSDBBrowser);
|
sdbDock = new SdbWidget(this, ui->actionSDBBrowser);
|
||||||
classesDock = new ClassesWidget(this, ui->actionClasses);
|
classesDock = new ClassesWidget(this, ui->actionClasses);
|
||||||
resourcesDock = new ResourcesWidget(this, ui->actionResources);
|
resourcesDock = new ResourcesWidget(this, ui->actionResources);
|
||||||
vTablesDock = new VTablesWidget(this, ui->actionVTables);
|
vTablesDock = new VTablesWidget(this, ui->actionVTables);
|
||||||
@ -612,6 +612,7 @@ void MainWindow::restoreDocks()
|
|||||||
tabifyDockWidget(dashboardDock, classesDock);
|
tabifyDockWidget(dashboardDock, classesDock);
|
||||||
tabifyDockWidget(dashboardDock, resourcesDock);
|
tabifyDockWidget(dashboardDock, resourcesDock);
|
||||||
tabifyDockWidget(dashboardDock, vTablesDock);
|
tabifyDockWidget(dashboardDock, vTablesDock);
|
||||||
|
tabifyDockWidget(dashboardDock, sdbDock);
|
||||||
|
|
||||||
// Add Stack, Registers and Backtrace vertically stacked
|
// Add Stack, Registers and Backtrace vertically stacked
|
||||||
addDockWidget(Qt::TopDockWidgetArea, stackDock);
|
addDockWidget(Qt::TopDockWidgetArea, stackDock);
|
||||||
|
@ -37,7 +37,7 @@ class StringsWidget;
|
|||||||
class FlagsWidget;
|
class FlagsWidget;
|
||||||
class Dashboard;
|
class Dashboard;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class SdbDock;
|
class SdbWidget;
|
||||||
class QAction;
|
class QAction;
|
||||||
class SectionsWidget;
|
class SectionsWidget;
|
||||||
class SegmentsWidget;
|
class SegmentsWidget;
|
||||||
@ -218,7 +218,7 @@ private:
|
|||||||
FlagsWidget *flagsDock = nullptr;
|
FlagsWidget *flagsDock = nullptr;
|
||||||
Dashboard *dashboardDock = nullptr;
|
Dashboard *dashboardDock = nullptr;
|
||||||
QLineEdit *gotoEntry = nullptr;
|
QLineEdit *gotoEntry = nullptr;
|
||||||
SdbDock *sdbDock = nullptr;
|
SdbWidget *sdbDock = nullptr;
|
||||||
SectionsWidget *sectionsDock = nullptr;
|
SectionsWidget *sectionsDock = nullptr;
|
||||||
SegmentsWidget *segmentsDock = nullptr;
|
SegmentsWidget *segmentsDock = nullptr;
|
||||||
ZignaturesWidget *zignaturesDock = nullptr;
|
ZignaturesWidget *zignaturesDock = nullptr;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "SdbDock.h"
|
#include "SdbWidget.h"
|
||||||
#include "ui_SdbDock.h"
|
#include "ui_SdbWidget.h"
|
||||||
|
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "common/Helpers.h"
|
#include "common/Helpers.h"
|
||||||
@ -8,9 +8,9 @@
|
|||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
|
|
||||||
|
|
||||||
SdbDock::SdbDock(MainWindow *main, QAction *action) :
|
SdbWidget::SdbWidget(MainWindow *main, QAction *action) :
|
||||||
CutterDockWidget(main, action),
|
CutterDockWidget(main, action),
|
||||||
ui(new Ui::SdbDock)
|
ui(new Ui::SdbWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ SdbDock::SdbDock(MainWindow *main, QAction *action) :
|
|||||||
reload(nullptr);
|
reload(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdbDock::reload(QString _path)
|
void SdbWidget::reload(QString _path)
|
||||||
{
|
{
|
||||||
if (!_path.isNull()) {
|
if (!_path.isNull()) {
|
||||||
path = _path;
|
path = _path;
|
||||||
@ -55,7 +55,7 @@ void SdbDock::reload(QString _path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SdbDock::on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
void SdbWidget::on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
||||||
{
|
{
|
||||||
if (column < 0)
|
if (column < 0)
|
||||||
return;
|
return;
|
||||||
@ -84,9 +84,9 @@ void SdbDock::on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SdbDock::~SdbDock() {}
|
SdbWidget::~SdbWidget() {}
|
||||||
|
|
||||||
void SdbDock::on_lockButton_clicked()
|
void SdbWidget::on_lockButton_clicked()
|
||||||
{
|
{
|
||||||
if (ui->lockButton->isChecked()) {
|
if (ui->lockButton->isChecked()) {
|
||||||
this->setAllowedAreas(Qt::NoDockWidgetArea);
|
this->setAllowedAreas(Qt::NoDockWidgetArea);
|
||||||
@ -97,7 +97,7 @@ void SdbDock::on_lockButton_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdbDock::on_treeWidget_itemChanged(QTreeWidgetItem *item, int column)
|
void SdbWidget::on_treeWidget_itemChanged(QTreeWidgetItem *item, int column)
|
||||||
{
|
{
|
||||||
Core()->sdbSet(path, item->text(0), item->text(column));
|
Core()->sdbSet(path, item->text(0), item->text(column));
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef SDBDOCK_H
|
#ifndef SDBWIDGET_H
|
||||||
#define SDBDOCK_H
|
#define SDBWIDGET_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@ -9,16 +9,16 @@ class MainWindow;
|
|||||||
class QTreeWidgetItem;
|
class QTreeWidgetItem;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class SdbDock;
|
class SdbWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SdbDock : public CutterDockWidget
|
class SdbWidget : public CutterDockWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SdbDock(MainWindow *main, QAction *action = nullptr);
|
explicit SdbWidget(MainWindow *main, QAction *action = nullptr);
|
||||||
~SdbDock();
|
~SdbWidget();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
||||||
@ -28,9 +28,9 @@ private slots:
|
|||||||
void reload(QString _path = nullptr);
|
void reload(QString _path = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Ui::SdbDock> ui;
|
std::unique_ptr<Ui::SdbWidget> ui;
|
||||||
QString path;
|
QString path;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SDBDOCK_H
|
#endif // SDBWIDGET_H
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>SdbDock</class>
|
<class>SdbWidget</class>
|
||||||
<widget class="QDockWidget" name="SdbDock">
|
<widget class="QDockWidget" name="SdbWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@ -11,10 +11,10 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="floating">
|
<property name="floating">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string notr="true">SDB Browser</string>
|
<string>SDB Browser</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="dockWidgetContents">
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
Loading…
Reference in New Issue
Block a user