diff options
Diffstat (limited to 'src/browserdialog.h')
| -rw-r--r-- | src/browserdialog.h | 71 |
1 files changed, 33 insertions, 38 deletions
diff --git a/src/browserdialog.h b/src/browserdialog.h index 31b86fff..2c9781b2 100644 --- a/src/browserdialog.h +++ b/src/browserdialog.h @@ -20,18 +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 <QNetworkRequest> #include <QNetworkReply> -#include <QTimer> -#include <QWebEngineView> +#include <QNetworkRequest> #include <QQueue> #include <QTabWidget> -#include <QAtomicInt> - +#include <QTimer> +#include <QWebEngineView> -namespace Ui { - class BrowserDialog; +namespace Ui +{ +class BrowserDialog; } class BrowserView; @@ -41,27 +41,27 @@ class BrowserView; **/ class BrowserDialog : public QDialog { - Q_OBJECT + Q_OBJECT public: - - /** - * @brief constructor - * - * @param accessManager the access manager to use for network requests - * @param parent parent widget - **/ - explicit BrowserDialog(QWidget *parent = 0); + /** + * @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 + * @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); + void openUrl(const QUrl& url); - virtual bool eventFilter(QObject *object, QEvent *event); + virtual bool eventFilter(QObject* object, QEvent* event); signals: /** @@ -69,26 +69,25 @@ signals: * @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); + 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 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 urlChanged(const QUrl &url); + void urlChanged(const QUrl& url); void on_backBtn_clicked(); @@ -105,22 +104,18 @@ private slots: void on_urlEdit_returnPressed(); private: + QString guessFileName(const QString& url); - QString guessFileName(const QString &url); - - BrowserView *getCurrentView(); + BrowserView* getCurrentView(); void maximizeWidth(); private: + Ui::BrowserDialog* ui; - Ui::BrowserDialog *ui; - - QNetworkAccessManager *m_AccessManager; - - QTabWidget *m_Tabs; - + QNetworkAccessManager* m_AccessManager; + QTabWidget* m_Tabs; }; -#endif // BROWSERDIALOG_H +#endif // BROWSERDIALOG_H |
