Okular

printinterface.h
1/*
2 SPDX-FileCopyrightText: 2007 Pino Toscano <pino@kde.org>
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
14class QWidget;
15
16namespace 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 */
36class OKULARCORE_EXPORT PrintInterface
37{
38public:
40 {
41 }
42
43 /**
44 * Destroys the printer interface.
45 */
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
68Q_DECLARE_INTERFACE(Okular::PrintInterface, "org.kde.okular.PrintInterface/0.1")
69
70#endif
Abstract interface for advanced printing control.
virtual ~PrintInterface()
Destroys the printer interface.
virtual QWidget * printConfigurationWidget() const =0
Builds and returns a new printing configuration widget.
global.h
Definition action.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.