cutter/src/widgets/DebugActions.h

76 lines
1.9 KiB
C
Raw Normal View History

2018-06-12 08:43:14 +00:00
#pragma once
#include "core/Cutter.h"
#include "dialogs/RemoteDebugDialog.h"
2018-06-12 08:43:14 +00:00
#include <QAction>
2018-06-12 08:43:14 +00:00
class MainWindow;
2018-12-21 20:36:40 +00:00
class QToolBar;
class QToolButton;
2018-06-12 08:43:14 +00:00
2018-12-21 20:36:40 +00:00
class DebugActions : public QObject
2018-06-12 08:43:14 +00:00
{
Q_OBJECT
public:
2018-12-21 20:36:40 +00:00
explicit DebugActions(QToolBar *toolBar, MainWindow *main);
void addToToolBar(QToolBar *toolBar);
QAction *actionStart;
QAction *actionStartRemote;
QAction *actionStartEmul;
QAction *actionAttach;
QAction *actionContinue;
QAction *actionContinueUntilMain;
QAction *actionContinueUntilCall;
QAction *actionContinueUntilSyscall;
QAction *actionStep;
QAction *actionStepOver;
QAction *actionStepOut;
QAction *actionStop;
2018-10-03 11:30:12 +00:00
QAction *actionAllContinues;
2019-12-11 11:26:54 +00:00
// Continue/suspend and start/restart interchange during runtime
QIcon continueIcon;
QIcon suspendIcon;
2019-12-11 11:26:54 +00:00
QIcon restartIcon;
QIcon startDebugIcon;
QString suspendLabel;
QString continueLabel;
2019-12-11 11:26:54 +00:00
QString restartDebugLabel;
QString startDebugLabel;
2018-06-12 08:43:14 +00:00
2019-12-07 13:28:05 +00:00
// Stop and Detach interchange during runtime
QIcon detachIcon;
QIcon stopIcon;
2018-06-12 08:43:14 +00:00
private:
/**
* @brief buttons that will be disabled/enabled on (disable/enable)DebugToolbar
*/
QList<QAction *> toggleActions;
QList<QAction *> toggleConnectionActions;
2018-10-03 11:30:12 +00:00
QList<QAction *> allActions;
QToolButton *continueUntilButton;
RemoteDebugDialog *remoteDialog = nullptr;
MainWindow *main;
2019-12-11 11:26:54 +00:00
bool acceptedDebugWarning = false;
// TODO: Remove once debug is stable
void showDebugWarning();
2018-06-12 08:43:14 +00:00
private slots:
void continueUntilMain();
2019-12-11 11:26:54 +00:00
void startDebug();
void attachProcessDialog();
void attachProcess(int pid);
void attachRemoteDialog();
void attachRemoteDebugger();
void onAttachedRemoteDebugger(bool successfully);
2018-10-03 11:30:12 +00:00
void setAllActionsVisible(bool visible);
void setButtonVisibleIfMainExists();
2019-12-07 14:15:09 +00:00
void chooseThemeIcons();
};