blob: 78ead7e66f1205e6e495bd9b610bff8518390460 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#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);
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_new_tab();
void on_refresh();
void on_close_tab();
public:
QSettings settings;
GeminiStyle current_style;
private:
Ui::MainWindow *ui;
QLabel * url_status;
};
#endif // MAINWINDOW_HPP
|