From 3aed883402dc8da829fc304434c5efd0570cbb97 Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Sat, 6 Jun 2020 23:14:21 +0200 Subject: Moves source code into subdirectory. --- src/mainwindow.hpp | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 src/mainwindow.hpp (limited to 'src/mainwindow.hpp') diff --git a/src/mainwindow.hpp b/src/mainwindow.hpp new file mode 100644 index 0000000..41b6e2c --- /dev/null +++ b/src/mainwindow.hpp @@ -0,0 +1,78 @@ +#ifndef MAINWINDOW_HPP +#define MAINWINDOW_HPP + +#include +#include +#include + + +#include "favouritecollection.hpp" +#include "geminirenderer.hpp" + +QT_BEGIN_NAMESPACE +namespace Ui { class MainWindow; } +QT_END_NAMESPACE + +class BrowserTab; + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + + BrowserTab * addEmptyTab(bool focus_new); + BrowserTab * addNewTab(bool focus_new, QUrl const & url); + + void setUrlPreview(QUrl const & url); + + void saveSettings(); + +public: + FavouriteCollection favourites; + +private slots: + void on_browser_tabs_currentChanged(int index); + + void on_favourites_view_doubleClicked(const QModelIndex &index); + + void on_browser_tabs_tabCloseRequested(int index); + + void on_history_view_doubleClicked(const QModelIndex &index); + + void on_tab_titleChanged(QString const & title); + + void on_tab_locationChanged(QUrl const & url); + + void on_outline_view_clicked(const QModelIndex &index); + + void on_actionSettings_triggered(); + + void on_actionNew_Tab_triggered(); + + void on_actionQuit_triggered(); + + void on_actionAbout_triggered(); + + void on_actionClose_Tab_triggered(); + + void on_actionForward_triggered(); + + void on_actionBackward_triggered(); + + void on_actionRefresh_triggered(); + + void on_actionAbout_Qt_triggered(); + +public: + QSettings settings; + GeminiStyle current_style; + +private: + Ui::MainWindow *ui; + + QLabel * url_status; +}; +#endif // MAINWINDOW_HPP -- cgit v1.2.3