io.qt.widgets.QGraphicsEffect Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* The base class for all graphics effects
* Java wrapper for Qt class QGraphicsEffect
*/
public abstract class QGraphicsEffect extends io.qt.core.QObject
{
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(QGraphicsEffect.class);
@NativeAccess
private static final class ConcreteWrapper extends QGraphicsEffect {
@NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@QtUninvokable
protected void draw(io.qt.gui.@Nullable QPainter painter){
draw_native_QPainter_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
@QtUninvokable
private native void draw_native_QPainter_ptr(long __this__nativeId, long painter);
}
/**
* Java wrapper for Qt enum QGraphicsEffect::ChangeFlag
*
* @see ChangeFlags
*/
public enum ChangeFlag implements QtFlagEnumerator {
/**
* Representing QGraphicsEffect:: SourceAttached
*/
SourceAttached(1),
/**
* Representing QGraphicsEffect:: SourceDetached
*/
SourceDetached(2),
/**
* Representing QGraphicsEffect:: SourceBoundingRectChanged
*/
SourceBoundingRectChanged(4),
/**
* Representing QGraphicsEffect:: SourceInvalidated
*/
SourceInvalidated(8);
static {
QtJambi_LibraryUtilities.initialize();
}
private ChangeFlag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull ChangeFlags asFlags() {
return new ChangeFlags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull ChangeFlags combined(@NonNull ChangeFlag e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull ChangeFlags cleared(@NonNull ChangeFlag e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link ChangeFlags} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull ChangeFlags flags(@Nullable ChangeFlag @NonNull... values) {
return new ChangeFlags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull ChangeFlag resolve(int value) {
switch (value) {
case 1: return SourceAttached;
case 2: return SourceDetached;
case 4: return SourceBoundingRectChanged;
case 8: return SourceInvalidated;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link ChangeFlag}
*/
public static final class ChangeFlags extends QFlags implements Comparable {
private static final long serialVersionUID = 0x9169d12f86dc2faaL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new ChangeFlags where the flags in args
are set.
* @param args enum entries
*/
public ChangeFlags(@Nullable ChangeFlag @NonNull... args){
super(args);
}
/**
* Creates a new ChangeFlags with given value
.
* @param value
*/
public ChangeFlags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new ChangeFlags
*/
@Override
public final @NonNull ChangeFlags combined(@StrictNonNull ChangeFlag e){
return new ChangeFlags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull ChangeFlags setFlag(@Nullable ChangeFlag e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final @NonNull ChangeFlags setFlag(@Nullable ChangeFlag e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this ChangeFlags.
* @return array of enum entries
*/
@Override
public final @NonNull ChangeFlag @NonNull[] flags(){
return super.flags(ChangeFlag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull ChangeFlags clone(){
return new ChangeFlags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull ChangeFlags other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QGraphicsEffect::PixmapPadMode
*/
@QtUnlistedEnum
public enum PixmapPadMode implements QtEnumerator {
/**
* Representing QGraphicsEffect:: NoPad
*/
NoPad(0),
/**
* Representing QGraphicsEffect:: PadToTransparentBorder
*/
PadToTransparentBorder(1),
/**
* Representing QGraphicsEffect:: PadToEffectiveBoundingRect
*/
PadToEffectiveBoundingRect(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private PixmapPadMode(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 PixmapPadMode resolve(int value) {
switch (value) {
case 0: return NoPad;
case 1: return PadToTransparentBorder;
case 2: return PadToEffectiveBoundingRect;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QGraphicsEffect:: enabledChanged(bool)
*/
@QtPropertyNotify(name="enabled")
public final @NonNull Signal1 enabledChanged = new Signal1<>();
/**
* See QGraphicsEffect:: QGraphicsEffect(QObject*)
*/
public QGraphicsEffect(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QGraphicsEffect instance, io.qt.core.QObject parent);
/**
* See QGraphicsEffect:: boundingRect()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QRectF boundingRect(){
return boundingRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QRectF boundingRect_native_constfct(long __this__nativeId);
/**
* See QGraphicsEffect:: drawSource(QPainter*)
*/
@QtUninvokable
protected final void drawSource(io.qt.gui.@Nullable QPainter painter){
drawSource_native_QPainter_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
@QtUninvokable
private native void drawSource_native_QPainter_ptr(long __this__nativeId, long painter);
/**
* See QGraphicsEffect:: isEnabled()const
*/
@QtPropertyReader(name="enabled")
@QtUninvokable
public final boolean isEnabled(){
return isEnabled_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isEnabled_native_constfct(long __this__nativeId);
/**
* See QGraphicsEffect:: setEnabled(bool)
*/
@QtPropertyWriter(name="enabled")
public final void setEnabled(boolean enable){
setEnabled_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enable);
}
private native void setEnabled_native_bool(long __this__nativeId, boolean enable);
/**
* See QGraphicsEffect:: sourceBoundingRect(Qt::CoordinateSystem)const
*/
@QtUninvokable
protected final io.qt.core.@NonNull QRectF sourceBoundingRect(io.qt.core.Qt.@NonNull CoordinateSystem system){
return sourceBoundingRect_native_Qt_CoordinateSystem_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), system.value());
}
@QtUninvokable
private native io.qt.core.QRectF sourceBoundingRect_native_Qt_CoordinateSystem_constfct(long __this__nativeId, int system);
/**
* See QGraphicsEffect:: sourceIsPixmap()const
*/
@QtUninvokable
protected final boolean sourceIsPixmap(){
return sourceIsPixmap_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean sourceIsPixmap_native_constfct(long __this__nativeId);
/**
* See QGraphicsEffect:: sourcePixmap(Qt::CoordinateSystem, QPoint*, QGraphicsEffect::PixmapPadMode)const
*/
@QtUninvokable
protected final io.qt.gui.@NonNull QPixmap sourcePixmap(io.qt.core.Qt.@NonNull CoordinateSystem system, io.qt.core.@Nullable QPoint offset, io.qt.widgets.QGraphicsEffect.@NonNull PixmapPadMode mode){
return sourcePixmap_native_Qt_CoordinateSystem_QPoint_ptr_QGraphicsEffect_PixmapPadMode_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), system.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(offset), mode.value());
}
@QtUninvokable
private native io.qt.gui.QPixmap sourcePixmap_native_Qt_CoordinateSystem_QPoint_ptr_QGraphicsEffect_PixmapPadMode_constfct(long __this__nativeId, int system, long offset, int mode);
/**
*
*/
public final void update(){
update_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void update_native(long __this__nativeId);
/**
* See QGraphicsEffect:: updateBoundingRect()
*/
@QtUninvokable
protected final void updateBoundingRect(){
updateBoundingRect_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void updateBoundingRect_native(long __this__nativeId);
/**
* See QGraphicsEffect:: boundingRectFor(QRectF)const
*/
@QtUninvokable
public io.qt.core.@NonNull QRectF boundingRectFor(io.qt.core.@NonNull QRectF sourceRect){
return boundingRectFor_native_cref_QRectF_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sourceRect));
}
@QtUninvokable
private native io.qt.core.QRectF boundingRectFor_native_cref_QRectF_constfct(long __this__nativeId, long sourceRect);
/**
* See QGraphicsEffect:: draw(QPainter*)
*/
@QtUninvokable
protected abstract void draw(io.qt.gui.@Nullable QPainter painter);
@QtUninvokable
private native void draw_native_QPainter_ptr(long __this__nativeId, long painter);
/**
* See QGraphicsEffect:: sourceChanged(QGraphicsEffect::ChangeFlags)
*/
@QtUninvokable
protected void sourceChanged(io.qt.widgets.QGraphicsEffect.@NonNull ChangeFlags flags){
sourceChanged_native_QGraphicsEffect_ChangeFlags(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value());
}
@QtUninvokable
private native void sourceChanged_native_QGraphicsEffect_ChangeFlags(long __this__nativeId, int flags);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QGraphicsEffect(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QGraphicsEffect(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QGraphicsEffect instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QGraphicsEffect(io.qt.core.QObject)}
* with parent = null
.
*/
public QGraphicsEffect() {
this((io.qt.core.QObject)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #isEnabled()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final boolean getEnabled() {
return isEnabled();
}
/**
* Overloaded function for {@link #sourceBoundingRect(io.qt.core.Qt.CoordinateSystem)}
* with system = io.qt.core.Qt.CoordinateSystem.LogicalCoordinates
.
*/
@QtUninvokable
protected final io.qt.core.@NonNull QRectF sourceBoundingRect() {
return sourceBoundingRect(io.qt.core.Qt.CoordinateSystem.LogicalCoordinates);
}
/**
* Overloaded function for {@link #sourcePixmap(io.qt.core.Qt.CoordinateSystem, io.qt.core.QPoint, io.qt.widgets.QGraphicsEffect.PixmapPadMode)}
* with mode = io.qt.widgets.QGraphicsEffect.PixmapPadMode.PadToEffectiveBoundingRect
.
*/
@QtUninvokable
protected final io.qt.gui.@NonNull QPixmap sourcePixmap(io.qt.core.Qt.@NonNull CoordinateSystem system, io.qt.core.@Nullable QPoint offset) {
return sourcePixmap(system, offset, io.qt.widgets.QGraphicsEffect.PixmapPadMode.PadToEffectiveBoundingRect);
}
/**
* Overloaded function for {@link #sourcePixmap(io.qt.core.Qt.CoordinateSystem, io.qt.core.QPoint, io.qt.widgets.QGraphicsEffect.PixmapPadMode)}
* with:
* offset = null
* mode = io.qt.widgets.QGraphicsEffect.PixmapPadMode.PadToEffectiveBoundingRect
*
*/
@QtUninvokable
protected final io.qt.gui.@NonNull QPixmap sourcePixmap(io.qt.core.Qt.@NonNull CoordinateSystem system) {
return sourcePixmap(system, (io.qt.core.QPoint)null, io.qt.widgets.QGraphicsEffect.PixmapPadMode.PadToEffectiveBoundingRect);
}
/**
* Overloaded function for {@link #sourcePixmap(io.qt.core.Qt.CoordinateSystem, io.qt.core.QPoint, io.qt.widgets.QGraphicsEffect.PixmapPadMode)}
* with:
* system = io.qt.core.Qt.CoordinateSystem.LogicalCoordinates
* offset = null
* mode = io.qt.widgets.QGraphicsEffect.PixmapPadMode.PadToEffectiveBoundingRect
*
*/
@QtUninvokable
protected final io.qt.gui.@NonNull QPixmap sourcePixmap() {
return sourcePixmap(io.qt.core.Qt.CoordinateSystem.LogicalCoordinates, (io.qt.core.QPoint)null, io.qt.widgets.QGraphicsEffect.PixmapPadMode.PadToEffectiveBoundingRect);
}
/**
* Overloaded function for {@link #boundingRectFor(io.qt.core.QRectF)}.
*/
@QtUninvokable
public final io.qt.core.@NonNull QRectF boundingRectFor(io.qt.core.@NonNull QRect sourceRect) {
return boundingRectFor(new io.qt.core.QRectF(sourceRect));
}
/**
* Overloaded function for {@link #sourceChanged(io.qt.widgets.QGraphicsEffect.ChangeFlags)}.
*/
@QtUninvokable
protected final void sourceChanged(io.qt.widgets.QGraphicsEffect.@NonNull ChangeFlag @NonNull... flags) {
sourceChanged(new io.qt.widgets.QGraphicsEffect.ChangeFlags(flags));
}
}