konqmainwindow.h 21.5 KB
Newer Older
David Faure's avatar
David Faure committed
1
/*
2
   This file is part of the KDE project
3
   Copyright (C) 1998, 1999 Simon Hausmann <hausmann@kde.org>
4
   Copyright (C) 2000-2004 David Faure <faure@kde.org>
5 6
   Copyright (C) 2007 Eduardo Robles Elvira <edulix@gmail.com>
   Copyright (C) 2007 Daniel García Moreno <danigm@gmail.com>
7

8 9 10 11
   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.
12

13 14 15 16
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.
17

18 19
   You should have received a copy of the GNU General Public License
   along with this program; see the file COPYING.  If not, write to
Dirk Mueller's avatar
Dirk Mueller committed
20
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Dirk Mueller's avatar
Dirk Mueller committed
21
   Boston, MA 02110-1301, USA.
22 23
*/

24 25
#ifndef KONQMAINWINDOW_H
#define KONQMAINWINDOW_H
26

27 28
#include "konqprivate_export.h"

29 30 31 32
#include <QMap>
#include <QPointer>
#include <QList>
#include <QUrl>
33

34
#include <kfileitem.h>
David Faure's avatar
David Faure committed
35
#include <kparts/mainwindow.h>
36
#include <KParts/PartActivateEvent>
Aaron J. Seigo's avatar
Aaron J. Seigo committed
37
#include <kservice.h>
38

39
#include "konqcombo.h"
Eduardo Robles Elvira's avatar
 
Eduardo Robles Elvira committed
40
#include "konqframe.h"
41
#include "konqframecontainer.h"
42
#include "konqopenurlrequest.h"
43

44
class QActionGroup;
45 46 47 48
class KUrlCompletion;
class QLabel;
class KLocalizedString;
class KToggleFullScreenAction;
49
class KonqUndoManager;
50
class QAction;
Laurent Montel's avatar
Laurent Montel committed
51
class QAction;
52
class KActionCollection;
53
class KActionMenu;
54
class KBookmarkGroup;
55
class KBookmarkMenu;
Daniel Teske's avatar
Daniel Teske committed
56
class KBookmarkActionMenu;
57
class KCMultiDialog;
58
class KNewFileMenu;
59
class KToggleAction;
60
class KBookmarkBar;
61
class KonqView;
Doug Hanley's avatar
 
Doug Hanley committed
62
class KonqFrameContainerBase;
63
class KonqFrameContainer;
64
class KToolBarPopupAction;
65
class KonqAnimatedLogo;
66
class KonqViewManager;
67
class ToggleViewGUIClient;
68
class KonqRun;
69
class KConfigGroup;
70
class KonqHistoryDialog;
71
struct HistoryEntry;
72
class QLineEdit;
73

74 75
namespace KParts
{
76 77 78 79 80
class BrowserExtension;
class BrowserHostExtension;
class ReadOnlyPart;
class OpenUrlArguments;
struct BrowserArguments;
Dirk Mueller's avatar
Dirk Mueller committed
81
}
82

83
class KonqExtendedBookmarkOwner;
84

