File indexing completed on 2024-12-22 04:40:11

0001 /*
0002     SPDX-FileCopyrightText: 2020-2022 Mladen Milinkovic <max@smoothware.net>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef RICHDOCUMENTPTR_H
0008 #define RICHDOCUMENTPTR_H
0009 
0010 #include "core/richtext/richdocument.h"
0011 
0012 namespace SubtitleComposer {
0013 
0014 class RichDocumentPtr {
0015 public:
0016     explicit RichDocumentPtr(RichDocument *doc=nullptr);
0017     RichDocumentPtr(const RichDocumentPtr &other);
0018     virtual ~RichDocumentPtr();
0019 
0020     inline RichDocument * operator->() { return m_doc; }
0021     inline operator RichDocument *() { return m_doc; }
0022     inline RichDocumentPtr & operator=(const RichDocumentPtr &other) { m_doc = other.m_doc; return *this; }
0023 
0024 private:
0025     RichDocument *m_doc;
0026 };
0027 
0028 }
0029 
0030 Q_DECLARE_METATYPE(SubtitleComposer::RichDocumentPtr)
0031 
0032 #endif // RICHDOCUMENTPTR_H