File indexing completed on 2024-03-24 05:01:18
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 1998, 1999 Simon Hausmann <hausmann@kde.org> 0004 SPDX-FileCopyrightText: 2000-2004 David Faure <faure@kde.org> 0005 SPDX-FileCopyrightText: 2007 Eduardo Robles Elvira <edulix@gmail.com> 0006 SPDX-FileCopyrightText: 2007 Daniel GarcĂa Moreno <danigm@gmail.com> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #ifndef KONQMAINWINDOW_H 0012 #define KONQMAINWINDOW_H 0013 0014 #include "konqprivate_export.h" 0015 0016 #include <QMap> 0017 #include <QPointer> 0018 #include <QList> 0019 #include <QUrl> 0020 #include <QUuid> 0021 0022 #include <kfileitem.h> 0023 #include <kparts/mainwindow.h> 0024 #include <KParts/PartActivateEvent> 0025 #include <kservice.h> 0026 0027 #include "konqcombo.h" 0028 #include "konqframe.h" 0029 #include "konqframecontainer.h" 0030 #include "konqopenurlrequest.h" 0031 #include "kf5compat.h" //For NavigationExtension 0032 #include "configdialog.h" 0033 #include "windowargs.h" 0034 0035 class QActionGroup; 0036 class KUrlCompletion; 0037 class QLabel; 0038 class KLocalizedString; 0039 class KToggleFullScreenAction; 0040 class KonqUndoManager; 0041 class QAction; 0042 class QAction; 0043 class KActionCollection; 0044 class KActionMenu; 0045 class KBookmarkGroup; 0046 class KBookmarkMenu; 0047 class KBookmarkActionMenu; 0048 class KCMultiDialog; 0049 class KNewFileMenu; 0050 class KToggleAction; 0051 class KBookmarkBar; 0052 class KonqView; 0053 class KonqFrameContainerBase; 0054 class KonqFrameContainer; 0055 class KToolBarPopupAction; 0056 class KonqAnimatedLogo; 0057 class KonqViewManager; 0058 class ToggleViewGUIClient; 0059 class KonqRun; 0060 class KConfigGroup; 0061 class KonqHistoryDialog; 0062 struct HistoryEntry; 0063 class QLineEdit; 0064 class UrlLoader; 0065 0066 namespace KParts 0067 { 0068 //TODO KF6: when removing compatibility with KF5, uncomment the line below 0069 // class NavigationExtension; 0070 class ReadOnlyPart; 0071 class OpenUrlArguments; 0072 } 0073 0074 class KonqExtendedBookmarkOwner; 0075 0076 class KONQ_TESTS_EXPORT KonqMainWindow : public KParts::MainWindow, public KonqFrameContainerBase 0077 { 0078 Q_OBJECT 0079 Q_PROPERTY(int viewCount READ viewCount) 0080 Q_PROPERTY(int linkableViewsCount READ linkableViewsCount) 0081 Q_PROPERTY(QString locationBarURL READ locationBarURL) 0082 Q_PROPERTY(bool fullScreenMode READ fullScreenMode) 0083 Q_PROPERTY(QString currentTitle READ currentTitle) 0084 Q_PROPERTY(QString currentURL READ currentURL) 0085 public: 0086 enum ComboAction { ComboClear, ComboAdd, ComboRemove }; 0087 enum PageSecurity { NotCrypted, Encrypted, Mixed }; 0088 0089 explicit KonqMainWindow(const QUrl &initialURL = QUrl()); 0090 ~KonqMainWindow() override; 0091 0092 /** 0093 * Filters the URL and calls the main openUrl method. 0094 */ 0095 void openFilteredUrl(const QString &url, const KonqOpenURLRequest &req); 0096 0097 /** 0098 * Convenience overload for openFilteredUrl(url, req) 0099 */ 0100 void openFilteredUrl(const QString &url, bool inNewTab = false, bool tempFile = false); 0101 0102 /** 0103 * Convenience overload for openFilteredUrl(url, req) 0104 */ 0105 void openFilteredUrl(const QString &_url, const QString &_mimeType, bool inNewTab, bool tempFile); 0106 0107 void applyMainWindowSettings(const KConfigGroup &config) override; 0108 0109 /** 0110 * It's not override since KMainWindow variant isn't virtual 0111 */ 0112 void saveMainWindowSettings(KConfigGroup &config); 0113 0114 public Q_SLOTS: 0115 /** 0116 * The main openUrl method. 0117 */ 0118 void openUrl(KonqView *view, const QUrl &url, 0119 const QString &serviceType = QString(), 0120 const KonqOpenURLRequest &req = KonqOpenURLRequest::null, 0121 bool trustedSource = false); // trustedSource should be part of KonqOpenURLRequest, probably 0122 0123 public: 0124 /** 0125 * Called by openUrl when it knows the mime type (either directly, 0126 * or using KonqRun). 0127 * \param mimeType the mimetype of the URL to open. Always set. 0128 * \param url the URL to open. 0129 * \param childView the view in which to open the URL. Can be 0, in which 0130 * case a new tab (or the very first view) will be created. 0131 */ 0132 bool openView(QString mimeType, const QUrl &url, KonqView *childView, 0133 const KonqOpenURLRequest &req = KonqOpenURLRequest::null, QUrl requestedUrl={}); 0134 0135 // bool openView(const QString &mimetype, const QUrl &url, KService::Ptr service); 0136 0137 void abortLoading(); 0138 0139 void openMultiURL(const QList<QUrl> &url); 0140 0141 /// Returns the view manager for this window. 0142 KonqViewManager *viewManager() const 0143 { 0144 return m_pViewManager; 0145 } 0146 0147 /// KXMLGUIBuilder methods, reimplemented for delayed bookmark-toolbar initialization 0148 QWidget *createContainer(QWidget *parent, int index, const QDomElement &element, QAction *&containerAction) override; 0149 void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, QAction *containerAction) override; 0150 0151 /// KMainWindow methods, for session management 0152 void saveProperties(KConfigGroup &config) override; 0153 void readProperties(const KConfigGroup &config) override; 0154 0155 void setInitialFrameName(const QString &name); 0156 0157 void reparseConfiguration(); 0158 0159 /// Called by KonqViewManager 0160 void insertChildView(KonqView *childView); 0161 /// Called by KonqViewManager 0162 void removeChildView(KonqView *childView); 0163 0164 KonqView *childView(KParts::ReadOnlyPart *view); 0165 KonqView *childView(KParts::ReadOnlyPart *callingPart, const QString &name, KParts::ReadOnlyPart **part); 0166 0167 // Total number of views 0168 int viewCount() const 0169 { 0170 return m_mapViews.count(); 0171 } 0172 0173 // Number of views not in "passive" mode and not locked 0174 int activeViewsNotLockedCount() const; 0175 0176 // Number of views that can be linked, i.e. not with "follow active view" behavior 0177 int linkableViewsCount() const; 0178 0179 // Number of main views (non-toggle non-passive views) 0180 int mainViewsCount() const; 0181 0182 typedef QMap<KParts::ReadOnlyPart *, KonqView *> MapViews; 0183 0184 const MapViews &viewMap() const 0185 { 0186 return m_mapViews; 0187 } 0188 0189 KonqView *currentView() const; 0190 0191 /** URL of current part, or URLs of selected items for directory views */ 0192 QList<QUrl> currentURLs() const; 0193 0194 // Only valid if there are one or two views 0195 KonqView *otherView(KonqView *view) const; 0196 0197 /// Overloaded of KMainWindow 0198 void setCaption(const QString &caption) override; 0199 /// Overloaded of KMainWindow -- should never be called, or if it is, we ignore "modified" anyway 0200 void setCaption(const QString &caption, bool modified) override 0201 { 0202 Q_UNUSED(modified); 0203 setCaption(caption); 0204 } 0205 0206 /** 0207 * Change URL displayed in the location bar 0208 */ 0209 void setLocationBarURL(const QString &url); 0210 /** 0211 * Overload for convenience 0212 */ 0213 void setLocationBarURL(const QUrl &url); 0214 /** 0215 * Return URL displayed in the location bar - for KonqViewManager 0216 */ 0217 QString locationBarURL() const; 0218 void focusLocationBar(); 0219 0220 /** 0221 * Set page security related to current view 0222 */ 0223 void setPageSecurity(PageSecurity); 0224 0225 void enableAllActions(bool enable); 0226 0227 void disableActionsNoView(); 0228 0229 void updateToolBarActions(bool pendingActions = false); 0230 void updateOpenWithActions(); 0231 void updateViewActions(); 0232 0233 bool sidebarVisible() const; 0234 0235 bool fullScreenMode() const; 0236 0237 KonqView* createTabForLoadUrlRequest(const QUrl &url, const KonqOpenURLRequest &request); 0238 0239 /** 0240 * @return the "link view" action, for checking/unchecking from KonqView 0241 */ 0242 KToggleAction *linkViewAction()const 0243 { 0244 return m_paLinkView; 0245 } 0246 0247 void enableAction(const char *name, bool enabled); 0248 void setActionText(const char *name, const QString &text); 0249 0250 static QList<KonqMainWindow *> *mainWindowList() 0251 { 0252 return s_lstMainWindows; 0253 } 0254 0255 /** 0256 * @brief A list of all existing `KonqMainWindow` 0257 * 0258 * @return A list of all `KonqMainWindow`. This list can be empty 0259 * @note This function is similar to mainWindowList(). The only differences is that it doesn't return a pointer, 0260 * so there's no need to check for `nullptr`, and that the list can't be modified. 0261 * @internal The returned list is `const` to avoid the fact that modifying it would affect ::s_lstMainWindows, but 0262 * only if the latter isn't `nullptr`, which could be confusing for the user. 0263 * @todo Check whether it's possible to make `s_lstMainWindows` not be a pointer: in this case, this function can be 0264 * removed and mainWindowList() can be used in its place. 0265 */ 0266 static QList<KonqMainWindow*> const mainWindows() {return s_lstMainWindows ? *s_lstMainWindows : QList<KonqMainWindow*>{};} 0267 0268 void linkableViewCountChanged(); 0269 void viewCountChanged(); 0270 0271 // operates on all combos of all mainwindows of this instance 0272 // up to now adds an entry or clears all entries 0273 static void comboAction(int action, const QString &url, 0274 const QString &senderId); 0275 0276 #ifndef NDEBUG 0277 void dumpViewList(); 0278 #endif 0279 0280 // KonqFrameContainerBase implementation BEGIN 0281 0282 bool accept(KonqFrameVisitor *visitor) override; 0283 0284 /** 0285 * Insert a new frame as the mainwindow's child 0286 */ 0287 void insertChildFrame(KonqFrameBase *frame, int index = -1) override; 0288 /** 0289 * Call this before deleting one of our children. 0290 */ 0291 void childFrameRemoved(KonqFrameBase *frame) override; 0292 0293 void saveConfig(KConfigGroup &config, const QString &prefix, const KonqFrameBase::Options &options, KonqFrameBase *docContainer, int id = 0, int depth = 0) override; 0294 0295 void copyHistory(KonqFrameBase *other) override; 0296 0297 void setTitle(const QString &title, QWidget *sender) override; 0298 void setTabIcon(const QUrl &url, QWidget *sender) override; 0299 0300 QWidget *asQWidget() override; 0301 0302 KonqFrameBase::FrameType frameType() const override; 0303 0304 KonqFrameBase *childFrame()const; 0305 0306 void setActiveChild(KonqFrameBase *activeChild) override; 0307 0308 // KonqFrameContainerBase implementation END 0309 0310 /** 0311 * When using RMB on a tab, remember the tab we are showing a popup for. 0312 */ 0313 void setWorkingTab(int index); 0314 0315 static bool isMimeTypeAssociatedWithSelf(const QString &mimeType); 0316 static bool isMimeTypeAssociatedWithSelf(const QString &mimeType, const KService::Ptr &offer); 0317 0318 bool refuseExecutingKonqueror(const QString &mimeType); 0319 0320 QString currentTitle() const; 0321 // Not used by konqueror itself; only exists for the Q_PROPERTY, 0322 // which I guess is used by scripts and plugins... 0323 QString currentURL() const; 0324 0325 void updateHistoryActions(); 0326 0327 bool isPreloaded() const; 0328 0329 /** 0330 * @brief The index of the current tab 0331 * @return the index of the current tab 0332 */ 0333 int currentTabIndex() const; 0334 0335 /** 0336 * @brief The number of tabs 0337 * @return the number of tabs 0338 */ 0339 int tabsCount() const; 0340 0341 // Public for unit tests 0342 void prepareForPopupMenu(const KFileItemList &items, const KParts::OpenUrlArguments &args, const BrowserArguments &browserArgs); 0343 0344 /** 0345 * @brief The last time the window was deactivated 0346 * 0347 * @return the last time the window was deactivated, as milliseconds from Epoch. If the window was never deactivated, this is 0 0348 */ 0349 qint64 lastDeactivationTime() const; 0350 0351 QString uuid() const {return m_uuid;} 0352 0353 QStringList activities() const; 0354 0355 void setOnActivities(const QStringList &ids) const; 0356 0357 Q_SIGNALS: 0358 void viewAdded(KonqView *view); 0359 void viewRemoved(KonqView *view); 0360 void popupItemsDisturbed(); 0361 void aboutToConfigure(); 0362 0363 /** 0364 * @brief Signal emitted before closing the window 0365 * @param window the window which was closed (`this`) 0366 */ 0367 void closing(KonqMainWindow *window); 0368 0369 public Q_SLOTS: 0370 void updateViewModeActions(); 0371 0372 void activateTab(int index); 0373 0374 void slotInternalViewModeChanged(); 0375 0376 void slotCtrlTabPressed(); 0377 0378 #if QT_VERSION_MAJOR < 6 0379 void slotPopupMenu(const QPoint &global, const KFileItemList &items, const KParts::OpenUrlArguments &args, const BrowserArguments &browserArgs, KParts::NavigationExtension::PopupFlags flags, const KParts::NavigationExtension::ActionGroupMap &); 0380 void slotPopupMenu(const QPoint &global, const QUrl &url, mode_t mode, const KParts::OpenUrlArguments &args, const BrowserArguments &browserArgs, KParts::NavigationExtension::PopupFlags f, const KParts::NavigationExtension::ActionGroupMap &); 0381 #else 0382 void slotPopupMenu(const QPoint &global, const KFileItemList &items, const KParts::OpenUrlArguments &args, const BrowserArguments &browserArgs, KParts::NavigationExtension::PopupFlags flags, const KParts::NavigationExtension::ActionGroupMap &, KonqView*); 0383 void slotPopupMenu(const QPoint &global, const QUrl &url, mode_t mode, const KParts::OpenUrlArguments &args, const BrowserArguments &browserArgs, KParts::NavigationExtension::PopupFlags f, const KParts::NavigationExtension::ActionGroupMap &, KonqView*); 0384 #endif 0385 0386 void slotOpenURLRequest(const QUrl &url, KonqOpenURLRequest &req); 0387 0388 void openUrl(KonqView *childView, const QUrl &url, KonqOpenURLRequest &req); 0389 0390 void slotCreateNewWindow(const QUrl &url, KonqOpenURLRequest& req, 0391 const WindowArgs &windowArgs = WindowArgs(), 0392 KParts::ReadOnlyPart **part = nullptr); 0393 0394 void slotNewWindow(); 0395 void slotDuplicateWindow(); 0396 void slotSendURL(); 0397 void slotSendFile(); 0398 void slotCopyFiles(); 0399 void slotMoveFiles(); 0400 void slotOpenLocation(); 0401 void slotOpenFile(); 0402 0403 // View menu 0404 void slotViewModeTriggered(QAction *action); 0405 void slotLockView(); 0406 void slotLinkView(); 0407 void slotReload(KonqView *view = nullptr, bool softReload = true); 0408 void slotForceReload(); 0409 void slotStop(); 0410 0411 // Go menu 0412 void slotUp(); 0413 void slotBack(); 0414 void slotForward(); 0415 void slotHome(); 0416 void slotGoHistory(); 0417 0418 void slotAddClosedUrl(KonqFrameBase *tab); 0419 0420 void slotConfigure(); 0421 void slotConfigure(Konq::ConfigDialog::Module module); 0422 void slotConfigureDone(); 0423 void slotConfigureToolbars(); 0424 void slotConfigureExtensions(); 0425 void slotConfigureSpellChecking(); 0426 void slotNewToolbarConfig(); 0427 0428 void slotUndoAvailable(bool avail); 0429 0430 void slotPartChanged(KonqView *childView, KParts::ReadOnlyPart *oldPart, KParts::ReadOnlyPart *newPart); 0431 0432 void urlLoaderFinished(UrlLoader *loader); 0433 void slotClearLocationBar(); 0434 0435 // reimplement from KParts::MainWindow 0436 void slotSetStatusBarText(const QString &text) override; 0437 0438 // public for KonqViewManager 0439 void slotPartActivated(KParts::Part *part); 0440 0441 void slotGoHistoryActivated(int steps); 0442 0443 void slotAddTab(); 0444 void slotSplitViewHorizontal(); 0445 void slotSplitViewVertical(); 0446 void slotRemoveOtherTabs(); 0447 void slotRemoveTabPopup(); 0448 0449 private Q_SLOTS: 0450 void slotViewCompleted(KonqView *view); 0451 0452 void slotURLEntered(const QString &text, Qt::KeyboardModifiers); 0453 0454 void slotLocationLabelActivated(); 0455 0456 void slotDuplicateTab(); 0457 void slotDuplicateTabPopup(); 0458 0459 void slotBreakOffTab(); 0460 void slotBreakOffTabPopup(); 0461 void breakOffTab(int); 0462 0463 void slotPopupNewWindow(); 0464 void slotPopupThisWindow(); 0465 void slotPopupNewTab(); 0466 void slotPopupPasteTo(); 0467 void slotRemoveView(); 0468 0469 void slotRemoveOtherTabsPopup(); 0470 0471 void slotReloadPopup(); 0472 void slotReloadAllTabs(); 0473 void slotRemoveTab(); 0474 void removeTab(int tabIndex); 0475 void removeOtherTabs(int tabIndex); 0476 0477 void slotActivateNextTab(); 0478 void slotActivatePrevTab(); 0479 void slotActivateTab(); 0480 0481 void slotDumpDebugInfo(); 0482 0483 void slotOpenEmbedded(const KPluginMetaData &part); 0484 0485 // Connected to KGlobalSettings 0486 void slotReconfigure(); 0487 0488 void slotForceSaveMainWindowSettings(); 0489 0490 void slotOpenWith(); 0491 0492 void updateProxyForWebEngine(bool updateProtocolManager = true); 0493 0494 #if 0 0495 void slotGoMenuAboutToShow(); 0496 #endif 0497 void slotUpAboutToShow(); 0498 void slotBackAboutToShow(); 0499 void slotForwardAboutToShow(); 0500 0501 void slotClosedItemsListAboutToShow(); 0502 void updateClosedItemsAction(); 0503 0504 void slotSessionsListAboutToShow(); 0505 void saveCurrentSession(); 0506 void manageSessions(); 0507 void slotSessionActivated(QAction *action); 0508 0509 void slotUpActivated(QAction *action); 0510 void slotBackActivated(QAction *action); 0511 void slotForwardActivated(QAction *action); 0512 void slotHomePopupActivated(QAction *action); 0513 void slotGoHistoryDelayed(); 0514 0515 void slotCompletionModeChanged(KCompletion::CompletionMode); 0516 void slotMakeCompletion(const QString &); 0517 void slotSubstringcompletion(const QString &); 0518 void slotRotation(KCompletionBase::KeyBindingType); 0519 void slotMatch(const QString &); 0520 void slotClearHistory(); 0521 void slotClearComboHistory(); 0522 0523 void slotClipboardDataChanged(); 0524 void slotCheckComboSelection(); 0525 0526 void slotShowMenuBar(); 0527 void slotShowStatusBar(); 0528 0529 void slotOpenURL(const QUrl &); 0530 0531 void slotIconsChanged(); 0532 0533 bool event(QEvent *) override; 0534 0535 void slotMoveTabLeft(); 0536 void slotMoveTabRight(); 0537 0538 void slotAddWebSideBar(const QUrl &url, const QString &name); 0539 0540 void slotUpdateFullScreen(bool set); // do not call directly 0541 0542 protected: 0543 bool eventFilter(QObject *obj, QEvent *ev) override; 0544 0545 /** 0546 * Reimplemented for internal reasons. The API is not affected. 0547 */ 0548 void showEvent(QShowEvent *event) override; 0549 0550 bool makeViewsFollow(const QUrl &url, 0551 const KParts::OpenUrlArguments &args, 0552 const BrowserArguments &browserArgs, const QString &serviceType, 0553 KonqView *senderView); 0554 0555 void applyKonqMainWindowSettings(); 0556 0557 void viewsChanged(); 0558 0559 void updateLocalPropsActions(); 0560 0561 void closeEvent(QCloseEvent *) override; 0562 0563 bool askForTarget(const KLocalizedString &text, QUrl &url); 0564 0565 private: 0566 0567 enum class FullScreenState { 0568 NoFullScreen, 0569 OrdinaryFullScreen, 0570 CompleteFullScreen 0571 }; 0572 0573 struct FullScreenData { 0574 FullScreenState previousState; 0575 FullScreenState currentState; 0576 bool wasMenuBarVisible; 0577 bool wasStatusBarVisible; 0578 bool wasSidebarVisible; 0579 0580 void switchToState(FullScreenState newState); 0581 }; 0582 0583 private Q_SLOTS: 0584 void slotUndoTextChanged(const QString &newText); 0585 0586 void slotIntro(); 0587 void slotItemsRemoved(const KFileItemList &); 0588 /** 0589 * Loads the url displayed currently in the lineedit of the locationbar, by 0590 * emulating a enter key press event. 0591 */ 0592 void goURL(); 0593 0594 void bookmarksIntoCompletion(); 0595 0596 void initBookmarkBar(); 0597 0598 void showPageSecurity(); 0599 0600 void toggleCompleteFullScreen(bool on); 0601 0602 /** 0603 * Copies the "checkerEnabledByDefault" setting from the Sonnet configuration file 0604 * to Konqueror's own and emits the spellCheckConfigurationChanged signal 0605 */ 0606 void updateSpellCheckConfiguration(); 0607 0608 void inspectCurrentPage(); 0609 0610 private: 0611 void updateWindowIcon(); 0612 0613 QString detectNameFilter(QUrl &url); 0614 0615 /** 0616 * takes care of hiding the bookmarkbar and calling setChecked( false ) on the 0617 * corresponding action 0618 */ 0619 void updateBookmarkBar(); 0620 0621 /** 0622 * Adds all children of @p group to the static completion object 0623 */ 0624 static void addBookmarksIntoCompletion(const KBookmarkGroup &group); 0625 0626 /** 0627 * Returns all matches of the url-history for @p s. If there are no direct 0628 * matches, it will try completing with http:// prepended, and if there's 0629 * still no match, then http://www. Due to that, this is only usable for 0630 * popupcompletion and not for manual or auto-completion. 0631 */ 0632 static QStringList historyPopupCompletionItems(const QString &s = QString()); 0633 0634 void startAnimation(); 0635 void stopAnimation(); 0636 0637 void setUpEnabled(const QUrl &url); 0638 0639 void checkDisableClearButton(); 0640 void initCombo(); 0641 void initActions(); 0642 0643 void popupNewTab(bool infront, bool openAfterCurrentPage); 0644 void addClosedWindowToUndoList(); 0645 /** 0646 * Tries to find a index.html (.kde.html) file in the specified directory 0647 */ 0648 static QString findIndexFile(const QString &directory); 0649 0650 void connectExtension(KParts::NavigationExtension *ext); 0651 void disconnectExtension(KParts::NavigationExtension *ext); 0652 0653 void plugViewModeActions(); 0654 void unplugViewModeActions(); 0655 0656 void splitCurrentView(Qt::Orientation orientation); 0657 0658 QObject *lastFrame(KonqView *view); 0659 0660 QLineEdit *comboEdit(); 0661 0662 void saveGlobalProperties(KConfig * sessionConfig) override; 0663 0664 void readGlobalProperties(KConfig * sessionConfig) override; 0665 0666 private: // members 0667 KonqUndoManager *m_pUndoManager; 0668 0669 KNewFileMenu *m_pMenuNew; 0670 0671 QAction *m_paPrint; 0672 0673 KBookmarkActionMenu *m_pamBookmarks; 0674 0675 KToolBarPopupAction *m_paUp; 0676 KToolBarPopupAction *m_paBack; 0677 KToolBarPopupAction *m_paForward; 0678 KToolBarPopupAction *m_paHomePopup; 0679 /// Action for the trash that contains closed tabs/windows 0680 KToolBarPopupAction *m_paClosedItems; 0681 KActionMenu *m_paSessions; 0682 QAction *m_paHome; 0683 0684 QAction *m_paSplitViewHor; 0685 QAction *m_paSplitViewVer; 0686 QAction *m_paAddTab; 0687 QAction *m_paDuplicateTab; 0688 QAction *m_paBreakOffTab; 0689 QAction *m_paRemoveView; 0690 QAction *m_paRemoveTab; 0691 QAction *m_paRemoveOtherTabs; 0692 QAction *m_paActivateNextTab; 0693 QAction *m_paActivatePrevTab; 0694 0695 KToggleAction *m_paLockView; 0696 KToggleAction *m_paLinkView; 0697 QAction *m_paReload; 0698 QAction *m_paForceReload; 0699 QAction *m_paReloadAllTabs; 0700 QAction *m_paUndo; 0701 QAction *m_paCut; 0702 QAction *m_paCopy; 0703 QAction *m_paPaste; 0704 QAction *m_paStop; 0705 0706 QAction *m_paCopyFiles; 0707 QAction *m_paMoveFiles; 0708 0709 QAction *m_paMoveTabLeft; 0710 QAction *m_paMoveTabRight; 0711 0712 QAction *m_paConfigureExtensions; 0713 QAction *m_paConfigureSpellChecking; 0714 0715 KonqAnimatedLogo *m_paAnimatedLogo; 0716 0717 KBookmarkBar *m_paBookmarkBar; 0718 0719 #if 0 0720 KToggleAction *m_paFindFiles; 0721 #endif 0722 0723 KToggleAction *m_paShowMenuBar; 0724 KToggleAction *m_paShowStatusBar; 0725 0726 KToggleFullScreenAction *m_ptaFullScreen; 0727 0728 QAction *m_paShowDeveloperTools; 0729 0730 bool m_fullyConstructed: 1; 0731 bool m_bLocationBarConnected: 1; 0732 bool m_bURLEnterLock: 1; 0733 // Set in constructor, used in slotRunFinished 0734 bool m_bNeedApplyKonqMainWindowSettings: 1; 0735 bool m_urlCompletionStarted: 1; 0736 0737 FullScreenData m_fullScreenData; 0738 0739 int m_goBuffer; 0740 Qt::MouseButtons m_goMouseState; 0741 Qt::KeyboardModifiers m_goKeyboardState; 0742 0743 MapViews m_mapViews; 0744 0745 QPointer<KonqView> m_currentView; 0746 0747 KBookmarkMenu *m_pBookmarkMenu; 0748 KonqExtendedBookmarkOwner *m_pBookmarksOwner; 0749 KActionCollection *m_bookmarksActionCollection; 0750 bool m_bookmarkBarInitialized; 0751 0752 KonqViewManager *m_pViewManager; 0753 KonqFrameBase *m_pChildFrame; 0754 0755 // RMB on a tab: we need to store the tab number until the slots are called 0756 int m_workingTab; 0757 0758 // Store a number of things when opening a popup, they are needed 0759 // in the slots connected to the popup's actions. 0760 // TODO: a struct with new/delete to save a bit of memory? 0761 QString m_popupMimeType; 0762 QUrl m_popupUrl; 0763 KFileItemList m_popupItems; 0764 KParts::OpenUrlArguments m_popupUrlArgs; 0765 BrowserArguments m_popupUrlBrowserArgs; 0766 0767 Konq::ConfigDialog *m_configureDialog; 0768 0769 QLabel *m_locationLabel; 0770 QPointer<KonqCombo> m_combo; 0771 static KConfig *s_comboConfig; 0772 KUrlCompletion *m_pURLCompletion; 0773 // just a reference to KonqHistoryManager's completionObject 0774 static KCompletion *s_pCompletion; 0775 0776 ToggleViewGUIClient *m_toggleViewGUIClient; 0777 0778 QString m_initialFrameName; 0779 0780 QList<QAction *> m_openWithActions; 0781 KActionMenu *m_openWithMenu; 0782 KActionMenu *m_viewModeMenu; 0783 QActionGroup *m_viewModesGroup; 0784 QActionGroup *m_closedItemsGroup; 0785 QActionGroup *m_sessionsGroup; 0786 0787 static QList<KonqMainWindow *> *s_lstMainWindows; 0788 0789 QUrl m_currentDir; // stores current dir for relative URLs whenever applicable 0790 0791 QPointer<KonqHistoryDialog> m_historyDialog; 0792 0793 /* The two variables below are used to store information about special popup 0794 * windows. These windows, mostly requested through javascript window.open API, 0795 * are required to have no toolbars showing. Since hiding all toolbars can lead 0796 * to a malicious site attempting to fool the user by mimicing native input dialogs, 0797 * (aka spoofing), Konqueror will NOT hide its location toolbar by default. 0798 */ 0799 bool m_isPopupWithProxyWindow; 0800 QPointer<KonqMainWindow> m_popupProxyWindow; 0801 0802 qint64 m_lastDeactivationTime = 0; //!< The last time the window was deactivated, stored as millisecond from epoch 0803 0804 /** 0805 * @brief Unique identifier for the window. Used for activities 0806 */ 0807 QString m_uuid; 0808 0809 friend class KonqBrowserWindowInterface; 0810 }; 0811 0812 #endif // KONQMAINWINDOW_H