File indexing completed on 2024-04-21 05:45:41
0001 /* 0002 * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz19@gmail.com> 0003 * SPDX-FileCopyrightText: 2006 Stefan Monov <logixoul@gmail.com> 0004 * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <ludmiloff@gmail.com> 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef DOLPHIN_MAINWINDOW_H 0010 #define DOLPHIN_MAINWINDOW_H 0011 0012 #include "config-dolphin.h" 0013 #include "dolphintabwidget.h" 0014 #include "selectionmode/bottombar.h" 0015 #include <KActionMenu> 0016 #include <KFileItemActions> 0017 #include <kio/fileundomanager.h> 0018 #include <kxmlguiwindow.h> 0019 0020 #if HAVE_BALOO 0021 #include "panels/information/informationpanel.h" 0022 #endif 0023 0024 #include <QFutureWatcher> 0025 #include <QIcon> 0026 #include <QList> 0027 #include <QMenu> 0028 #include <QPointer> 0029 #include <QUrl> 0030 #include <QVector> 0031 0032 typedef KIO::FileUndoManager::CommandType CommandType; 0033 0034 class DolphinBookmarkHandler; 0035 class DolphinViewActionHandler; 0036 class DolphinSettingsDialog; 0037 class DolphinViewContainer; 0038 class DolphinRemoteEncoding; 0039 class DolphinTabWidget; 0040 class KFileItem; 0041 class KFileItemList; 0042 class KJob; 0043 class KNewFileMenu; 0044 class KToolBarPopupAction; 0045 class QToolButton; 0046 class PlacesPanel; 0047 class TerminalPanel; 0048 0049 namespace KIO 0050 { 0051 class OpenUrlJob; 0052 } 0053 namespace SelectionMode 0054 { 0055 class ActionTextHelper; 0056 } 0057 0058 /** 0059 * @short Main window for Dolphin. 0060 * 0061 * Handles the menus, toolbars and Dolphin views. 0062 */ 0063 class DolphinMainWindow : public KXmlGuiWindow 0064 { 0065 Q_OBJECT 0066 Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.MainWindow") 0067 0068 public: 0069 DolphinMainWindow(); 0070 ~DolphinMainWindow() override; 0071 0072 /** 0073 * Returns the currently active view. 0074 * All menu actions are applied to this view. When 0075 * having a split view setup, the nonactive view 0076 * is usually shown in darker colors. 0077 */ 0078 DolphinViewContainer *activeViewContainer() const; 0079 0080 /** 0081 * Returns view container for all tabs 0082 */ 0083 QVector<DolphinViewContainer *> viewContainers() const; 0084 0085 /** 0086 * Opens each directory in \p dirs in a separate tab. If \a splitView is set, 0087 * 2 directories are collected within one tab. 0088 * \pre \a dirs must contain at least one url. 0089 */ 0090 void openDirectories(const QList<QUrl> &dirs, bool splitView); 0091 0092 /** 0093 * Opens the directories which contain the files \p files and selects all files. 0094 * If \a splitView is set, 2 directories are collected within one tab. 0095 * \pre \a files must contain at least one url. 0096 */ 0097 void openFiles(const QList<QUrl> &files, bool splitView); 0098 0099 /** 0100 * Returns the 'Create New...' sub menu which also can be shared 0101 * with other menus (e. g. a context menu). 0102 */ 0103 KNewFileMenu *newFileMenu() const; 0104 0105 /** 0106 * Augments Qt's build-in QMainWindow context menu to add 0107 * Dolphin-specific actions, such as "unlock panels". 0108 */ 0109 QMenu *createPopupMenu() override; 0110 0111 /** 0112 * Switch the window's view containers' locations to display the home path 0113 * for any which are currently displaying a location corresponding to or 0114 * within mountPath. 0115 * 0116 * This typically done after unmounting a disk at mountPath to ensure that 0117 * the window is not displaying an invalid location. 0118 */ 0119 void setViewsToHomeIfMountPathOpen(const QString &mountPath); 0120 0121 /** 0122 * Enables or disables the session autosaving feature. 0123 * 0124 * @param enable If true, saves the session automatically after a fixed 0125 * time interval from the last state change. 0126 */ 0127 void setSessionAutoSaveEnabled(bool enable); 0128 0129 bool isFoldersPanelEnabled() const; 0130 bool isInformationPanelEnabled() const; 0131 bool isSplitViewEnabledInCurrentTab() const; 0132 0133 public Q_SLOTS: 0134 /** 0135 * Opens each directory in \p dirs in a separate tab. If \a splitView is set, 0136 * 2 directories are collected within one tab. 0137 * \pre \a dirs must contain at least one url. 0138 * 0139 * @note this function is overloaded so that it is callable via DBus. 0140 */ 0141 void openDirectories(const QStringList &dirs, bool splitView); 0142 0143 /** 0144 * Opens the directories which contain the files \p files and selects all files. 0145 * If \a splitView is set, 2 directories are collected within one tab. 0146 * \pre \a files must contain at least one url. 0147 * 0148 * @note this is overloaded so that this function is callable via DBus. 0149 */ 0150 void openFiles(const QStringList &files, bool splitView); 0151 0152 /** 0153 * Tries to raise/activate the Dolphin window. 0154 */ 0155 void activateWindow(const QString &activationToken); 0156 0157 bool isActiveWindow(); 0158 0159 /** 0160 * Determines if a URL is open in any tab. 0161 * @note Use of QString instead of QUrl is required to be callable via DBus. 0162 * 0163 * @param url URL to look for 0164 * @returns true if url is currently open in a tab, false otherwise. 0165 */ 0166 bool isUrlOpen(const QString &url); 0167 0168 /** 0169 * @return Whether the item with @p url can be found in any view only by switching 0170 * between already open tabs and scrolling in their primary or secondary view. 0171 * @note Use of QString instead of QUrl is required to be callable via DBus. 0172 */ 0173 bool isItemVisibleInAnyView(const QString &urlOfItem); 0174 0175 /** 0176 * Pastes the clipboard data into the currently selected folder 0177 * of the active view. If not exactly one folder is selected, 0178 * no pasting is done at all. 0179 */ 0180 void pasteIntoFolder(); 0181 0182 /** 0183 * Implementation of the MainWindowAdaptor/QDBusAbstractAdaptor interface. 0184 * Inform all affected dolphin components (panels, views) of an URL 0185 * change. 0186 */ 0187 void changeUrl(const QUrl &url); 0188 0189 /** 0190 * The current directory of the Terminal Panel has changed, probably because 0191 * the user entered a 'cd' command. This slot calls changeUrl(url) and makes 0192 * sure that the panel keeps the keyboard focus. 0193 */ 0194 void slotTerminalDirectoryChanged(const QUrl &url); 0195 0196 /** Stores all settings and quits Dolphin. */ 0197 void quit(); 0198 0199 /** 0200 * Opens a new tab in the background showing the URL \a url. 0201 */ 0202 void openNewTab(const QUrl &url); 0203 0204 /** 0205 * Opens a new tab showing the URL \a url and activate it. 0206 */ 0207 void openNewTabAndActivate(const QUrl &url); 0208 0209 /** 0210 * Opens a new window showing the URL \a url. 0211 */ 0212 void openNewWindow(const QUrl &url); 0213 0214 /** @see GeneralSettings::splitViewChanged() */ 0215 void slotSplitViewChanged(); 0216 0217 Q_SIGNALS: 0218 /** 0219 * Is sent if the selection of the currently active view has 0220 * been changed. 0221 */ 0222 void selectionChanged(const KFileItemList &selection); 0223 0224 /** 0225 * Is sent if the url of the currently active view has 0226 * been changed. 0227 */ 0228 void urlChanged(const QUrl &url); 0229 0230 /** 0231 * Is emitted if information of an item is requested to be shown e. g. in the panel. 0232 * If item is null, no item information request is pending. 0233 */ 0234 void requestItemInfo(const KFileItem &item); 0235 0236 /** 0237 * It is emitted when in the current view, files are changed, 0238 * or dirs have files/removed from them. 0239 */ 0240 void fileItemsChanged(const KFileItemList &changedFileItems); 0241 0242 /** 0243 * Is emitted if the settings have been changed. 0244 */ 0245 void settingsChanged(); 0246 0247 protected: 0248 /** @see QObject::event() */ 0249 bool event(QEvent *event) override; 0250 0251 /** @see QWidget::showEvent() */ 0252 void showEvent(QShowEvent *event) override; 0253 0254 /** @see QMainWindow::closeEvent() */ 0255 void closeEvent(QCloseEvent *event) override; 0256 0257 /** @see KMainWindow::saveProperties() */ 0258 void saveProperties(KConfigGroup &group) override; 0259 0260 /** @see KMainWindow::readProperties() */ 0261 void readProperties(const KConfigGroup &group) override; 0262 0263 /** Sets a sane initial window size **/ 0264 QSize sizeHint() const override; 0265 0266 protected Q_SLOTS: 0267 /** 0268 * Calls the base method KXmlGuiWindow::saveNewToolbarConfig(). 0269 * Is also used to set toolbar constraints and UrlNavigator position 0270 * based on the newly changed toolbar configuration. 0271 */ 0272 void saveNewToolbarConfig() override; 0273 0274 private Q_SLOTS: 0275 /** 0276 * Refreshes the views of the main window by recreating them according to 0277 * the given Dolphin settings. 0278 */ 0279 void refreshViews(); 0280 0281 void clearStatusBar(); 0282 0283 /** Updates the 'Create New...' sub menu. */ 0284 void updateNewMenu(); 0285 0286 void createDirectory(); 0287 0288 /** Shows the error message in the status bar of the active view. */ 0289 void showErrorMessage(const QString &message); 0290 0291 /** 0292 * Updates the state of the 'Undo' menu action dependent 0293 * on the parameter \a available. 0294 */ 0295 void slotUndoAvailable(bool available); 0296 0297 /** Sets the text of the 'Undo' menu action to \a text. */ 0298 void slotUndoTextChanged(const QString &text); 0299 0300 /** Performs the current undo operation. */ 0301 void undo(); 0302 0303 /** 0304 * Copies all selected items to the clipboard and marks 0305 * the items as cut. 0306 */ 0307 void cut(); 0308 0309 /** Copies all selected items to the clipboard. */ 0310 void copy(); 0311 0312 /** Pastes the clipboard data to the active view. */ 0313 void paste(); 0314 0315 /** Replaces the URL navigator by a search box to find files. */ 0316 void find(); 0317 0318 /** Updates the state of the search action according to the view container. */ 0319 void updateSearchAction(); 0320 0321 /** 0322 * Updates the text of the paste action dependent on 0323 * the number of items which are in the clipboard. 0324 */ 0325 void updatePasteAction(); 0326 0327 /** Calls DolphinViewContainer::setSelectionMode() for m_activeViewContainer. */ 0328 void slotSetSelectionMode(bool enabled, SelectionMode::BottomBar::Contents bottomBarContents); 0329 0330 /** Selects all items from the active view. */ 0331 void selectAll(); 0332 0333 /** 0334 * Inverts the selection of all items of the active view: 0335 * Selected items get nonselected and nonselected items get 0336 * selected. 0337 */ 0338 void invertSelection(); 0339 0340 /** 0341 * Switches between one and two views: 0342 * If one view is visible, it will get split into two views. 0343 * If already two views are visible, the active view gets closed. 0344 */ 0345 void toggleSplitView(); 0346 0347 /** 0348 * Pops out a split view. 0349 * The active view will be popped out, unless the view is not split, 0350 * in which case nothing will happen. 0351 */ 0352 void popoutSplitView(); 0353 0354 /** Dedicated action to open the stash:/ ioslave in split view. */ 0355 void toggleSplitStash(); 0356 0357 /** Copies all selected items to the inactive view. */ 0358 void copyToInactiveSplitView(); 0359 0360 /** Moves all selected items to the inactive view. */ 0361 void moveToInactiveSplitView(); 0362 0363 /** Reloads the currently active view. */ 0364 void reloadView(); 0365 0366 /** Stops the loading process for the currently active view. */ 0367 void stopLoading(); 0368 0369 void enableStopAction(); 0370 void disableStopAction(); 0371 0372 void toggleSelectionMode(); 0373 0374 void showFilterBar(); 0375 void toggleFilterBar(); 0376 0377 /** 0378 * Toggles between edit and browse mode of the navigation bar. 0379 */ 0380 void toggleEditLocation(); 0381 0382 /** 0383 * Switches to the edit mode of the navigation bar and selects 0384 * the whole URL, so that it can be replaced by the user. If the edit mode is 0385 * already active, it is assured that the navigation bar get focused. 0386 */ 0387 void replaceLocation(); 0388 0389 /** 0390 * Toggles the state of the panels between a locked and unlocked layout. 0391 */ 0392 void togglePanelLockState(); 0393 0394 /** 0395 * Is invoked if the Terminal panel got visible/invisible and takes care 0396 * that the active view has the focus if the Terminal panel is invisible. 0397 */ 0398 void slotTerminalPanelVisibilityChanged(); 0399 0400 /** Goes back one step of the URL history. */ 0401 void goBack(); 0402 0403 /** Goes forward one step of the URL history. */ 0404 void goForward(); 0405 0406 /** Goes up one hierarchy of the current URL. */ 0407 void goUp(); 0408 0409 /** Changes the location to the home URL. */ 0410 void goHome(); 0411 0412 /** Open the previous URL in the URL history in a new tab. */ 0413 void goBackInNewTab(); 0414 0415 /** Open the next URL in the URL history in a new tab. */ 0416 void goForwardInNewTab(); 0417 0418 /** Open the URL one hierarchy above the current URL in a new tab. */ 0419 void goUpInNewTab(); 0420 0421 /** * Open the home URL in a new tab. */ 0422 void goHomeInNewTab(); 0423 0424 /** Opens Kompare for 2 selected files. */ 0425 void compareFiles(); 0426 0427 /** 0428 * Hides the menu bar if it is visible, makes the menu bar 0429 * visible if it is hidden. 0430 */ 0431 void toggleShowMenuBar(); 0432 0433 /** Updates "Open Preferred Search Tool" action. */ 0434 void updateOpenPreferredSearchToolAction(); 0435 0436 /** Opens preferred search tool for the current location. */ 0437 void openPreferredSearchTool(); 0438 0439 /** Opens a terminal window for the current location. */ 0440 void openTerminal(); 0441 0442 /** Opens terminal windows for the selected items' locations. */ 0443 void openTerminalHere(); 0444 0445 /** Opens a terminal window for the URL. */ 0446 void openTerminalJob(const QUrl &url); 0447 0448 /** Focus a Terminal Panel. */ 0449 void focusTerminalPanel(); 0450 0451 /** Opens the settings dialog for Dolphin. */ 0452 void editSettings(); 0453 0454 /** Updates the state of the 'Show Full Location' action. */ 0455 void slotEditableStateChanged(bool editable); 0456 0457 /** 0458 * Updates the state of the 'Edit' menu actions and emits 0459 * the signal selectionChanged(). 0460 */ 0461 void slotSelectionChanged(const KFileItemList &selection); 0462 0463 /** 0464 * Updates the state of the 'Back' and 'Forward' menu 0465 * actions corresponding to the current history. 0466 */ 0467 void updateHistory(); 0468 0469 /** Updates the state of the 'Show filter bar' menu action. */ 0470 void updateFilterBarAction(bool show); 0471 0472 /** Open a new main window. */ 0473 void openNewMainWindow(); 0474 0475 /** 0476 * Opens a new view with the current URL that is part of a tab and 0477 * activates it. 0478 */ 0479 void openNewActivatedTab(); 0480 0481 /** 0482 * Adds the current URL as an entry to the Places panel 0483 */ 0484 void addToPlaces(); 0485 0486 /** 0487 * Opens the selected folder in a new tab. 0488 */ 0489 void openInNewTab(); 0490 0491 /** 0492 * Opens the selected folder in a new window. 0493 */ 0494 void openInNewWindow(); 0495 0496 /** 0497 * Opens the selected folder in the other inactive split view, enables split view if necessary. 0498 */ 0499 void openInSplitView(const QUrl &url); 0500 0501 /** 0502 * Show the target of the selected symlink 0503 */ 0504 void showTarget(); 0505 0506 /** 0507 * Indicates in the statusbar that the execution of the command \a command 0508 * has been finished. 0509 */ 0510 void showCommand(CommandType command); 0511 0512 /** 0513 * If the URL can be listed, open it in the current view, otherwise 0514 * run it through KRun. 0515 */ 0516 void handleUrl(const QUrl &url); 0517 0518 /** 0519 * Is invoked when the write state of a folder has been changed and 0520 * enables/disables the "Create New..." menu entry. 0521 */ 0522 void slotWriteStateChanged(bool isFolderWritable); 0523 0524 /** 0525 * Opens the context menu on the current mouse position. 0526 * @pos Position in screen coordinates. 0527 * @item File item context. If item is null, the context menu 0528 * should be applied to \a url. 0529 * @selectedItems The selected items for which the context menu 0530 * is opened. This list generally includes \a item. 0531 * @url URL which contains \a item. 0532 */ 0533 void openContextMenu(const QPoint &pos, const KFileItem &item, const KFileItemList &selectedItems, const QUrl &url); 0534 0535 /** 0536 * Updates the menu that is by default at the right end of the toolbar. 0537 * 0538 * In true "simple by default" fashion, the menu only contains the most important 0539 * and necessary actions to be able to use Dolphin. This is supposed to hold true even 0540 * if the user does not know how to open a context menu. More advanced actions can be 0541 * discovered through a sub-menu (@see KConfigWidgets::KHamburgerMenu::setMenuBarAdvertised()). 0542 */ 0543 void updateHamburgerMenu(); 0544 0545 /** 0546 * Is called if the user clicked an item in the Places Panel. 0547 * Reloads the view if \a url is the current URL already, and changes the 0548 * current URL otherwise. 0549 */ 0550 void slotPlaceActivated(const QUrl &url); 0551 0552 /** 0553 * Is called if the another view has been activated by changing the current 0554 * tab or activating another view in split-view mode. 0555 * 0556 * Activates the given view, which means that all menu actions are applied 0557 * to this view. When having a split view setup, the nonactive view is 0558 * usually shown in darker colors. 0559 */ 0560 void activeViewChanged(DolphinViewContainer *viewContainer); 0561 0562 void closedTabsCountChanged(unsigned int count); 0563 0564 /** 0565 * Is called if a new tab has been opened or a tab has been closed to 0566 * enable/disable the tab actions. 0567 */ 0568 void tabCountChanged(int count); 0569 0570 /** 0571 * Updates the Window Title with the caption from the active view container 0572 */ 0573 void updateWindowTitle(); 0574 0575 /** 0576 * This slot is called when the user requested to unmount a removable media 0577 * from the places menu 0578 */ 0579 void slotStorageTearDownFromPlacesRequested(const QString &mountPath); 0580 0581 /** 0582 * This slot is called when the user requested to unmount a removable media 0583 * _not_ from the dolphin's places menu (from the notification area for e.g.) 0584 * This slot is basically connected to each removable device's 0585 * Solid::StorageAccess::teardownRequested(const QString & udi) 0586 * signal through the places panel. 0587 */ 0588 void slotStorageTearDownExternallyRequested(const QString &mountPath); 0589 0590 /** 0591 * Is called when the view has finished loading the directory. 0592 */ 0593 void slotDirectoryLoadingCompleted(); 0594 0595 /** 0596 * Is called when the user middle clicks a toolbar button. 0597 * 0598 * Here middle clicking Back/Forward/Up/Home will open the resulting 0599 * folder in a new tab. 0600 */ 0601 void slotToolBarActionMiddleClicked(QAction *action); 0602 0603 /** 0604 * Is called before the Back popup menu is shown. This slot will populate 0605 * the menu with history data 0606 */ 0607 void slotAboutToShowBackPopupMenu(); 0608 0609 /** 0610 * This slot is used by the Back Popup Menu to go back to a specific 0611 * history index. The QAction::data will carry an int with the index 0612 * to go to. 0613 */ 0614 void slotGoBack(QAction *action); 0615 0616 /** 0617 * Middle clicking Back/Forward will open the resulting folder in a new tab. 0618 */ 0619 void slotBackForwardActionMiddleClicked(QAction *action); 0620 0621 /** 0622 * Is called before the Forward popup menu is shown. This slot will populate 0623 * the menu with history data 0624 */ 0625 void slotAboutToShowForwardPopupMenu(); 0626 0627 /** 0628 * This slot is used by the Forward Popup Menu to go forward to a specific 0629 * history index. The QAction::data will carry an int with the index 0630 * to go to. 0631 */ 0632 void slotGoForward(QAction *action); 0633 0634 /** 0635 * Is called when configuring the keyboard shortcuts 0636 */ 0637 void slotKeyBindings(); 0638 0639 /** 0640 * Saves the session. 0641 */ 0642 void slotSaveSession(); 0643 0644 private: 0645 /** 0646 * Sets up the various menus and actions and connects them. 0647 */ 0648 void setupActions(); 0649 0650 /** 0651 * Sets up the dock widgets and their panels. 0652 */ 0653 void setupDockWidgets(); 0654 0655 void updateFileAndEditActions(); 0656 void updateViewActions(); 0657 void updateGoActions(); 0658 0659 /** 0660 * Connects the signals from the created DolphinView with 0661 * the DolphinViewContainer \a container with the corresponding slots of 0662 * the DolphinMainWindow. This method must be invoked each 0663 * time a DolphinView has been created. 0664 */ 0665 void connectViewSignals(DolphinViewContainer *container); 0666 0667 /** 0668 * Updates the text of the split action: 0669 * If two views are shown, the text is set to "Split", 0670 * otherwise the text is set to "Join". The icon 0671 * is updated to match with the text and the currently active view. 0672 */ 0673 void updateSplitActions(); 0674 0675 /** 0676 * Sets the window sides the toolbar may be moved to based on toolbar contents. 0677 */ 0678 void updateAllowedToolbarAreas(); 0679 0680 bool isKompareInstalled() const; 0681 0682 /** 0683 * Creates an action for showing/hiding a panel, that is accessible 0684 * in "Configure toolbars..." and "Configure shortcuts...". 0685 */ 0686 void createPanelAction(const QIcon &icon, const QKeySequence &shortcut, QDockWidget *dockAction, const QString &actionName); 0687 0688 /** Adds "What's This?" texts to many widgets and StandardActions. */ 0689 void setupWhatsThis(); 0690 0691 /** Returns preferred search tool as configured in "More Search Tools" menu. */ 0692 QPointer<QAction> preferredSearchTool(); 0693 0694 /** 0695 * Adds this action to the mainWindow's toolbar and saves the change 0696 * in the users ui configuration file. 0697 * This method is only needed for migration and should be removed once we can expect 0698 * that pretty much all users have been migrated. Remove in 2026 because that's when 0699 * even the most risk-averse distros will already have been forced to upgrade. 0700 * @return true if successful. Otherwise false. 0701 */ 0702 bool addHamburgerMenuToToolbar(); 0703 0704 /** Creates an action representing an item in the URL navigator history */ 0705 static QAction *urlNavigatorHistoryAction(const KUrlNavigator *urlNavigator, int historyIndex, QObject *parent = nullptr); 0706 0707 private: 0708 /** 0709 * Implements a custom error handling for the undo manager. This 0710 * assures that all errors are shown in the status bar of Dolphin 0711 * instead as modal error dialog with an OK button. 0712 */ 0713 class UndoUiInterface : public KIO::FileUndoManager::UiInterface 0714 { 0715 public: 0716 UndoUiInterface(); 0717 ~UndoUiInterface() override; 0718 void jobError(KIO::Job *job) override; 0719 }; 0720 0721 KNewFileMenu *m_newFileMenu; 0722 DolphinTabWidget *m_tabWidget; 0723 DolphinViewContainer *m_activeViewContainer; 0724 0725 DolphinViewActionHandler *m_actionHandler; 0726 DolphinRemoteEncoding *m_remoteEncoding; 0727 QPointer<DolphinSettingsDialog> m_settingsDialog; 0728 DolphinBookmarkHandler *m_bookmarkHandler; 0729 SelectionMode::ActionTextHelper *m_actionTextHelper; 0730 0731 KIO::OpenUrlJob *m_lastHandleUrlOpenJob; 0732 0733 TerminalPanel *m_terminalPanel; 0734 PlacesPanel *m_placesPanel; 0735 bool m_tearDownFromPlacesRequested; 0736 0737 KToolBarPopupAction *m_backAction; 0738 KToolBarPopupAction *m_forwardAction; 0739 KActionMenu *m_splitViewAction; 0740 QAction *m_splitViewMenuAction; 0741 0742 QMenu m_searchTools; 0743 KFileItemActions m_fileItemActions; 0744 0745 QTimer *m_sessionSaveTimer; 0746 QFutureWatcher<void> *m_sessionSaveWatcher; 0747 bool m_sessionSaveScheduled; 0748 0749 friend class DolphinMainWindowTest; 0750 }; 0751 0752 inline DolphinViewContainer *DolphinMainWindow::activeViewContainer() const 0753 { 0754 return m_activeViewContainer; 0755 } 0756 0757 inline KNewFileMenu *DolphinMainWindow::newFileMenu() const 0758 { 0759 return m_newFileMenu; 0760 } 0761 0762 #endif // DOLPHIN_MAINWINDOW_H