85
class KONQ_TESTS_EXPORT KonqMainWindow : public KParts::MainWindow, public KonqFrameContainerBase
86
{
87
    Q_OBJECT
88 89 90 91 92 93
    Q_PROPERTY(int viewCount READ viewCount)
    Q_PROPERTY(int linkableViewsCount READ linkableViewsCount)
    Q_PROPERTY(QString locationBarURL READ locationBarURL)
    Q_PROPERTY(bool fullScreenMode READ fullScreenMode)
    Q_PROPERTY(QString currentTitle READ currentTitle)
    Q_PROPERTY(QString currentURL READ currentURL)
94
public:
95 96
    enum ComboAction { ComboClear, ComboAdd, ComboRemove };
    enum PageSecurity { NotCrypted, Encrypted, Mixed };
97

98
    explicit KonqMainWindow(const QUrl &initialURL = QUrl());
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
99
    ~KonqMainWindow() override;
100

David Faure's avatar
David Faure committed
101 102 103
    /**
     * Filters the URL and calls the main openUrl method.
     */
104
    void openFilteredUrl(const QString &url, const KonqOpenURLRequest &req);
105

David Faure's avatar
David Faure committed
106 107 108
    /**
     * Convenience overload for openFilteredUrl(url, req)
     */
109
    void openFilteredUrl(const QString &url, bool inNewTab = false, bool tempFile = false);
110

111 112
    /**
     * Convenience overload for openFilteredUrl(url, req)
113
     */
114
    void openFilteredUrl(const QString &_url, const QString &_mimeType, bool inNewTab, bool tempFile);
115

116
public Q_SLOTS:
117
    /**
118 119 120
    * The main openUrl method.
    */
    void openUrl(KonqView *view, const QUrl &url,
121
                 const QString &serviceType = QString(),
122
                 const KonqOpenURLRequest &req = KonqOpenURLRequest::null,
123
                 bool trustedSource = false); // trustedSource should be part of KonqOpenURLRequest, probably
124

125
public:
126 127 128 129 130 131 132 133
    /**
     * Called by openUrl when it knows the mime type (either directly,
     * or using KonqRun).
     * \param mimeType the mimetype of the URL to open. Always set.
     * \param url the URL to open.
     * \param childView the view in which to open the URL. Can be 0, in which
     * case a new tab (or the very first view) will be created.
     */
134 135
    bool openView(QString mimeType, const QUrl &url, KonqView *childView,
                  const KonqOpenURLRequest &req = KonqOpenURLRequest::null);
136

137
    void abortLoading();
138

139
    void openMultiURL(const QList<QUrl> &url);
140

141
    /// Returns the view manager for this window.
142 143 144 145
    KonqViewManager *viewManager() const
    {
        return m_pViewManager;
    }
146

147
    /// KXMLGUIBuilder methods, reimplemented for delayed bookmark-toolbar initialization
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
148 149
    QWidget *createContainer(QWidget *parent, int index, const QDomElement &element, QAction *&containerAction) override;
    void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, QAction *containerAction) override;
150

151
    /// KMainWindow methods, for session management
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
152 153
    void saveProperties(KConfigGroup &config) override;
    void readProperties(const KConfigGroup &config) override;
Simon Hausmann's avatar
Simon Hausmann committed
154

155
    void setInitialFrameName(const QString &name);
156

157
    void reparseConfiguration();
158

159 160 161 162
    /// Called by KonqViewManager
    void insertChildView(KonqView *childView);
    /// Called by KonqViewManager
    void removeChildView(KonqView *childView);
163

164 165
    KonqView *childView(KParts::ReadOnlyPart *view);
    KonqView *childView(KParts::ReadOnlyPart *callingPart, const QString &name, KParts::BrowserHostExtension *&hostExtension, KParts::ReadOnlyPart **part);
166

167
    // Total number of views
168 169 170 171
    int viewCount() const
    {
        return m_mapViews.count();
    }
172

173 174
    // Number of views not in "passive" mode and not locked
    int activeViewsNotLockedCount() const;
175

176 177 178 179 180
    // Number of views that can be linked, i.e. not with "follow active view" behavior
    int linkableViewsCount() const;

    // Number of main views (non-toggle non-passive views)
    int mainViewsCount() const;
181

182
    typedef QMap<KParts::ReadOnlyPart *, KonqView *> MapViews;
183

184 185 186 187
    const MapViews &viewMap() const
    {
        return m_mapViews;
    }
188

189
    KonqView *currentView() const;
190

191 192
    /** URL of current part, or URLs of selected items for directory views */
    QList<QUrl> currentURLs() const;
193

194
    // Only valid if there are one or two views
195
    KonqView *otherView(KonqView *view) const;
196

