QPrinterInfo Class
QPrinterInfo 클래스는 기존 프린터에 대한 정보에 액세스할 수 있습니다. 더 보기...
헤더: | #include <QPrinterInfo> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS PrintSupport) target_link_libraries(mytarget PRIVATE Qt6::PrintSupport) |
qmake: | QT += printsupport |
- 상속된 멤버를 포함한 모든 멤버 목록
- QPrinterInfo는 프린터 및 인쇄 API의 일부입니다.
공용 함수
QPrinterInfo() | |
QPrinterInfo(const QPrinter &printer) | |
QPrinterInfo(const QPrinterInfo &other) | |
~QPrinterInfo() | |
QPrinter::ColorMode | defaultColorMode() const |
QPrinter::DuplexMode | defaultDuplexMode() const |
QPageSize | defaultPageSize() const |
QString | description() const |
bool | isDefault() const |
bool | isNull() const |
bool | isRemote() const |
QString | location() const |
QString | makeAndModel() const |
QPageSize | maximumPhysicalPageSize() const |
QPageSize | minimumPhysicalPageSize() const |
QString | printerName() const |
QPrinter::PrinterState | state() const |
QList<QPrinter::ColorMode> | supportedColorModes() const |
QList<QPrinter::DuplexMode> | supportedDuplexModes() const |
QList<QPageSize> | supportedPageSizes() const |
QList<int> | supportedResolutions() const |
bool | supportsCustomPageSizes() const |
QPrinterInfo & | operator=(const QPrinterInfo &other) |
정적 공용 멤버
QStringList | availablePrinterNames() |
QList<QPrinterInfo> | availablePrinters() |
QPrinterInfo | defaultPrinter() |
QString | defaultPrinterName() |
QPrinterInfo | printerInfo(const QString &printerName) |
상세 설명
정적 함수를 사용하여 QPrinterInfo 객체 목록을 생성합니다. 목록의 각 QPrinterInfo 객체는 단일 프린터를 나타내며 이름, 지원되는 용지 크기 및 기본 프린터인지 여부를 쿼리할 수 있습니다.
멤버 함수 문서
QPrinterInfo::QPrinterInfo()
빈 QPrinterInfo 객체를 구축합니다.
isNull()도 참조하십시오 .
[explicit]
QPrinterInfo::QPrinterInfo(const QPrinter &printer)
printer 에서 QPrinterInfo 객체를 생성합니다.
QPrinterInfo::QPrinterInfo(const QPrinterInfo &other)
other 의 복사본을 생성합니다.
[noexcept]
QPrinterInfo::~QPrinterInfo()
QPrinterInfo 객체를 삭제합니다. 객체의 값에 대한 참조가 유효하지 않게 됩니다.
[static]
QStringList QPrinterInfo::availablePrinterNames()
이 시스템에서 사용 가능한 모든 프린터 이름 목록을 반환합니다.
대부분의 시스템에서 availablePrinters() 대신 이 방법을 사용하는 것이 더 빠르므로 사용하는 것이 좋습니다.
로컬 시스템이나 원격 인쇄 서버에서 변경이 이루어지면 목록이 오래될 수 있습니다. 필요한 경우에만 QPrinterInfo 인스턴스를 인스턴스화하고, 호출하기 전에 항상 유효성을 확인하세요.
[static]
QList<QPrinterInfo> QPrinterInfo::availablePrinters()
이 시스템에서 사용 가능한 모든 프린터에 대한 QPrinterInfo 객체 목록을 반환합니다.
특히 원격 네트워크 프린터가 있는 경우 각 프린터 인스턴스를 만드는 데 시간이 오래 걸릴 수 있으며 로컬 시스템이나 원격 인쇄 서버에서 변경 사항이 있으면 유지된 인스턴스가 오래될 수 있으므로 이 방법을 사용하지 않는 것이 좋습니다. 대신 availablePrinterNames()를 사용하고 필요할 때만 프린터 인스턴스를 인스턴스화하세요.
QPrinter::ColorMode QPrinterInfo::defaultColorMode() const
이 프린터의 기본 색상 모드를 반환합니다.
QPrinter::DuplexMode QPrinterInfo::defaultDuplexMode() const
이 프린터의 기본 양면 모드를 반환합니다.
QPageSize QPrinterInfo::defaultPageSize() const
이 프린터의 현재 기본 페이지 크기를 반환합니다.
[static]
QPrinterInfo QPrinterInfo::defaultPrinter()
시스템의 기본 프린터를 반환합니다.
기본 프린터가 없는 경우 사용하기 전에 isNull()를 사용하여 반환값을 확인해야 합니다.
일부 시스템에서는 사용 가능한 프린터가 있지만 기본 프린터로 설정된 프린터가 없을 수 있습니다.
isNull(), isDefault() 및 availablePrinters()도 참조하세요 .
[static]
QString QPrinterInfo::defaultPrinterName()
현재 기본 프린터 이름을 반환합니다.
QString QPrinterInfo::description() const
프린터에 대한 사람이 읽을 수 있는 설명을 반환합니다.
QPrinterInfo::printerName()도 참조하세요 .
bool QPrinterInfo::isDefault() const
이 프린터가 현재 기본 프린터인지 여부를 반환합니다.
bool QPrinterInfo::isNull() const
이 QPrinterInfo 객체에 프린터 정의가 있는지 여부를 반환합니다.
예를 들어 시스템에 프린터가 없는 경우 defaultPrinter()을 호출하면 빈 QPrinterInfo 객체가 발생할 수 있습니다.
bool QPrinterInfo::isRemote() const
이 프린터가 원격 네트워크 프린터인지 여부를 반환합니다.
QString QPrinterInfo::location() const
사람이 읽을 수 있는 프린터의 위치를 반환합니다.
QString QPrinterInfo::makeAndModel() const
사람이 읽을 수 있는 프린터의 제조업체와 모델을 반환합니다.
QPageSize QPrinterInfo::maximumPhysicalPageSize() const
이 프린터에서 지원하는 최대 실제 페이지 크기를 반환합니다.
minimumPhysicalPageSize()도 참조하세요 .
QPageSize QPrinterInfo::minimumPhysicalPageSize() const
이 프린터에서 지원하는 최소 물리적 페이지 크기를 반환합니다.
maximumPhysicalPageSize()도 참조하세요 .
[static]
QPrinterInfo QPrinterInfo::printerInfo(const QString &printerName)
프린터를 반환합니다 printerName.
명명된 프린터가 존재하지 않는 경우 사용하기 전에 isNull()를 사용하여 반환 값을 확인해야 합니다.
isNull()도 참조하세요 .
QString QPrinterInfo::printerName() const
프린터의 이름을 반환합니다.
이 이름은 프린터를 식별하는 고유 ID이며 사람이 읽을 수 없을 수도 있습니다.
QPrinterInfo::description() 및 QPrinter::setPrinterName()도 참조하세요 .
QPrinter::PrinterState QPrinterInfo::state() const
이 프린터의 현재 상태를 반환합니다.
이 상태는 플랫폼, 프린터 드라이버 또는 프린터 자체에 따라 항상 정확하지 않을 수 있습니다.
QList<QPrinter::ColorMode> QPrinterInfo::supportedColorModes() const
이 프린터에서 지원되는 색상 모드를 반환합니다.
QList<QPrinter::DuplexMode> QPrinterInfo::supportedDuplexModes() const
이 프린터에서 지원하는 양면 모드 목록을 반환합니다.
QList<QPageSize> QPrinterInfo::supportedPageSizes() const
이 프린터에서 지원하는 페이지 크기 목록을 반환합니다.
QList<int> QPrinterInfo::supportedResolutions() const
이 프린터에서 지원하는 해상도 목록을 반환합니다.
bool QPrinterInfo::supportsCustomPageSizes() const
이 프린터가 사용자 지정 페이지 크기를 지원하는지 여부를 반환합니다.
QPrinterInfo &QPrinterInfo::operator=(const QPrinterInfo &other)
QPrinterInfo 개체를 other 과 동일하게 설정합니다.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.