┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2006-12-08 23:41:08 +0000
committerPeter Penz <[email protected]>2006-12-08 23:41:08 +0000
commitd8669c68e40a6571dfcbdf38e3281a4aeb8c2be6 (patch)
tree8b49a9b34fbdcbb9f577481a7acf9efb62322c8f /src/dolphinmainwindow.h
parentd7d4fb9d26773c2d729b49d71af10e1378381ff3 (diff)
Cleanup of signal/slot handling between the dolphin view and the main window: now the main window listens to the signals from the dolphin view and connects to private slots (previously the dolphin view connected to public slots of the main window). Also prevent naming all slots by the prefix 'slot', describe instead what the method does.
svn path=/trunk/playground/utils/dolphin/; revision=611617
Diffstat (limited to 'src/dolphinmainwindow.h')
-rw-r--r--src/dolphinmainwindow.h101
1 files changed, 52 insertions, 49 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index 0e546511f..064bf1867 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -28,13 +28,14 @@
#include <kapplication.h>
#include <kmainwindow.h>
+#include <ksortablelist.h>
+#include <kvbox.h>
+
#include <q3valuelist.h>
#include <q3ptrlist.h>
-#include <qstring.h>
-//Added by qt3to4:
+
#include <QCloseEvent>
-#include <ksortablelist.h>
-#include <kvbox.h>
+#include <QString>
#include "dolphinview.h"
#include "undomanager.h"
@@ -126,51 +127,6 @@ signals:
*/
void selectionChanged();
-public slots:
- /**
- * Updates the state of the 'Back' and 'Forward' menu
- * actions corresponding the the current history.
- */
- void slotHistoryChanged();
-
- /**
- * Updates the caption of the main window and the state
- * of all menu actions which depend from a changed Url.
- */
- void slotUrlChanged(const KUrl& url);
-
- /**
- * Go to the given Url.
- */
- void slotUrlChangeRequest(const KUrl& url);
-
- /** Updates the state of all 'View' menu actions. */
- void slotViewModeChanged();
-
- /** Updates the state of the 'Show hidden files' menu action. */
- void slotShowHiddenFilesChanged();
-
- /** Updates the state of the 'Show filter bar' menu action. */
- void slotShowFilterBarChanged();
-
- /** Updates the state of the 'Sort by' actions. */
- void slotSortingChanged(DolphinView::Sorting sorting);
-
- /** Updates the state of the 'Sort Ascending/Descending' action. */
- void slotSortOrderChanged(Qt::SortOrder order);
-
- /** Updates the state of the 'Edit' menu actions. */
- void slotSelectionChanged();
-
- /** Executes Redo operation */
- void slotRedo();
-
- /** @see slotUndo() */
- void slotUndo();
-
- /** Open a new mainwindow */
- void slotNewMainWindow();
-
protected:
/** @see QMainWindow::closeEvent */
virtual void closeEvent(QCloseEvent* event);
@@ -371,6 +327,44 @@ private slots:
*/
void addUndoOperation(KJob* job);
+ /** Updates the state of all 'View' menu actions. */
+ void slotViewModeChanged();
+
+ /** Updates the state of the 'Show hidden files' menu action. */
+ void slotShowHiddenFilesChanged();
+
+ /** Updates the state of the 'Sort by' actions. */
+ void slotSortingChanged(DolphinView::Sorting sorting);
+
+ /** Updates the state of the 'Sort Ascending/Descending' action. */
+ void slotSortOrderChanged(Qt::SortOrder order);
+
+ /** Updates the state of the 'Edit' menu actions. */
+ void slotSelectionChanged();
+
+ /**
+ * Updates the state of the 'Back' and 'Forward' menu
+ * actions corresponding the the current history.
+ */
+ void slotHistoryChanged();
+
+ /**
+ * Updates the caption of the main window and the state
+ * of all menu actions which depend from a changed Url.
+ */
+ void slotUrlChanged(const KUrl& url);
+
+ /** Updates the state of the 'Show filter bar' menu action. */
+ void updateFilterBarAction(bool show);
+
+ /** Executes the redo operation (see UndoManager::Redo ()). */
+ void redo();
+
+ /** Executes the undo operation (see UndoManager::Undo()). */
+ void undo();
+
+ /** Open a new main window. */
+ void openNewMainWindow();
private:
DolphinMainWindow();
@@ -394,6 +388,15 @@ private:
const KUrl& dest);
void clearStatusBar();
+ /**
+ * Connects the signals from the created DolphinView with
+ * the index \a viewIndex with the corresponding slots of
+ * the DolphinMainWindow. This method must be invoked each
+ * time a DolphinView has been created.
+ */
+ void connectViewSignals(int viewIndex);
+
+private:
QSplitter* m_splitter;
DolphinView* m_activeView;