Remove RWJumpModel
Will not be included in version 2.0 but possibly reintroduced later on.
MODIFY
src/memorytab.cpp
src/memorytab.cpp
@@ -11,13 +11,10 @@ MemoryTab::MemoryTab(QToolBar* toolbar, QWidget* parent) : RipesTab(toolbar, par
m_ui->memoryViewerWidget->updateModel();
m_ui->memoryViewerWidget->updateView();
- m_ui->rwjumpwidget->init();
- connect(m_ui->rwjumpwidget, &RWJumpWidget::jumpToAdress, m_ui->memoryViewerWidget,
- &MemoryViewerWidget::setCentralAddress);
+ m_ui->splitter->setStretchFactor(1, 1);
}
void MemoryTab::update() {
- m_ui->rwjumpwidget->updateModel();
m_ui->memoryViewerWidget->updateView();
}

MODIFY
src/memorytab.ui
src/memorytab.ui
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
- <widget class="QSplitter" name="splitter_2">
+ <widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="verticalLayoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
- <widget class="MemoryViewerWidget" name="memoryViewerWidget" native="true"/>
- </item>
- </layout>
+ <widget class="MemoryViewerWidget" name="memoryViewerWidget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
- <widget class="QWidget" name="verticalLayoutWidget_2">
- <layout class="QVBoxLayout" name="verticalLayout_8">
- <item>
- <widget class="RWJumpWidget" name="rwjumpwidget" native="true"/>
</item>
</layout>
</widget>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
</layout>
</widget>
<customwidgets>
- <customwidget>
- <class>RWJumpWidget</class>
- <extends>QWidget</extends>
- <header>rwjumpwidget.h</header>
- <container>1</container>
- </customwidget>
<customwidget>
<class>MemoryViewerWidget</class>
<extends>QWidget</extends>

DELETE
src/tmp_unused/rwjumpmodel.cpp
-#include "rwjumpmodel.h"
-
-#include "parser.h"
-
-RWJumpModel::RWJumpModel(QObject* parent) : QAbstractTableModel(parent) {
- m_parserPtr = Parser::getParser();
-}
-
-QVariant RWJumpModel::headerData(int section, Qt::Orientation orientation, int role) const {
- if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
- switch (section) {
- case 0:
- return "Cycle";
- case 1:
- return "PC";
- case 2:
- return "Instruction";
- case 3:
- return "Access address";
- default:
- return QVariant();
- }
- }
-
- return QVariant();
-}
-
-int RWJumpModel::rowCount(const QModelIndex& parent) const {
- /*
- Q_UNUSED(parent)
- int size = m_pipelinePtr->m_MemoryAccesses.size();
- return size;
- */
- return 0;
-}
-
-void RWJumpModel::update() {
- emit dataChanged(index(0, 0), index(rowCount(), columnCount()));
- beginResetModel();
- endResetModel();
-}
-
-int RWJumpModel::columnCount(const QModelIndex& parent) const {
- Q_UNUSED(parent)
- return 4; // PC, Write type and instrution
-}
-
-QVariant RWJumpModel::data(const QModelIndex& index, int role) const {
- // const RVAccess& access = m_pipelinePtr->m_MemoryAccesses[index.row()];
- if (role == Qt::UserRole) {
- // Address is requested for jumping
- return access.addr;
- }
- if (role != Qt::DisplayRole)
- return QVariant();
- switch (index.column()) {
- case 0:
- return access.cycle - 1;
- case 1:
- return access.pc;
- case 2: {
- return QString(); // m_parserPtr->getInstructionString(access.pc);
- }
- case 3: {
- return QString("0x%1").arg(QString::number(access.addr, 16));
- }
- }
- return QVariant();
-}

DELETE
src/tmp_unused/rwjumpmodel.h
-#ifndef RWJUMPMODEL_H
-#define RWJUMPMODEL_H
-
-#include <QAbstractTableModel>
-
-class Parser;
-class RWJumpModel : public QAbstractTableModel {
- Q_OBJECT
-
-public:
- explicit RWJumpModel(QObject* parent = nullptr);
-
- // Header:
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
-
- int rowCount(const QModelIndex& parent = QModelIndex()) const override;
- int columnCount(const QModelIndex& parent = QModelIndex()) const override;
-
- QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
-
- void update();
-
-private:
- Parser* m_parserPtr;
-};
-
-#endif // RWJUMPMODEL_H

Remove RWJumpModel

Will not be included in version 2.0 but possibly reintroduced later on.