aboutsummaryrefslogtreecommitdiff
path: root/mainwindow.hpp
blob: 048101166acc64a32778bd164e12d216fd7c0e51 (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
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP

#include <QMainWindow>
#include <QLabel>

#include "favouritecollection.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);

private:
    Ui::MainWindow *ui;

    QLabel * url_status;

};
#endif // MAINWINDOW_HPP