bigsnitch/mainwindow.h

59 lines
1.4 KiB
C
Raw Permalink Normal View History

2020-08-05 00:08:41 +00:00
#pragma once
#include <QMainWindow>
#include <string>
2020-08-09 12:07:14 +00:00
#include <session.h>
#include <includes.h>
2020-09-10 19:26:41 +00:00
#include <editandresend.h>
2020-08-05 00:08:41 +00:00
2021-03-19 16:40:33 +00:00
#include <pluginhandler.h>
2020-08-05 00:08:41 +00:00
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
2021-03-20 21:56:03 +00:00
//! MainWindow
2020-08-05 00:08:41 +00:00
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
Ui::MainWindow *ui;
2020-09-10 19:26:41 +00:00
Ui::EditAndResend *ui_editandresend;
2020-08-05 00:08:41 +00:00
QThread* thread;
2020-08-09 12:07:14 +00:00
Session* current_session;
2020-08-26 18:58:36 +00:00
HistoryModel history_model;
2020-08-28 23:09:41 +00:00
HistoryProxyModel history_proxy;
2021-01-01 20:22:03 +00:00
2021-03-19 16:40:33 +00:00
PluginHandler plugin_handler;
2021-01-01 20:22:03 +00:00
QAction* editAndResendMenu;
QAction* hideHistoryColumn;
QAction* showHistoryColumn;
// hack for supplying the initial data to edit&resend
std::tuple<QString, QString, QString, QString> current_selection;
2020-08-05 00:08:41 +00:00
public:
2021-03-20 21:56:03 +00:00
//! MainWindow constructor
2020-08-05 00:08:41 +00:00
MainWindow(QWidget *parent = nullptr);
~MainWindow();
2021-03-20 21:56:03 +00:00
//! opens the EditAndResend window
2021-01-01 20:22:03 +00:00
void openEditAndResend();
2020-08-09 12:07:14 +00:00
public slots:
2021-03-20 21:56:03 +00:00
//! triggers a history update
2020-08-14 01:37:33 +00:00
void updateHistory();
2021-03-20 21:56:03 +00:00
//! right click menu
2021-01-01 20:22:03 +00:00
void editMenuRequested(QPoint pos);
2021-03-20 21:56:03 +00:00
//! right click menu
2021-01-01 20:22:03 +00:00
void edit2MenuRequested(QPoint pos);
2021-03-20 21:56:03 +00:00
//! right click menu
2021-01-01 20:22:03 +00:00
void edit3MenuRequested(QPoint pos);
2021-03-20 21:56:03 +00:00
//! right click menu
2021-01-01 20:22:03 +00:00
void edit4MenuRequested(QPoint pos);
2021-03-20 21:56:03 +00:00
//! right click menu
2021-01-01 20:22:03 +00:00
void historyMenuRequested(QPoint pos);
2020-08-14 01:37:33 +00:00
private slots:
2020-09-01 20:14:49 +00:00
void on_selectionChange(const QItemSelection& selection);
2020-08-14 01:37:33 +00:00
void on_searchEdit_textEdited(const QString &arg1);
2020-08-05 00:08:41 +00:00
};