197
    /// Overloaded of KMainWindow
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
198
    void setCaption(const QString &caption) override;
199
    /// Overloaded of KMainWindow -- should never be called, or if it is, we ignore "modified" anyway
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
200
    void setCaption(const QString &caption, bool modified) override
201
    {
202
        Q_UNUSED(modified);
Laurent Montel's avatar
Laurent Montel committed
203
        setCaption(caption);
204
    }
205

206
    /**
207 208 209
    * Change URL displayed in the location bar
    */
    void setLocationBarURL(const QString &url);
210
    /**
211 212 213
    * Overload for convenience
    */
    void setLocationBarURL(const QUrl &url);
214
    /**
215 216
    * Return URL displayed in the location bar - for KonqViewManager
    */
217 218
    QString locationBarURL() const;
    void focusLocationBar();
David Faure's avatar
David Faure committed
219

220
    /**
221 222 223
    * Set page security related to current view
    */
    void setPageSecurity(PageSecurity);
David Faure's avatar
David Faure committed
224

225
    void enableAllActions(bool enable);
Simon Hausmann's avatar
- fix  
Simon Hausmann committed
226

227
    void disableActionsNoView();
228

229
    void updateToolBarActions(bool pendingActions = false);
230 231
    void updateOpenWithActions();
    void updateViewActions();
232

233
    bool sidebarVisible() const;
234

235
    bool fullScreenMode() const;
236

237
    /**
238 239 240 241 242 243
    * @return the "link view" action, for checking/unchecking from KonqView
    */
    KToggleAction *linkViewAction()const
    {
        return m_paLinkView;
    }
244

245 246
    void enableAction(const char *name, bool enabled);
    void setActionText(const char *name, const QString &text);
247

248 249
    static QList<KonqMainWindow *> *mainWindowList()
    {
David Faure's avatar
David Faure committed
250
        return s_lstMainWindows;
251
    }
Simon Hausmann's avatar
Simon Hausmann committed
252

253 254
    void linkableViewCountChanged();
    void viewCountChanged();
255

256 257
    // operates on all combos of all mainwindows of this instance
    // up to now adds an entry or clears all entries
258 259
    static void comboAction(int action, const QString &url,
                            const QString &senderId);
260

261
#ifndef NDEBUG
262
    void dumpViewList();
263
#endif
264

265
    // KonqFrameContainerBase implementation BEGIN
266

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
267
    bool accept(KonqFrameVisitor *visitor) override;
David Faure's avatar
David Faure committed
268

269 270 271
    /**
     * Insert a new frame as the mainwindow's child
     */
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
272
    void insertChildFrame(KonqFrameBase *frame, int index = -1) override;
273 274 275
    /**
     * Call this before deleting one of our children.
     */
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
276
    void childFrameRemoved(KonqFrameBase *frame) override;
277

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
278
    void saveConfig(KConfigGroup &config, const QString &prefix, const KonqFrameBase::Options &options, KonqFrameBase *docContainer, int id = 0, int depth = 0) override;
Doug Hanley's avatar
 
Doug Hanley committed
279

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
280
    void copyHistory(KonqFrameBase *other) override;
Doug Hanley's avatar
 
Doug Hanley committed
281

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
282 283
    void setTitle(const QString &title, QWidget *sender) override;
    void setTabIcon(const QUrl &url, QWidget *sender) override;
284

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
285
    QWidget *asQWidget() override;
Doug Hanley's avatar
 
Doug Hanley committed
286

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
287
    KonqFrameBase::FrameType frameType() const override;
Doug Hanley's avatar
 
Doug Hanley committed
288

289
    KonqFrameBase *childFrame()const;
290

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
291
    void setActiveChild(KonqFrameBase *activeChild) override;
Doug Hanley's avatar
 
Doug Hanley committed
292

293
    // KonqFrameContainerBase implementation END
294

295 296 297 298
    /**
     * When using RMB on a tab, remember the tab we are showing a popup for.
     */
    void setWorkingTab(int index);
