2017-04-23 15:05:48 +02:00
|
|
|
#ifndef MAINWINDOW_HPP
|
|
|
|
#define MAINWINDOW_HPP
|
|
|
|
|
2017-04-25 22:36:33 +02:00
|
|
|
#include <QDoubleSpinBox>
|
2017-04-23 15:05:48 +02:00
|
|
|
#include <QMainWindow>
|
2017-04-26 22:00:13 +02:00
|
|
|
#include <QMap>
|
2017-04-23 15:05:48 +02:00
|
|
|
#include <QSystemTrayIcon>
|
2017-04-26 22:00:13 +02:00
|
|
|
#include <functional>
|
2017-04-23 15:05:48 +02:00
|
|
|
|
2017-04-25 21:27:29 +02:00
|
|
|
#include <uploaders/uploader.hpp>
|
|
|
|
|
2017-04-23 15:05:48 +02:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
private slots:
|
|
|
|
void quit();
|
|
|
|
void toggleVisible();
|
2017-04-25 21:27:29 +02:00
|
|
|
void newUploader(Uploader *u);
|
2017-04-23 15:05:48 +02:00
|
|
|
|
|
|
|
void on_actionQuit_triggered();
|
|
|
|
void on_actionFullscreen_triggered();
|
|
|
|
void on_actionArea_triggered();
|
|
|
|
void on_uploaderList_clicked(const QModelIndex &);
|
2017-04-23 20:29:24 +02:00
|
|
|
void on_nameScheme_textEdited(const QString &arg1);
|
2017-04-23 15:05:48 +02:00
|
|
|
|
2017-04-25 22:36:33 +02:00
|
|
|
void on_delay_valueChanged(double arg1);
|
|
|
|
|
2017-04-26 22:00:13 +02:00
|
|
|
void on_hotkeys_doubleClicked(const QModelIndex &index);
|
|
|
|
|
2017-04-23 15:05:48 +02:00
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
2017-04-26 22:00:13 +02:00
|
|
|
Ui::MainWindow *ui;
|
2017-04-23 15:05:48 +02:00
|
|
|
|
2017-04-25 22:17:36 +02:00
|
|
|
QSystemTrayIcon *tray;
|
2017-04-23 20:29:24 +02:00
|
|
|
void setScheme(QString scheme);
|
2017-04-25 22:36:33 +02:00
|
|
|
QDoubleSpinBox *delay();
|
2017-04-23 20:29:24 +02:00
|
|
|
|
2017-04-25 22:17:36 +02:00
|
|
|
static MainWindow *inst();
|
2017-04-26 22:00:13 +02:00
|
|
|
QMap<QString, std::function<void()> *> fncs;
|
2017-04-25 22:17:36 +02:00
|
|
|
|
2017-04-23 15:05:48 +02:00
|
|
|
private:
|
2017-04-25 22:17:36 +02:00
|
|
|
static MainWindow *instance;
|
2017-04-23 15:05:48 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_HPP
|