mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 02:48:49 +00:00
Allow multi selection of entries in QTreeView widgets (#903)
This commit is contained in:
parent
a92fc9b83e
commit
b01de2d724
@ -209,7 +209,8 @@ SOURCES += \
|
|||||||
dialogs/SetFunctionVarTypes.cpp \
|
dialogs/SetFunctionVarTypes.cpp \
|
||||||
widgets/ColorSchemePrefWidget.cpp \
|
widgets/ColorSchemePrefWidget.cpp \
|
||||||
common/ColorSchemeFileSaver.cpp \
|
common/ColorSchemeFileSaver.cpp \
|
||||||
dialogs/EditFunctionDialog.cpp
|
dialogs/EditFunctionDialog.cpp \
|
||||||
|
widgets/CutterTreeView.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
Cutter.h \
|
Cutter.h \
|
||||||
@ -310,7 +311,8 @@ HEADERS += \
|
|||||||
dialogs/SetFunctionVarTypes.h \
|
dialogs/SetFunctionVarTypes.h \
|
||||||
common/ColorSchemeFileSaver.h \
|
common/ColorSchemeFileSaver.h \
|
||||||
widgets/ColorSchemePrefWidget.h \
|
widgets/ColorSchemePrefWidget.h \
|
||||||
dialogs/EditFunctionDialog.h
|
dialogs/EditFunctionDialog.h \
|
||||||
|
widgets/CutterTreeView.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
dialogs/AboutDialog.ui \
|
dialogs/AboutDialog.ui \
|
||||||
@ -367,7 +369,8 @@ FORMS += \
|
|||||||
widgets/RegisterRefsWidget.ui \
|
widgets/RegisterRefsWidget.ui \
|
||||||
dialogs/SetToDataDialog.ui \
|
dialogs/SetToDataDialog.ui \
|
||||||
dialogs/SetFunctionVarTypes.ui \
|
dialogs/SetFunctionVarTypes.ui \
|
||||||
widgets/ColorSchemePrefWidget.ui
|
widgets/ColorSchemePrefWidget.ui \
|
||||||
|
widgets/CutterTreeView.ui
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
resources.qrc \
|
resources.qrc \
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="breakpointTreeView">
|
<widget class="CutterTreeView" name="breakpointTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -78,6 +78,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="classesTreeView">
|
<widget class="CutterTreeView" name="classesTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -105,6 +105,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="commentsTreeView">
|
<widget class="CutterTreeView" name="commentsTreeView">
|
||||||
<property name="sortingEnabled">
|
<property name="sortingEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -69,6 +69,12 @@
|
|||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
12
src/widgets/CutterTreeView.cpp
Normal file
12
src/widgets/CutterTreeView.cpp
Normal file
@ -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() {}
|
24
src/widgets/CutterTreeView.h
Normal file
24
src/widgets/CutterTreeView.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#ifndef CUTTERTREEVIEW_H
|
||||||
|
#define CUTTERTREEVIEW_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <QAbstractItemView>
|
||||||
|
#include <QTreeView>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class CutterTreeView;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CutterTreeView : public QTreeView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit CutterTreeView(QWidget *parent = nullptr);
|
||||||
|
~CutterTreeView();
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::unique_ptr<Ui::CutterTreeView> ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //CUTTERTREEVIEW_H
|
6
src/widgets/CutterTreeView.ui
Normal file
6
src/widgets/CutterTreeView.ui
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<widget class="QTreeView" name="CutterTreeView">
|
||||||
|
</widget>
|
||||||
|
</ui>
|
@ -6,8 +6,8 @@
|
|||||||
#include "common/TempConfig.h"
|
#include "common/TempConfig.h"
|
||||||
#include "dialogs/VersionInfoDialog.h"
|
#include "dialogs/VersionInfoDialog.h"
|
||||||
|
|
||||||
|
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
|
#include "CutterTreeView.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
@ -19,7 +19,6 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QTreeView>
|
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
|
|
||||||
Dashboard::Dashboard(MainWindow *main, QAction *action) :
|
Dashboard::Dashboard(MainWindow *main, QAction *action) :
|
||||||
@ -176,12 +175,12 @@ void Dashboard::updateContents()
|
|||||||
void Dashboard::on_certificateButton_clicked()
|
void Dashboard::on_certificateButton_clicked()
|
||||||
{
|
{
|
||||||
static QDialog *viewDialog = nullptr;
|
static QDialog *viewDialog = nullptr;
|
||||||
static QTreeView *view = nullptr;
|
static CutterTreeView *view = nullptr;
|
||||||
static JsonModel *model = nullptr;
|
static JsonModel *model = nullptr;
|
||||||
static QString qstrCertificates;
|
static QString qstrCertificates;
|
||||||
if (!viewDialog) {
|
if (!viewDialog) {
|
||||||
viewDialog = new QDialog(this);
|
viewDialog = new QDialog(this);
|
||||||
view = new QTreeView(viewDialog);
|
view = new CutterTreeView(viewDialog);
|
||||||
model = new JsonModel();
|
model = new JsonModel();
|
||||||
QJsonDocument qjsonCertificatesDoc = Core()->getSignatureInfo();
|
QJsonDocument qjsonCertificatesDoc = Core()->getSignatureInfo();
|
||||||
qstrCertificates = qjsonCertificatesDoc.toJson(QJsonDocument::Compact);
|
qstrCertificates = qjsonCertificatesDoc.toJson(QJsonDocument::Compact);
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="exportsTreeView">
|
<widget class="CutterTreeView" name="exportsTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -57,6 +57,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="flagsTreeView">
|
<widget class="CutterTreeView" name="flagsTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -105,6 +105,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
#include <QTreeView>
|
|
||||||
|
|
||||||
#include "Cutter.h"
|
#include "Cutter.h"
|
||||||
#include "CutterDockWidget.h"
|
#include "CutterDockWidget.h"
|
||||||
#include "CutterTreeWidget.h"
|
#include "CutterTreeWidget.h"
|
||||||
|
#include "CutterTreeView.h"
|
||||||
|
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class QTreeWidgetItem;
|
class QTreeWidgetItem;
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="functionsTreeView">
|
<widget class="CutterTreeView" name="functionsTreeView">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
|
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">
|
<string notr="true">
|
||||||
QTreeView::item
|
CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -128,6 +128,12 @@ QTreeView::item
|
|||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="headersTreeView">
|
<widget class="CutterTreeView" name="headersTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -53,6 +53,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="importsTreeView">
|
<widget class="CutterTreeView" name="importsTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -57,6 +57,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="memoryTreeView">
|
<widget class="CutterTreeView" name="memoryTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -53,6 +53,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="registerRefTreeView">
|
<widget class="CutterTreeView" name="registerRefTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -57,6 +57,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="relocsTreeView">
|
<widget class="CutterTreeView" name="relocsTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -54,6 +54,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -84,7 +84,7 @@ ResourcesWidget::ResourcesWidget(MainWindow *main, QAction *action) :
|
|||||||
this->setWindowTitle(tr("Resources"));
|
this->setWindowTitle(tr("Resources"));
|
||||||
|
|
||||||
// Add resources tree view
|
// Add resources tree view
|
||||||
view = new QTreeView(this);
|
view = new CutterTreeView(this);
|
||||||
view->setModel(model);
|
view->setModel(model);
|
||||||
view->show();
|
view->show();
|
||||||
this->setWidget(view);
|
this->setWidget(view);
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
#include "Cutter.h"
|
#include "Cutter.h"
|
||||||
#include "CutterDockWidget.h"
|
#include "CutterDockWidget.h"
|
||||||
|
#include "CutterTreeView.h"
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QTreeView>
|
|
||||||
|
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class ResourcesWidget;
|
class ResourcesWidget;
|
||||||
@ -37,7 +37,7 @@ class ResourcesWidget : public CutterDockWidget
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ResourcesModel *model;
|
ResourcesModel *model;
|
||||||
QTreeView *view;
|
CutterTreeView *view;
|
||||||
QList<ResourcesDescription> resources;
|
QList<ResourcesDescription> resources;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="searchTreeView">
|
<widget class="CutterTreeView" name="searchTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -116,6 +116,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include <QTreeView>
|
|
||||||
|
|
||||||
#include "SectionsWidget.h"
|
#include "SectionsWidget.h"
|
||||||
|
|
||||||
|
#include "CutterTreeView.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "QuickFilterView.h"
|
#include "QuickFilterView.h"
|
||||||
#include "common/Helpers.h"
|
#include "common/Helpers.h"
|
||||||
@ -131,7 +130,7 @@ SectionsWidget::SectionsWidget(MainWindow *main, QAction *action) :
|
|||||||
setObjectName("SectionsWidget");
|
setObjectName("SectionsWidget");
|
||||||
setWindowTitle(QStringLiteral("Sections"));
|
setWindowTitle(QStringLiteral("Sections"));
|
||||||
|
|
||||||
sectionsTable = new QTreeView;
|
sectionsTable = new CutterTreeView;
|
||||||
sectionsModel = new SectionsModel(§ions, this);
|
sectionsModel = new SectionsModel(§ions, this);
|
||||||
auto proxyModel = new SectionsProxyModel(sectionsModel, this);
|
auto proxyModel = new SectionsProxyModel(sectionsModel, this);
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "Cutter.h"
|
#include "Cutter.h"
|
||||||
#include "CutterDockWidget.h"
|
#include "CutterDockWidget.h"
|
||||||
|
|
||||||
class QTreeView;
|
class CutterTreeView;
|
||||||
class QAbstractItemView;
|
class QAbstractItemView;
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class SectionsWidget;
|
class SectionsWidget;
|
||||||
@ -63,7 +63,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
QList<SectionDescription> sections;
|
QList<SectionDescription> sections;
|
||||||
SectionsModel *sectionsModel;
|
SectionsModel *sectionsModel;
|
||||||
QTreeView *sectionsTable;
|
CutterTreeView *sectionsTable;
|
||||||
MainWindow *main;
|
MainWindow *main;
|
||||||
QWidget *dockWidgetContents;
|
QWidget *dockWidgetContents;
|
||||||
QuickFilterView *quickFilterView;
|
QuickFilterView *quickFilterView;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include <QTreeView>
|
|
||||||
|
|
||||||
#include "SegmentsWidget.h"
|
#include "SegmentsWidget.h"
|
||||||
|
|
||||||
|
#include "CutterTreeView.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "QuickFilterView.h"
|
#include "QuickFilterView.h"
|
||||||
#include "common/Helpers.h"
|
#include "common/Helpers.h"
|
||||||
@ -127,7 +126,7 @@ SegmentsWidget::SegmentsWidget(MainWindow *main, QAction *action) :
|
|||||||
setObjectName("SegmentsWidget");
|
setObjectName("SegmentsWidget");
|
||||||
setWindowTitle(QStringLiteral("Segments"));
|
setWindowTitle(QStringLiteral("Segments"));
|
||||||
|
|
||||||
segmentsTable = new QTreeView;
|
segmentsTable = new CutterTreeView;
|
||||||
segmentsModel = new SegmentsModel(&segments, this);
|
segmentsModel = new SegmentsModel(&segments, this);
|
||||||
auto proxyModel = new SegmentsProxyModel(segmentsModel, this);
|
auto proxyModel = new SegmentsProxyModel(segmentsModel, this);
|
||||||
|
|
||||||
|
@ -7,9 +7,10 @@
|
|||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
|
|
||||||
#include "Cutter.h"
|
#include "Cutter.h"
|
||||||
|
#include "CutterTreeView.h"
|
||||||
#include "CutterDockWidget.h"
|
#include "CutterDockWidget.h"
|
||||||
|
|
||||||
class QTreeView;
|
class CutterTreeView;
|
||||||
class QAbstractItemView;
|
class QAbstractItemView;
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class SegmentsWidget;
|
class SegmentsWidget;
|
||||||
@ -63,7 +64,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
QList<SegmentDescription> segments;
|
QList<SegmentDescription> segments;
|
||||||
SegmentsModel *segmentsModel;
|
SegmentsModel *segmentsModel;
|
||||||
QTreeView *segmentsTable;
|
CutterTreeView *segmentsTable;
|
||||||
MainWindow *main;
|
MainWindow *main;
|
||||||
QWidget *dockWidgetContents;
|
QWidget *dockWidgetContents;
|
||||||
QuickFilterView *quickFilterView;
|
QuickFilterView *quickFilterView;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="stringsTreeView">
|
<widget class="CutterTreeView" name="stringsTreeView">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -93,6 +93,12 @@
|
|||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="symbolsTreeView">
|
<widget class="CutterTreeView" name="symbolsTreeView">
|
||||||
<property name="sortingEnabled">
|
<property name="sortingEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -44,6 +44,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="typesTreeView">
|
<widget class="CutterTreeView" name="typesTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -53,6 +53,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="vTableTreeView">
|
<widget class="CutterTreeView" name="vTableTreeView">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
|
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">
|
<string notr="true">
|
||||||
QTreeView::item
|
CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -81,6 +81,12 @@ QTreeView::item
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QuickFilterView</class>
|
<class>QuickFilterView</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeView" name="zignaturesTreeView">
|
<widget class="CutterTreeView" name="zignaturesTreeView">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QTreeView::item
|
<string notr="true">CutterTreeView::item
|
||||||
{
|
{
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
@ -65,6 +65,14 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CutterTreeView</class>
|
||||||
|
<extends>QTreeView</extends>
|
||||||
|
<header>widgets/CutterTreeView.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user