File indexing completed on 2024-06-02 06:03:20
0001 /* 0002 This file is part of the Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007, 2012 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_TESTDOCUMENT_HPP 0010 #define KASTEN_TESTDOCUMENT_HPP 0011 0012 // lib 0013 #include "abstractdocument.hpp" 0014 // Qt 0015 #include <QByteArray> 0016 #include <QString> 0017 0018 namespace Kasten { 0019 0020 class TestDocument : public AbstractDocument 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 TestDocument(); 0026 explicit TestDocument(const QByteArray& data); 0027 ~TestDocument() override; 0028 0029 public: // API to be implemented 0030 QString title() const override; 0031 QString typeName() const override; 0032 QString mimeType() const override; 0033 ContentFlags contentFlags() const override; 0034 0035 public: 0036 const QByteArray* data() const; 0037 void setData(const QByteArray& data); 0038 0039 public: // instruction functions 0040 void setTitle(const QString& title); 0041 void setContentFlags(ContentFlags contentFlags); 0042 0043 private: 0044 QString mTitle; 0045 QByteArray mData; 0046 ContentFlags mContentFlags = ContentStateNormal; 0047 }; 0048 0049 } 0050 0051 #endif