14 QCUPSSupport__JobHoldUntil)
16 QCUPSSupport__BannerPage)
19 QCUPSSupport__PagesPerSheetLayout)
21 QCUPSSupport__PagesPerSheet)
25 return printer->printEngine()->property(
PPK_CupsOptions).toStringList();
36 if (cupsOptions.contains(
option)) {
37 cupsOptions.replace(cupsOptions.indexOf(
option) + 1,
value);
39 cupsOptions.append(
option);
40 cupsOptions.append(
value);
42 setCupsOptions(printer, cupsOptions);
49 const QStringList::iterator
it = std::find(cupsOptions.begin(), cupsOptions.end(),
option);
50 if (
it != cupsOptions.end()) {
52 cupsOptions.erase(
it,
it+1);
53 setCupsOptions(printer, cupsOptions);
78 if (!holdUntilTime.
isNull()) {
82 if (holdUntilTime < localDateTime.
time())
83 localDateTime = localDateTime.
addDays(1);
84 localDateTime.
setTime(holdUntilTime);
85 return localDateTime.
toUTC().
time().toString(u
"HH:mm");
92 Q_UNREACHABLE_RETURN(
QString());
97 if (jobHoldUntil ==
"indefinite"_L1) {
99 }
else if (jobHoldUntil ==
"day-time"_L1) {
101 }
else if (jobHoldUntil ==
"night"_L1) {
103 }
else if (jobHoldUntil ==
"second-shift"_L1) {
105 }
else if (jobHoldUntil ==
"third-shift"_L1) {
107 }
else if (jobHoldUntil ==
"weekend"_L1) {
114 parsedTime = QTime::fromString(jobHoldUntil,
QStringLiteral(
"h:m"));
118 dateTimeUtc.
setTime(parsedTime);
130 for (
int i = 0;
i < ppd->num_groups; ++
i) {
131 ppd_group_t *
group = &ppd->groups[
i];
133 for (
int i = 0;
i <
group->num_options; ++
i) {
148 if (!jobHoldUntilArgument.
isEmpty()) {
151 jobHoldUntilArgument);
169 switch (bannerPage) {
178 Q_UNREACHABLE_RETURN(
QString());
199 if (parts.size() == 2) {
240 static const char pagesPerSheetData[][2] = {
"1",
"2",
"4",
"6",
"9", {
'1',
'6'},
"\0" };
241 static const char pageLayoutData[][5] = {
"lrtb",
"lrbt",
"rlbt",
"rltb",
"btlr",
"btrl",
"tblr",
"tbrl"};
static void setJobBilling(QPrinter *printer, const QString &jobBilling=QString())
static JobSheets parseJobSheets(const QString &jobSheets)
static void setJobHold(QPrinter *printer, const JobHoldUntil jobHold=NoHold, QTime holdUntilTime=QTime())
static void setJobPriority(QPrinter *printer, int priority=50)
static void clearCupsOption(QPrinter *printer, const QString &option)
static void setPageSet(QPrinter *printer, const PageSet pageSet)
static void setCupsOption(QPrinter *printer, const QString &option, const QString &value)
static void clearCupsOptions(QPrinter *printer)
static void setBannerPages(QPrinter *printer, const BannerPage startBannerPage, const BannerPage endBannerPage)
static ppd_option_t * findPpdOption(const char *optionName, QPrintDevice *printDevice)
static void setPageRange(QPrinter *printer, int pageFrom, int pageTo)
static JobHoldUntilWithTime parseJobHoldUntil(const QString &jobHoldUntil)
static void setPagesPerSheetLayout(QPrinter *printer, const PagesPerSheet pagesPerSheet, const PagesPerSheetLayout pagesPerSheetLayout)
\inmodule QtCore\reentrant
static QDateTime currentDateTime()
This is an overloaded member function, provided for convenience. It differs from the above function o...
QDateTime toUTC() const
Returns a copy of this datetime converted to UTC.
void setTime(QTime time)
Sets the time part of this datetime to time.
QTime time() const
Returns the time part of the datetime.
QDateTime toLocalTime() const
Returns a copy of this datetime converted to local time.
static QDateTime currentDateTimeUtc()
QDateTime addDays(qint64 days) const
Returns a QDateTime object containing a datetime ndays days later than the datetime of this object (o...
QVariant property(PrintDevicePropertyKey key) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
\inmodule QtCore \reentrant
constexpr bool isNull() const
Returns true if the time is null (i.e., the QTime object was constructed using the default constructo...
bool isValid() const
Returns true if the time is valid; otherwise returns false.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
static QCUPSSupport::BannerPage stringToBannerPage(const QString &bannerPage)
static QString bannerPageToString(const QCUPSSupport::BannerPage bannerPage)
static QString jobHoldToString(const QCUPSSupport::JobHoldUntil jobHold, QTime holdUntilTime)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define QStringLiteral(str)