Kstars

kstarsdocument.h
1/*
2 SPDX-FileCopyrightText: 2011 Rafał Kułaga <rl.kulaga@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QRectF>
10
11#include <memory>
12
13class QPrinter;
14class QString;
15class QTextDocument;
16
17/**
18 * @class KStarsDocument
19 * @brief Base class for KStars documents.
20 * KStarsDocument is a base class for all KStars documents: finder charts, logging forms
21 * etc.
22 *
23 * @author Rafał Kułaga
24 */
26{
27 public:
28 /** Constructor */
30
31 /** Clears contents of the document. */
32 void clearContent();
33
34 /**
35 * @brief Print contents of the document.
36 * @param printer Printer on which document will be printed.
37 */
38 void print(QPrinter *printer);
39
40 /**
41 * @brief Write contents of the document to Open Document Text file.
42 * @param fname File name.
43 * @return Returns true if write is successful.
44 */
45 bool writeOdt(const QString &fname);
46
47 /**
48 * @brief Write contents of the document to the Postscript/PDF file.
49 * @param fname File name.
50 */
51 void writePsPdf(const QString &fname);
52
53 protected:
54 std::unique_ptr<QTextDocument> m_Document;
55};
Base class for KStars documents.
void writePsPdf(const QString &fname)
Write contents of the document to the Postscript/PDF file.
KStarsDocument()
Constructor.
void clearContent()
Clears contents of the document.
bool writeOdt(const QString &fname)
Write contents of the document to Open Document Text file.
void print(QPrinter *printer)
Print contents of the document.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.