io.qt.gui.QPdfWriter Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Class to generate PDFs that can be used as a paint device
* Java wrapper for Qt class QPdfWriter
*/
public class QPdfWriter extends io.qt.core.QObject
implements io.qt.gui.QPagedPaintDevice,
io.qt.gui.QPaintDevice
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QPdfWriter.class);
/**
* Java wrapper for Qt enum QPdfWriter::ColorModel
* @since This enum was introduced in Qt 6.8.
*/
public enum ColorModel implements QtEnumerator {
/**
* Representing QPdfWriter:: ColorModel:: RGB
*/
RGB(0),
/**
* Representing QPdfWriter:: ColorModel:: Grayscale
*/
Grayscale(1),
/**
* Representing QPdfWriter:: ColorModel:: CMYK
*/
CMYK(2),
/**
* Representing QPdfWriter:: ColorModel:: Auto
*/
Auto(3);
static {
QtJambi_LibraryUtilities.initialize();
}
private ColorModel(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull ColorModel resolve(int value) {
switch (value) {
case 0: return RGB;
case 1: return Grayscale;
case 2: return CMYK;
case 3: return Auto;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QPdfWriter:: QPdfWriter(QIODevice*)
* @param device
*/
public QPdfWriter(io.qt.core.@Nullable QIODevice device){
super((QPrivateConstructor)null);
initialize_native(this, device);
}
private native static void initialize_native(QPdfWriter instance, io.qt.core.QIODevice device);
/**
* See QPdfWriter:: QPdfWriter(QString)
* @param filename
*/
public QPdfWriter(java.lang.@NonNull String filename){
super((QPrivateConstructor)null);
initialize_native(this, filename);
}
private native static void initialize_native(QPdfWriter instance, java.lang.String filename);
/**
* See QPdfWriter:: addFileAttachment(QString, QByteArray, QString)
* @param fileName
* @param data
* @param mimeType
*/
@QtUninvokable
public final void addFileAttachment(java.lang.@NonNull String fileName, io.qt.core.@NonNull QByteArray data, java.lang.@NonNull String mimeType){
addFileAttachment_native_cref_QString_cref_QByteArray_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), fileName, QtJambi_LibraryUtilities.internal.checkedNativeId(data), mimeType);
}
@QtUninvokable
private native void addFileAttachment_native_cref_QString_cref_QByteArray_cref_QString(long __this__nativeId, java.lang.String fileName, long data, java.lang.String mimeType);
/**
* See QPaintDevice:: colorCount()const
* @return
*/
@QtUninvokable
public final int colorCount(){
return colorCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int colorCount_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: colorModel()const
* @since This function was introduced in Qt 6.8.
* @return
*/
@QtUninvokable
public final io.qt.gui.QPdfWriter.@NonNull ColorModel colorModel(){
return io.qt.gui.QPdfWriter.ColorModel.resolve(colorModel_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int colorModel_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: creator()const
* @return
*/
@QtUninvokable
public final java.lang.@NonNull String creator(){
return creator_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String creator_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: depth()const
* @return
*/
@QtUninvokable
public final int depth(){
return depth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int depth_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: devicePixelRatio()const
* @return
*/
@QtUninvokable
public final double devicePixelRatio(){
return devicePixelRatio_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static double devicePixelRatio_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: devicePixelRatioF()const
* @return
*/
@QtUninvokable
public final double devicePixelRatioF(){
return devicePixelRatioF_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static double devicePixelRatioF_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: documentId()const
* @since This function was introduced in Qt 6.8.
* @return
*/
@QtUninvokable
public final io.qt.core.@NonNull QUuid documentId(){
return documentId_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QUuid documentId_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: documentXmpMetadata()const
* @return
*/
@QtUninvokable
public final io.qt.core.@NonNull QByteArray documentXmpMetadata(){
return documentXmpMetadata_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QByteArray documentXmpMetadata_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: height()const
* @return
*/
@QtUninvokable
public final int height(){
return height_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int height_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: heightMM()const
* @return
*/
@QtUninvokable
public final int heightMM(){
return heightMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int heightMM_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: logicalDpiX()const
* @return
*/
@QtUninvokable
public final int logicalDpiX(){
return logicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int logicalDpiX_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: logicalDpiY()const
* @return
*/
@QtUninvokable
public final int logicalDpiY(){
return logicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int logicalDpiY_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: outputIntent()const
* @since This function was introduced in Qt 6.8.
* @return
*/
@QtUninvokable
public final io.qt.gui.@NonNull QPdfOutputIntent outputIntent(){
return outputIntent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QPdfOutputIntent outputIntent_native_constfct(long __this__nativeId);
/**
* See QPagedPaintDevice:: pageLayout()const
* @return
*/
@QtUninvokable
public final io.qt.gui.@NonNull QPageLayout pageLayout(){
return pageLayout_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static io.qt.gui.QPageLayout pageLayout_native_constfct(long __this__nativeId);
/**
* See QPagedPaintDevice:: pageRanges()const
* @since This function was introduced in Qt 6.0.
* @return
*/
@QtUninvokable
public final io.qt.gui.@NonNull QPageRanges pageRanges(){
return pageRanges_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static io.qt.gui.QPageRanges pageRanges_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: paintingActive()const
* @return
*/
@QtUninvokable
public final boolean paintingActive(){
return paintingActive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static boolean paintingActive_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: pdfVersion()const
* @return
*/
@QtUninvokable
public final io.qt.gui.QPagedPaintDevice.@NonNull PdfVersion pdfVersion(){
return io.qt.gui.QPagedPaintDevice.PdfVersion.resolve(pdfVersion_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int pdfVersion_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: physicalDpiX()const
* @return
*/
@QtUninvokable
public final int physicalDpiX(){
return physicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int physicalDpiX_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: physicalDpiY()const
* @return
*/
@QtUninvokable
public final int physicalDpiY(){
return physicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int physicalDpiY_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: resolution()const
* @return
*/
@QtUninvokable
public final int resolution(){
return resolution_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int resolution_native_constfct(long __this__nativeId);
/**
* See QPdfWriter:: setColorModel(QPdfWriter::ColorModel)
* @since This function was introduced in Qt 6.8.
* @param model
*/
@QtUninvokable
public final void setColorModel(io.qt.gui.QPdfWriter.@NonNull ColorModel model){
setColorModel_native_QPdfWriter_ColorModel(QtJambi_LibraryUtilities.internal.nativeId(this), model.value());
}
@QtUninvokable
private native void setColorModel_native_QPdfWriter_ColorModel(long __this__nativeId, int model);
/**
* See QPdfWriter:: setCreator(QString)
* @param creator
*/
@QtUninvokable
public final void setCreator(java.lang.@NonNull String creator){
setCreator_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), creator);
}
@QtUninvokable
private native void setCreator_native_cref_QString(long __this__nativeId, java.lang.String creator);
/**
* See QPdfWriter:: setDocumentId(QUuid)
* @since This function was introduced in Qt 6.8.
* @param documentId
*/
@QtUninvokable
public final void setDocumentId(io.qt.core.@NonNull QUuid documentId){
setDocumentId_native_QUuid(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(documentId));
}
@QtUninvokable
private native void setDocumentId_native_QUuid(long __this__nativeId, long documentId);
/**
* See QPdfWriter:: setDocumentXmpMetadata(QByteArray)
* @param xmpMetadata
*/
@QtUninvokable
public final void setDocumentXmpMetadata(io.qt.core.@NonNull QByteArray xmpMetadata){
setDocumentXmpMetadata_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(xmpMetadata));
}
@QtUninvokable
private native void setDocumentXmpMetadata_native_cref_QByteArray(long __this__nativeId, long xmpMetadata);
/**
* See QPdfWriter:: setOutputIntent(QPdfOutputIntent)
* @since This function was introduced in Qt 6.8.
* @param intent
*/
@QtUninvokable
public final void setOutputIntent(io.qt.gui.@StrictNonNull QPdfOutputIntent intent){
java.util.Objects.requireNonNull(intent, "Argument 'intent': null not expected.");
setOutputIntent_native_cref_QPdfOutputIntent(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(intent));
}
@QtUninvokable
private native void setOutputIntent_native_cref_QPdfOutputIntent(long __this__nativeId, long intent);
/**
* See QPdfWriter:: setPdfVersion(QPagedPaintDevice::PdfVersion)
* @param version
*/
@QtUninvokable
public final void setPdfVersion(io.qt.gui.QPagedPaintDevice.@NonNull PdfVersion version){
setPdfVersion_native_QPagedPaintDevice_PdfVersion(QtJambi_LibraryUtilities.internal.nativeId(this), version.value());
}
@QtUninvokable
private native void setPdfVersion_native_QPagedPaintDevice_PdfVersion(long __this__nativeId, int version);
/**
* See QPdfWriter:: setResolution(int)
* @param resolution
*/
@QtUninvokable
public final void setResolution(int resolution){
setResolution_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), resolution);
}
@QtUninvokable
private native void setResolution_native_int(long __this__nativeId, int resolution);
/**
* See QPdfWriter:: setTitle(QString)
* @param title
*/
@QtUninvokable
public final void setTitle(java.lang.@NonNull String title){
setTitle_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), title);
}
@QtUninvokable
private native void setTitle_native_cref_QString(long __this__nativeId, java.lang.String title);
/**
*
* @return
*/
@QtUninvokable
public final java.lang.@NonNull String title(){
return title_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String title_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: width()const
* @return
*/
@QtUninvokable
public final int width(){
return width_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int width_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: widthMM()const
* @return
*/
@QtUninvokable
public final int widthMM(){
return widthMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static int widthMM_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: initPainter(QPainter*)const
* @param painter
*/
@QtUninvokable
protected void initPainter(io.qt.gui.@Nullable QPainter painter){
initPainter_native_QPainter_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
private native static void initPainter_native_QPainter_ptr_constfct(long __this__nativeId, long painter);
/**
* See QPaintDevice:: metric(QPaintDevice::PaintDeviceMetric)const
* @param id
* @return
*/
@QtUninvokable
protected int metric(io.qt.gui.QPaintDevice.@NonNull PaintDeviceMetric id){
return metric_native_QPaintDevice_PaintDeviceMetric_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), id.value());
}
private native static int metric_native_QPaintDevice_PaintDeviceMetric_constfct(long __this__nativeId, int id);
/**
* See QPagedPaintDevice:: newPage()
* @return
*/
@QtUninvokable
@Override
public boolean newPage(){
return newPage_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static boolean newPage_native(long __this__nativeId);
/**
* See QPaintDevice:: paintEngine()const
* @return
*/
@QtUninvokable
@Override
public io.qt.gui.@Nullable QPaintEngine paintEngine(){
return paintEngine_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static io.qt.gui.QPaintEngine paintEngine_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: redirected(QPoint*)const
* @param offset
* @return
*/
@QtUninvokable
protected io.qt.gui.@Nullable QPaintDevice redirected(io.qt.core.@Nullable QPoint offset){
return redirected_native_QPoint_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(offset));
}
private native static io.qt.gui.QPaintDevice redirected_native_QPoint_ptr_constfct(long __this__nativeId, long offset);
/**
* See QPagedPaintDevice:: setPageLayout(QPageLayout)
* @param pageLayout
* @return
*/
@QtUninvokable
public boolean setPageLayout(io.qt.gui.@NonNull QPageLayout pageLayout){
return setPageLayout_native_cref_QPageLayout(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(pageLayout));
}
private native static boolean setPageLayout_native_cref_QPageLayout(long __this__nativeId, long pageLayout);
/**
* See QPagedPaintDevice:: setPageMargins(QMarginsF, QPageLayout::Unit)
* @param margins
* @param units
* @return
*/
@QtUninvokable
public boolean setPageMargins(io.qt.core.@NonNull QMarginsF margins, io.qt.gui.QPageLayout.@NonNull Unit units){
return setPageMargins_native_cref_QMarginsF_QPageLayout_Unit(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(margins), units.value());
}
private native static boolean setPageMargins_native_cref_QMarginsF_QPageLayout_Unit(long __this__nativeId, long margins, int units);
/**
* See QPagedPaintDevice:: setPageOrientation(QPageLayout::Orientation)
* @param orientation
* @return
*/
@QtUninvokable
public boolean setPageOrientation(io.qt.gui.QPageLayout.@NonNull Orientation orientation){
return setPageOrientation_native_QPageLayout_Orientation(QtJambi_LibraryUtilities.internal.nativeId(this), orientation.value());
}
private native static boolean setPageOrientation_native_QPageLayout_Orientation(long __this__nativeId, int orientation);
/**
* See QPagedPaintDevice:: setPageRanges(QPageRanges)
* @since This function was introduced in Qt 6.0.
* @param ranges
*/
@QtUninvokable
public void setPageRanges(io.qt.gui.@NonNull QPageRanges ranges){
setPageRanges_native_cref_QPageRanges(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(ranges));
}
private native static void setPageRanges_native_cref_QPageRanges(long __this__nativeId, long ranges);
/**
* See QPagedPaintDevice:: setPageSize(QPageSize)
* @param pageSize
* @return
*/
@QtUninvokable
public boolean setPageSize(io.qt.gui.@NonNull QPageSize pageSize){
return setPageSize_native_cref_QPageSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(pageSize));
}
private native static boolean setPageSize_native_cref_QPageSize(long __this__nativeId, long pageSize);
/**
* See QPaintDevice:: sharedPainter()const
* @return
*/
@QtUninvokable
protected io.qt.gui.@Nullable QPainter sharedPainter(){
return sharedPainter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static io.qt.gui.QPainter sharedPainter_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: devicePixelRatioFScale()
* @return
*/
public native static double devicePixelRatioFScale();
/**
* See QPaintDevice:: encodeMetricF(QPaintDevice::PaintDeviceMetric, double)
* @param metric
* @param value
* @return
*/
public static int encodeMetricF(io.qt.gui.QPaintDevice.@NonNull PaintDeviceMetric metric, double value){
return encodeMetricF_native_QPaintDevice_PaintDeviceMetric_double(metric.value(), value);
}
private native static int encodeMetricF_native_QPaintDevice_PaintDeviceMetric_double(int metric, double value);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QPdfWriter(QPrivateConstructor p) { super(p); }
/**
* Overloaded function for {@link #addFileAttachment(java.lang.String, io.qt.core.QByteArray, java.lang.String)}
* with mimeType = (String)null
.
*/
@QtUninvokable
public final void addFileAttachment(java.lang.@NonNull String fileName, io.qt.core.@NonNull QByteArray data) {
addFileAttachment(fileName, data, (String)null);
}
/**
* Overloaded function for {@link #addFileAttachment(java.lang.String, byte[], java.lang.String)}
* with mimeType = (String)null
.
*/
@QtUninvokable
public final void addFileAttachment(java.lang.@NonNull String fileName, byte @NonNull[] data) {
addFileAttachment(fileName, data, (String)null);
}
/**
* Overloaded function for {@link #addFileAttachment(java.lang.String, io.qt.core.QByteArray, java.lang.String)}.
*/
@QtUninvokable
public final void addFileAttachment(java.lang.@NonNull String fileName, byte @NonNull[] data, java.lang.@NonNull String mimeType) {
addFileAttachment(fileName, new io.qt.core.QByteArray(data), mimeType);
}
/**
* Overloaded function for {@link #setDocumentXmpMetadata(io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final void setDocumentXmpMetadata(byte @NonNull[] xmpMetadata) {
setDocumentXmpMetadata(new io.qt.core.QByteArray(xmpMetadata));
}
/**
* Overloaded function for {@link #setPageMargins(io.qt.core.QMarginsF, io.qt.gui.QPageLayout.Unit)}
* with units = io.qt.gui.QPageLayout.Unit.Millimeter
.
*/
@QtUninvokable
public final boolean setPageMargins(io.qt.core.@NonNull QMarginsF margins) {
return setPageMargins(margins, io.qt.gui.QPageLayout.Unit.Millimeter);
}
/**
* Overloaded function for {@link #setPageMargins(io.qt.core.QMargins, io.qt.gui.QPageLayout.Unit)}
* with units = io.qt.gui.QPageLayout.Unit.Millimeter
.
*/
@QtUninvokable
public final boolean setPageMargins(io.qt.core.@NonNull QMargins margins) {
return setPageMargins(margins, io.qt.gui.QPageLayout.Unit.Millimeter);
}
/**
* Overloaded function for {@link #setPageMargins(io.qt.core.QMarginsF, io.qt.gui.QPageLayout.Unit)}.
*/
@QtUninvokable
public final boolean setPageMargins(io.qt.core.@NonNull QMargins margins, io.qt.gui.QPageLayout.@NonNull Unit units) {
return setPageMargins(new io.qt.core.QMarginsF(margins), units);
}
/**
* Overloaded function for {@link #setPageSize(io.qt.gui.QPageSize)}.
*/
@QtUninvokable
public final boolean setPageSize(io.qt.gui.QPageSize.@NonNull PageSizeId pageSize) {
return setPageSize(new io.qt.gui.QPageSize(pageSize));
}
}