299

300 301
    static bool isMimeTypeAssociatedWithSelf(const QString &mimeType);
    static bool isMimeTypeAssociatedWithSelf(const QString &mimeType, const KService::Ptr &offer);
302

303
    bool refuseExecutingKonqueror(const QString &mimeType);
304

305
    QString currentTitle() const;
306 307
    // Not used by konqueror itself; only exists for the Q_PROPERTY,
    // which I guess is used by scripts and plugins...
308
    QString currentURL() const;
309

David Faure's avatar
David Faure committed
310 311
    void updateHistoryActions();

David Faure's avatar
David Faure committed
312 313
    bool isPreloaded() const;

David Faure's avatar
David Faure committed
314
    // Public for unit tests
315
    void prepareForPopupMenu(const KFileItemList &items, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs);
Martin Koller's avatar
Martin Koller committed
316

Laurent Montel's avatar
Laurent Montel committed
317
Q_SIGNALS:
318 319
    void viewAdded(KonqView *view);
    void viewRemoved(KonqView *view);
320
    void popupItemsDisturbed();
321

Laurent Montel's avatar
Laurent Montel committed
322
public Q_SLOTS:
323 324 325 326
    void updateViewModeActions();

    void slotInternalViewModeChanged();

327
    void slotCtrlTabPressed();
Alexander Neundorf's avatar
 
Alexander Neundorf committed
328

329 330
    void slotPopupMenu(const QPoint &global, const KFileItemList &items, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs, KParts::BrowserExtension::PopupFlags flags, const KParts::BrowserExtension::ActionGroupMap &);
    void slotPopupMenu(const QPoint &global, const QUrl &url, mode_t mode, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs, KParts::BrowserExtension::PopupFlags f, const KParts::BrowserExtension::ActionGroupMap &);
331

332 333 334
    /**
     * __NEEEEVER__ call this method directly. It relies on sender() (the part)
     */
335
    void slotOpenURLRequest(const QUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs);
336

337
    void openUrlRequestHelper(KonqView *childView, const QUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs);
338

339 340
    void slotCreateNewWindow(const QUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &browserArgs,
                             const KParts::WindowArgs &windowArgs = KParts::WindowArgs(),
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
341
                             KParts::ReadOnlyPart **part = nullptr);
342 343 344 345 346 347 348 349 350 351 352

    void slotNewWindow();
    void slotDuplicateWindow();
    void slotSendURL();
    void slotSendFile();
    void slotCopyFiles();
    void slotMoveFiles();
    void slotOpenLocation();
    void slotOpenFile();

    // View menu
353
    void slotViewModeTriggered(QAction *action);
354 355
    void slotLockView();
    void slotLinkView();
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
356
    void slotReload(KonqView *view = nullptr, bool softReload = true);
357 358 359 360 361 362 363 364 365 366 367 368
    void slotForceReload();
    void slotStop();

    // Go menu
    void slotUp();
    void slotBack();
    void slotForward();
    void slotHome();
    void slotGoHistory();

    void slotAddClosedUrl(KonqFrameBase *tab);

369
    void slotConfigure(QString startingModule = QString());
370 371 372 373 374 375
    void slotConfigureDone();
    void slotConfigureToolbars();
    void slotConfigureExtensions();
    void slotConfigureSpellChecking();
    void slotNewToolbarConfig();

376
    void slotUndoAvailable(bool avail);
377

378
    void slotPartChanged(KonqView *childView, KParts::ReadOnlyPart *oldPart, KParts::ReadOnlyPart *newPart);
379 380 381 382 383

    void slotRunFinished();
    void slotClearLocationBar();

    // reimplement from KParts::MainWindow
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
384
    void slotSetStatusBarText(const QString &text) override;
385 386

    // public for KonqViewManager
387
    void slotPartActivated(KParts::Part *part);
388

389
    void slotGoHistoryActivated(int steps);
