Kstars

kstarsdocument.h
1 /*
2  SPDX-FileCopyrightText: 2011 Rafał Kułaga <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QRectF>
10 
11 #include <memory>
12 
13 class QPrinter;
14 class QString;
15 class 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 };
bool writeOdt(const QString &fname)
Write contents of the document to Open Document Text file.
void clearContent()
Clears contents of the document.
Base class for KStars documents. KStarsDocument is a base class for all KStars documents: finder char...
void print(QPrinter *printer)
Print contents of the document.
KStarsDocument()
Constructor.
void writePsPdf(const QString &fname)
Write contents of the document to the Postscript/PDF file.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.