io.qt.gui.QPaintDevice Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* The base class of objects that can be painted on with QPainter
* Java wrapper for Qt class QPaintDevice
* Following functions are protected in the Qt interface, all implementations of this interface may implement these function:
*
*
* @QtUninvokable
* protected void initPainter(io.qt.gui.@Nullable QPainter painter){
* QPaintDevice.MemberAccess.of(this).initPainter(painter);
* }
*
* @QtUninvokable
* protected int metric(io.qt.gui.QPaintDevice.@NonNull PaintDeviceMetric metric){
* return QPaintDevice.MemberAccess.of(this).metric(metric);
* }
*
* @QtUninvokable
* protected io.qt.gui.@Nullable QPaintDevice redirected(io.qt.core.@Nullable QPoint offset){
* return QPaintDevice.MemberAccess.of(this).redirected(offset);
* }
*
* @QtUninvokable
* protected io.qt.gui.@Nullable QPainter sharedPainter(){
* return QPaintDevice.MemberAccess.of(this).sharedPainter();
* }
*
*
*/
public interface QPaintDevice extends QtObjectInterface
{
/**
* Java wrapper for Qt enum QPaintDevice::PaintDeviceMetric
*/
public enum PaintDeviceMetric implements QtEnumerator {
/**
* Representing QPaintDevice:: PdmWidth
*/
PdmWidth(1),
/**
* Representing QPaintDevice:: PdmHeight
*/
PdmHeight(2),
/**
* Representing QPaintDevice:: PdmWidthMM
*/
PdmWidthMM(3),
/**
* Representing QPaintDevice:: PdmHeightMM
*/
PdmHeightMM(4),
/**
* Representing QPaintDevice:: PdmNumColors
*/
PdmNumColors(5),
/**
* Representing QPaintDevice:: PdmDepth
*/
PdmDepth(6),
/**
* Representing QPaintDevice:: PdmDpiX
*/
PdmDpiX(7),
/**
* Representing QPaintDevice:: PdmDpiY
*/
PdmDpiY(8),
/**
* Representing QPaintDevice:: PdmPhysicalDpiX
*/
PdmPhysicalDpiX(9),
/**
* Representing QPaintDevice:: PdmPhysicalDpiY
*/
PdmPhysicalDpiY(10),
/**
* Representing QPaintDevice:: PdmDevicePixelRatio
*/
PdmDevicePixelRatio(11),
/**
* Representing QPaintDevice:: PdmDevicePixelRatioScaled
*/
PdmDevicePixelRatioScaled(12);
static {
QtJambi_LibraryUtilities.initialize();
}
private PaintDeviceMetric(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 @NonNull PaintDeviceMetric resolve(int value) {
switch (value) {
case 1: return PdmWidth;
case 2: return PdmHeight;
case 3: return PdmWidthMM;
case 4: return PdmHeightMM;
case 5: return PdmNumColors;
case 6: return PdmDepth;
case 7: return PdmDpiX;
case 8: return PdmDpiY;
case 9: return PdmPhysicalDpiX;
case 10: return PdmPhysicalDpiY;
case 11: return PdmDevicePixelRatio;
case 12: return PdmDevicePixelRatioScaled;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* @hidden
* Implementor class for interface {@link io.qt.gui.QPaintDevice}
*/
public static abstract class Impl extends QtObject
implements io.qt.gui.QPaintDevice
{
static {
QtJambi_LibraryUtilities.initialize();
}
@NativeAccess
private static final class ConcreteWrapper extends QPaintDevice.Impl {
@NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@QtUninvokable
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:: QPaintDevice()
*/
protected Impl(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QPaintDevice instance);
/**
* See QPaintDevice:: colorCount()const
*/
@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 QPaintDevice:: depth()const
*/
@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
*/
@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
*/
@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 QPaintDevice:: height()const
*/
@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
*/
@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
*/
@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
*/
@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 QPaintDevice:: paintingActive()const
*/
@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 QPaintDevice:: physicalDpiX()const
*/
@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
*/
@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 QPaintDevice:: width()const
*/
@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
*/
@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
*/
@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
*/
@QtUninvokable
protected int metric(io.qt.gui.QPaintDevice.@NonNull PaintDeviceMetric metric){
return metric_native_QPaintDevice_PaintDeviceMetric_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), metric.value());
}
private native static int metric_native_QPaintDevice_PaintDeviceMetric_constfct(long __this__nativeId, int metric);
/**
* See QPaintDevice:: paintEngine()const
*/
@QtUninvokable
public abstract io.qt.gui.@Nullable QPaintEngine paintEngine();
private native static io.qt.gui.QPaintEngine paintEngine_native_constfct(long __this__nativeId);
/**
* See QPaintDevice:: redirected(QPoint*)const
*/
@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 QPaintDevice:: sharedPainter()const
*/
@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()
*/
private native static double devicePixelRatioFScale();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected Impl(QPrivateConstructor p) { super(p); }
@QtUninvokable
static io.qt.gui.QPainter sharedPainter(QPaintDevice instance){
return sharedPainter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance));
}
@QtUninvokable
static io.qt.gui.QPaintDevice redirected(QPaintDevice instance, io.qt.core.QPoint offset){
return redirected_native_QPoint_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), QtJambi_LibraryUtilities.internal.checkedNativeId(offset));
}
}
/**
* See QPaintDevice:: colorCount()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int colorCount(){
return Impl.colorCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: depth()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int depth(){
return Impl.depth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: devicePixelRatio()const
*/
@QtDeclaredFinal
@QtUninvokable
public default double devicePixelRatio(){
return Impl.devicePixelRatio_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: devicePixelRatioF()const
*/
@QtDeclaredFinal
@QtUninvokable
public default double devicePixelRatioF(){
return Impl.devicePixelRatioF_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: height()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int height(){
return Impl.height_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: heightMM()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int heightMM(){
return Impl.heightMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: logicalDpiX()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int logicalDpiX(){
return Impl.logicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: logicalDpiY()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int logicalDpiY(){
return Impl.logicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: paintingActive()const
*/
@QtDeclaredFinal
@QtUninvokable
public default boolean paintingActive(){
return Impl.paintingActive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: physicalDpiX()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int physicalDpiX(){
return Impl.physicalDpiX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: physicalDpiY()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int physicalDpiY(){
return Impl.physicalDpiY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: width()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int width(){
return Impl.width_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: widthMM()const
*/
@QtDeclaredFinal
@QtUninvokable
public default int widthMM(){
return Impl.widthMM_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QPaintDevice:: paintEngine()const
*/
@QtUninvokable
public io.qt.gui.@Nullable QPaintEngine paintEngine();
/**
* See QPaintDevice:: devicePixelRatioFScale()
*/
public static double devicePixelRatioFScale(){
return Impl.devicePixelRatioFScale();
}
/**
* @hidden
*/
public static class MemberAccess extends io.qt.MemberAccess {
private MemberAccess(QPaintDevice instance){
super(instance);
}
@QtUninvokable
public void initPainter(io.qt.gui.@Nullable QPainter painter){
QPaintDevice instance = instance();
QPaintDevice.Impl.initPainter_native_QPainter_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
@QtUninvokable
public int metric(io.qt.gui.QPaintDevice.@NonNull PaintDeviceMetric metric){
QPaintDevice instance = instance();
return QPaintDevice.Impl.metric_native_QPaintDevice_PaintDeviceMetric_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), metric.value());
}
@QtUninvokable
public io.qt.gui.@Nullable QPaintDevice redirected(io.qt.core.@Nullable QPoint offset){
QPaintDevice instance = instance();
return QPaintDevice.Impl.redirected_native_QPoint_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance), QtJambi_LibraryUtilities.internal.checkedNativeId(offset));
}
@QtUninvokable
public io.qt.gui.@Nullable QPainter sharedPainter(){
QPaintDevice instance = instance();
return QPaintDevice.Impl.sharedPainter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(instance));
}
public static MemberAccess of(QPaintDevice instance){
Class> callerClass = QtJambi_LibraryUtilities.internal.callerClassProvider().get();
if(!QPaintDevice.class.isAssignableFrom(callerClass) || !callerClass.isInstance(instance))
throw new RuntimeException("Access to restricted functions of class QPaintDevice is only granted from inside a user-implemented subclass.");
return QtJambi_LibraryUtilities.internal.findMemberAccess(instance, QPaintDevice.class, MemberAccess.class);
}
}
}