
io.qt.widgets.QGraphicsEffect Maven / Gradle / Ivy
package io.qt.widgets;
/**
* 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.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QGraphicsEffect.class);
@io.qt.NativeAccess
private static final class ConcreteWrapper extends QGraphicsEffect {
@io.qt.NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
protected void draw(io.qt.gui.QPainter painter){
draw_native_QPainter_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
@io.qt.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 io.qt.QtFlagEnumerator {
SourceAttached(1),
SourceDetached(2),
SourceBoundingRectChanged(4),
SourceInvalidated(8);
private ChangeFlag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public ChangeFlags asFlags() {
return new ChangeFlags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public ChangeFlags combined(ChangeFlag e) {
return new ChangeFlags(this, e);
}
/**
* Creates a new {@link ChangeFlags} from the entries.
* @param values entries
* @return new flag
*/
public static ChangeFlags flags(ChangeFlag ... values) {
return new ChangeFlags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static 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 io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link ChangeFlag}
*/
public static final class ChangeFlags extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0x9169d12f86dc2faaL;
/**
* Creates a new ChangeFlags where the flags in args
are set.
* @param args enum entries
*/
public ChangeFlags(ChangeFlag ... 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 ChangeFlags combined(ChangeFlag e){
return new ChangeFlags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final ChangeFlags setFlag(ChangeFlag 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 ChangeFlags setFlag(ChangeFlag e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this ChangeFlags.
* @return array of enum entries
*/
@Override
public final ChangeFlag[] flags(){
return super.flags(ChangeFlag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final ChangeFlags clone(){
return new ChangeFlags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(ChangeFlags other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QGraphicsEffect::PixmapPadMode
*/
@io.qt.QtUnlistedEnum
public enum PixmapPadMode implements io.qt.QtEnumerator {
NoPad(0),
PadToTransparentBorder(1),
PadToEffectiveBoundingRect(2);
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 PixmapPadMode resolve(int value) {
switch (value) {
case 0: return NoPad;
case 1: return PadToTransparentBorder;
case 2: return PadToEffectiveBoundingRect;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QGraphicsEffect::enabledChanged(bool)
*/
@io.qt.QtPropertyNotify(name="enabled")
public final Signal1<@io.qt.QtPrimitiveType Boolean> enabledChanged = new Signal1<>();
/**
* Overloaded constructor for {@link #QGraphicsEffect(io.qt.core.QObject)}
* with parent = null
.
*/
public QGraphicsEffect() {
this((io.qt.core.QObject)null);
}
/**
* See QGraphicsEffect::QGraphicsEffect(QObject*)
*/
public QGraphicsEffect(io.qt.core.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
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(){
return boundingRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QRectF boundingRect_native_constfct(long __this__nativeId);
/**
* See QGraphicsEffect::drawSource(QPainter*)
*/
@io.qt.QtUninvokable
protected final void drawSource(io.qt.gui.QPainter painter){
drawSource_native_QPainter_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(painter));
}
@io.qt.QtUninvokable
private native void drawSource_native_QPainter_ptr(long __this__nativeId, long painter);
/**
* See QGraphicsEffect::isEnabled()const
*/
@io.qt.QtPropertyReader(name="enabled")
@io.qt.QtUninvokable
public final boolean isEnabled(){
return isEnabled_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isEnabled_native_constfct(long __this__nativeId);
/**
* See QGraphicsEffect::setEnabled(bool)
*/
@io.qt.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);
/**
* Overloaded function for {@link #sourceBoundingRect(io.qt.core.Qt.CoordinateSystem)}
* with system = io.qt.core.Qt.CoordinateSystem.LogicalCoordinates
.
*/
@io.qt.QtUninvokable
protected final io.qt.core.QRectF sourceBoundingRect() {
return sourceBoundingRect(io.qt.core.Qt.CoordinateSystem.LogicalCoordinates);
}
/**
* See QGraphicsEffect::sourceBoundingRect(Qt::CoordinateSystem)const
*/
@io.qt.QtUninvokable
protected final io.qt.core.QRectF sourceBoundingRect(io.qt.core.Qt.CoordinateSystem system){
return sourceBoundingRect_native_Qt_CoordinateSystem_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), system.value());
}
@io.qt.QtUninvokable
private native io.qt.core.QRectF sourceBoundingRect_native_Qt_CoordinateSystem_constfct(long __this__nativeId, int system);
/**
* See QGraphicsEffect::sourceIsPixmap()const
*/
@io.qt.QtUninvokable
protected final boolean sourceIsPixmap(){
return sourceIsPixmap_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean sourceIsPixmap_native_constfct(long __this__nativeId);
/**
* 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
.
*/
@io.qt.QtUninvokable
protected final io.qt.gui.QPixmap sourcePixmap(io.qt.core.Qt.CoordinateSystem system, io.qt.core.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
*
*/
@io.qt.QtUninvokable
protected final io.qt.gui.QPixmap sourcePixmap(io.qt.core.Qt.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
*
*/
@io.qt.QtUninvokable
protected final io.qt.gui.QPixmap sourcePixmap() {
return sourcePixmap(io.qt.core.Qt.CoordinateSystem.LogicalCoordinates, (io.qt.core.QPoint)null, io.qt.widgets.QGraphicsEffect.PixmapPadMode.PadToEffectiveBoundingRect);
}
/**
* See QGraphicsEffect::sourcePixmap(Qt::CoordinateSystem,QPoint*,QGraphicsEffect::PixmapPadMode)const
*/
@io.qt.QtUninvokable
protected final io.qt.gui.QPixmap sourcePixmap(io.qt.core.Qt.CoordinateSystem system, io.qt.core.QPoint offset, io.qt.widgets.QGraphicsEffect.PixmapPadMode mode){
return sourcePixmap_native_Qt_CoordinateSystem_QPoint_ptr_QGraphicsEffect_PixmapPadMode_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), system.value(), offset, mode.value());
}
@io.qt.QtUninvokable
private native io.qt.gui.QPixmap sourcePixmap_native_Qt_CoordinateSystem_QPoint_ptr_QGraphicsEffect_PixmapPadMode_constfct(long __this__nativeId, int system, io.qt.core.QPoint 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()
*/
@io.qt.QtUninvokable
protected final void updateBoundingRect(){
updateBoundingRect_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void updateBoundingRect_native(long __this__nativeId);
/**
* See QGraphicsEffect::boundingRectFor(QRectF)const
*/
@io.qt.QtUninvokable
public io.qt.core.QRectF boundingRectFor(io.qt.core.QRectF sourceRect){
return boundingRectFor_native_cref_QRectF_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sourceRect));
}
@io.qt.QtUninvokable
private native io.qt.core.QRectF boundingRectFor_native_cref_QRectF_constfct(long __this__nativeId, long sourceRect);
/**
* See QGraphicsEffect::draw(QPainter*)
*/
@io.qt.QtUninvokable
protected abstract void draw(io.qt.gui.QPainter painter);
@io.qt.QtUninvokable
private native void draw_native_QPainter_ptr(long __this__nativeId, long painter);
/**
* Overloaded function for {@link #sourceChanged(io.qt.widgets.QGraphicsEffect.ChangeFlags)}.
*/
@io.qt.QtUninvokable
protected final void sourceChanged(io.qt.widgets.QGraphicsEffect.ChangeFlag ... flags){
sourceChanged(new io.qt.widgets.QGraphicsEffect.ChangeFlags(flags));
}
/**
* See QGraphicsEffect::sourceChanged(ChangeFlags)
*/
@io.qt.QtUninvokable
protected void sourceChanged(io.qt.widgets.QGraphicsEffect.ChangeFlags flags){
sourceChanged_native_QFlags_QGraphicsEffect_ChangeFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value());
}
@io.qt.QtUninvokable
private native void sourceChanged_native_QFlags_QGraphicsEffect_ChangeFlag_(long __this__nativeId, int flags);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QGraphicsEffect(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 QGraphicsEffect(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@io.qt.QtUninvokable
private static native void initialize_native(QGraphicsEffect instance, QDeclarativeConstructor constructor);
}