
io.qt.widgets.QStyleOptionHeader Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
/**
* Used to describe the parameters for drawing a header
* Java wrapper for Qt class QStyleOptionHeader
*/
public class QStyleOptionHeader extends io.qt.widgets.QStyleOption
implements java.lang.Cloneable
{
/**
* Java wrapper for Qt enum QStyleOptionHeader::SectionPosition
*/
public enum SectionPosition implements io.qt.QtEnumerator {
Beginning(0),
Middle(1),
End(2),
OnlyOneSection(3);
private SectionPosition(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 SectionPosition resolve(int value) {
switch (value) {
case 0: return Beginning;
case 1: return Middle;
case 2: return End;
case 3: return OnlyOneSection;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QStyleOptionHeader::SelectedPosition
*/
public enum SelectedPosition implements io.qt.QtEnumerator {
NotAdjacent(0),
NextIsSelected(1),
PreviousIsSelected(2),
NextAndPreviousAreSelected(3);
private SelectedPosition(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 SelectedPosition resolve(int value) {
switch (value) {
case 0: return NotAdjacent;
case 1: return NextIsSelected;
case 2: return PreviousIsSelected;
case 3: return NextAndPreviousAreSelected;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QStyleOptionHeader::SortIndicator
*/
public enum SortIndicator implements io.qt.QtEnumerator {
None(0),
SortUp(1),
SortDown(2);
private SortIndicator(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 SortIndicator resolve(int value) {
switch (value) {
case 0: return None;
case 1: return SortUp;
case 2: return SortDown;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QStyleOptionHeader::QStyleOptionHeader()
*/
public QStyleOptionHeader(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QStyleOptionHeader instance);
/**
* See QStyleOptionHeader::QStyleOptionHeader(QStyleOptionHeader)
*/
public QStyleOptionHeader(io.qt.widgets.QStyleOptionHeader other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QStyleOptionHeader instance, io.qt.widgets.QStyleOptionHeader other);
@io.qt.QtUninvokable
public final void set(io.qt.widgets.QStyleOptionHeader arg__1){
set_native_cref_QStyleOptionHeader(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void set_native_cref_QStyleOptionHeader(long __this__nativeId, long arg__1);
/**
* The icon of the header
*
*/
@io.qt.QtUninvokable
public final void setIcon(io.qt.gui.QIcon icon){
setIcon_native_cref_QIcon(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(icon));
}
@io.qt.QtUninvokable
private native void setIcon_native_cref_QIcon(long __this__nativeId, long icon);
/**
* The icon of the header
*
*/
@io.qt.QtUninvokable
public final io.qt.gui.QIcon icon(){
return icon_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QIcon icon_native(long __this__nativeId);
/**
* Overloaded function for {@link #setIconAlignment(io.qt.core.Qt.Alignment)}.
*/
@io.qt.QtUninvokable
public final void setIconAlignment(io.qt.core.Qt.AlignmentFlag ... iconAlignment){
setIconAlignment(new io.qt.core.Qt.Alignment(iconAlignment));
}
/**
* The alignment flags for the icon of the header
* See QStyleOptionHeader::iconAlignment
*/
@io.qt.QtUninvokable
public final void setIconAlignment(io.qt.core.Qt.Alignment iconAlignment){
setIconAlignment_native_cref_QFlags_Qt_AlignmentFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), iconAlignment.value());
}
@io.qt.QtUninvokable
private native void setIconAlignment_native_cref_QFlags_Qt_AlignmentFlag_(long __this__nativeId, int iconAlignment);
/**
* The alignment flags for the icon of the header
* See QStyleOptionHeader::iconAlignment
*/
@io.qt.QtUninvokable
public final io.qt.core.Qt.Alignment iconAlignment(){
return new io.qt.core.Qt.Alignment(iconAlignment_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int iconAlignment_native(long __this__nativeId);
/**
* The header's orientation (horizontal or vertical)
* See QStyleOptionHeader::orientation
*/
@io.qt.QtUninvokable
public final void setOrientation(io.qt.core.Qt.Orientation orientation){
setOrientation_native_cref_Qt_Orientation(QtJambi_LibraryUtilities.internal.nativeId(this), orientation.value());
}
@io.qt.QtUninvokable
private native void setOrientation_native_cref_Qt_Orientation(long __this__nativeId, int orientation);
/**
* The header's orientation (horizontal or vertical)
* See QStyleOptionHeader::orientation
*/
@io.qt.QtUninvokable
public final io.qt.core.Qt.Orientation orientation(){
return io.qt.core.Qt.Orientation.resolve(orientation_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int orientation_native(long __this__nativeId);
/**
* The section's position in relation to the other sections
* See QStyleOptionHeader::position
*/
@io.qt.QtUninvokable
public final void setPosition(io.qt.widgets.QStyleOptionHeader.SectionPosition position){
setPosition_native_cref_QStyleOptionHeader_SectionPosition(QtJambi_LibraryUtilities.internal.nativeId(this), position.value());
}
@io.qt.QtUninvokable
private native void setPosition_native_cref_QStyleOptionHeader_SectionPosition(long __this__nativeId, int position);
/**
* The section's position in relation to the other sections
* See QStyleOptionHeader::position
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QStyleOptionHeader.SectionPosition position(){
return io.qt.widgets.QStyleOptionHeader.SectionPosition.resolve(position_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int position_native(long __this__nativeId);
/**
* Which section of the header is being painted
* See QStyleOptionHeader::section
*/
@io.qt.QtUninvokable
public final void setSection(int section){
setSection_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), section);
}
@io.qt.QtUninvokable
private native void setSection_native_int(long __this__nativeId, int section);
/**
* Which section of the header is being painted
* See QStyleOptionHeader::section
*/
@io.qt.QtUninvokable
public final int section(){
return section_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int section_native(long __this__nativeId);
/**
* The section's position in relation to the selected section
* See QStyleOptionHeader::selectedPosition
*/
@io.qt.QtUninvokable
public final void setSelectedPosition(io.qt.widgets.QStyleOptionHeader.SelectedPosition selectedPosition){
setSelectedPosition_native_cref_QStyleOptionHeader_SelectedPosition(QtJambi_LibraryUtilities.internal.nativeId(this), selectedPosition.value());
}
@io.qt.QtUninvokable
private native void setSelectedPosition_native_cref_QStyleOptionHeader_SelectedPosition(long __this__nativeId, int selectedPosition);
/**
* The section's position in relation to the selected section
* See QStyleOptionHeader::selectedPosition
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QStyleOptionHeader.SelectedPosition selectedPosition(){
return io.qt.widgets.QStyleOptionHeader.SelectedPosition.resolve(selectedPosition_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int selectedPosition_native(long __this__nativeId);
/**
* The direction the sort indicator should be drawn
* See QStyleOptionHeader::sortIndicator
*/
@io.qt.QtUninvokable
public final void setSortIndicator(io.qt.widgets.QStyleOptionHeader.SortIndicator sortIndicator){
setSortIndicator_native_cref_QStyleOptionHeader_SortIndicator(QtJambi_LibraryUtilities.internal.nativeId(this), sortIndicator.value());
}
@io.qt.QtUninvokable
private native void setSortIndicator_native_cref_QStyleOptionHeader_SortIndicator(long __this__nativeId, int sortIndicator);
/**
* The direction the sort indicator should be drawn
* See QStyleOptionHeader::sortIndicator
*/
@io.qt.QtUninvokable
public final io.qt.widgets.QStyleOptionHeader.SortIndicator sortIndicator(){
return io.qt.widgets.QStyleOptionHeader.SortIndicator.resolve(sortIndicator_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int sortIndicator_native(long __this__nativeId);
/**
* The text of the header
*
*/
@io.qt.QtUninvokable
public final void setText(java.lang.String text){
setText_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), text);
}
@io.qt.QtUninvokable
private native void setText_native_cref_QString(long __this__nativeId, java.lang.String text);
/**
* The text of the header
*
*/
@io.qt.QtUninvokable
public final java.lang.String text(){
return text_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String text_native(long __this__nativeId);
/**
* Overloaded function for {@link #setTextAlignment(io.qt.core.Qt.Alignment)}.
*/
@io.qt.QtUninvokable
public final void setTextAlignment(io.qt.core.Qt.AlignmentFlag ... textAlignment){
setTextAlignment(new io.qt.core.Qt.Alignment(textAlignment));
}
/**
* The alignment flags for the text of the header
* See QStyleOptionHeader::textAlignment
*/
@io.qt.QtUninvokable
public final void setTextAlignment(io.qt.core.Qt.Alignment textAlignment){
setTextAlignment_native_cref_QFlags_Qt_AlignmentFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), textAlignment.value());
}
@io.qt.QtUninvokable
private native void setTextAlignment_native_cref_QFlags_Qt_AlignmentFlag_(long __this__nativeId, int textAlignment);
/**
* The alignment flags for the text of the header
* See QStyleOptionHeader::textAlignment
*/
@io.qt.QtUninvokable
public final io.qt.core.Qt.Alignment textAlignment(){
return new io.qt.core.Qt.Alignment(textAlignment_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int textAlignment_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QStyleOptionHeader(QPrivateConstructor p) { super(p); }
@Override
public QStyleOptionHeader clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QStyleOptionHeader clone_native(long __this_nativeId);
}