File indexing completed on 2024-04-21 15:02:45

0001 /*
0002     SPDX-FileCopyrightText: 1999, 2000 David Faure <faure@kde.org>
0003     SPDX-FileCopyrightText: 1999, 2000 Simon Hausmann <hausmann@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef TESTMAINWINDOW_H
0009 #define TESTMAINWINDOW_H
0010 
0011 #include <kparts/mainwindow.h>
0012 #include <kparts/readwritepart.h>
0013 
0014 namespace KParts
0015 {
0016 class PartManager;
0017 }
0018 class QAction;
0019 class QWidget;
0020 
0021 class TestMainWindow : public KParts::MainWindow
0022 {
0023     Q_OBJECT
0024 public:
0025     TestMainWindow();
0026     ~TestMainWindow() override;
0027 
0028 protected Q_SLOTS:
0029     void slotFileOpen();
0030     void slotFileOpenRemote();
0031     void slotFileEdit();
0032     void slotFileCloseEditor();
0033 
0034 protected:
0035     void embedEditor();
0036 
0037 private:
0038     QAction *m_paEditFile;
0039     QAction *m_paCloseEditor;
0040 
0041     KParts::ReadOnlyPart *m_part1;
0042     KParts::Part *m_part2;
0043     KParts::ReadWritePart *m_editorpart;
0044     KParts::PartManager *m_manager;
0045     QWidget *m_splitter;
0046 };
0047 
0048 #endif