BPS C++ API  2.24.4
bpsprintersettings.h
Go to the documentation of this file.
1 
4 #ifndef BPSPRINTERSETTINGS_H
5 #define BPSPRINTERSETTINGS_H
6 
7 #include "bpscore_global.h"
8 #include <QObject>
9 #include <QMap>
10 #include <QPrinter>
11 #include <QVariantList>
12 
13 class BpsSettings;
14 
42 {
43  Q_OBJECT
45 
46 public:
52  BpsPrinterSettings(QPrinter* aPrinter, BpsSettings* aSettings = nullptr, QObject* aParent = nullptr);
53 
54  virtual ~BpsPrinterSettings();
55 
61  bool setConfig(const QMap<QString,QString>& aConfig);
62 
67 
71  void save();
72 
77  bool restore();
78 
84 
91 
96 
101 
106 };
107 
108 #endif // BPSPRINTERSETTINGS_H
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
The BpsPrinterSettings class allows to save and restore printer settings.
Definition: bpsprintersettings.h:42
static QMap< QPrinter::Orientation, QString > orientations()
BpsPrinterSettings(QPrinter *aPrinter, BpsSettings *aSettings=nullptr, QObject *aParent=nullptr)
static QMap< QPrinter::PaperSize, QSizeF > paperSizes()
A map with paper size informations.
static QMap< QPrinter::PaperSize, QString > paperNames()
A map with the paper names.
bool setConfig(const QMap< QString, QString > &aConfig)
Load the settings from a config map instead from the settings.
QMap< QString, QString > config() const
bool restore()
Restore the settings from human readable keys/values.
void save()
Save the settings as human readable keys/values.
static QMap< QPrinter::PaperSource, QString > paperSources()
static QMap< QPrinter::ColorMode, QString > colorModes()
Query and edit settings.
Definition: bpssettings.h:17