390 391 392 393 394 395

    void slotAddTab();
    void slotSplitViewHorizontal();
    void slotSplitViewVertical();
    void slotRemoveOtherTabs();
    void slotRemoveTabPopup();
396

397
private Q_SLOTS:
398
    void slotViewCompleted(KonqView *view);
399

400
    void slotURLEntered(const QString &text, Qt::KeyboardModifiers);
401

402
    void slotLocationLabelActivated();
403

404 405
    void slotDuplicateTab();
    void slotDuplicateTabPopup();
Maks Orlovich's avatar
 
Maks Orlovich committed
406

407 408 409
    void slotBreakOffTab();
    void slotBreakOffTabPopup();
    void breakOffTab(int);
Maks Orlovich's avatar
 
Maks Orlovich committed
410

411 412 413 414 415
    void slotPopupNewWindow();
    void slotPopupThisWindow();
    void slotPopupNewTab();
    void slotPopupPasteTo();
    void slotRemoveView();
Maks Orlovich's avatar
 
Maks Orlovich committed
416

417
    void slotRemoveOtherTabsPopup();
Maks Orlovich's avatar
 
Maks Orlovich committed
418

419 420 421 422 423
    void slotReloadPopup();
    void slotReloadAllTabs();
    void slotRemoveTab();
    void removeTab(int tabIndex);
    void removeOtherTabs(int tabIndex);
Maks Orlovich's avatar
 
Maks Orlovich committed
424

425 426 427
    void slotActivateNextTab();
    void slotActivatePrevTab();
    void slotActivateTab();
Stephan Binner's avatar
 
Stephan Binner committed
428

429
    void slotDumpDebugInfo();
430

431
    void slotOpenEmbedded(KService::Ptr);
432

433 434
    // Connected to KGlobalSettings
    void slotReconfigure();
435

436
    void slotForceSaveMainWindowSettings();
437

438
    void slotOpenWith();
439

440 441
    void updateProxyForWebEngine(bool updateProtocolManager = true);

442
#if 0
443
    void slotGoMenuAboutToShow();
444
#endif
445 446 447
    void slotUpAboutToShow();
    void slotBackAboutToShow();
    void slotForwardAboutToShow();
448

449 450
    void slotClosedItemsListAboutToShow();
    void updateClosedItemsAction();
451

452 453 454
    void slotSessionsListAboutToShow();
    void saveCurrentSession();
    void manageSessions();
455
    void slotSessionActivated(QAction *action);
456

457 458 459 460
    void slotUpActivated(QAction *action);
    void slotBackActivated(QAction *action);
    void slotForwardActivated(QAction *action);
    void slotHomePopupActivated(QAction *action);
461
    void slotGoHistoryDelayed();
462

463 464 465 466 467
    void slotCompletionModeChanged(KCompletion::CompletionMode);
    void slotMakeCompletion(const QString &);
    void slotSubstringcompletion(const QString &);
    void slotRotation(KCompletionBase::KeyBindingType);
    void slotMatch(const QString &);
468 469
    void slotClearHistory();
    void slotClearComboHistory();
470

471 472
    void slotClipboardDataChanged();
    void slotCheckComboSelection();
473

474 475
    void slotShowMenuBar();
    void slotShowStatusBar();
Simon Hausmann's avatar
Simon Hausmann committed
476

477
    void slotOpenURL(const QUrl &);
478

479
    void slotIconsChanged();
480

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
481
    bool event(QEvent *) override;
482

483 484
    void slotMoveTabLeft();
    void slotMoveTabRight();
485

486
    void slotAddWebSideBar(const QUrl &url, const QString &name);
487

488
    void slotUpdateFullScreen(bool set);   // do not call directly
489

490
protected:
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
491
    bool eventFilter(QObject *obj, QEvent *ev) override;
492

493
    /**
494 495
    * Reimplemented for internal reasons. The API is not affected.
    */
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
496
    void showEvent(QShowEvent *event) override;
