aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/newdialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/newdialog.h')
-rw-r--r--qtmips_gui/newdialog.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/qtmips_gui/newdialog.h b/qtmips_gui/newdialog.h
index 5b50a41..79616a2 100644
--- a/qtmips_gui/newdialog.h
+++ b/qtmips_gui/newdialog.h
@@ -9,12 +9,16 @@
#include "ui_NewDialogCache.h"
#include "machineconfig.h"
+class NewDialogCacheHandler;
+
class NewDialog : public QDialog {
Q_OBJECT
public:
NewDialog(QWidget *parent, QSettings *settings);
~NewDialog();
+ void switch2custom();
+
protected:
void closeEvent(QCloseEvent *);
@@ -29,9 +33,6 @@ private slots:
void mem_protec_exec_change(bool);
void mem_protec_write_change(bool);
- void cache_data_change(bool);
- void cache_program_change(bool);
-
private:
Ui::NewDialog *ui;
Ui::NewDialogCache *ui_cache_p, *ui_cache_d;
@@ -40,8 +41,33 @@ private:
machine::MachineConfig *config;
void config_gui(); // Apply configuration to gui
+ unsigned preset_number();
void load_settings();
void store_settings();
+ NewDialogCacheHandler *cache_handler_p, *cache_handler_d;
+};
+
+class NewDialogCacheHandler : QObject {
+ Q_OBJECT
+public:
+ NewDialogCacheHandler(NewDialog *nd, Ui::NewDialogCache *ui);
+
+ void set_config(machine::MachineConfigCache *config);
+
+ void config_gui();
+
+private slots:
+ void enabled(bool);
+ void numsets();
+ void blocksize();
+ void degreeassociativity();
+ void replacement(int);
+ void writeback(int);
+
+private:
+ NewDialog *nd;
+ Ui::NewDialogCache *ui;
+ machine::MachineConfigCache *config;
};
#endif // NEWDIALOG_H