[−][src]Struct qt_gui::QPictureFormatPlugin
The QPictureFormatPlugin class provides an abstract base for custom picture format plugins.
C++ class: QPictureFormatPlugin
.
The QPictureFormatPlugin class provides an abstract base for custom picture format plugins.
The picture format plugin is a simple plugin interface that makes it easy to create custom picture formats that can be used transparently by applications.
Writing an picture format plugin is achieved by subclassing this base class, reimplementing the pure virtual functions loadPicture(), savePicture(), and installIOHandler(), and exporting the class with the Q_PLUGIN_METADATA() macro.
The json file containing the metadata should contain one entry with the list of picture formats supported by the plugin:
{ "Keys": [ "mypictureformat" ] }
Methods
impl QPictureFormatPlugin
[src]
pub unsafe fn install_io_handler(
&mut self,
format: impl CastInto<Ref<QString>>
) -> bool
[src]
&mut self,
format: impl CastInto<Ref<QString>>
) -> bool
Installs a QPictureIO picture I/O handler for the picture format format. Returns true
on success.
Calls C++ function: pure virtual bool QPictureFormatPlugin::installIOHandler(const QString& format)
.
Installs a QPictureIO picture I/O handler for the picture format format. Returns true
on success.
pub unsafe fn load_picture(
&mut self,
format: impl CastInto<Ref<QString>>,
filename: impl CastInto<Ref<QString>>,
pic: impl CastInto<MutPtr<QPicture>>
) -> bool
[src]
&mut self,
format: impl CastInto<Ref<QString>>,
filename: impl CastInto<Ref<QString>>,
pic: impl CastInto<MutPtr<QPicture>>
) -> bool
Loads the picture stored in the file called fileName, with the given format, into *picture. Returns true
on success; otherwise returns false
.
Calls C++ function: virtual bool QPictureFormatPlugin::loadPicture(const QString& format, const QString& filename, QPicture* pic)
.
Loads the picture stored in the file called fileName, with the given format, into *picture. Returns true
on success; otherwise returns false
.
See also savePicture().
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QPictureFormatPlugin::metaObject() const
.
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int QPictureFormatPlugin::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* QPictureFormatPlugin::qt_metacast(const char* arg1)
.
pub unsafe fn save_picture(
&mut self,
format: impl CastInto<Ref<QString>>,
filename: impl CastInto<Ref<QString>>,
pic: impl CastInto<Ref<QPicture>>
) -> bool
[src]
&mut self,
format: impl CastInto<Ref<QString>>,
filename: impl CastInto<Ref<QString>>,
pic: impl CastInto<Ref<QPicture>>
) -> bool
Saves the given picture into the file called fileName, using the specified format. Returns true
on success; otherwise returns false
.
Calls C++ function: virtual bool QPictureFormatPlugin::savePicture(const QString& format, const QString& filename, const QPicture& pic)
.
Saves the given picture into the file called fileName, using the specified format. Returns true
on success; otherwise returns false
.
See also loadPicture().
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn tr(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QPictureFormatPlugin::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QPictureFormatPlugin::trUtf8(const char* s, const char* c, int n)
.
Trait Implementations
impl CppDeletable for QPictureFormatPlugin
[src]
unsafe fn delete(&mut self)
[src]
Destroys the picture format plugin.
Calls C++ function: virtual [destructor] void QPictureFormatPlugin::~QPictureFormatPlugin()
.
Destroys the picture format plugin.
You never have to call this explicitly. Qt destroys a plugin automatically when it is no longer used.
impl Deref for QPictureFormatPlugin
[src]
type Target = QObject
The resulting type after dereferencing.
fn deref(&self) -> &QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(QPictureFormatPlugin* ptr)
.
impl DerefMut for QPictureFormatPlugin
[src]
fn deref_mut(&mut self) -> &mut QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(QPictureFormatPlugin* ptr)
.
impl DynamicCast<QPictureFormatPlugin> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QPictureFormatPlugin>
[src]
Calls C++ function: QPictureFormatPlugin* dynamic_cast<QPictureFormatPlugin*>(QObject* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QPictureFormatPlugin>
[src]
Calls C++ function: QPictureFormatPlugin* dynamic_cast<QPictureFormatPlugin*>(QObject* ptr)
.
impl StaticDowncast<QPictureFormatPlugin> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QPictureFormatPlugin>
[src]
Calls C++ function: QPictureFormatPlugin* static_cast<QPictureFormatPlugin*>(QObject* ptr)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QObject>
) -> MutPtr<QPictureFormatPlugin>
[src]
ptr: MutPtr<QObject>
) -> MutPtr<QPictureFormatPlugin>
Calls C++ function: QPictureFormatPlugin* static_cast<QPictureFormatPlugin*>(QObject* ptr)
.
impl StaticUpcast<QObject> for QPictureFormatPlugin
[src]
unsafe fn static_upcast(ptr: Ptr<QPictureFormatPlugin>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QPictureFormatPlugin* ptr)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QPictureFormatPlugin>
) -> MutPtr<QObject>
[src]
ptr: MutPtr<QPictureFormatPlugin>
) -> MutPtr<QObject>
Calls C++ function: QObject* static_cast<QObject*>(QPictureFormatPlugin* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QPictureFormatPlugin
impl Send for QPictureFormatPlugin
impl Sync for QPictureFormatPlugin
impl Unpin for QPictureFormatPlugin
impl UnwindSafe for QPictureFormatPlugin
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,