From 4150695c5fff0504cf19ad74b3f185bd67397497 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 16 Feb 2009 00:06:28 +0100 Subject: new singleton Application class. Try 1.. --- src/application.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/application.h') diff --git a/src/application.h b/src/application.h index 32d810f0..30f1cc5b 100644 --- a/src/application.h +++ b/src/application.h @@ -22,7 +22,7 @@ #define REKONQ_APPLICATION_H // KDE Includes -#include +#include #include #include #include @@ -38,53 +38,53 @@ class QLocalServer; QT_END_NAMESPACE class MainWindow; +class WebView; class CookieJar; class HistoryManager; class NetworkAccessManager; -/* - * - */ -class Application : public KApplication +/** + * + */ +class Application : public KUniqueApplication { Q_OBJECT public: - Application(KCmdLineArgs*, const QString &); + Application(); ~Application(); + int newInstance(); static Application *instance(); - bool isTheOnlyBrowser() const; MainWindow *mainWindow(); - QList mainWindows(); + WebView* newTab(); + KIcon icon(const KUrl &url) const; - void downloadUrl(const KUrl &srcUrl, const KUrl &destUrl); - void saveSession(); - bool canRestoreSession() const; + /** + * This method lets you to download a file from a source remote url + * to a local destination url. + */ + void downloadUrl(const KUrl &srcUrl, const KUrl &destUrl); static HistoryManager *historyManager(); static CookieJar *cookieJar(); static NetworkAccessManager *networkAccessManager(); -public slots: - MainWindow *newMainWindow(); - void restoreLastSession(); - private slots: + + /** + * Any actions that can be delayed until the window is visible + */ void postLaunch(); void openUrl(const KUrl &url); - void newLocalSocketConnection(); +// void newLocalSocketConnection(); private: - void clean(); - static HistoryManager *s_historyManager; static NetworkAccessManager *s_networkAccessManager; - QList > m_mainWindows; - QLocalServer *m_localServer; - QByteArray m_lastSession; + MainWindow* m_mainWindow; mutable KIcon m_defaultIcon; }; -- cgit v1.2.1