summaryrefslogtreecommitdiff
path: root/src/tabwindow/rekonqwindow.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-03-10 19:02:12 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-03-10 19:02:12 +0100
commit9461c52f07a2bf8b9bc25f037b17805cda51b2b0 (patch)
treeb599e6eff700e65a864bb275c94adc9a6da7e529 /src/tabwindow/rekonqwindow.h
parentAdd toggle ability to bk folder in bk page (diff)
downloadrekonq-9461c52f07a2bf8b9bc25f037b17805cda51b2b0.tar.xz
Supporting panel (again) :)
- Move to a pure QWidget base window (instead of TabWidget one) (this to properly store panels position) - Restoring && rewamping panels code - Restoring actions to activate/deactivate them BUG: 312354
Diffstat (limited to 'src/tabwindow/rekonqwindow.h')
-rw-r--r--src/tabwindow/rekonqwindow.h130
1 files changed, 38 insertions, 92 deletions
diff --git a/src/tabwindow/rekonqwindow.h b/src/tabwindow/rekonqwindow.h
index ed018e4a..1d46faeb 100644
--- a/src/tabwindow/rekonqwindow.h
+++ b/src/tabwindow/rekonqwindow.h
@@ -2,7 +2,7 @@
*
* This file is a part of the rekonq project
*
-* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot com>
+* Copyright (C) 2013 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -32,109 +32,55 @@
// Rekonq Includes
#include "rekonq_defines.h"
-// KDE Includes
-#include <KTabWidget>
-#include <KConfig>
-#include <KConfigGroup>
+// Local Includes
+#include "rwindow.h"
+#include "tabwidget.h"
+
+#include "bookmarkspanel.h"
+#include "historypanel.h"
// Qt Includes
-#include <QTimer>
-
-/**
- * This is rekonq (re)implementation of KMainWindow,
- * given that we'd like to NOT use a "real" xMainWindow
- * but a widget with the nice mainwindow properties
- * (eg: session management, auto save dimension, etc) but
- * NOT its peculiar containers (eg: toolbars, menubar, statusbar,
- * central widget...)
- *
- */
-class RekonqWindow : public KTabWidget
-{
- friend class KRWSessionManager;
+#include <QSplitter>
+#include <QWeakPointer>
+
+// Forward Declarations
+class TabBar;
+
+class WebPage;
+class WebWindow;
+
+class RekonqWindow : public RWindow
+{
Q_OBJECT
public:
- explicit RekonqWindow(QWidget* parent = 0);
+ explicit RekonqWindow(bool withTab = true, bool PrivateBrowsingMode = false, QWidget *parent = 0);
+ explicit RekonqWindow(WebPage *pg, QWidget *parent = 0);
virtual ~RekonqWindow();
- QSize sizeHint() const;
-
- /**
- * List of members of RekonqWindow class.
- */
- static QList<RekonqWindow*> windowList();
-
- /**
- * If the session did contain so high a @p number, @p true is returned,
- * else @p false.
- * @see restore()
- **/
- static bool canBeRestored(int number);
-
- /**
- * Try to restore the toplevel widget as defined by @p number (1..X).
- *
- * You should call canBeRestored() first.
- *
- **/
- bool restore(int number, bool show = true);
-
- // NOTE: For internal purpose only ------------------------------------------------------
- int addTab(QWidget *page, const QString &label);
- int addTab(QWidget *page, const QIcon &icon, const QString &label);
-
- int insertTab(int index, QWidget *page, const QString &label);
- int insertTab(int index, QWidget *page, const QIcon &icon, const QString &label);
- // --------------------------------------------------------------------------------------
-
-protected:
- /**
- * Save your instance-specific properties. The function is
- * invoked when the session manager requests your application
- * to save its state.
- *
- * Please reimplement these function in childclasses.
- *
- * Note: No user interaction is allowed
- * in this function!
- *
- */
- virtual void saveProperties(KConfigGroup &) {}
-
- /**
- * Read your instance-specific properties.
- *
- * Is called indirectly by restore().
- */
- virtual void readProperties(const KConfigGroup &) {}
-
- void savePropertiesInternal(KConfig*, int);
- bool readPropertiesInternal(KConfig*, int);
-
- /**
- * For inherited classes
- */
- void saveWindowSize(const KConfigGroup &config) const;
- /**
- * For inherited classes
- * Note that a -geometry on the command line has priority.
- */
- void restoreWindowSize(const KConfigGroup & config);
-
- /// parse the geometry from the geometry command line argument
- void parseGeometry();
-
- virtual void resizeEvent(QResizeEvent *);
+ TabWidget *tabWidget();
+ TabBar *tabBar();
+ WebWindow *currentWebWindow() const;
-private Q_SLOTS:
- void saveAutoSaveSettings();
+private:
+ void init();
+
+public Q_SLOTS:
+ void loadUrl(const KUrl &, Rekonq::OpenType type = Rekonq::CurrentTab, TabHistory *history = 0);
+private Q_SLOTS:
+ void showBookmarksPanel(bool);
+ void showHistoryPanel(bool);
+
private:
- /// This has been added to just fix window position && not let them be overlying
- void checkPosition();
+ TabWidget *_tabWidget;
+
+ QSplitter *_splitter;
+
+ QWeakPointer<HistoryPanel> _historyPanel;
+ QWeakPointer<BookmarksPanel> _bookmarksPanel;
};
#endif // REKONQ_WINDOW_H