summaryrefslogtreecommitdiff
path: root/src/browserdialog.h
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2018-02-23 01:45:58 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2018-02-23 01:45:58 +0100
commitea6292168a6acd4c263913f0ccd7dd64daf4f5cf (patch)
tree312024abbd7c3c100274f3a8031d49096480b654 /src/browserdialog.h
parent5e5c9c07291f6b09623d31c92b1fb61c4ede576e (diff)
Revert "Applied clang-format on source"
This reverts commit 5e5c9c07291f6b09623d31c92b1fb61c4ede576e.
Diffstat (limited to 'src/browserdialog.h')
-rw-r--r--src/browserdialog.h106
1 files changed, 57 insertions, 49 deletions
diff --git a/src/browserdialog.h b/src/browserdialog.h
index 6947cc43..354a377b 100644
--- a/src/browserdialog.h
+++ b/src/browserdialog.h
@@ -20,17 +20,18 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#ifndef BROWSERDIALOG_H
#define BROWSERDIALOG_H
-#include <QAtomicInt>
#include <QDialog>
-#include <QNetworkReply>
#include <QNetworkRequest>
-#include <QQueue>
-#include <QTabWidget>
+#include <QNetworkReply>
#include <QTimer>
#include <QWebEngineView>
+#include <QQueue>
+#include <QTabWidget>
+#include <QAtomicInt>
+
namespace Ui {
-class BrowserDialog;
+ class BrowserDialog;
}
class BrowserView;
@@ -38,81 +39,88 @@ class BrowserView;
/**
* @brief a dialog containing a webbrowser that is intended to browse the nexus network
**/
-class BrowserDialog : public QDialog {
+class BrowserDialog : public QDialog
+{
Q_OBJECT
public:
- /**
- * @brief constructor
- *
- * @param accessManager the access manager to use for network requests
- * @param parent parent widget
- **/
- explicit BrowserDialog(QWidget* parent = 0);
- ~BrowserDialog();
- /**
- * @brief set the url to open. If automatic login is enabled, the url is opened after login
- *
- * @param url the url to open
- **/
- void openUrl(const QUrl& url);
+ /**
+ * @brief constructor
+ *
+ * @param accessManager the access manager to use for network requests
+ * @param parent parent widget
+ **/
+ explicit BrowserDialog(QWidget *parent = 0);
+ ~BrowserDialog();
+
+ /**
+ * @brief set the url to open. If automatic login is enabled, the url is opened after login
+ *
+ * @param url the url to open
+ **/
+ void openUrl(const QUrl &url);
- virtual bool eventFilter(QObject* object, QEvent* event);
+ virtual bool eventFilter(QObject *object, QEvent *event);
signals:
- /**
- * @brief emitted when the user starts a download
- * @param pageUrl url of the current web site from which the download was started
- * @param reply network reply of the started download
- */
- void requestDownload(const QUrl& pageUrl, QNetworkReply* reply);
+ /**
+ * @brief emitted when the user starts a download
+ * @param pageUrl url of the current web site from which the download was started
+ * @param reply network reply of the started download
+ */
+ void requestDownload(const QUrl &pageUrl, QNetworkReply *reply);
protected:
- virtual void closeEvent(QCloseEvent*);
+
+ virtual void closeEvent(QCloseEvent *);
private slots:
- void initTab(BrowserView* newView);
- void openInNewTab(const QUrl& url);
+ void initTab(BrowserView *newView);
+ void openInNewTab(const QUrl &url);
- void progress(int value);
+ void progress(int value);
- void titleChanged(const QString& title);
- void unsupportedContent(QNetworkReply* reply);
- void downloadRequested(const QNetworkRequest& request);
+ void titleChanged(const QString &title);
+ void unsupportedContent(QNetworkReply *reply);
+ void downloadRequested(const QNetworkRequest &request);
- void tabCloseRequested(int index);
+ void tabCloseRequested(int index);
- void urlChanged(const QUrl& url);
+ void urlChanged(const QUrl &url);
- void on_backBtn_clicked();
+ void on_backBtn_clicked();
- void on_fwdBtn_clicked();
+ void on_fwdBtn_clicked();
- void on_searchEdit_returnPressed();
+ void on_searchEdit_returnPressed();
- void startSearch();
+ void startSearch();
- void on_refreshBtn_clicked();
+ void on_refreshBtn_clicked();
- void on_browserTabWidget_currentChanged(int index);
+ void on_browserTabWidget_currentChanged(int index);
- void on_urlEdit_returnPressed();
+ void on_urlEdit_returnPressed();
private:
- QString guessFileName(const QString& url);
- BrowserView* getCurrentView();
+ QString guessFileName(const QString &url);
+
+ BrowserView *getCurrentView();
- void maximizeWidth();
+ void maximizeWidth();
private:
- Ui::BrowserDialog* ui;
- QNetworkAccessManager* m_AccessManager;
+ Ui::BrowserDialog *ui;
+
+ QNetworkAccessManager *m_AccessManager;
+
+ QTabWidget *m_Tabs;
+
- QTabWidget* m_Tabs;
};
#endif // BROWSERDIALOG_H