497

498 499 500 501
    bool makeViewsFollow(const QUrl &url,
                         const KParts::OpenUrlArguments &args,
                         const KParts::BrowserArguments &browserArgs, const QString &serviceType,
                         KonqView *senderView);
502

503
    void applyKonqMainWindowSettings();
504

505
    void viewsChanged();
506

507
    void updateLocalPropsActions();
508

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
509
    void closeEvent(QCloseEvent *) override;
510

511
    bool askForTarget(const KLocalizedString &text, QUrl &url);
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
    
private:
    
    enum class FullScreenState {
        NoFullScreen,
        OrdinaryFullScreen,
        CompleteFullScreen
    };
    
    struct FullScreenData {
        FullScreenState previousState;
        FullScreenState currentState;
        bool wasMenuBarVisible;
        bool wasStatusBarVisible;
        bool wasSidebarVisible;
        
        void switchToState(FullScreenState newState);
    };

531

Laurent Montel's avatar
Laurent Montel committed
532
private Q_SLOTS:
533
    void slotUndoTextChanged(const QString &newText);
534

535 536 537
    void slotIntro();
    void slotItemsRemoved(const KFileItemList &);
    /**
538 539 540
    * Loads the url displayed currently in the lineedit of the locationbar, by
    * emulating a enter key press event.
    */
541
    void goURL();
542

543
    void bookmarksIntoCompletion();
Carsten Pfeiffer's avatar
Carsten Pfeiffer committed
544

545
    void initBookmarkBar();
546

547
    void showPageSecurity();
548 549 550
    
    void toggleCompleteFullScreen(bool on);
    
551
private:
552
    void updateWindowIcon();
553

554
    QString detectNameFilter(QUrl &url);
555

556
    /**
557 558 559
    * takes care of hiding the bookmarkbar and calling setChecked( false ) on the
    * corresponding action
    */
560
    void updateBookmarkBar();
561

562
    /**
563 564 565
    * Adds all children of @p group to the static completion object
    */
    static void addBookmarksIntoCompletion(const KBookmarkGroup &group);
566

567
    /**
568 569 570 571 572 573
    * Returns all matches of the url-history for @p s. If there are no direct
    * matches, it will try completing with http:// prepended, and if there's
    * still no match, then http://www. Due to that, this is only usable for
    * popupcompletion and not for manual or auto-completion.
    */
    static QStringList historyPopupCompletionItems(const QString &s = QString());
574

575 576
    void startAnimation();
    void stopAnimation();
577

578
    void setUpEnabled(const QUrl &url);
579

580 581 582
    void checkDisableClearButton();
    void initCombo();
    void initActions();
583

584 585 586
    void popupNewTab(bool infront, bool openAfterCurrentPage);
    void addClosedWindowToUndoList();
    /**
587 588 589
    * Tries to find a index.html (.kde.html) file in the specified directory
    */
    static QString findIndexFile(const QString &directory);
590

591 592
    void connectExtension(KParts::BrowserExtension *ext);
    void disconnectExtension(KParts::BrowserExtension *ext);
593

594 595
    void plugViewModeActions();
    void unplugViewModeActions();
596

597
    QObject *lastFrame(KonqView *view);
598

599
    QLineEdit *comboEdit();
600
    
601
private: // members
602
    KonqUndoManager *m_pUndoManager;
603

604
    KNewFileMenu *m_pMenuNew;
605

606
    QAction *m_paPrint;
607

608
    KBookmarkActionMenu *m_pamBookmarks;
609

610 611 612 613 614 615 616 617
    KToolBarPopupAction *m_paUp;
    KToolBarPopupAction *m_paBack;
    KToolBarPopupAction *m_paForward;
    KToolBarPopupAction *m_paHomePopup;
    /// Action for the trash that contains closed tabs/windows
    KToolBarPopupAction *m_paClosedItems;
    KActionMenu *m_paSessions;
    QAction *m_paHome;
