Okular

textdocumentsettings.h
1 /***************************************************************************
2  * Copyright (C) 2013 by Azat Khuzhin <[email protected]> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  ***************************************************************************/
9 
10 
11 #ifndef _OKULAR_TEXTDOCUMENTSETTINGS_H_
12 #define _OKULAR_TEXTDOCUMENTSETTINGS_H_
13 
14 
15 #include "okularcore_export.h"
16 
17 #include <QFont>
18 #include <QWidget>
19 #include <QObject>
20 #include <KConfigSkeleton>
21 
22 namespace Okular {
23 
24 class TextDocumentSettingsWidgetPrivate;
25 class TextDocumentSettingsPrivate;
26 
82 class OKULARCORE_EXPORT TextDocumentSettingsWidget : public QWidget
83 {
84  Q_OBJECT
85 
86  public:
87  explicit TextDocumentSettingsWidget( QWidget *parent = nullptr );
88  ~TextDocumentSettingsWidget() override;
89 
90  void addRow( const QString& labelText, QWidget *widget );
91 
92  private:
93  friend class TextDocumentGenerator;
94 
95  TextDocumentSettingsWidgetPrivate *d_ptr;
96  Q_DECLARE_PRIVATE( TextDocumentSettingsWidget )
97  Q_DISABLE_COPY( TextDocumentSettingsWidget )
98 };
99 
108 class OKULARCORE_EXPORT TextDocumentSettings : public KConfigSkeleton
109 {
110  Q_OBJECT
111 
112  public:
113  QFont font() const;
114 
115  private:
116  friend class TextDocumentGenerator;
117 
118  TextDocumentSettings( const QString& config, QObject *parent );
119 
120  TextDocumentSettingsPrivate *d_ptr;
121  Q_DECLARE_PRIVATE( TextDocumentSettings )
122  Q_DISABLE_COPY( TextDocumentSettings )
123 };
124 
125 }
126 
127 #endif
Here is example of how you can add custom settings per-backend:
global.h
Definition: action.h:19
QTextDocument-based Generator.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 22:31:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.