2018-12-01 19:12:45 -05:00
|
|
|
#pragma once
|
2018-07-21 15:40:16 -07:00
|
|
|
|
2018-08-22 12:24:55 -04:00
|
|
|
#include "qtcommon.h"
|
2018-10-28 02:27:24 -04:00
|
|
|
#include "host/host.h"
|
2018-11-04 04:00:14 -05:00
|
|
|
#include "defs.h"
|
2018-08-21 22:43:30 -04:00
|
|
|
#include <QPlainTextEdit>
|
|
|
|
#include <QComboBox>
|
2018-09-23 22:29:33 -04:00
|
|
|
#include <QSettings>
|
2018-07-21 15:40:16 -07:00
|
|
|
|
2018-07-23 12:25:02 -07:00
|
|
|
namespace Ui
|
|
|
|
{
|
2018-07-25 10:46:59 -07:00
|
|
|
class MainWindow;
|
2018-07-21 15:40:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
2018-07-25 10:46:59 -07:00
|
|
|
Q_OBJECT
|
2018-07-21 15:40:16 -07:00
|
|
|
|
|
|
|
public:
|
2018-07-25 10:46:59 -07:00
|
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
2018-07-21 15:40:16 -07:00
|
|
|
|
2018-07-23 12:25:02 -07:00
|
|
|
private slots:
|
2018-07-26 22:42:21 -07:00
|
|
|
void on_attachButton_clicked();
|
|
|
|
void on_detachButton_clicked();
|
2018-07-25 21:48:18 -07:00
|
|
|
void on_hookButton_clicked();
|
2018-07-26 22:42:21 -07:00
|
|
|
void on_saveButton_clicked();
|
2018-11-10 05:13:59 -05:00
|
|
|
void on_setButton_clicked();
|
2018-11-01 17:02:52 -04:00
|
|
|
void on_extenButton_clicked();
|
|
|
|
void on_ttCombo_activated(int index);
|
2018-07-28 12:41:21 -07:00
|
|
|
|
2018-07-21 15:40:16 -07:00
|
|
|
private:
|
2018-11-27 16:57:47 -05:00
|
|
|
void closeEvent(QCloseEvent*);
|
2018-12-01 15:55:32 -05:00
|
|
|
void InvokeOnMainThread(std::function<void()> f);
|
2018-11-27 15:54:04 -05:00
|
|
|
void ProcessConnected(DWORD processId);
|
|
|
|
void ProcessDisconnected(DWORD processId);
|
|
|
|
void ThreadAdded(TextThread* thread);
|
|
|
|
void ThreadRemoved(TextThread* thread);
|
|
|
|
bool SentenceReceived(TextThread* thread, std::wstring& sentence);
|
2018-08-22 15:11:40 -04:00
|
|
|
QString TextThreadString(TextThread* thread);
|
2018-11-27 15:54:04 -05:00
|
|
|
ThreadParam ParseTextThreadString(QString ttString);
|
2018-08-22 15:11:40 -04:00
|
|
|
DWORD GetSelectedProcessId();
|
2018-11-01 14:07:42 -04:00
|
|
|
std::unordered_map<std::string, int64_t> GetMiscInfo(TextThread* thread);
|
2018-07-25 21:48:18 -07:00
|
|
|
|
2018-09-01 13:56:45 -04:00
|
|
|
Ui::MainWindow* ui;
|
2018-11-04 04:00:14 -05:00
|
|
|
QSettings settings = QSettings(CONFIG_FILE, QSettings::IniFormat);
|
2018-08-21 22:43:30 -04:00
|
|
|
QComboBox* processCombo;
|
|
|
|
QComboBox* ttCombo;
|
|
|
|
QPlainTextEdit* textOutput;
|
2018-11-01 14:07:42 -04:00
|
|
|
QWidget* extenWindow;
|
2018-07-21 15:40:16 -07:00
|
|
|
};
|