9#include <private/qprinterinfo_p.h>
10#include <private/qprintdevice_p.h>
12#include <QtPrintSupport/QPrinterInfo>
14#if QT_CONFIG(cupspassworddialog)
15#include <QGuiApplication>
17#include <QDialogButtonBox>
25# include <cups/language.h>
30#if QT_CONFIG(cupspassworddialog)
31static const char *getPasswordCB(
const char *, http_t *http,
const char *,
const char *resource,
void *)
41 char hostname[HTTP_MAX_HOST];
42 httpGetHostname(http, hostname, HTTP_MAX_HOST);
67 label->setWordWrap(
true);
85 if (usernameLE->
text() != username)
97#if QT_CONFIG(cupspassworddialog)
100 cupsSetPasswordCB2(getPasswordCB,
nullptr );
128 int count = cupsGetDests(&dests);
132 if (dests[
i].instance)
136 cupsFreeDests(
count, dests);
149 int count = cupsGetDests(&dests);
151 if (dests[
i].is_default) {
153 if (dests[
i].instance) {
159 cupsFreeDests(
count, dests);
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
static QString staticDefaultPrintDeviceId()
QPrintEngine * createNativePrintEngine(QPrinter::PrinterMode printerMode, const QString &deviceId=QString()) override
QPrintDevice createPrintDevice(const QString &id) override
QStringList availablePrintDeviceIds() const override
QString defaultPrintDeviceId() const override
QPaintEngine * createPaintEngine(QPrintEngine *printEngine, QPrinter::PrinterMode) override
The QDialog class is the base class of dialog windows.
virtual void reject()
Hides the modal dialog and sets the result code to Rejected.
virtual int exec()
Shows the dialog as a \l{QDialog::Modal Dialogs}{modal dialog}, blocking until the user closes it.
virtual void accept()
Hides the modal dialog and sets the result code to Accepted.
The QLabel widget provides a text or image display.
void setSizeConstraint(SizeConstraint)
The QLineEdit widget is a one-line text editor.
void setText(const QString &)
void setEchoMode(EchoMode)
QString text
the line edit's text.
void reserve(qsizetype size)
void append(parameter_type t)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
PrinterMode
This enum describes the mode the printer should work in.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QByteArray toLocal8Bit() const &
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLuint GLsizei const GLchar * label
[43]
#define QStringLiteral(str)
QFileDialog dialog(this)
[1]