io.qt.widgets.QStyleOption Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Stores the parameters used by QStyle functions
* Java wrapper for Qt class QStyleOption
*/
public class QStyleOption extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
@QtPropertyMember(enabled=false)
private Object __rcStyleObject = null;
/**
* See QStyleOption:: QStyleOption(QStyleOption)
*/
public QStyleOption(io.qt.widgets.@NonNull QStyleOption other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QStyleOption instance, io.qt.widgets.QStyleOption other);
/**
* See QStyleOption:: QStyleOption(int, int)
*/
public QStyleOption(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QStyleOption instance);
/**
* See QStyleOption:: initFrom(const QWidget*)
*/
@QtUninvokable
public final void initFrom(io.qt.widgets.@Nullable QWidget w){
initFrom_native_const_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(w));
}
@QtUninvokable
private native void initFrom_native_const_QWidget_ptr(long __this__nativeId, long w);
/**
* See QStyleOption:: operator=(QStyleOption)
*/
@QtUninvokable
public final void assign(io.qt.widgets.@NonNull QStyleOption other){
assign_native_cref_QStyleOption(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QStyleOption(long __this__nativeId, long other);
/**
* The text layout direction that should be used when drawing text in the control
*
*/
@QtUninvokable
public final void setDirection(io.qt.core.Qt.@NonNull LayoutDirection direction){
setDirection_native_cref_Qt_LayoutDirection(QtJambi_LibraryUtilities.internal.nativeId(this), direction.value());
}
@QtUninvokable
private native void setDirection_native_cref_Qt_LayoutDirection(long __this__nativeId, int direction);
/**
* The text layout direction that should be used when drawing text in the control
*
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull LayoutDirection direction(){
return io.qt.core.Qt.LayoutDirection.resolve(direction_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int direction_native(long __this__nativeId);
/**
* The font metrics that should be used when drawing text in the control
*
*/
@QtUninvokable
public final void setFontMetrics(io.qt.gui.@NonNull QFontMetrics fontMetrics){
setFontMetrics_native_cref_QFontMetrics(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(fontMetrics));
}
@QtUninvokable
private native void setFontMetrics_native_cref_QFontMetrics(long __this__nativeId, long fontMetrics);
/**
* The font metrics that should be used when drawing text in the control
*
*/
@QtUninvokable
public final io.qt.gui.@NonNull QFontMetrics fontMetrics(){
return fontMetrics_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QFontMetrics fontMetrics_native(long __this__nativeId);
/**
* The palette that should be used when painting the control
*
*/
@QtUninvokable
public final void setPalette(io.qt.gui.@NonNull QPalette palette){
setPalette_native_cref_QPalette(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(palette));
}
@QtUninvokable
private native void setPalette_native_cref_QPalette(long __this__nativeId, long palette);
/**
* The palette that should be used when painting the control
*
*/
@QtUninvokable
public final io.qt.gui.@NonNull QPalette palette(){
return palette_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QPalette palette_native(long __this__nativeId);
/**
* The area that should be used for various calculations and painting
*
*/
@QtUninvokable
public final void setRect(io.qt.core.@NonNull QRect rect){
setRect_native_cref_QRect(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rect));
}
@QtUninvokable
private native void setRect_native_cref_QRect(long __this__nativeId, long rect);
/**
* The area that should be used for various calculations and painting
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QRect rect(){
return rect_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QRect rect_native(long __this__nativeId);
/**
* The style flags that are used when drawing the control
*
*/
@QtUninvokable
public final void setState(io.qt.widgets.QStyle.@NonNull State state){
setState_native_cref_QStyle_State(QtJambi_LibraryUtilities.internal.nativeId(this), state.value());
}
@QtUninvokable
private native void setState_native_cref_QStyle_State(long __this__nativeId, int state);
/**
* The style flags that are used when drawing the control
*
*/
@QtUninvokable
public final io.qt.widgets.QStyle.@NonNull State state(){
return new io.qt.widgets.QStyle.State(state_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int state_native(long __this__nativeId);
/**
* The object being styled
*
*/
@QtUninvokable
public final void setStyleObject(io.qt.core.@Nullable QObject styleObject){
setStyleObject_native_QObject_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(styleObject));
__rcStyleObject = styleObject;
}
@QtUninvokable
private native void setStyleObject_native_QObject_ptr(long __this__nativeId, long styleObject);
/**
* The object being styled
*
*/
@QtUninvokable
public final io.qt.core.@Nullable QObject styleObject(){
return styleObject_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QObject styleObject_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QStyleOption(QPrivateConstructor p) { super(p); }
/**
* See operator<<(QDebug, QStyleOption)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QStyleOption:: QStyleOption(QStyleOption)
*/
@QtUninvokable
@Override
public QStyleOption clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QStyleOption clone_native(long __this_nativeId);
/**
* @deprecated Use {@link #assign(io.qt.widgets.QStyleOption)} instead.
*/
@Deprecated
@QtUninvokable
public final void set(io.qt.widgets.@NonNull QStyleOption other) {
assign(other);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #direction()} instead.
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull LayoutDirection getDirection() {
return direction();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #fontMetrics()} instead.
*/
@QtUninvokable
public final io.qt.gui.@NonNull QFontMetrics getFontMetrics() {
return fontMetrics();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #palette()} instead.
*/
@QtUninvokable
public final io.qt.gui.@NonNull QPalette getPalette() {
return palette();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #rect()} instead.
*/
@QtUninvokable
public final io.qt.core.@NonNull QRect getRect() {
return rect();
}
/**
* Overloaded function for {@link #setState(io.qt.widgets.QStyle.State)}.
*/
@QtUninvokable
public final void setState(io.qt.widgets.QStyle.@NonNull StateFlag @NonNull... state) {
setState(new io.qt.widgets.QStyle.State(state));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #state()} instead.
*/
@QtUninvokable
public final io.qt.widgets.QStyle.@NonNull State getState() {
return state();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #styleObject()} instead.
*/
@QtUninvokable
public final io.qt.core.@Nullable QObject getStyleObject() {
return styleObject();
}
}