┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.h
diff options
context:
space:
mode:
authorHolger Freyther <[email protected]>2006-11-29 00:02:19 +0000
committerHolger Freyther <[email protected]>2006-11-29 00:02:19 +0000
commitf31a541925033c2ef5e27b85c099d47791b50121 (patch)
tree11cc728aa7d247ca5b075776c438be0f381be765 /src/dolphinview.h
parent68e81f7280c810e26cabf6cd2897b9dc8466f458 (diff)
Make it (almost) possible to have more than one Dolphin KMainWindow
Create a DolphinApplication, holding DolphinMainWindows and update the code to use the DolphinView to get the MainWindow, or get a ptr to the MainWindow directly. Or if all windows are effected go through the DolphinApplication to update every mainwindow. The UndowManager and ProgressIndicator have a rather strange relationship and will need some more attention but as UndoManager will be killed anyway I have skipped this. More cleanup, debugging and thinking is needed. svn path=/trunk/playground/utils/dolphin/; revision=608945
Diffstat (limited to 'src/dolphinview.h')
-rw-r--r--src/dolphinview.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/dolphinview.h b/src/dolphinview.h
index 5c7fb5c2c..69b0022d8 100644
--- a/src/dolphinview.h
+++ b/src/dolphinview.h
@@ -46,7 +46,7 @@ class Q3IconViewItem;
class Q3ListViewItem;
class Q3VBoxLayout;
//class KFileView;
-class Dolphin;
+class DolphinMainWindow;
class DolphinDirLister;
class DolphinStatusBar;
class DolphinIconsView;
@@ -115,7 +115,8 @@ public:
MaxSortEnum = SortByDate
};
- DolphinView(QWidget* parent,
+ DolphinView(DolphinMainWindow* mainwindow,
+ QWidget *parent,
const KUrl& url,
Mode mode = IconsView,
bool showHiddenFiles = false);
@@ -326,6 +327,12 @@ public:
*/
bool isFilterBarVisible();
+ /**
+ * Return the DolphinMainWindow this View belongs to. It is guranteed
+ * that we have one.
+ */
+ DolphinMainWindow* mainWindow() const ;
+
public slots:
void reload();
void slotUrlListDropped(QDropEvent* event,
@@ -337,6 +344,11 @@ public slots:
*/
void slotShowFilterBar(bool show);
+ /**
+ * Declare this View as the activeview of the mainWindow()
+ */
+ void declareViewActive();
+
signals:
/** Is emitted if Url of the view has been changed to \a url. */
void signalUrlChanged(const KUrl& url);
@@ -367,8 +379,8 @@ signals:
/**
* Is emitted whenever the selection has been changed. The current selection can
- * be retrieved by Dolphin::mainWin().activeView()->selectedItems() or by
- * Dolphin::mainWin().activeView()->selectedUrls().
+ * be retrieved by mainWindow()->activeView()->selectedItems() or by
+ * mainWindow()->activeView()->selectedUrls().
*/
void signalSelectionChanged();
@@ -381,6 +393,7 @@ protected:
/** @see QWidget::mouseReleaseEvent */
virtual void mouseReleaseEvent(QMouseEvent* event);
+
private slots:
void slotUrlChanged(const KUrl& kurl);
void triggerIconsViewItem(Q3IconViewItem *item);
@@ -440,6 +453,7 @@ private:
*/
void applyModeToView();
+ DolphinMainWindow *m_mainWindow;
bool m_refreshing;
bool m_showProgress;
Mode m_mode;