7#ifndef KSANE_PAGESIZE_OPTION_H
8#define KSANE_PAGESIZE_OPTION_H
12#include "baseoption.h"
17static const QString PageSizeOptionName = QStringLiteral(
"KSane::PageSize");
19class PageSizeOption :
public BaseOption
24 PageSizeOption(BaseOption *optionTopLeftX,
25 BaseOption *optionTopLeftY,
26 BaseOption *optionBottomRightX,
27 BaseOption *optionBottomRightY,
28 BaseOption *optionResolution,
29 BaseOption *optionPageWidth,
30 BaseOption *optionPageHeight);
32 QVariant value()
const override;
33 QString valueAsString()
const override;
36 QString name()
const override;
37 QString title()
const override;
38 QString description()
const override;
39 QVariantList valueList()
const override;
40 QVariantList internalValueList()
const override;
43 bool setValue(
const QVariant &value)
override;
45 void restoreOptions();
46 void computePageSizes();
49 void optionTopLeftXUpdated();
50 void optionTopLeftYUpdated();
51 void optionBottomRightXUpdated();
52 void optionBottomRightYUpdated();
55 double ensureMilliMeter(BaseOption *option,
double value);
57 BaseOption *m_optionTopLeftX;
58 BaseOption *m_optionTopLeftY;
59 BaseOption *m_optionBottomRightX;
60 BaseOption *m_optionBottomRightY;
61 BaseOption *m_optionResolution;
62 BaseOption *m_optionPageWidth;
63 BaseOption *m_optionPageHeight;
64 int m_currentIndex = -1;
66 QVariantList m_availableSizesListNames;
67 QList<QSizeF> m_availableSizesList;
68 double m_previousCoordinates[4];
OptionState
This enumeration describes the current statue of the value of the option, indicating if this option s...