aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-01-11 10:18:08 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-01-11 10:18:08 +0100
commit120a5f7c6d31a3bc5acdb54b19326516f8399767 (patch)
tree882e3a096a2ef9bd3138633fb564024e45ba6524 /src/mainwindow.h
downloadsmolbote-0.1.0.tar.xz
Initial commit0.1.0
Diffstat (limited to 'src/mainwindow.h')
-rw-r--r--src/mainwindow.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h
new file mode 100644
index 0000000..a130087
--- /dev/null
+++ b/src/mainwindow.h
@@ -0,0 +1,39 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QToolBar>
+#include <QLineEdit>
+#include <QWebEngineView>
+#include <QUrl>
+#include "widgets/webviewtabbar.h"
+#include <QSettings>
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QSettings *settings, QUrl defaultUrl = QUrl(""), QWidget *parent = 0);
+ ~MainWindow();
+
+public slots:
+ void createNewTab(const QUrl &url = QUrl(""));
+
+private slots:
+ void handleTabChanged(QWebEngineView *view);
+ void handleUrlChanged();
+ void handleUrlUpdated(const QUrl &url);
+
+private:
+ Ui::MainWindow *ui;
+ QToolBar *navigationToolBar, *tabToolBar;
+ WebViewTabBar *tabBar;
+ QLineEdit *urlLineEdit;
+};
+
+#endif // MAINWINDOW_H