io.qt.widgets.QDockWidget Maven / Gradle / Ivy
package io.qt.widgets;
/**
* 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.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QDockWidget.class);
/**
* Java wrapper for Qt enum QDockWidget::DockWidgetFeature
*
* @see DockWidgetFeatures
*/
public enum DockWidgetFeature implements io.qt.QtFlagEnumerator {
DockWidgetClosable(1),
DockWidgetMovable(2),
DockWidgetFloatable(4),
DockWidgetVerticalTitleBar(8),
DockWidgetFeatureMask(15),
NoDockWidgetFeatures(0),
Reserved(255);
private DockWidgetFeature(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public DockWidgetFeatures asFlags() {
return new DockWidgetFeatures(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public DockWidgetFeatures combined(DockWidgetFeature e) {
return new DockWidgetFeatures(this, e);
}
/**
* Creates a new {@link DockWidgetFeatures} from the entries.
* @param values entries
* @return new flag
*/
public static DockWidgetFeatures flags(DockWidgetFeature ... values) {
return new DockWidgetFeatures(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static 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 io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link DockWidgetFeature}
*/
public static final class DockWidgetFeatures extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0x34be3cad6c1ffec1L;
/**
* Creates a new DockWidgetFeatures where the flags in args
are set.
* @param args enum entries
*/
public DockWidgetFeatures(DockWidgetFeature ... 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 DockWidgetFeatures combined(DockWidgetFeature e){
return new DockWidgetFeatures(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final DockWidgetFeatures setFlag(DockWidgetFeature 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 DockWidgetFeatures setFlag(DockWidgetFeature e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this DockWidgetFeatures.
* @return array of enum entries
*/
@Override
public final DockWidgetFeature[] flags(){
return super.flags(DockWidgetFeature.values());
}
/**
* {@inheritDoc}
*/
@Override
public final DockWidgetFeatures clone(){
return new DockWidgetFeatures(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(DockWidgetFeatures other){
return Integer.compare(value(), other.value());
}
}
/**
* See QDockWidget::allowedAreasChanged(Qt::DockWidgetAreas)
*/
@io.qt.QtPropertyNotify(name="allowedAreas")
public final Signal1 allowedAreasChanged = new Signal1<>();
/**
* See QDockWidget::dockLocationChanged(Qt::DockWidgetArea)
*/
public final Signal1 dockLocationChanged = new Signal1<>();
/**
* See QDockWidget::featuresChanged(QDockWidget::DockWidgetFeatures)
*/
@io.qt.QtPropertyNotify(name="features")
public final Signal1 featuresChanged = new Signal1<>();
/**
* See QDockWidget::topLevelChanged(bool)
*/
public final Signal1<@io.qt.QtPrimitiveType Boolean> topLevelChanged = new Signal1<>();
/**
* See QDockWidget::visibilityChanged(bool)
*/
public final Signal1<@io.qt.QtPrimitiveType Boolean> visibilityChanged = new Signal1<>();
/**
* Overloaded constructor for {@link #QDockWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}.
*/
public QDockWidget(io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowType ... flags){
this(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.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));
}
/**
* See QDockWidget::QDockWidget(QWidget*,Qt::WindowFlags)
*/
public QDockWidget(io.qt.widgets.QWidget parent, io.qt.core.Qt.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);
/**
* Overloaded constructor for {@link #QDockWidget(java.lang.String, io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)}.
*/
public QDockWidget(java.lang.String title, io.qt.widgets.QWidget parent, io.qt.core.Qt.WindowType ... flags){
this(title, parent, new io.qt.core.Qt.WindowFlags(flags));
}
/**
* 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.String title, io.qt.widgets.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.String title) {
this(title, (io.qt.widgets.QWidget)null, new io.qt.core.Qt.WindowFlags(0));
}
/**
* See QDockWidget::QDockWidget(QString,QWidget*,Qt::WindowFlags)
*/
public QDockWidget(java.lang.String title, io.qt.widgets.QWidget parent, io.qt.core.Qt.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::allowedAreas()const
*/
@io.qt.QtPropertyReader(name="allowedAreas")
@io.qt.QtUninvokable
public final io.qt.core.Qt.DockWidgetAreas allowedAreas(){
return new io.qt.core.Qt.DockWidgetAreas(allowedAreas_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int allowedAreas_native_constfct(long __this__nativeId);
/**
* See QDockWidget::features()const
*/
@io.qt.QtPropertyReader(name="features")
@io.qt.QtUninvokable
public final io.qt.widgets.QDockWidget.DockWidgetFeatures features(){
return new io.qt.widgets.QDockWidget.DockWidgetFeatures(features_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int features_native_constfct(long __this__nativeId);
/**
* See QDockWidget::isAreaAllowed(Qt::DockWidgetArea)const
*/
@io.qt.QtUninvokable
public final boolean isAreaAllowed(io.qt.core.Qt.DockWidgetArea area){
return isAreaAllowed_native_Qt_DockWidgetArea_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), area.value());
}
@io.qt.QtUninvokable
private native boolean isAreaAllowed_native_Qt_DockWidgetArea_constfct(long __this__nativeId, int area);
/**
* See QDockWidget::isFloating()const
*/
@io.qt.QtPropertyReader(name="floating")
@io.qt.QtUninvokable
public final boolean isFloating(){
return isFloating_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isFloating_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #setAllowedAreas(io.qt.core.Qt.DockWidgetAreas)}.
*/
@io.qt.QtUninvokable
public final void setAllowedAreas(io.qt.core.Qt.DockWidgetArea ... areas){
setAllowedAreas(new io.qt.core.Qt.DockWidgetAreas(areas));
}
/**
* See QDockWidget::setAllowedAreas(Qt::DockWidgetAreas)
*/
@io.qt.QtPropertyWriter(name="allowedAreas")
@io.qt.QtUninvokable
public final void setAllowedAreas(io.qt.core.Qt.DockWidgetAreas areas){
setAllowedAreas_native_QFlags_Qt_DockWidgetArea_(QtJambi_LibraryUtilities.internal.nativeId(this), areas.value());
}
@io.qt.QtUninvokable
private native void setAllowedAreas_native_QFlags_Qt_DockWidgetArea_(long __this__nativeId, int areas);
/**
* Overloaded function for {@link #setFeatures(io.qt.widgets.QDockWidget.DockWidgetFeatures)}.
*/
@io.qt.QtUninvokable
public final void setFeatures(io.qt.widgets.QDockWidget.DockWidgetFeature ... features){
setFeatures(new io.qt.widgets.QDockWidget.DockWidgetFeatures(features));
}
/**
* See QDockWidget::setFeatures(DockWidgetFeatures)
*/
@io.qt.QtPropertyWriter(name="features")
@io.qt.QtUninvokable
public final void setFeatures(io.qt.widgets.QDockWidget.DockWidgetFeatures features){
setFeatures_native_QFlags_QDockWidget_DockWidgetFeature_(QtJambi_LibraryUtilities.internal.nativeId(this), features.value());
}
@io.qt.QtUninvokable
private native void setFeatures_native_QFlags_QDockWidget_DockWidgetFeature_(long __this__nativeId, int features);
/**
* See QDockWidget::setFloating(bool)
*/
@io.qt.QtPropertyWriter(name="floating")
@io.qt.QtUninvokable
public final void setFloating(boolean floating){
setFloating_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), floating);
}
@io.qt.QtUninvokable
private native void setFloating_native_bool(long __this__nativeId, boolean floating);
/**
* See QDockWidget::setTitleBarWidget(QWidget*)
*/
@io.qt.QtUninvokable
public final void setTitleBarWidget(io.qt.widgets.QWidget widget){
setTitleBarWidget_native_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(widget));
}
@io.qt.QtUninvokable
private native void setTitleBarWidget_native_QWidget_ptr(long __this__nativeId, long widget);
/**
* See QDockWidget::setWidget(QWidget*)
*/
@io.qt.QtUninvokable
public final void setWidget(io.qt.widgets.QWidget widget){
setWidget_native_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(widget));
}
@io.qt.QtUninvokable
private native void setWidget_native_QWidget_ptr(long __this__nativeId, long widget);
/**
* See QDockWidget::titleBarWidget()const
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QWidget titleBarWidget(){
return titleBarWidget_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.widgets.QWidget titleBarWidget_native_constfct(long __this__nativeId);
/**
* See QDockWidget::toggleViewAction()const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QAction toggleViewAction(){
return toggleViewAction_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QAction toggleViewAction_native_constfct(long __this__nativeId);
/**
* See QDockWidget::widget()const
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QWidget widget(){
return widget_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.widgets.QWidget widget_native_constfct(long __this__nativeId);
/**
* See QWidget::changeEvent(QEvent*)
*/
@io.qt.QtUninvokable
protected void changeEvent(io.qt.core.QEvent event){
changeEvent_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@io.qt.QtUninvokable
private native void changeEvent_native_QEvent_ptr(long __this__nativeId, long event);
/**
* See QWidget::closeEvent(QCloseEvent*)
*/
@io.qt.QtUninvokable
protected void closeEvent(io.qt.gui.QCloseEvent event){
closeEvent_native_QCloseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@io.qt.QtUninvokable
private native void closeEvent_native_QCloseEvent_ptr(long __this__nativeId, long event);
/**
*
*/
@io.qt.QtUninvokable
public boolean event(io.qt.core.QEvent event){
return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@io.qt.QtUninvokable
private native boolean event_native_QEvent_ptr(long __this__nativeId, long event);
/**
* See QDockWidget::initStyleOption(QStyleOptionDockWidget*)const
*/
@io.qt.QtUninvokable
protected void initStyleOption(io.qt.widgets.QStyleOptionDockWidget option){
initStyleOption_native_QStyleOptionDockWidget_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), option);
}
@io.qt.QtUninvokable
private native void initStyleOption_native_QStyleOptionDockWidget_ptr_constfct(long __this__nativeId, io.qt.widgets.QStyleOptionDockWidget option);
/**
* See QWidget::paintEvent(QPaintEvent*)
*/
@io.qt.QtUninvokable
protected void paintEvent(io.qt.gui.QPaintEvent event){
paintEvent_native_QPaintEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@io.qt.QtUninvokable
private native void paintEvent_native_QPaintEvent_ptr(long __this__nativeId, long event);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QDockWidget(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 QDockWidget(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@io.qt.QtUninvokable
private static native void initialize_native(QDockWidget instance, QDeclarativeConstructor constructor);
}