diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 23:14:21 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 23:14:21 +0200 |
| commit | 3aed883402dc8da829fc304434c5efd0570cbb97 (patch) | |
| tree | 48c46ab087a950d80f78819ceb609e93d246b040 /src/mainwindow.hpp | |
| parent | 44e85dce678e7e36f436a6d0a25c212c9a2d3657 (diff) | |
| download | kristall-3aed883402dc8da829fc304434c5efd0570cbb97.tar.gz | |
Moves source code into subdirectory.
Diffstat (limited to 'src/mainwindow.hpp')
| -rw-r--r-- | src/mainwindow.hpp | 78 |
1 files changed, 78 insertions, 0 deletions
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 <QMainWindow> +#include <QLabel> +#include <QSettings> + + +#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 |
