1
0
Fork 0

registers view new scroll area and new size for big symbol names, more registers in one tab etc..

This commit is contained in:
dreg_fr33project 2014-09-12 06:33:17 +02:00
parent 7933cd71a7
commit db91383a9e
3 changed files with 9 additions and 5 deletions

View File

@ -32,10 +32,13 @@ CPUWidget::CPUWidget(QWidget* parent) : QWidget(parent), ui(new Ui::CPUWidget)
connect(mDisas, SIGNAL(selectionChanged(int_t)), mInfo, SLOT(disasmSelectionChanged(int_t))); connect(mDisas, SIGNAL(selectionChanged(int_t)), mInfo, SLOT(disasmSelectionChanged(int_t)));
mGeneralRegs = new RegistersView(0); mGeneralRegs = new RegistersView(0);
mGeneralRegs->setFixedWidth(1000);
QScrollArea* scrollArea = new QScrollArea;
scrollArea->setWidget(mGeneralRegs);
//TODO: add more tabs
mRegsTab = new QTabWidget(this); mRegsTab = new QTabWidget(this);
mRegsTab->addTab(mGeneralRegs, "General"); mRegsTab->addTab(scrollArea, "General");
ui->mTopRightFrameLayout->addWidget(mRegsTab); ui->mTopRightFrameLayout->addWidget(mRegsTab);

View File

@ -3,7 +3,8 @@
#include "Configuration.h" #include "Configuration.h"
#include "WordEditDialog.h" #include "WordEditDialog.h"
RegistersView::RegistersView(QWidget* parent) : QAbstractScrollArea(parent), mVScrollOffset(0)
RegistersView::RegistersView(QWidget* parent) : QScrollArea(parent), mVScrollOffset(0)
{ {
// precreate ContextMenu Actions // precreate ContextMenu Actions
wCM_Increment = new QAction(tr("Increment"), this); wCM_Increment = new QAction(tr("Increment"), this);

View File

@ -1,7 +1,7 @@
#ifndef REGISTERSVIEW_H #ifndef REGISTERSVIEW_H
#define REGISTERSVIEW_H #define REGISTERSVIEW_H
#include <QAbstractScrollArea> #include <QScrollArea>
#include <QSet> #include <QSet>
#include <QMap> #include <QMap>
#include "Bridge.h" #include "Bridge.h"
@ -13,7 +13,7 @@ namespace Ui
class RegistersView; class RegistersView;
} }
class RegistersView : public QAbstractScrollArea class RegistersView : public QScrollArea
{ {
Q_OBJECT Q_OBJECT