1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
//! C++ namespace: <span style='color: green;'>```Qt```</span> /// Calls C++ function: <span style='color: green;'>```QTextCodec* Qt::codecForHtml(const QByteArray& ba)```</span>. #[inline(always)] pub unsafe fn codec_for_html( ba: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QByteArray>>, ) -> ::cpp_core::MutPtr<::qt_core::QTextCodec> { let ffi_result = crate::__ffi::ctr_qt_gui_ffi_Qt_codecForHtml( ::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QByteArray>>::cast_into(ba).as_raw_ptr(), ); ::cpp_core::MutPtr::from_raw(ffi_result) } /// <p>Converts the plain text string <i>plain</i> to an HTML-formatted paragraph while preserving most of its look.</p> /// /// Calls C++ function: <span style='color: green;'>```QString Qt::convertFromPlainText(const QString& plain, Qt::WhiteSpaceMode mode = …)```</span>. /// /// <a href="http://doc.qt.io/qt-5/qt-sub-qtgui.html#convertFromPlainText">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Converts the plain text string <i>plain</i> to an HTML-formatted paragraph while preserving most of its look.</p> /// <p><i>mode</i> defines how whitespace is handled.</p> /// <p>This function is defined in the <code><QTextDocument></code> header file.</p> /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qstring.html#toHtmlEscaped">QString::toHtmlEscaped</a>() and <a href="http://doc.qt.io/qt-5/qt-sub-qtgui.html#mightBeRichText">mightBeRichText</a>().</p></div> #[inline(always)] pub unsafe fn convert_from_plain_text_2a( plain: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>, mode: ::qt_core::WhiteSpaceMode, ) -> ::cpp_core::CppBox<::qt_core::QString> { let ffi_result = crate::__ffi::ctr_qt_gui_ffi_Qt_convertFromPlainText( ::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(plain).as_raw_ptr(), mode, ); ::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox") } /// <p>Converts the plain text string <i>plain</i> to an HTML-formatted paragraph while preserving most of its look.</p> /// /// Calls C++ function: <span style='color: green;'>```QString Qt::convertFromPlainText(const QString& plain)```</span>. /// /// <a href="http://doc.qt.io/qt-5/qt-sub-qtgui.html#convertFromPlainText">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Converts the plain text string <i>plain</i> to an HTML-formatted paragraph while preserving most of its look.</p> /// <p><i>mode</i> defines how whitespace is handled.</p> /// <p>This function is defined in the <code><QTextDocument></code> header file.</p> /// <p><b>See also </b><a href="http://doc.qt.io/qt-5/qstring.html#toHtmlEscaped">QString::toHtmlEscaped</a>() and <a href="http://doc.qt.io/qt-5/qt-sub-qtgui.html#mightBeRichText">mightBeRichText</a>().</p></div> #[inline(always)] pub unsafe fn convert_from_plain_text_1a( plain: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>, ) -> ::cpp_core::CppBox<::qt_core::QString> { let ffi_result = crate::__ffi::ctr_qt_gui_ffi_Qt_convertFromPlainText1( ::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(plain).as_raw_ptr(), ); ::cpp_core::CppBox::from_raw(ffi_result).expect("attempted to construct a null CppBox") } /// <p>Returns <code>true</code> if the string <i>text</i> is likely to be rich text; otherwise returns <code>false</code>.</p> /// /// Calls C++ function: <span style='color: green;'>```bool Qt::mightBeRichText(const QString& arg1)```</span>. /// /// <a href="http://doc.qt.io/qt-5/qt-sub-qtgui.html#mightBeRichText">C++ documentation</a>:<div style='border: 1px solid #5CFF95; background: #D6FFE4; padding: 16px;'><p>Returns <code>true</code> if the string <i>text</i> is likely to be rich text; otherwise returns <code>false</code>.</p> /// <p>This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee.</p> /// <p>This function is defined in the <code><QTextDocument></code> header file.</p></div> #[inline(always)] pub unsafe fn might_be_rich_text( arg1: impl ::cpp_core::CastInto<::cpp_core::Ref<::qt_core::QString>>, ) -> bool { crate::__ffi::ctr_qt_gui_ffi_Qt_mightBeRichText( ::cpp_core::CastInto::<::cpp_core::Ref<::qt_core::QString>>::cast_into(arg1).as_raw_ptr(), ) }