File indexing completed on 2024-04-21 15:05:55

0001 /*
0002     KDE Rich Text Editor
0003     SPDX-FileCopyrightText: 2008 Stephen Kelly <steveire@gmail.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-or-later
0006 */
0007 
0008 #ifndef KRICHTEXTEDITOR_H
0009 #define KRICHTEXTEDITOR_H
0010 
0011 #include <KRichTextWidget>
0012 
0013 #include <kxmlguiwindow.h>
0014 
0015 //@cond PRIVATE
0016 
0017 class QLabel;
0018 
0019 /**
0020  * @internal
0021  * Test window for testing KRichTextWidget
0022  */
0023 class KRichTextEditor : public KXmlGuiWindow
0024 {
0025     Q_OBJECT
0026 public:
0027     KRichTextEditor();
0028     ~KRichTextEditor() override;
0029 
0030     void setupActions();
0031 
0032 private Q_SLOTS:
0033     void newFile();
0034     void openFile();
0035     void saveFile();
0036     void saveFileAs();
0037     void saveFileAs(const QString &outputFileName);
0038     void cursorPositionChanged();
0039 
0040 private:
0041     KRichTextWidget *textArea;
0042     QString fileName;
0043     QLabel *itemLabel;
0044 };
0045 
0046 //@endcond
0047 
0048 #endif