[][src]Struct qt_gui::QPdfWriter

#[repr(C)]pub struct QPdfWriter { /* fields omitted */ }

The QPdfWriter class is a class to generate PDFs that can be used as a paint device.

C++ class: QPdfWriter.

C++ documentation:

The QPdfWriter class is a class to generate PDFs that can be used as a paint device.

QPdfWriter generates PDF out of a series of drawing commands using QPainter. The newPage() method can be used to create several pages.

Methods

impl QPdfWriter[src]

pub unsafe fn creator(&self) -> CppBox<QString>[src]

Returns the creator of the document.

Calls C++ function: QString QPdfWriter::creator() const.

C++ documentation:

Returns the creator of the document.

See also setCreator().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QPdfWriter::metaObject() const.

pub unsafe fn from_q_string(
    filename: impl CastInto<Ref<QString>>
) -> QBox<QPdfWriter>
[src]

Constructs a PDF writer that will write the pdf to filename.

Calls C++ function: [constructor] void QPdfWriter::QPdfWriter(const QString& filename).

C++ documentation:

Constructs a PDF writer that will write the pdf to filename.

pub unsafe fn from_q_io_device(
    device: impl CastInto<Ptr<QIODevice>>
) -> QBox<QPdfWriter>
[src]

Constructs a PDF writer that will write the pdf to device.

Calls C++ function: [constructor] void QPdfWriter::QPdfWriter(QIODevice* device).

C++ documentation:

Constructs a PDF writer that will write the pdf to device.

pub unsafe fn new_page(&self) -> bool[src]

Reimplemented from QPagedPaintDevice::newPage().

Calls C++ function: virtual bool QPdfWriter::newPage().

C++ documentation:

Reimplemented from QPagedPaintDevice::newPage().

pub unsafe fn pdf_version(&self) -> PdfVersion[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Returns the PDF version for this writer. The default is PdfVersion_1_4.

Calls C++ function: QPagedPaintDevice::PdfVersion QPdfWriter::pdfVersion() const.

C++ documentation:

Returns the PDF version for this writer. The default is PdfVersion_1_4.

This function was introduced in Qt 5.10.

See also setPdfVersion().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QPdfWriter::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QPdfWriter::qt_metacast(const char* arg1).

pub unsafe fn resolution(&self) -> c_int[src]

Returns the resolution of the PDF in DPI.

Calls C++ function: int QPdfWriter::resolution() const.

C++ documentation:

Returns the resolution of the PDF in DPI.

This function was introduced in Qt 5.3.

See also setResolution().

pub unsafe fn set_creator(&self, creator: impl CastInto<Ref<QString>>)[src]

Sets the creator of the document to creator.

Calls C++ function: void QPdfWriter::setCreator(const QString& creator).

C++ documentation:

Sets the creator of the document to creator.

See also creator().

pub unsafe fn set_margins(&self, m: impl CastInto<Ref<Margins>>)[src]

Reimplemented from QPagedPaintDevice::setMargins().

Calls C++ function: virtual void QPdfWriter::setMargins(const QPagedPaintDevice::Margins& m).

C++ documentation:

Reimplemented from QPagedPaintDevice::setMargins().

See also setPageMargins().

pub unsafe fn set_page_size(&self, size: PageSize)[src]

Reimplemented from QPagedPaintDevice::setPageSize().

Calls C++ function: virtual void QPdfWriter::setPageSize(QPagedPaintDevice::PageSize size).

C++ documentation:

Reimplemented from QPagedPaintDevice::setPageSize().

See also setPageSize().

pub unsafe fn set_page_size_m_m(&self, size: impl CastInto<Ref<QSizeF>>)[src]

Reimplemented from QPagedPaintDevice::setPageSizeMM().

Calls C++ function: virtual void QPdfWriter::setPageSizeMM(const QSizeF& size).

C++ documentation:

Reimplemented from QPagedPaintDevice::setPageSizeMM().

See also setPageSize().

pub unsafe fn set_pdf_version(&self, version: PdfVersion)[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Sets the PDF version for this writer to version.

Calls C++ function: void QPdfWriter::setPdfVersion(QPagedPaintDevice::PdfVersion version).

C++ documentation:

Sets the PDF version for this writer to version.

If version is the same value as currently set then no change will be made.

This function was introduced in Qt 5.10.

See also pdfVersion().

pub unsafe fn set_resolution(&self, resolution: c_int)[src]

Sets the PDF resolution in DPI.

Calls C++ function: void QPdfWriter::setResolution(int resolution).

C++ documentation:

Sets the PDF resolution in DPI.

This setting affects the coordinate system as returned by, for example QPainter::viewport().

This function was introduced in Qt 5.3.

See also resolution().

pub unsafe fn set_title(&self, title: impl CastInto<Ref<QString>>)[src]

Sets the title of the document being created to title.

Calls C++ function: void QPdfWriter::setTitle(const QString& title).

C++ documentation:

Sets the title of the document being created to title.

See also title().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn title(&self) -> CppBox<QString>[src]

Returns the title of the document.

Calls C++ function: QString QPdfWriter::title() const.

C++ documentation:

Returns the title of the document.

See also setTitle().

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QPdfWriter::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QPdfWriter::trUtf8(const char* s, const char* c, int n).

Trait Implementations

impl CppDeletable for QPdfWriter[src]

unsafe fn delete(&self)[src]

Destroys the pdf writer.

Calls C++ function: virtual [destructor] void QPdfWriter::~QPdfWriter().

C++ documentation:

Destroys the pdf writer.

impl Deref for QPdfWriter[src]

type Target = QObject

The resulting type after dereferencing.

fn deref(&self) -> &QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(QPdfWriter* ptr).

impl DynamicCast<QPdfWriter> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QPdfWriter>[src]

Calls C++ function: QPdfWriter* dynamic_cast<QPdfWriter*>(QObject* ptr).

impl DynamicCast<QPdfWriter> for QPagedPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPagedPaintDevice>) -> Ptr<QPdfWriter>[src]

Calls C++ function: QPdfWriter* dynamic_cast<QPdfWriter*>(QPagedPaintDevice* ptr).

impl DynamicCast<QPdfWriter> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QPdfWriter>[src]

Calls C++ function: QPdfWriter* dynamic_cast<QPdfWriter*>(QPaintDevice* ptr).

impl StaticDowncast<QPdfWriter> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QPdfWriter>[src]

Calls C++ function: QPdfWriter* static_cast<QPdfWriter*>(QObject* ptr).

impl StaticDowncast<QPdfWriter> for QPagedPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPagedPaintDevice>) -> Ptr<QPdfWriter>[src]

Calls C++ function: QPdfWriter* static_cast<QPdfWriter*>(QPagedPaintDevice* ptr).

impl StaticDowncast<QPdfWriter> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QPdfWriter>[src]

Calls C++ function: QPdfWriter* static_cast<QPdfWriter*>(QPaintDevice* ptr).

impl StaticUpcast<QObject> for QPdfWriter[src]

unsafe fn static_upcast(ptr: Ptr<QPdfWriter>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QPdfWriter* ptr).

impl StaticUpcast<QPagedPaintDevice> for QPdfWriter[src]

unsafe fn static_upcast(ptr: Ptr<QPdfWriter>) -> Ptr<QPagedPaintDevice>[src]

Calls C++ function: QPagedPaintDevice* static_cast<QPagedPaintDevice*>(QPdfWriter* ptr).

impl StaticUpcast<QPaintDevice> for QPdfWriter[src]

unsafe fn static_upcast(ptr: Ptr<QPdfWriter>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QPdfWriter* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.