-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a config for the Assembly view to change what $pc, $ps, and $sp r…
…egisters are. Needed for AVR, as it doesn't seem to have a $ps.
- Loading branch information
Showing
8 changed files
with
581 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
#include "SeerAssemblyPreferenceDialog.h" | ||
#include <QtCore/QSettings> | ||
#include <QtCore/QDebug> | ||
|
||
SeerAssemblyPreferenceDialog::SeerAssemblyPreferenceDialog (QWidget* parent) : QDialog(parent) { | ||
|
||
// Set up the UI. | ||
setupUi(this); | ||
|
||
// Setup the widgets | ||
|
||
// Connect things. | ||
|
||
// Restore window settings. | ||
readSettings(); | ||
} | ||
|
||
SeerAssemblyPreferenceDialog::~SeerAssemblyPreferenceDialog () { | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::setRegiserNamePC (const QString& name) { | ||
|
||
pcLineEdit->setText(name); | ||
} | ||
|
||
QString SeerAssemblyPreferenceDialog::regiserNamePC () const { | ||
|
||
return pcLineEdit->text(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::setRegiserNameFLAGS (const QString& name) { | ||
|
||
flagsLineEdit->setText(name); | ||
} | ||
|
||
QString SeerAssemblyPreferenceDialog::regiserNameFLAGS () const { | ||
|
||
return flagsLineEdit->text(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::setRegiserNameSP (const QString& name) { | ||
|
||
spLineEdit->setText(name); | ||
} | ||
|
||
QString SeerAssemblyPreferenceDialog::regiserNameSP () const { | ||
|
||
return spLineEdit->text(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::setShowAssemblyAddress (bool flag) { | ||
|
||
showAddressCheckBox->setChecked(flag); | ||
} | ||
|
||
bool SeerAssemblyPreferenceDialog::showAssemblyAddress () const { | ||
|
||
return showAddressCheckBox->isChecked(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::setShowAssemblyOffset (bool flag) { | ||
|
||
showOffsetCheckBox->setChecked(flag); | ||
} | ||
|
||
bool SeerAssemblyPreferenceDialog::showAssemblyOffset () const { | ||
|
||
return showOffsetCheckBox->isChecked(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::setShowAssemblyOpcode (bool flag) { | ||
|
||
showOpcodeCheckBox->setChecked(flag); | ||
} | ||
|
||
bool SeerAssemblyPreferenceDialog::showAssemblyOpcode () const { | ||
|
||
return showOpcodeCheckBox->isChecked(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::setShowAssemblySource (bool flag) { | ||
|
||
showSourceCheckBox->setChecked(flag); | ||
} | ||
|
||
bool SeerAssemblyPreferenceDialog::showAssemblySource () const { | ||
|
||
return showSourceCheckBox->isChecked(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::writeSettings() { | ||
|
||
QSettings settings; | ||
|
||
settings.beginGroup("registerpreferencedialog"); { | ||
settings.setValue("size", size()); | ||
}settings.endGroup(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::readSettings() { | ||
|
||
QSettings settings; | ||
|
||
settings.beginGroup("registerpreferencedialog"); { | ||
resize(settings.value("size", QSize(350, 300)).toSize()); | ||
} settings.endGroup(); | ||
} | ||
|
||
void SeerAssemblyPreferenceDialog::resizeEvent (QResizeEvent* event) { | ||
|
||
// Write window settings. | ||
writeSettings(); | ||
|
||
QWidget::resizeEvent(event); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#pragma once | ||
|
||
#include <QtWidgets/QDialog> | ||
#include <QtCore/QString> | ||
#include <QtCore/QVector> | ||
|
||
#include "ui_SeerAssemblyPreferenceDialog.h" | ||
|
||
class SeerAssemblyPreferenceDialog : public QDialog, protected Ui::SeerAssemblyPreferenceDialogForm { | ||
|
||
Q_OBJECT | ||
|
||
public: | ||
explicit SeerAssemblyPreferenceDialog (QWidget* parent = 0); | ||
~SeerAssemblyPreferenceDialog (); | ||
|
||
void setRegiserNamePC (const QString& name); | ||
QString regiserNamePC () const; | ||
|
||
void setRegiserNameFLAGS (const QString& name); | ||
QString regiserNameFLAGS () const; | ||
|
||
void setRegiserNameSP (const QString& name); | ||
QString regiserNameSP () const; | ||
|
||
void setShowAssemblyAddress (bool flag); | ||
bool showAssemblyAddress () const; | ||
|
||
void setShowAssemblyOffset (bool flag); | ||
bool showAssemblyOffset () const; | ||
|
||
void setShowAssemblyOpcode (bool flag); | ||
bool showAssemblyOpcode () const; | ||
|
||
void setShowAssemblySource (bool flag); | ||
bool showAssemblySource () const; | ||
|
||
public slots: | ||
|
||
private slots: | ||
|
||
protected: | ||
void writeSettings (); | ||
void readSettings (); | ||
void resizeEvent (QResizeEvent* event); | ||
|
||
private: | ||
}; | ||
|
Oops, something went wrong.