io.qt.core.QSaveFile 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.core;
import io.qt.*;
/**
* Interface for safely writing to files
* Java wrapper for Qt class QSaveFile
*/
public class QSaveFile extends io.qt.core.QFileDevice
{
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QSaveFile.class);
/**
* See QSaveFile:: QSaveFile(QObject*)
*/
public QSaveFile(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QSaveFile instance, io.qt.core.QObject parent);
/**
* See QSaveFile:: QSaveFile(QString)
*/
public QSaveFile(java.lang.@NonNull String name){
super((QPrivateConstructor)null);
initialize_native(this, name);
}
private native static void initialize_native(QSaveFile instance, java.lang.String name);
/**
* See QSaveFile:: QSaveFile(QString, QObject*)
*/
public QSaveFile(java.lang.@NonNull String name, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, name, parent);
}
private native static void initialize_native(QSaveFile instance, java.lang.String name, io.qt.core.QObject parent);
/**
* See QSaveFile:: cancelWriting()
*/
@QtUninvokable
public final void cancelWriting(){
cancelWriting_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void cancelWriting_native(long __this__nativeId);
/**
* Function has no implementation because its native counterpart is private.
*/
@Deprecated
@QtUninvokable
@Override
public final void close() throws QNoImplementationException {
throw new QNoImplementationException();
}
/**
*
*/
@QtUninvokable
public final boolean commit(){
return commit_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean commit_native(long __this__nativeId);
/**
* See QSaveFile:: directWriteFallback()const
*/
@QtUninvokable
public final boolean directWriteFallback(){
return directWriteFallback_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean directWriteFallback_native_constfct(long __this__nativeId);
/**
* See QSaveFile:: setDirectWriteFallback(bool)
*/
@QtUninvokable
public final void setDirectWriteFallback(boolean enabled){
setDirectWriteFallback_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enabled);
}
@QtUninvokable
private native void setDirectWriteFallback_native_bool(long __this__nativeId, boolean enabled);
/**
* See QSaveFile:: setFileName(QString)
*/
@QtUninvokable
public final void setFileName(java.lang.@NonNull String name){
setFileName_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), name);
}
@QtUninvokable
private native void setFileName_native_cref_QString(long __this__nativeId, java.lang.String name);
/**
* See QFileDevice:: fileName()const
*/
@QtUninvokable
@Override
public java.lang.@NonNull String fileName(){
return fileName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String fileName_native_constfct(long __this__nativeId);
/**
* See QIODevice:: open(QIODeviceBase::OpenMode)
*/
@QtUninvokable
@Override
public boolean open(io.qt.core.QIODeviceBase.@NonNull OpenMode flags){
return open_native_QIODeviceBase_OpenMode(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value());
}
@QtUninvokable
private native boolean open_native_QIODeviceBase_OpenMode(long __this__nativeId, int flags);
/**
* See QIODevice:: writeData(const char*, qint64)
*/
@QtUninvokable
@Override
protected int writeData(java.nio.@Nullable ByteBuffer data){
return writeData_native_const_char_ptr_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@QtUninvokable
private native int writeData_native_const_char_ptr_qint64(long __this__nativeId, java.nio.ByteBuffer data);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QSaveFile(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QSaveFile(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QSaveFile instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QSaveFile(io.qt.core.QObject)}
* with parent = null
.
*/
public QSaveFile() {
this((io.qt.core.QObject)null);
}
}