diff --git a/src/Cutter.pro b/src/Cutter.pro
index a5663a06..92387cc5 100644
--- a/src/Cutter.pro
+++ b/src/Cutter.pro
@@ -209,7 +209,8 @@ SOURCES += \
dialogs/SetFunctionVarTypes.cpp \
widgets/ColorSchemePrefWidget.cpp \
common/ColorSchemeFileSaver.cpp \
- dialogs/EditFunctionDialog.cpp
+ dialogs/EditFunctionDialog.cpp \
+ widgets/CutterTreeView.cpp
HEADERS += \
Cutter.h \
@@ -310,7 +311,8 @@ HEADERS += \
dialogs/SetFunctionVarTypes.h \
common/ColorSchemeFileSaver.h \
widgets/ColorSchemePrefWidget.h \
- dialogs/EditFunctionDialog.h
+ dialogs/EditFunctionDialog.h \
+ widgets/CutterTreeView.h
FORMS += \
dialogs/AboutDialog.ui \
@@ -367,7 +369,8 @@ FORMS += \
widgets/RegisterRefsWidget.ui \
dialogs/SetToDataDialog.ui \
dialogs/SetFunctionVarTypes.ui \
- widgets/ColorSchemePrefWidget.ui
+ widgets/ColorSchemePrefWidget.ui \
+ widgets/CutterTreeView.ui
RESOURCES += \
resources.qrc \
diff --git a/src/widgets/BreakpointWidget.ui b/src/widgets/BreakpointWidget.ui
index 7bdb646c..40e5f0aa 100644
--- a/src/widgets/BreakpointWidget.ui
+++ b/src/widgets/BreakpointWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -78,6 +78,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+
diff --git a/src/widgets/ClassesWidget.ui b/src/widgets/ClassesWidget.ui
index b4161f84..29554a1c 100644
--- a/src/widgets/ClassesWidget.ui
+++ b/src/widgets/ClassesWidget.ui
@@ -31,9 +31,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -105,6 +105,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+
diff --git a/src/widgets/CommentsWidget.ui b/src/widgets/CommentsWidget.ui
index 26469eab..f471916e 100644
--- a/src/widgets/CommentsWidget.ui
+++ b/src/widgets/CommentsWidget.ui
@@ -31,7 +31,7 @@
0
-
-
+
true
@@ -69,6 +69,12 @@
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/CutterTreeView.cpp b/src/widgets/CutterTreeView.cpp
new file mode 100644
index 00000000..7d1bd501
--- /dev/null
+++ b/src/widgets/CutterTreeView.cpp
@@ -0,0 +1,12 @@
+#include "CutterTreeView.h"
+#include "ui_CutterTreeView.h"
+
+CutterTreeView::CutterTreeView(QWidget *parent) :
+ QTreeView(parent),
+ ui(new Ui::CutterTreeView())
+{
+ ui->setupUi(this);
+ this->setSelectionMode(QAbstractItemView::ExtendedSelection);
+}
+
+CutterTreeView::~CutterTreeView() {}
diff --git a/src/widgets/CutterTreeView.h b/src/widgets/CutterTreeView.h
new file mode 100644
index 00000000..3d636567
--- /dev/null
+++ b/src/widgets/CutterTreeView.h
@@ -0,0 +1,24 @@
+#ifndef CUTTERTREEVIEW_H
+#define CUTTERTREEVIEW_H
+
+#include
+#include
+#include
+
+namespace Ui {
+class CutterTreeView;
+}
+
+class CutterTreeView : public QTreeView
+{
+ Q_OBJECT
+
+public:
+ explicit CutterTreeView(QWidget *parent = nullptr);
+ ~CutterTreeView();
+
+private:
+ std::unique_ptr ui;
+};
+
+#endif //CUTTERTREEVIEW_H
diff --git a/src/widgets/CutterTreeView.ui b/src/widgets/CutterTreeView.ui
new file mode 100644
index 00000000..ba413986
--- /dev/null
+++ b/src/widgets/CutterTreeView.ui
@@ -0,0 +1,6 @@
+
+
+ CutterTreeView
+
+
+
diff --git a/src/widgets/Dashboard.cpp b/src/widgets/Dashboard.cpp
index 7033609a..d013af70 100644
--- a/src/widgets/Dashboard.cpp
+++ b/src/widgets/Dashboard.cpp
@@ -6,8 +6,8 @@
#include "common/TempConfig.h"
#include "dialogs/VersionInfoDialog.h"
-
#include "MainWindow.h"
+#include "CutterTreeView.h"
#include
#include
@@ -19,7 +19,6 @@
#include
#include
#include
-#include
#include
Dashboard::Dashboard(MainWindow *main, QAction *action) :
@@ -176,12 +175,12 @@ void Dashboard::updateContents()
void Dashboard::on_certificateButton_clicked()
{
static QDialog *viewDialog = nullptr;
- static QTreeView *view = nullptr;
+ static CutterTreeView *view = nullptr;
static JsonModel *model = nullptr;
static QString qstrCertificates;
if (!viewDialog) {
viewDialog = new QDialog(this);
- view = new QTreeView(viewDialog);
+ view = new CutterTreeView(viewDialog);
model = new JsonModel();
QJsonDocument qjsonCertificatesDoc = Core()->getSignatureInfo();
qstrCertificates = qjsonCertificatesDoc.toJson(QJsonDocument::Compact);
diff --git a/src/widgets/ExportsWidget.ui b/src/widgets/ExportsWidget.ui
index 6caeb9f7..aca22bfb 100644
--- a/src/widgets/ExportsWidget.ui
+++ b/src/widgets/ExportsWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -57,6 +57,12 @@
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/FlagsWidget.ui b/src/widgets/FlagsWidget.ui
index 24f43c42..a58912f3 100644
--- a/src/widgets/FlagsWidget.ui
+++ b/src/widgets/FlagsWidget.ui
@@ -31,9 +31,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -105,6 +105,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+
diff --git a/src/widgets/FunctionsWidget.h b/src/widgets/FunctionsWidget.h
index a7e0f952..8d01a9b0 100644
--- a/src/widgets/FunctionsWidget.h
+++ b/src/widgets/FunctionsWidget.h
@@ -4,11 +4,11 @@
#include
#include
-#include
#include "Cutter.h"
#include "CutterDockWidget.h"
#include "CutterTreeWidget.h"
+#include "CutterTreeView.h"
class MainWindow;
class QTreeWidgetItem;
diff --git a/src/widgets/FunctionsWidget.ui b/src/widgets/FunctionsWidget.ui
index 62f2613d..5f5d7a40 100644
--- a/src/widgets/FunctionsWidget.ui
+++ b/src/widgets/FunctionsWidget.ui
@@ -46,7 +46,7 @@
0
-
-
+
0
@@ -58,7 +58,7 @@
-QTreeView::item
+CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -128,6 +128,12 @@ QTreeView::item
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/HeadersWidget.ui b/src/widgets/HeadersWidget.ui
index 2f7360d4..0b673f45 100644
--- a/src/widgets/HeadersWidget.ui
+++ b/src/widgets/HeadersWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -53,6 +53,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+
diff --git a/src/widgets/ImportsWidget.ui b/src/widgets/ImportsWidget.ui
index 8975f0ce..b918f8d9 100644
--- a/src/widgets/ImportsWidget.ui
+++ b/src/widgets/ImportsWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -57,6 +57,12 @@
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/MemoryMapWidget.ui b/src/widgets/MemoryMapWidget.ui
index 1349b3b3..7bccee5e 100644
--- a/src/widgets/MemoryMapWidget.ui
+++ b/src/widgets/MemoryMapWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -53,6 +53,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+
diff --git a/src/widgets/RegisterRefsWidget.ui b/src/widgets/RegisterRefsWidget.ui
index 9d29ea77..8124694d 100644
--- a/src/widgets/RegisterRefsWidget.ui
+++ b/src/widgets/RegisterRefsWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -57,6 +57,12 @@
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/RelocsWidget.ui b/src/widgets/RelocsWidget.ui
index e1ebfd98..29f9772a 100644
--- a/src/widgets/RelocsWidget.ui
+++ b/src/widgets/RelocsWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -54,6 +54,12 @@
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/ResourcesWidget.cpp b/src/widgets/ResourcesWidget.cpp
index 95796a19..85063175 100644
--- a/src/widgets/ResourcesWidget.cpp
+++ b/src/widgets/ResourcesWidget.cpp
@@ -84,7 +84,7 @@ ResourcesWidget::ResourcesWidget(MainWindow *main, QAction *action) :
this->setWindowTitle(tr("Resources"));
// Add resources tree view
- view = new QTreeView(this);
+ view = new CutterTreeView(this);
view->setModel(model);
view->show();
this->setWidget(view);
diff --git a/src/widgets/ResourcesWidget.h b/src/widgets/ResourcesWidget.h
index f573b90f..817af4d7 100644
--- a/src/widgets/ResourcesWidget.h
+++ b/src/widgets/ResourcesWidget.h
@@ -3,9 +3,9 @@
#include "Cutter.h"
#include "CutterDockWidget.h"
+#include "CutterTreeView.h"
#include
-#include
class MainWindow;
class ResourcesWidget;
@@ -37,7 +37,7 @@ class ResourcesWidget : public CutterDockWidget
private:
ResourcesModel *model;
- QTreeView *view;
+ CutterTreeView *view;
QList resources;
public:
diff --git a/src/widgets/SearchWidget.ui b/src/widgets/SearchWidget.ui
index cae1e17a..17d66538 100644
--- a/src/widgets/SearchWidget.ui
+++ b/src/widgets/SearchWidget.ui
@@ -31,9 +31,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -116,6 +116,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+
diff --git a/src/widgets/SectionsWidget.cpp b/src/widgets/SectionsWidget.cpp
index d59c925e..1a5a8125 100644
--- a/src/widgets/SectionsWidget.cpp
+++ b/src/widgets/SectionsWidget.cpp
@@ -1,7 +1,6 @@
-#include
-
#include "SectionsWidget.h"
+#include "CutterTreeView.h"
#include "MainWindow.h"
#include "QuickFilterView.h"
#include "common/Helpers.h"
@@ -131,7 +130,7 @@ SectionsWidget::SectionsWidget(MainWindow *main, QAction *action) :
setObjectName("SectionsWidget");
setWindowTitle(QStringLiteral("Sections"));
- sectionsTable = new QTreeView;
+ sectionsTable = new CutterTreeView;
sectionsModel = new SectionsModel(§ions, this);
auto proxyModel = new SectionsProxyModel(sectionsModel, this);
diff --git a/src/widgets/SectionsWidget.h b/src/widgets/SectionsWidget.h
index 4ca86b3f..5a806f9d 100644
--- a/src/widgets/SectionsWidget.h
+++ b/src/widgets/SectionsWidget.h
@@ -9,7 +9,7 @@
#include "Cutter.h"
#include "CutterDockWidget.h"
-class QTreeView;
+class CutterTreeView;
class QAbstractItemView;
class MainWindow;
class SectionsWidget;
@@ -63,7 +63,7 @@ private slots:
private:
QList sections;
SectionsModel *sectionsModel;
- QTreeView *sectionsTable;
+ CutterTreeView *sectionsTable;
MainWindow *main;
QWidget *dockWidgetContents;
QuickFilterView *quickFilterView;
diff --git a/src/widgets/SegmentsWidget.cpp b/src/widgets/SegmentsWidget.cpp
index 1de7a921..a8450c85 100644
--- a/src/widgets/SegmentsWidget.cpp
+++ b/src/widgets/SegmentsWidget.cpp
@@ -1,7 +1,6 @@
-#include
-
#include "SegmentsWidget.h"
+#include "CutterTreeView.h"
#include "MainWindow.h"
#include "QuickFilterView.h"
#include "common/Helpers.h"
@@ -127,7 +126,7 @@ SegmentsWidget::SegmentsWidget(MainWindow *main, QAction *action) :
setObjectName("SegmentsWidget");
setWindowTitle(QStringLiteral("Segments"));
- segmentsTable = new QTreeView;
+ segmentsTable = new CutterTreeView;
segmentsModel = new SegmentsModel(&segments, this);
auto proxyModel = new SegmentsProxyModel(segmentsModel, this);
diff --git a/src/widgets/SegmentsWidget.h b/src/widgets/SegmentsWidget.h
index ff723e3c..ea5a3714 100644
--- a/src/widgets/SegmentsWidget.h
+++ b/src/widgets/SegmentsWidget.h
@@ -7,9 +7,10 @@
#include
#include "Cutter.h"
+#include "CutterTreeView.h"
#include "CutterDockWidget.h"
-class QTreeView;
+class CutterTreeView;
class QAbstractItemView;
class MainWindow;
class SegmentsWidget;
@@ -63,7 +64,7 @@ private slots:
private:
QList segments;
SegmentsModel *segmentsModel;
- QTreeView *segmentsTable;
+ CutterTreeView *segmentsTable;
MainWindow *main;
QWidget *dockWidgetContents;
QuickFilterView *quickFilterView;
diff --git a/src/widgets/StringsWidget.ui b/src/widgets/StringsWidget.ui
index 000c88f9..98e9f6a3 100644
--- a/src/widgets/StringsWidget.ui
+++ b/src/widgets/StringsWidget.ui
@@ -31,7 +31,7 @@
0
-
-
+
0
@@ -93,6 +93,12 @@
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/SymbolsWidget.ui b/src/widgets/SymbolsWidget.ui
index 356fd09e..1ee5cafe 100644
--- a/src/widgets/SymbolsWidget.ui
+++ b/src/widgets/SymbolsWidget.ui
@@ -28,7 +28,7 @@
0
-
-
+
true
@@ -44,6 +44,12 @@
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/TypesWidget.ui b/src/widgets/TypesWidget.ui
index 19e5cc2a..f97b969d 100644
--- a/src/widgets/TypesWidget.ui
+++ b/src/widgets/TypesWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -53,6 +53,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+
diff --git a/src/widgets/VTablesWidget.ui b/src/widgets/VTablesWidget.ui
index 50899b40..13015f35 100644
--- a/src/widgets/VTablesWidget.ui
+++ b/src/widgets/VTablesWidget.ui
@@ -38,7 +38,7 @@
0
-
-
+
0
@@ -50,7 +50,7 @@
-QTreeView::item
+CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -81,6 +81,12 @@ QTreeView::item
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
QuickFilterView
QWidget
diff --git a/src/widgets/ZignaturesWidget.ui b/src/widgets/ZignaturesWidget.ui
index e9280792..4db82885 100644
--- a/src/widgets/ZignaturesWidget.ui
+++ b/src/widgets/ZignaturesWidget.ui
@@ -28,9 +28,9 @@
0
-
-
+
- QTreeView::item
+ CutterTreeView::item
{
padding-top: 1px;
padding-bottom: 1px;
@@ -65,6 +65,14 @@
+
+
+ CutterTreeView
+ QTreeView
+
+ 1
+
+