| 1 | /* | 
|---|
| 2 | * Copyright (C) 2020-2022 Roy Qu (royqh1979@gmail.com) | 
|---|
| 3 | * | 
|---|
| 4 | * This program is free software: you can redistribute it and/or modify | 
|---|
| 5 | * it under the terms of the GNU General Public License as published by | 
|---|
| 6 | * the Free Software Foundation, either version 3 of the License, or | 
|---|
| 7 | * (at your option) any later version. | 
|---|
| 8 | * | 
|---|
| 9 | * This program is distributed in the hope that it will be useful, | 
|---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 12 | * GNU General Public License for more details. | 
|---|
| 13 | * | 
|---|
| 14 | * You should have received a copy of the GNU General Public License | 
|---|
| 15 | * along with this program.  If not, see <https://www.gnu.org/licenses/>. | 
|---|
| 16 | */ | 
|---|
| 17 | #ifndef CPUDIALOG_H | 
|---|
| 18 | #define CPUDIALOG_H | 
|---|
| 19 |  | 
|---|
| 20 | #include <QDialog> | 
|---|
| 21 |  | 
|---|
| 22 | namespace Ui { | 
|---|
| 23 | class CPUDialog; | 
|---|
| 24 | } | 
|---|
| 25 |  | 
|---|
| 26 | class CPUDialog : public QDialog | 
|---|
| 27 | { | 
|---|
| 28 | Q_OBJECT | 
|---|
| 29 |  | 
|---|
| 30 | public: | 
|---|
| 31 | explicit CPUDialog(QWidget *parent = nullptr); | 
|---|
| 32 | ~CPUDialog(); | 
|---|
| 33 | void updateInfo(); | 
|---|
| 34 | void updateButtonStates(bool enable); | 
|---|
| 35 | public slots: | 
|---|
| 36 | void updateDPI(float dpi); | 
|---|
| 37 | void setDisassembly(const QString& file, const QString& funcName,const QStringList& lines); | 
|---|
| 38 | void resetEditorFont(float dpi); | 
|---|
| 39 | signals: | 
|---|
| 40 | void closed(); | 
|---|
| 41 | private: | 
|---|
| 42 | void sendSyntaxCommand(); | 
|---|
| 43 | private: | 
|---|
| 44 | Ui::CPUDialog *ui; | 
|---|
| 45 | // QWidget interface | 
|---|
| 46 | protected: | 
|---|
| 47 | void closeEvent(QCloseEvent *event) override; | 
|---|
| 48 | private slots: | 
|---|
| 49 | void on_rdIntel_toggled(bool checked); | 
|---|
| 50 | void on_rdATT_toggled(bool checked); | 
|---|
| 51 | void on_chkBlendMode_stateChanged(int arg1); | 
|---|
| 52 | void on_btnStepOverInstruction_clicked(); | 
|---|
| 53 | void on_btnStepIntoInstruction_clicked(); | 
|---|
| 54 | void onUpdateIcons(); | 
|---|
| 55 | }; | 
|---|
| 56 |  | 
|---|
| 57 | #endif // CPUDIALOG_H | 
|---|
| 58 |  | 
|---|