io.qt.widgets.QStyleOptionFrame Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Used to describe the parameters for drawing a frame
* Java wrapper for Qt class QStyleOptionFrame
*/
public class QStyleOptionFrame extends io.qt.widgets.QStyleOption
implements java.lang.Cloneable
{
/**
* Java wrapper for Qt enum QStyleOptionFrame::FrameFeature
*
* @see FrameFeatures
*/
public enum FrameFeature implements QtFlagEnumerator {
/**
* Representing QStyleOptionFrame:: None
*/
None(0),
/**
* Representing QStyleOptionFrame:: Flat
*/
Flat(1),
/**
* Representing QStyleOptionFrame:: Rounded
*/
Rounded(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private FrameFeature(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull FrameFeatures asFlags() {
return new FrameFeatures(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull FrameFeatures combined(@NonNull FrameFeature 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 FrameFeatures cleared(@NonNull FrameFeature e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link FrameFeatures} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull FrameFeatures flags(@Nullable FrameFeature @NonNull... values) {
return new FrameFeatures(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull FrameFeature resolve(int value) {
switch (value) {
case 0: return None;
case 1: return Flat;
case 2: return Rounded;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link FrameFeature}
*/
public static final class FrameFeatures extends QFlags implements Comparable {
private static final long serialVersionUID = 0xa33506677cd8a4e6L;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new FrameFeatures where the flags in args
are set.
* @param args enum entries
*/
public FrameFeatures(@Nullable FrameFeature @NonNull... args){
super(args);
}
/**
* Creates a new FrameFeatures with given value
.
* @param value
*/
public FrameFeatures(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new FrameFeatures
*/
@Override
public final @NonNull FrameFeatures combined(@StrictNonNull FrameFeature e){
return new FrameFeatures(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull FrameFeatures setFlag(@Nullable FrameFeature 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 FrameFeatures setFlag(@Nullable FrameFeature 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 FrameFeatures.
* @return array of enum entries
*/
@Override
public final @NonNull FrameFeature @NonNull[] flags(){
return super.flags(FrameFeature.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull FrameFeatures clone(){
return new FrameFeatures(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull FrameFeatures other){
return Integer.compare(value(), other.value());
}
}
/**
* See QStyleOptionFrame:: QStyleOptionFrame()
*/
public QStyleOptionFrame(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QStyleOptionFrame instance);
/**
* See QStyleOptionFrame:: QStyleOptionFrame(QStyleOptionFrame)
*/
public QStyleOptionFrame(io.qt.widgets.@NonNull QStyleOptionFrame other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QStyleOptionFrame instance, io.qt.widgets.QStyleOptionFrame other);
/**
* See QStyleOptionFrame:: operator=(QStyleOptionFrame)
*/
@QtUninvokable
public final void assign(io.qt.widgets.@NonNull QStyleOptionFrame arg__1){
assign_native_cref_QStyleOptionFrame(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void assign_native_cref_QStyleOptionFrame(long __this__nativeId, long arg__1);
/**
* Bitwise OR of the features that describe this frame
* See QStyleOptionFrame:: features
*/
@QtUninvokable
public final void setFeatures(io.qt.widgets.QStyleOptionFrame.@NonNull FrameFeatures features){
setFeatures_native_cref_QStyleOptionFrame_FrameFeatures(QtJambi_LibraryUtilities.internal.nativeId(this), features.value());
}
@QtUninvokable
private native void setFeatures_native_cref_QStyleOptionFrame_FrameFeatures(long __this__nativeId, int features);
/**
* Bitwise OR of the features that describe this frame
* See QStyleOptionFrame:: features
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionFrame.@NonNull FrameFeatures features(){
return new io.qt.widgets.QStyleOptionFrame.FrameFeatures(features_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int features_native(long __this__nativeId);
/**
* This property holds the frame shape value of the frame
* See QStyleOptionFrame:: frameShape
*/
@QtUninvokable
public final void setFrameShape(io.qt.widgets.QFrame.@NonNull Shape frameShape){
setFrameShape_native_cref_QFrame_Shape(QtJambi_LibraryUtilities.internal.nativeId(this), frameShape.value());
}
@QtUninvokable
private native void setFrameShape_native_cref_QFrame_Shape(long __this__nativeId, int frameShape);
/**
* This property holds the frame shape value of the frame
* See QStyleOptionFrame:: frameShape
*/
@QtUninvokable
public final io.qt.widgets.QFrame.@NonNull Shape frameShape(){
return io.qt.widgets.QFrame.Shape.resolve(frameShape_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int frameShape_native(long __this__nativeId);
/**
* The line width for drawing the frame
* See QStyleOptionFrame:: lineWidth
*/
@QtUninvokable
public final void setLineWidth(int lineWidth){
setLineWidth_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), lineWidth);
}
@QtUninvokable
private native void setLineWidth_native_int(long __this__nativeId, int lineWidth);
/**
* The line width for drawing the frame
* See QStyleOptionFrame:: lineWidth
*/
@QtUninvokable
public final int lineWidth(){
return lineWidth_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int lineWidth_native(long __this__nativeId);
/**
* The mid-line width for drawing the frame
* See QStyleOptionFrame:: midLineWidth
*/
@QtUninvokable
public final void setMidLineWidth(int midLineWidth){
setMidLineWidth_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), midLineWidth);
}
@QtUninvokable
private native void setMidLineWidth_native_int(long __this__nativeId, int midLineWidth);
/**
* The mid-line width for drawing the frame
* See QStyleOptionFrame:: midLineWidth
*/
@QtUninvokable
public final int midLineWidth(){
return midLineWidth_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int midLineWidth_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QStyleOptionFrame(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QStyleOptionFrame:: QStyleOptionFrame(QStyleOptionFrame)
*/
@QtUninvokable
@Override
public QStyleOptionFrame clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QStyleOptionFrame clone_native(long __this_nativeId);
/**
* @deprecated Use {@link #assign(io.qt.widgets.QStyleOptionFrame)} instead.
*/
@Deprecated
@QtUninvokable
public final void set(io.qt.widgets.@NonNull QStyleOptionFrame arg__1) {
assign(arg__1);
}
/**
* Overloaded function for {@link #setFeatures(io.qt.widgets.QStyleOptionFrame.FrameFeatures)}.
*/
@QtUninvokable
public final void setFeatures(io.qt.widgets.QStyleOptionFrame.@NonNull FrameFeature @NonNull... features) {
setFeatures(new io.qt.widgets.QStyleOptionFrame.FrameFeatures(features));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #features()} instead.
*/
@QtUninvokable
public final io.qt.widgets.QStyleOptionFrame.@NonNull FrameFeatures getFeatures() {
return features();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #frameShape()} instead.
*/
@QtUninvokable
public final io.qt.widgets.QFrame.@NonNull Shape getFrameShape() {
return frameShape();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #lineWidth()} instead.
*/
@QtUninvokable
public final int getLineWidth() {
return lineWidth();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #midLineWidth()} instead.
*/
@QtUninvokable
public final int getMidLineWidth() {
return midLineWidth();
}
}