File indexing completed on 2024-05-19 05:19:21
0001 /* 0002 This file is part of KJots. 0003 0004 SPDX-FileCopyrightText: 2008 Stephen Kelly <steveire@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 0007 */ 0008 0009 #ifndef KJOTSPART_H 0010 #define KJOTSPART_H 0011 0012 #include <KParts/StatusBarExtension> 0013 #include <KParts/ReadOnlyPart> 0014 0015 class QWidget; 0016 class KAboutData; 0017 class KJotsWidget; 0018 0019 /** 0020 * This is a "Part". It that does all the real work in a KPart 0021 * application. 0022 * 0023 * @short Main Part 0024 * @author Stephen Kelly <steveire@gmail.com> 0025 * @version 0.1 0026 */ 0027 class KJotsPart : public KParts::ReadOnlyPart 0028 { 0029 Q_OBJECT 0030 public: 0031 /** 0032 * Default constructor 0033 */ 0034 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 0035 explicit KJotsPart(QWidget *parentWidget, QObject *parent, const QVariantList &); 0036 #else 0037 explicit KJotsPart(QWidget *parentWidget, QObject *parent, const KPluginMetaData &data, const QVariantList &); 0038 #endif 0039 0040 /** 0041 * Destructor 0042 */ 0043 ~KJotsPart() override; 0044 protected: 0045 /** 0046 * This must be implemented by each part 0047 */ 0048 bool openFile() override; 0049 0050 private: 0051 void initAction(); 0052 KJotsWidget *mComponent; 0053 }; 0054 0055 #endif // KJOTSPART_H