File indexing completed on 2024-04-21 08:48:06

0001 /* This file is part of the KDE project
0002     SPDX-FileCopyrightText: 2000 Simon Hausmann <hausmann@kde.org>
0003     SPDX-FileCopyrightText: 2000, 2006 David Faure <faure@kde.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef __KonqMainWindowAdaptor_h__
0009 #define __KonqMainWindowAdaptor_h__
0010 
0011 // !!! Don't regenerate this file, I don't want to lose the method documentation
0012 // Use qdbuscpp2xml KonqMainWindowAdaptor.h > org.kde.Konqueror.MainWindow.xml
0013 // if you change the API.
0014 
0015 #include <QDBusAbstractAdaptor>
0016 #include <QDBusObjectPath>
0017 #include <QDBusConnection>
0018 
0019 class KonqMainWindow;
0020 
0021 /**
0022  * DBUS interface for a konqueror main window
0023  */
0024 class KonqMainWindowAdaptor : public QDBusAbstractAdaptor
0025 {
0026     Q_OBJECT
0027     Q_CLASSINFO("D-Bus Interface", "org.kde.Konqueror.MainWindow")
0028 
0029 public:
0030 
0031     explicit KonqMainWindowAdaptor(KonqMainWindow *mainWindow);
0032     ~KonqMainWindowAdaptor() override;
0033 
0034 public slots:
0035 
0036     /**
0037      * Open a url in this window
0038      * @param url the url to open
0039      * @param tempFile whether to delete the file after use, usually this is false
0040      */
0041     void openUrl(const QString &url, bool tempFile);
0042     /**
0043      * Open a url in a new tab in this window
0044      * @param url the url to open
0045      * @param tempFile whether to delete the file after use, usually this is false
0046      */
0047     void newTab(const QString &url, bool tempFile);
0048 
0049     void newTabASN(const QString &url, const QByteArray &startup_id, bool tempFile);
0050 
0051     void newTabASNWithMimeType(const QString &url, const QString &mimetype, const QByteArray &startup_id, bool tempFile);
0052 
0053     void splitViewHorizontally();
0054     void splitViewVertically();
0055 
0056     /**
0057      * Reloads the current view.
0058      */
0059     void reload();
0060 
0061     /**
0062      * @return reference to the current KonqView
0063      */
0064     QDBusObjectPath currentView();
0065     /**
0066      * @return reference to the current part
0067      */
0068     QDBusObjectPath currentPart();
0069 
0070     QDBusObjectPath view(int viewNumber);
0071 
0072     QDBusObjectPath part(int partNumber);
0073 
0074 private:
0075 
0076     KonqMainWindow *m_pMainWindow;
0077 };
0078 
0079 #endif
0080