io.qt.widgets.QColormap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qtjambi Show documentation
Show all versions of qtjambi Show documentation
QtJambi base module containing QtCore, QtGui and QtWidgets.
package io.qt.widgets;
import io.qt.*;
/**
* Maps device independent QColors to device dependent pixel values
* Java wrapper for Qt class QColormap
*/
public class QColormap extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QColormap::Mode
*/
public enum Mode implements QtEnumerator {
/**
* Representing QColormap:: Direct
*/
Direct(0),
/**
* Representing QColormap:: Indexed
*/
Indexed(1),
/**
* Representing QColormap:: Gray
*/
Gray(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private Mode(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 @NonNull Mode resolve(int value) {
switch (value) {
case 0: return Direct;
case 1: return Indexed;
case 2: return Gray;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QColormap:: QColormap(QColormap)
*/
public QColormap(io.qt.widgets.@NonNull QColormap colormap){
super((QPrivateConstructor)null);
initialize_native(this, colormap);
}
private native static void initialize_native(QColormap instance, io.qt.widgets.QColormap colormap);
/**
* See QColormap:: colorAt(uint)const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QColor colorAt(int pixel){
return colorAt_native_uint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), pixel);
}
@QtUninvokable
private native io.qt.gui.QColor colorAt_native_uint_constfct(long __this__nativeId, int pixel);
/**
* See QColormap:: colormap()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList colormap(){
return colormap_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList colormap_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int depth(){
return depth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int depth_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.widgets.QColormap.@NonNull Mode mode(){
return io.qt.widgets.QColormap.Mode.resolve(mode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int mode_native_constfct(long __this__nativeId);
/**
* See QColormap:: operator=(QColormap)
*/
@QtUninvokable
public final void assign(io.qt.widgets.@NonNull QColormap colormap){
assign_native_cref_QColormap(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(colormap));
}
@QtUninvokable
private native void assign_native_cref_QColormap(long __this__nativeId, long colormap);
/**
* See QColormap:: pixel(QColor)const
*/
@QtUninvokable
public final int pixel(io.qt.gui.@NonNull QColor color){
return pixel_native_cref_QColor_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(color));
}
@QtUninvokable
private native int pixel_native_cref_QColor_constfct(long __this__nativeId, long color);
/**
*
*/
@QtUninvokable
public final int size(){
return size_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int size_native_constfct(long __this__nativeId);
/**
*
*/
public native static io.qt.widgets.@NonNull QColormap instance(int screen);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QColormap(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QColormap:: QColormap(QColormap)
*/
@QtUninvokable
@Override
public QColormap clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QColormap clone_native(long __this_nativeId);
/**
* Overloaded function for {@link #pixel(io.qt.gui.QColor)}.
*/
@QtUninvokable
public final int pixel(io.qt.core.Qt.@NonNull GlobalColor color) {
return pixel(new io.qt.gui.QColor(color));
}
/**
* Overloaded function for {@link #pixel(io.qt.gui.QColor)}.
*/
@QtUninvokable
public final int pixel(io.qt.gui.@NonNull QRgba64 color) {
return pixel(new io.qt.gui.QColor(color));
}
/**
* Overloaded function for {@link #pixel(io.qt.gui.QColor)}.
*/
@QtUninvokable
public final int pixel(java.lang.@NonNull String color) {
return pixel(new io.qt.gui.QColor(color));
}
/**
* Overloaded function for {@link #instance(int)}
* with screen = -1
.
*/
public static io.qt.widgets.@NonNull QColormap instance() {
return instance((int)-1);
}
}