cutter/src/widgets/DebugActions.h

67 lines
1.6 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;
// Continue and suspend interchange during runtime
QIcon continueIcon;
QIcon suspendIcon;
QString suspendLabel;
QString continueLabel;
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;
2018-06-12 08:43:14 +00:00
private slots:
void continueUntilMain();
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();
};