Okular

printinterface.h
1 /*
2  SPDX-FileCopyrightText: 2007 Pino Toscano <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #ifndef _OKULAR_PRINTINTERFACE_H_
8 #define _OKULAR_PRINTINTERFACE_H_
9 
10 #include "../core/okularcore_export.h"
11 
12 #include <QObject>
13 
14 class QWidget;
15 
16 namespace Okular
17 {
18 /**
19  * @short Abstract interface for advanced printing control
20  *
21  * This interface defines an advanced way of interfacing with the print
22  * process.
23  *
24  * How to use it in a custom Generator:
25  * @code
26  class MyGenerator : public Okular::Generator, public Okular::PrintInterface
27  {
28  Q_OBJECT
29  Q_INTERFACES( Okular::PrintInterface )
30 
31  ...
32  };
33  * @endcode
34  * and - of course - implementing its methods.
35  */
36 class OKULARCORE_EXPORT PrintInterface
37 {
38 public:
40  {
41  }
42 
43  /**
44  * Destroys the printer interface.
45  */
46  virtual ~PrintInterface()
47  {
48  }
49 
50  PrintInterface(const PrintInterface &) = delete;
51  PrintInterface &operator=(const PrintInterface &) = delete;
52 
53  /**
54  * Builds and returns a new printing configuration widget.
55  *
56  * @note don't keep a pointer to the new constructed widget, as it
57  * will be handled elsewhere (in the Okular KPart)
58  *
59  * @note The returned object should be of a PrintOptionsWidget subclass
60  * (which is not officially enforced by the signature for binary
61  * compatibility reasons).
62  */
63  virtual QWidget *printConfigurationWidget() const = 0;
64 };
65 
66 }
67 
68 Q_DECLARE_INTERFACE(Okular::PrintInterface, "org.kde.okular.PrintInterface/0.1")
69 
70 #endif
global.h
Definition: action.h:16
Abstract interface for advanced printing control.
virtual ~PrintInterface()
Destroys the printer interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 22:32:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.