io.qt.printsupport.QPrintPreviewWidget Maven / Gradle / Ivy
package io.qt.printsupport;
/**
* Widget for previewing page layouts for printer output
* Java wrapper for Qt class QPrintPreviewWidget
*/
public class QPrintPreviewWidget extends io.qt.widgets.QWidget
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QPrintPreviewWidget.class);
/**
* Java wrapper for Qt enum QPrintPreviewWidget::ViewMode
*/
@io.qt.QtUnlistedEnum
public enum ViewMode implements io.qt.QtEnumerator {
SinglePageView(0),
FacingPagesView(1),
AllPagesView(2);
private ViewMode(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 ViewMode resolve(int value) {
switch (value) {
case 0: return SinglePageView;
case 1: return FacingPagesView;
case 2: return AllPagesView;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QPrintPreviewWidget::ZoomMode
*/
@io.qt.QtUnlistedEnum
public enum ZoomMode implements io.qt.QtEnumerator {
CustomZoom(0),
FitToWidth(1),
FitInView(2);
private ZoomMode(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 ZoomMode resolve(int value) {
switch (value) {
case 0: return CustomZoom;
case 1: return FitToWidth;
case 2: return FitInView;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QPrintPreviewWidget::paintRequested(QPrinter*)
*/
public final Signal1 paintRequested = new Signal1<>();
/**
* See QPrintPreviewWidget::previewChanged()
*/
public final Signal0 previewChanged = new Signal0();
/**
* Overloaded constructor for {@link #QPrintPreviewWidget(io.qt.printsupport.QPrinter, io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}.
*/
public QPrintPreviewWidget(io.qt.printsupport.QPrinter printer, io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowType ... flags){
this(printer, parent, new io.qt.core.Qt.WindowFlags(flags));
}
/**
* Overloaded constructor for {@link #QPrintPreviewWidget(io.qt.printsupport.QPrinter, io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with flags = new io.qt.core.Qt.WindowFlags(0)
.
*/
public QPrintPreviewWidget(io.qt.printsupport.QPrinter printer, io.qt.widgets.QWidget parent) {
this(printer, parent, new io.qt.core.Qt.WindowFlags(0));
}
/**
* Overloaded constructor for {@link #QPrintPreviewWidget(io.qt.printsupport.QPrinter, io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with:
* parent = null
* flags = new io.qt.core.Qt.WindowFlags(0)
*
*/
public QPrintPreviewWidget(io.qt.printsupport.QPrinter printer) {
this(printer, (io.qt.widgets.QWidget)null, new io.qt.core.Qt.WindowFlags(0));
}
/**
* See QPrintPreviewWidget::QPrintPreviewWidget(QPrinter*,QWidget*,Qt::WindowFlags)
*/
public QPrintPreviewWidget(io.qt.printsupport.QPrinter printer, io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowFlags flags){
super((QPrivateConstructor)null);
initialize_native(this, printer, parent, flags);
}
private native static void initialize_native(QPrintPreviewWidget instance, io.qt.printsupport.QPrinter printer, io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowFlags flags);
/**
* Overloaded constructor for {@link #QPrintPreviewWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}.
*/
public QPrintPreviewWidget(io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowType ... flags){
this(parent, new io.qt.core.Qt.WindowFlags(flags));
}
/**
* Overloaded constructor for {@link #QPrintPreviewWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with flags = new io.qt.core.Qt.WindowFlags(0)
.
*/
public QPrintPreviewWidget(io.qt.widgets.QWidget parent) {
this(parent, new io.qt.core.Qt.WindowFlags(0));
}
/**
* Overloaded constructor for {@link #QPrintPreviewWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with:
* parent = null
* flags = new io.qt.core.Qt.WindowFlags(0)
*
*/
public QPrintPreviewWidget() {
this((io.qt.widgets.QWidget)null, new io.qt.core.Qt.WindowFlags(0));
}
/**
* See QPrintPreviewWidget::QPrintPreviewWidget(QWidget*,Qt::WindowFlags)
*/
public QPrintPreviewWidget(io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowFlags flags){
super((QPrivateConstructor)null);
initialize_native(this, parent, flags);
}
private native static void initialize_native(QPrintPreviewWidget instance, io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowFlags flags);
/**
* See QPrintPreviewWidget::currentPage()const
*/
@io.qt.QtUninvokable
public final int currentPage(){
return currentPage_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int currentPage_native_constfct(long __this__nativeId);
/**
* See QPrintPreviewWidget::fitInView()
*/
public final void fitInView(){
fitInView_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void fitInView_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::fitToWidth()
*/
public final void fitToWidth(){
fitToWidth_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void fitToWidth_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::orientation()const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QPageLayout.Orientation orientation(){
return io.qt.gui.QPageLayout.Orientation.resolve(orientation_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int orientation_native_constfct(long __this__nativeId);
/**
* See QPrintPreviewWidget::pageCount()const
*/
@io.qt.QtUninvokable
public final int pageCount(){
return pageCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int pageCount_native_constfct(long __this__nativeId);
/**
* See QPrintPreviewWidget::print()
*/
public final void print(){
print_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void print_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::setAllPagesViewMode()
*/
public final void setAllPagesViewMode(){
setAllPagesViewMode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void setAllPagesViewMode_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::setCurrentPage(int)
*/
public final void setCurrentPage(int pageNumber){
setCurrentPage_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), pageNumber);
}
private native void setCurrentPage_native_int(long __this__nativeId, int pageNumber);
/**
* See QPrintPreviewWidget::setFacingPagesViewMode()
*/
public final void setFacingPagesViewMode(){
setFacingPagesViewMode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void setFacingPagesViewMode_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::setLandscapeOrientation()
*/
public final void setLandscapeOrientation(){
setLandscapeOrientation_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void setLandscapeOrientation_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::setOrientation(QPageLayout::Orientation)
*/
public final void setOrientation(io.qt.gui.QPageLayout.Orientation orientation){
setOrientation_native_QPageLayout_Orientation(QtJambi_LibraryUtilities.internal.nativeId(this), orientation.value());
}
private native void setOrientation_native_QPageLayout_Orientation(long __this__nativeId, int orientation);
/**
* See QPrintPreviewWidget::setPortraitOrientation()
*/
public final void setPortraitOrientation(){
setPortraitOrientation_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void setPortraitOrientation_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::setSinglePageViewMode()
*/
public final void setSinglePageViewMode(){
setSinglePageViewMode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void setSinglePageViewMode_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::setViewMode(QPrintPreviewWidget::ViewMode)
*/
public final void setViewMode(io.qt.printsupport.QPrintPreviewWidget.ViewMode viewMode){
setViewMode_native_QPrintPreviewWidget_ViewMode(QtJambi_LibraryUtilities.internal.nativeId(this), viewMode.value());
}
private native void setViewMode_native_QPrintPreviewWidget_ViewMode(long __this__nativeId, int viewMode);
/**
* See QPrintPreviewWidget::setZoomFactor(qreal)
*/
public final void setZoomFactor(double zoomFactor){
setZoomFactor_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), zoomFactor);
}
private native void setZoomFactor_native_qtjambireal(long __this__nativeId, double zoomFactor);
/**
* See QPrintPreviewWidget::setZoomMode(QPrintPreviewWidget::ZoomMode)
*/
public final void setZoomMode(io.qt.printsupport.QPrintPreviewWidget.ZoomMode zoomMode){
setZoomMode_native_QPrintPreviewWidget_ZoomMode(QtJambi_LibraryUtilities.internal.nativeId(this), zoomMode.value());
}
private native void setZoomMode_native_QPrintPreviewWidget_ZoomMode(long __this__nativeId, int zoomMode);
/**
* See QPrintPreviewWidget::updatePreview()
*/
public final void updatePreview(){
updatePreview_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void updatePreview_native(long __this__nativeId);
/**
* See QPrintPreviewWidget::viewMode()const
*/
@io.qt.QtUninvokable
public final io.qt.printsupport.QPrintPreviewWidget.ViewMode viewMode(){
return io.qt.printsupport.QPrintPreviewWidget.ViewMode.resolve(viewMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int viewMode_native_constfct(long __this__nativeId);
/**
* See QPrintPreviewWidget::zoomFactor()const
*/
@io.qt.QtUninvokable
public final double zoomFactor(){
return zoomFactor_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double zoomFactor_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #zoomIn(double)}
* with zoom = 1.1
.
*/
public final void zoomIn() {
zoomIn((double)1.1);
}
/**
* See QPrintPreviewWidget::zoomIn(qreal)
*/
public final void zoomIn(double zoom){
zoomIn_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), zoom);
}
private native void zoomIn_native_qtjambireal(long __this__nativeId, double zoom);
/**
* See QPrintPreviewWidget::zoomMode()const
*/
@io.qt.QtUninvokable
public final io.qt.printsupport.QPrintPreviewWidget.ZoomMode zoomMode(){
return io.qt.printsupport.QPrintPreviewWidget.ZoomMode.resolve(zoomMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int zoomMode_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #zoomOut(double)}
* with zoom = 1.1
.
*/
public final void zoomOut() {
zoomOut((double)1.1);
}
/**
* See QPrintPreviewWidget::zoomOut(qreal)
*/
public final void zoomOut(double zoom){
zoomOut_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), zoom);
}
private native void zoomOut_native_qtjambireal(long __this__nativeId, double zoom);
/**
*
*/
@io.qt.QtUninvokable
public void setVisible(boolean visible){
setVisible_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), visible);
}
@io.qt.QtUninvokable
private native void setVisible_native_bool(long __this__nativeId, boolean visible);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QPrintPreviewWidget(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
*/
@io.qt.NativeAccess
protected QPrintPreviewWidget(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@io.qt.QtUninvokable
private static native void initialize_native(QPrintPreviewWidget instance, QDeclarativeConstructor constructor);
}