bigsnitch/mainwindow.h
Tim Blume 462f2811b9 foo
2021-03-21 02:35:40 +01:00

58 lines
1.4 KiB
C++

#pragma once
#include <QMainWindow>
#include <string>
#include <session.h>
#include <includes.h>
#include <editandresend.h>
#include <pluginhandler.h>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
//! MainWindow
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
Ui::MainWindow *ui;
Ui::EditAndResend *ui_editandresend;
QThread* thread;
Session* current_session;
HistoryModel history_model;
HistoryProxyModel history_proxy;
PluginHandler plugin_handler;
QAction* editAndResendMenu;
QAction* hideHistoryColumn;
QAction* showHistoryColumn;
// hack for supplying the initial data to edit&resend
std::tuple<QString, QString, QString, QString> current_selection;
public:
//! MainWindow constructor
MainWindow(QWidget *parent = nullptr);
~MainWindow();
//! opens the EditAndResend window
void openEditAndResend();
public slots:
//! triggers a history update
void updateHistory();
//! right click menu
void editMenuRequested(QPoint pos);
//! right click menu
void edit2MenuRequested(QPoint pos);
//! right click menu
void edit3MenuRequested(QPoint pos);
//! right click menu
void edit4MenuRequested(QPoint pos);
//! right click menu
void historyMenuRequested(QPoint pos);
private slots:
void on_selectionChange(const QItemSelection& selection);
void on_searchEdit_textEdited(const QString &arg1);
};