io.qt.pdf.QPdfDocumentRenderOptions Maven / Gradle / Ivy
package io.qt.pdf;
/**
* Holds the options to render a page from a PDF document
* Java wrapper for Qt's class QPdfDocumentRenderOptions
*/
public class QPdfDocumentRenderOptions extends io.qt.QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QPdfDocumentRenderOptions::RenderFlag
*
* @see RenderFlags
*/
public enum RenderFlag implements io.qt.QtFlagEnumerator {
None(0),
Annotations(1),
OptimizedForLcd(2),
Grayscale(4),
ForceHalftone(8),
TextAliased(16),
ImageAliased(32),
PathAliased(64);
static {
QtJambi_LibraryUtilities.initialize();
}
private RenderFlag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public RenderFlags asFlags() {
return new RenderFlags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public RenderFlags combined(RenderFlag e) {
return new RenderFlags(this, e);
}
/**
* Creates a new {@link RenderFlags} from the entries.
* @param values entries
* @return new flag
*/
public static RenderFlags flags(RenderFlag ... values) {
return new RenderFlags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static RenderFlag resolve(int value) {
switch (value) {
case 0: return None;
case 1: return Annotations;
case 2: return OptimizedForLcd;
case 4: return Grayscale;
case 8: return ForceHalftone;
case 16: return TextAliased;
case 32: return ImageAliased;
case 64: return PathAliased;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link RenderFlag}
*/
public static final class RenderFlags extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0xc5275907bfed457bL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new RenderFlags where the flags in args
are set.
* @param args enum entries
*/
public RenderFlags(RenderFlag ... args){
super(args);
}
/**
* Creates a new RenderFlags with given value
.
* @param value
*/
public RenderFlags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new RenderFlags
*/
@Override
public final RenderFlags combined(RenderFlag e){
return new RenderFlags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final RenderFlags setFlag(RenderFlag e){
super.setFlag(e);
return this;
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final RenderFlags setFlag(RenderFlag e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this RenderFlags.
* @return array of enum entries
*/
@Override
public final RenderFlag[] flags(){
return super.flags(RenderFlag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final RenderFlags clone(){
return new RenderFlags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(RenderFlags other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QPdfDocumentRenderOptions::Rotation
*/
public enum Rotation implements io.qt.QtEnumerator {
None(0),
Clockwise90(1),
Clockwise180(2),
Clockwise270(3);
static {
QtJambi_LibraryUtilities.initialize();
}
private Rotation(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static Rotation resolve(int value) {
switch (value) {
case 0: return None;
case 1: return Clockwise90;
case 2: return Clockwise180;
case 3: return Clockwise270;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QPdfDocumentRenderOptions::QPdfDocumentRenderOptions()
*/
public QPdfDocumentRenderOptions(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QPdfDocumentRenderOptions instance);
@io.qt.QtUninvokable
private final boolean operator_equal(io.qt.pdf.QPdfDocumentRenderOptions rhs){
return operator_equal_native_cref_QPdfDocumentRenderOptions(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@io.qt.QtUninvokable
private native boolean operator_equal_native_cref_QPdfDocumentRenderOptions(long __this__nativeId, long rhs);
/**
* See QPdfDocumentRenderOptions::renderFlags()const
*/
@io.qt.QtUninvokable
public final io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags renderFlags(){
return new io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags(renderFlags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int renderFlags_native_constfct(long __this__nativeId);
/**
* See QPdfDocumentRenderOptions::rotation()const
*/
@io.qt.QtUninvokable
public final io.qt.pdf.QPdfDocumentRenderOptions.Rotation rotation(){
return io.qt.pdf.QPdfDocumentRenderOptions.Rotation.resolve(rotation_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int rotation_native_constfct(long __this__nativeId);
/**
* See QPdfDocumentRenderOptions::scaledClipRect()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QRect scaledClipRect(){
return scaledClipRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QRect scaledClipRect_native_constfct(long __this__nativeId);
/**
* See QPdfDocumentRenderOptions::scaledSize()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QSize scaledSize(){
return scaledSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QSize scaledSize_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #setRenderFlags(io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags)}.
*/
@io.qt.QtUninvokable
public final void setRenderFlags(io.qt.pdf.QPdfDocumentRenderOptions.RenderFlag ... r){
setRenderFlags(new io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags(r));
}
/**
* See QPdfDocumentRenderOptions::setRenderFlags(QPdfDocumentRenderOptions::RenderFlags)
*/
@io.qt.QtUninvokable
public final void setRenderFlags(io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags r){
setRenderFlags_native_QFlags_QPdfDocumentRenderOptions_RenderFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), r.value());
}
@io.qt.QtUninvokable
private native void setRenderFlags_native_QFlags_QPdfDocumentRenderOptions_RenderFlag_(long __this__nativeId, int r);
/**
* See QPdfDocumentRenderOptions::setRotation(QPdfDocumentRenderOptions::Rotation)
*/
@io.qt.QtUninvokable
public final void setRotation(io.qt.pdf.QPdfDocumentRenderOptions.Rotation r){
setRotation_native_QPdfDocumentRenderOptions_Rotation(QtJambi_LibraryUtilities.internal.nativeId(this), r.value());
}
@io.qt.QtUninvokable
private native void setRotation_native_QPdfDocumentRenderOptions_Rotation(long __this__nativeId, int r);
/**
* See QPdfDocumentRenderOptions::setScaledClipRect(QRect)
*/
@io.qt.QtUninvokable
public final void setScaledClipRect(io.qt.core.QRect r){
setScaledClipRect_native_cref_QRect(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native void setScaledClipRect_native_cref_QRect(long __this__nativeId, long r);
/**
* See QPdfDocumentRenderOptions::setScaledSize(QSize)
*/
@io.qt.QtUninvokable
public final void setScaledSize(io.qt.core.QSize s){
setScaledSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(s));
}
@io.qt.QtUninvokable
private native void setScaledSize_native_cref_QSize(long __this__nativeId, long s);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QPdfDocumentRenderOptions(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.pdf.QPdfDocumentRenderOptions) {
return operator_equal((io.qt.pdf.QPdfDocumentRenderOptions) other);
}
return false;
}
@io.qt.QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native static int hashCode_native(long __this_nativeId);
@Override
public QPdfDocumentRenderOptions clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QPdfDocumentRenderOptions clone_native(long __this_nativeId);
}