From 5e5c9c07291f6b09623d31c92b1fb61c4ede576e Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 22 Feb 2018 16:54:34 +0100 Subject: Applied clang-format on source --- src/browserdialog.h | 110 ++++++++++++++++++++++++---------------------------- 1 file changed, 51 insertions(+), 59 deletions(-) (limited to 'src/browserdialog.h') diff --git a/src/browserdialog.h b/src/browserdialog.h index 354a377b..6947cc43 100644 --- a/src/browserdialog.h +++ b/src/browserdialog.h @@ -20,18 +20,17 @@ along with Mod Organizer. If not, see . #ifndef BROWSERDIALOG_H #define BROWSERDIALOG_H +#include #include -#include #include -#include -#include +#include #include #include -#include - +#include +#include namespace Ui { - class BrowserDialog; +class BrowserDialog; } class BrowserView; @@ -39,88 +38,81 @@ 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); - - virtual bool eventFilter(QObject *object, QEvent *event); + /** + * @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); 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); - QString guessFileName(const QString &url); - - BrowserView *getCurrentView(); + BrowserView* getCurrentView(); - void maximizeWidth(); + void maximizeWidth(); private: + Ui::BrowserDialog* ui; - Ui::BrowserDialog *ui; - - QNetworkAccessManager *m_AccessManager; - - QTabWidget *m_Tabs; - + QNetworkAccessManager* m_AccessManager; + QTabWidget* m_Tabs; }; #endif // BROWSERDIALOG_H -- cgit v1.3.1