-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathabstractbarcode_p.h
48 lines (37 loc) · 1.02 KB
/
abstractbarcode_p.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
SPDX-FileCopyrightText: 2010-2016 Sune Vuorela <[email protected]>
SPDX-License-Identifier: MIT
*/
#ifndef PRISON_ABSTRACTBARCODE_P_H
#define PRISON_ABSTRACTBARCODE_P_H
#include "barcode.h"
#include "prison.h"
#include <QImage>
#include <QVariant>
namespace Prison
{
class AbstractBarcodePrivate
{
public:
explicit AbstractBarcodePrivate(Barcode::Dimensions dim);
virtual ~AbstractBarcodePrivate();
/**
* Doing the actual painting of the image
* @param size unused - will be removed in KF6
* @return image with barcode, or null image
*/
virtual QImage paintImage() = 0;
/** @see Barcode::preferredSize */
virtual QSizeF preferredSize(qreal devicePixelRatio) const;
bool isEmpty() const;
bool sizeTooSmall(const QSizeF &size) const;
void recompute();
QVariant m_data;
QImage m_cache;
QColor m_foreground = Qt::black;
QColor m_background = Qt::white;
Barcode::Dimensions m_dimension = Barcode::NoDimensions;
Prison::BarcodeType m_format;
};
}
#endif