2018-07-22 06:40:16 +08:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
2018-08-23 00:24:55 +08:00
|
|
|
#include "qtcommon.h"
|
2018-10-28 14:27:24 +08:00
|
|
|
#include "host/host.h"
|
2018-07-22 06:40:16 +08:00
|
|
|
#include <QMainWindow>
|
2018-08-22 10:43:30 +08:00
|
|
|
#include <QPlainTextEdit>
|
|
|
|
#include <QComboBox>
|
2018-09-24 10:29:33 +08:00
|
|
|
#include <QSettings>
|
2018-07-22 06:40:16 +08:00
|
|
|
|
2018-07-24 03:25:02 +08:00
|
|
|
namespace Ui
|
|
|
|
{
|
2018-07-26 01:46:59 +08:00
|
|
|
class MainWindow;
|
2018-07-22 06:40:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
2018-07-26 01:46:59 +08:00
|
|
|
Q_OBJECT
|
2018-07-22 06:40:16 +08:00
|
|
|
|
|
|
|
public:
|
2018-07-26 01:46:59 +08:00
|
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
2018-07-22 06:40:16 +08:00
|
|
|
|
2018-08-03 12:07:25 +08:00
|
|
|
signals:
|
2018-10-08 12:26:43 +08:00
|
|
|
void SigAddProcess(unsigned processId);
|
|
|
|
void SigRemoveProcess(unsigned processId);
|
2018-08-22 10:43:30 +08:00
|
|
|
void SigAddThread(TextThread* thread);
|
|
|
|
void SigRemoveThread(TextThread* thread);
|
|
|
|
void SigThreadOutput(TextThread* thread, QString output);
|
2018-08-03 12:07:25 +08:00
|
|
|
|
2018-07-24 03:25:02 +08:00
|
|
|
private slots:
|
2018-10-08 12:26:43 +08:00
|
|
|
void AddProcess(unsigned processId);
|
|
|
|
void RemoveProcess(unsigned processId);
|
2018-07-26 01:46:59 +08:00
|
|
|
void AddThread(TextThread* thread);
|
|
|
|
void RemoveThread(TextThread* thread);
|
|
|
|
void ThreadOutput(TextThread* thread, QString output);
|
2018-07-27 13:42:21 +08:00
|
|
|
void on_attachButton_clicked();
|
|
|
|
void on_detachButton_clicked();
|
|
|
|
void on_ttCombo_activated(int index);
|
|
|
|
void on_unhookButton_clicked();
|
2018-07-26 12:48:18 +08:00
|
|
|
void on_hookButton_clicked();
|
2018-07-27 13:42:21 +08:00
|
|
|
void on_saveButton_clicked();
|
|
|
|
void on_addExtenButton_clicked();
|
2018-10-28 14:27:24 +08:00
|
|
|
void on_moveExtenButton_clicked();
|
2018-07-29 03:41:21 +08:00
|
|
|
void on_rmvExtenButton_clicked();
|
|
|
|
|
2018-07-22 06:40:16 +08:00
|
|
|
private:
|
2018-10-08 12:26:43 +08:00
|
|
|
bool ProcessThreadOutput(TextThread* thread, std::wstring& output);
|
2018-08-23 03:11:40 +08:00
|
|
|
QString TextThreadString(TextThread* thread);
|
2018-08-23 23:53:23 +08:00
|
|
|
ThreadParam ParseTextThreadString(QString textThreadString);
|
2018-08-23 03:11:40 +08:00
|
|
|
DWORD GetSelectedProcessId();
|
2018-08-18 02:37:37 +08:00
|
|
|
void ReloadExtensions();
|
2018-09-21 10:32:47 +08:00
|
|
|
std::unordered_map<std::string, int64_t> GetInfoForExtensions(TextThread* thread);
|
2018-07-26 12:48:18 +08:00
|
|
|
QVector<HookParam> GetAllHooks(DWORD processId);
|
|
|
|
|
2018-09-02 01:56:45 +08:00
|
|
|
Ui::MainWindow* ui;
|
2018-09-30 04:05:08 +08:00
|
|
|
QSettings settings = QSettings("Textractor.ini", QSettings::IniFormat);
|
2018-08-22 10:43:30 +08:00
|
|
|
QComboBox* processCombo;
|
|
|
|
QComboBox* ttCombo;
|
|
|
|
QComboBox* extenCombo;
|
|
|
|
QPlainTextEdit* textOutput;
|
2018-07-22 06:40:16 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|