io.qt.widgets.QDockWidget Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Widget that can be docked inside a QMainWindow or floated as a top-level window on the desktop
* Java wrapper for Qt class QDockWidget
*/
public class QDockWidget extends io.qt.widgets.QWidget
{
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QDockWidget.class);
/**
* Java wrapper for Qt enum QDockWidget::DockWidgetFeature
*
* @see DockWidgetFeatures
*/
public enum DockWidgetFeature implements QtFlagEnumerator {
/**
* Representing QDockWidget:: DockWidgetClosable
*/
DockWidgetClosable(1),
/**
* Representing QDockWidget:: DockWidgetMovable
*/
DockWidgetMovable(2),
/**
* Representing QDockWidget:: DockWidgetFloatable
*/
DockWidgetFloatable(4),
/**
* Representing QDockWidget:: DockWidgetVerticalTitleBar
*/
DockWidgetVerticalTitleBar(8),
/**
* Representing QDockWidget:: DockWidgetFeatureMask
*/
DockWidgetFeatureMask(15),
/**
* Representing QDockWidget:: NoDockWidgetFeatures
*/
NoDockWidgetFeatures(0),
/**
* Representing QDockWidget:: Reserved
*/
Reserved(255);
static {
QtJambi_LibraryUtilities.initialize();
}
private DockWidgetFeature(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull DockWidgetFeatures asFlags() {
return new DockWidgetFeatures(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull DockWidgetFeatures combined(@NonNull DockWidgetFeature 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 DockWidgetFeatures cleared(@NonNull DockWidgetFeature e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link DockWidgetFeatures} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull DockWidgetFeatures flags(@Nullable DockWidgetFeature @NonNull... values) {
return new DockWidgetFeatures(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull DockWidgetFeature resolve(int value) {
switch (value) {
case 1: return DockWidgetClosable;
case 2: return DockWidgetMovable;
case 4: return DockWidgetFloatable;
case 8: return DockWidgetVerticalTitleBar;
case 15: return DockWidgetFeatureMask;
case 0: return NoDockWidgetFeatures;
case 255: return Reserved;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link DockWidgetFeature}
*/
public static final class DockWidgetFeatures extends QFlags implements Comparable {
private static final long serialVersionUID = 0x34be3cad6c1ffec1L;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new DockWidgetFeatures where the flags in args
are set.
* @param args enum entries
*/
public DockWidgetFeatures(@Nullable DockWidgetFeature @NonNull... args){
super(args);
}
/**
* Creates a new DockWidgetFeatures with given value
.
* @param value
*/
public DockWidgetFeatures(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new DockWidgetFeatures
*/
@Override
public final @NonNull DockWidgetFeatures combined(@StrictNonNull DockWidgetFeature e){
return new DockWidgetFeatures(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull DockWidgetFeatures setFlag(@Nullable DockWidgetFeature 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 DockWidgetFeatures setFlag(@Nullable DockWidgetFeature 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 DockWidgetFeatures.
* @return array of enum entries
*/
@Override
public final @NonNull DockWidgetFeature @NonNull[] flags(){
return super.flags(DockWidgetFeature.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull DockWidgetFeatures clone(){
return new DockWidgetFeatures(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull DockWidgetFeatures other){
return Integer.compare(value(), other.value());
}
}
/**
* See QDockWidget:: allowedAreasChanged(Qt::DockWidgetAreas)
*/
@QtPropertyNotify(name="allowedAreas")
public final @NonNull Signal1 allowedAreasChanged = new Signal1<>();
/**
* See QDockWidget:: dockLocationChanged(Qt::DockWidgetArea)
*/
public final @NonNull Signal1 dockLocationChanged = new Signal1<>();
/**
* See QDockWidget:: featuresChanged(QDockWidget::DockWidgetFeatures)
*/
@QtPropertyNotify(name="features")
public final @NonNull Signal1 featuresChanged = new Signal1<>();
/**
* See QDockWidget:: topLevelChanged(bool)
*/
public final @NonNull Signal1 topLevelChanged = new Signal1<>();
/**
* See QDockWidget:: visibilityChanged(bool)
*/
public final @NonNull Signal1 visibilityChanged = new Signal1<>();
/**
* See QDockWidget:: QDockWidget(QString, QWidget*, Qt::WindowFlags)
*/
public QDockWidget(java.lang.@NonNull String title, io.qt.widgets.@Nullable QWidget parent, io.qt.core.Qt.@NonNull WindowFlags flags){
super((QPrivateConstructor)null);
initialize_native(this, title, parent, flags);
}
private native static void initialize_native(QDockWidget instance, java.lang.String title, io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowFlags flags);
/**
* See QDockWidget:: QDockWidget(QWidget*, Qt::WindowFlags)
*/
public QDockWidget(io.qt.widgets.@Nullable QWidget parent, io.qt.core.Qt.@NonNull WindowFlags flags){
super((QPrivateConstructor)null);
initialize_native(this, parent, flags);
}
private native static void initialize_native(QDockWidget instance, io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowFlags flags);
/**
* See QDockWidget:: allowedAreas()const
*/
@QtPropertyReader(name="allowedAreas")
@QtUninvokable
public final io.qt.core.Qt.@NonNull DockWidgetAreas allowedAreas(){
return new io.qt.core.Qt.DockWidgetAreas(allowedAreas_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int allowedAreas_native_constfct(long __this__nativeId);
/**
* See QDockWidget:: features()const
*/
@QtPropertyReader(name="features")
@QtUninvokable
public final io.qt.widgets.QDockWidget.@NonNull DockWidgetFeatures features(){
return new io.qt.widgets.QDockWidget.DockWidgetFeatures(features_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int features_native_constfct(long __this__nativeId);
/**
* See QDockWidget:: isAreaAllowed(Qt::DockWidgetArea)const
*/
@QtUninvokable
public final boolean isAreaAllowed(io.qt.core.Qt.@NonNull DockWidgetArea area){
return isAreaAllowed_native_Qt_DockWidgetArea_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), area.value());
}
@QtUninvokable
private native boolean isAreaAllowed_native_Qt_DockWidgetArea_constfct(long __this__nativeId, int area);
/**
* See QDockWidget:: isFloating()const
*/
@QtPropertyReader(name="floating")
@QtUninvokable
public final boolean isFloating(){
return isFloating_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isFloating_native_constfct(long __this__nativeId);
/**
* See QDockWidget:: setAllowedAreas(Qt::DockWidgetAreas)
*/
@QtPropertyWriter(name="allowedAreas")
@QtUninvokable
public final void setAllowedAreas(io.qt.core.Qt.@NonNull DockWidgetAreas areas){
setAllowedAreas_native_Qt_DockWidgetAreas(QtJambi_LibraryUtilities.internal.nativeId(this), areas.value());
}
@QtUninvokable
private native void setAllowedAreas_native_Qt_DockWidgetAreas(long __this__nativeId, int areas);
/**
* See QDockWidget:: setFeatures(QDockWidget::DockWidgetFeatures)
*/
@QtPropertyWriter(name="features")
@QtUninvokable
public final void setFeatures(io.qt.widgets.QDockWidget.@NonNull DockWidgetFeatures features){
setFeatures_native_QDockWidget_DockWidgetFeatures(QtJambi_LibraryUtilities.internal.nativeId(this), features.value());
}
@QtUninvokable
private native void setFeatures_native_QDockWidget_DockWidgetFeatures(long __this__nativeId, int features);
/**
* See QDockWidget:: setFloating(bool)
*/
@QtPropertyWriter(name="floating")
@QtUninvokable
public final void setFloating(boolean floating){
setFloating_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), floating);
}
@QtUninvokable
private native void setFloating_native_bool(long __this__nativeId, boolean floating);
/**
* See QDockWidget:: setTitleBarWidget(QWidget*)
*/
@QtUninvokable
public final void setTitleBarWidget(io.qt.widgets.@Nullable QWidget widget){
setTitleBarWidget_native_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(widget));
}
@QtUninvokable
private native void setTitleBarWidget_native_QWidget_ptr(long __this__nativeId, long widget);
/**
* See QDockWidget:: setWidget(QWidget*)
*/
@QtUninvokable
public final void setWidget(io.qt.widgets.@Nullable QWidget widget){
setWidget_native_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(widget));
}
@QtUninvokable
private native void setWidget_native_QWidget_ptr(long __this__nativeId, long widget);
/**
* See QDockWidget:: titleBarWidget()const
*/
@QtUninvokable
public final io.qt.widgets.@Nullable QWidget titleBarWidget(){
return titleBarWidget_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.widgets.QWidget titleBarWidget_native_constfct(long __this__nativeId);
/**
* See QDockWidget:: toggleViewAction()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QAction toggleViewAction(){
return toggleViewAction_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QAction toggleViewAction_native_constfct(long __this__nativeId);
/**
* See QDockWidget:: widget()const
*/
@QtUninvokable
public final io.qt.widgets.@Nullable QWidget widget(){
return widget_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.widgets.QWidget widget_native_constfct(long __this__nativeId);
/**
* See QWidget:: changeEvent(QEvent*)
*/
@QtUninvokable
@Override
protected void changeEvent(io.qt.core.@Nullable QEvent event){
changeEvent_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@QtUninvokable
private native void changeEvent_native_QEvent_ptr(long __this__nativeId, long event);
/**
* See QWidget:: closeEvent(QCloseEvent*)
*/
@QtUninvokable
@Override
protected void closeEvent(io.qt.gui.@Nullable QCloseEvent event){
closeEvent_native_QCloseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@QtUninvokable
private native void closeEvent_native_QCloseEvent_ptr(long __this__nativeId, long event);
/**
*
*/
@QtUninvokable
@Override
public boolean event(io.qt.core.@Nullable QEvent event){
return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@QtUninvokable
private native boolean event_native_QEvent_ptr(long __this__nativeId, long event);
/**
* See QDockWidget:: initStyleOption(QStyleOptionDockWidget*)const
*/
@QtUninvokable
protected void initStyleOption(io.qt.widgets.@Nullable QStyleOptionDockWidget option){
initStyleOption_native_QStyleOptionDockWidget_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(option));
}
@QtUninvokable
private native void initStyleOption_native_QStyleOptionDockWidget_ptr_constfct(long __this__nativeId, long option);
/**
* See QWidget:: paintEvent(QPaintEvent*)
*/
@QtUninvokable
@Override
protected void paintEvent(io.qt.gui.@Nullable QPaintEvent event){
paintEvent_native_QPaintEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@QtUninvokable
private native void paintEvent_native_QPaintEvent_ptr(long __this__nativeId, long event);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QDockWidget(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QDockWidget(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QDockWidget instance, QDeclarativeConstructor constructor);
/**
* See operator<<(QDebug, const QDockWidget*)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QDockWidget(java.lang.String, io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with flags = new io.qt.core.Qt.WindowFlags(0)
.
*/
public QDockWidget(java.lang.@NonNull String title, io.qt.widgets.@Nullable QWidget parent) {
this(title, parent, new io.qt.core.Qt.WindowFlags(0));
}
/**
* Overloaded constructor for {@link #QDockWidget(java.lang.String, io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with:
* parent = null
* flags = new io.qt.core.Qt.WindowFlags(0)
*
*/
public QDockWidget(java.lang.@NonNull String title) {
this(title, (io.qt.widgets.QWidget)null, new io.qt.core.Qt.WindowFlags(0));
}
/**
* Overloaded constructor for {@link #QDockWidget(java.lang.String, io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}.
*/
public QDockWidget(java.lang.@NonNull String title, io.qt.widgets.@Nullable QWidget parent, io.qt.core.Qt.@NonNull WindowType @NonNull... flags) {
this(title, parent, new io.qt.core.Qt.WindowFlags(flags));
}
/**
* Overloaded constructor for {@link #QDockWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with flags = new io.qt.core.Qt.WindowFlags(0)
.
*/
public QDockWidget(io.qt.widgets.@Nullable QWidget parent) {
this(parent, new io.qt.core.Qt.WindowFlags(0));
}
/**
* Overloaded constructor for {@link #QDockWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}
* with:
* parent = null
* flags = new io.qt.core.Qt.WindowFlags(0)
*
*/
public QDockWidget() {
this((io.qt.widgets.QWidget)null, new io.qt.core.Qt.WindowFlags(0));
}
/**
* Overloaded constructor for {@link #QDockWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}.
*/
public QDockWidget(io.qt.widgets.@Nullable QWidget parent, io.qt.core.Qt.@NonNull WindowType @NonNull... flags) {
this(parent, new io.qt.core.Qt.WindowFlags(flags));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #allowedAreas()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.core.Qt.@NonNull DockWidgetAreas getAllowedAreas() {
return allowedAreas();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #features()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.widgets.QDockWidget.@NonNull DockWidgetFeatures getFeatures() {
return features();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #isFloating()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final boolean getFloating() {
return isFloating();
}
/**
* Overloaded function for {@link #setAllowedAreas(io.qt.core.Qt.DockWidgetAreas)}.
*/
@QtUninvokable
public final void setAllowedAreas(io.qt.core.Qt.@NonNull DockWidgetArea @NonNull... areas) {
setAllowedAreas(new io.qt.core.Qt.DockWidgetAreas(areas));
}
/**
* Overloaded function for {@link #setFeatures(io.qt.widgets.QDockWidget.DockWidgetFeatures)}.
*/
@QtUninvokable
public final void setFeatures(io.qt.widgets.QDockWidget.@NonNull DockWidgetFeature @NonNull... features) {
setFeatures(new io.qt.widgets.QDockWidget.DockWidgetFeatures(features));
}
}