cutter/src/dialogs/InitialOptionsDialog.h

83 lines
2.1 KiB
C
Raw Normal View History

#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include <QDialog>
#include <QCheckBox>
2017-10-02 09:41:28 +00:00
#include <memory>
2018-10-17 07:55:53 +00:00
#include "common/InitialOptions.h"
2018-09-30 20:00:53 +00:00
namespace Ui {
class InitialOptionsDialog;
}
class CutterCore;
class MainWindow;
class InitialOptionsDialog : public QDialog
{
Q_OBJECT
public:
explicit InitialOptionsDialog(MainWindow *main);
~InitialOptionsDialog();
2018-05-27 14:51:01 +00:00
void setupAndStartAnalysis();
private slots:
void on_okButton_clicked();
void on_analysisSlider_valueChanged(int value);
void on_AdvOptButton_clicked();
void on_analysisCheckBox_clicked(bool checked);
void on_archComboBox_currentIndexChanged(int index);
void on_pdbSelectButton_clicked();
void on_scriptSelectButton_clicked();
void updatePDBLayout();
void updateScriptLayout();
protected:
2018-03-21 20:32:32 +00:00
void closeEvent(QCloseEvent *event) override;
private:
std::unique_ptr<Ui::InitialOptionsDialog> ui;
2018-07-24 16:49:52 +00:00
MainWindow *main;
2017-10-09 18:08:35 +00:00
CutterCore *core;
2017-04-01 11:20:13 +00:00
QString analysisDescription(int level);
QString shellcode;
int analysisLevel;
2020-10-28 12:28:04 +00:00
QList<RzAsmPluginDescription> asmPlugins;
void updateCPUComboBox();
2021-01-24 14:50:13 +00:00
struct AnalysisCommands
{
CommandDescription commandDesc;
QCheckBox *checkbox;
bool checked;
};
QList<AnalysisCommands> analysisCommands;
QList<QString> getAnalysisCommands(const InitialOptions &options);
QString getSelectedArch() const;
QString getSelectedCPU() const;
int getSelectedBits() const;
InitialOptions::Endianness getSelectedEndianness() const;
QString getSelectedOS() const;
QList<CommandDescription> getSelectedAdvancedAnalCmds() const;
2018-05-27 14:51:01 +00:00
/**
* @brief setTooltipWithConfigHelp is an helper function that add a tolltip to a widget with
* a description of a given Rizin eval config.
* @param w - a widget to which to add the tooltip
* @param config - name of a configuration variable such as "asm.bits".
*/
void setTooltipWithConfigHelp(QWidget *w, const char *config);
public:
void loadOptions(const InitialOptions &options);
2017-12-06 12:32:35 +00:00
void reject() override;
};
#endif // OPTIONSDIALOG_H