618

619 620 621 622 623 624 625 626 627 628
    QAction *m_paSplitViewHor;
    QAction *m_paSplitViewVer;
    QAction *m_paAddTab;
    QAction *m_paDuplicateTab;
    QAction *m_paBreakOffTab;
    QAction *m_paRemoveView;
    QAction *m_paRemoveTab;
    QAction *m_paRemoveOtherTabs;
    QAction *m_paActivateNextTab;
    QAction *m_paActivatePrevTab;
629

630 631 632 633 634 635 636 637 638 639
    KToggleAction *m_paLockView;
    KToggleAction *m_paLinkView;
    QAction *m_paReload;
    QAction *m_paForceReload;
    QAction *m_paReloadAllTabs;
    QAction *m_paUndo;
    QAction *m_paCut;
    QAction *m_paCopy;
    QAction *m_paPaste;
    QAction *m_paStop;
640

641 642
    QAction *m_paCopyFiles;
    QAction *m_paMoveFiles;
643

644 645
    QAction *m_paMoveTabLeft;
    QAction *m_paMoveTabRight;
646

647 648
    QAction *m_paConfigureExtensions;
    QAction *m_paConfigureSpellChecking;
649

650
    KonqAnimatedLogo *m_paAnimatedLogo;
651

652
    KBookmarkBar *m_paBookmarkBar;
653

654
#if 0
655
    KToggleAction *m_paFindFiles;
656
#endif
Simon Hausmann's avatar
Simon Hausmann committed
657

658 659
    KToggleAction *m_paShowMenuBar;
    KToggleAction *m_paShowStatusBar;
Simon Hausmann's avatar
Simon Hausmann committed
660

661
    KToggleFullScreenAction *m_ptaFullScreen;
662

663 664 665
    bool m_fullyConstructed: 1;
    bool m_bLocationBarConnected: 1;
    bool m_bURLEnterLock: 1;
666
    // Set in constructor, used in slotRunFinished
667 668
    bool m_bNeedApplyKonqMainWindowSettings: 1;
    bool m_urlCompletionStarted: 1;
669

670 671
    FullScreenData m_fullScreenData;
    
672 673 674
    int m_goBuffer;
    Qt::MouseButtons m_goMouseState;
    Qt::KeyboardModifiers m_goKeyboardState;
675

676
    MapViews m_mapViews;
677

678
    QPointer<KonqView> m_currentView;
679

680
    KBookmarkMenu *m_pBookmarkMenu;
681
    KonqExtendedBookmarkOwner *m_pBookmarksOwner;
682
    KActionCollection *m_bookmarksActionCollection;
683
    bool m_bookmarkBarInitialized;
684

685
    KonqViewManager *m_pViewManager;
686
    KonqFrameBase *m_pChildFrame;
Doug Hanley's avatar
 
Doug Hanley committed
687

688 689
    // RMB on a tab: we need to store the tab number until the slots are called
    int m_workingTab;
Doug Hanley's avatar
 
Doug Hanley committed
690

691 692 693 694
    // Store a number of things when opening a popup, they are needed
    // in the slots connected to the popup's actions.
    // TODO: a struct with new/delete to save a bit of memory?
    QString m_popupMimeType;
695
    QUrl m_popupUrl;
696 697 698
    KFileItemList m_popupItems;
    KParts::OpenUrlArguments m_popupUrlArgs;
    KParts::BrowserArguments m_popupUrlBrowserArgs;
699

700
    KCMultiDialog *m_configureDialog;
701

702
    QLabel *m_locationLabel;
703 704 705 706 707
    QPointer<KonqCombo> m_combo;
    static KConfig *s_comboConfig;
    KUrlCompletion *m_pURLCompletion;
    // just a reference to KonqHistoryManager's completionObject
    static KCompletion *s_pCompletion;
708

709
    ToggleViewGUIClient *m_toggleViewGUIClient;