/// <remarks> /// Sends the media <pre>data</pre> to the backend for decoding. /// \warning Don't call this function before the first needData() is emitted. /// </remarks> <short> Sends the media \p data to the backend for decoding.</short> protected void WriteData(QByteArray data) { interceptor.Invoke("writeData#", "writeData(const QByteArray&)", typeof(void), typeof(QByteArray), data); }
public UncontrolledAnimation(QObject target, QByteArray propertyName, QObject parent = null) : base(target, propertyName, parent) { _id = 0; SetDuration(250); }
public abstract void WriteData(QByteArray data);
public string ToHtml() { var builder = new StringBuilder(); var document = base.Document(); bool isFirstBlock = true; var block = document.Begin(); while (block.IsValid()) { if (!isFirstBlock) { builder.Append("<br/>"); } isFirstBlock = false; QTextBlock.iterator it; //for (it = block.Begin(); !it.AtEnd(); it = it++) { for (it = block.Begin(); !it.AtEnd(); it = it.Next()) { var fragment = it.Fragment(); var format = fragment.CharFormat(); if (format.IsImageFormat()) { var imageFormat = format.ToImageFormat(); var name = imageFormat.Name(); var data = document.Resource((int)QTextDocument.ResourceType.ImageResource, new QUrl(name)); if (data.type() == QVariant.TypeOf.Pixmap) { var pixmap = (QPixmap)data; var tempArray = new QByteArray(); var tempBuffer = new QBuffer(tempArray); pixmap.Save(tempBuffer, "PNG"); string imageString = tempArray.ToBase64().ConstData(); builder.AppendFormat("<img alt=\"[embeded image]\" src=\"data:image/png;base64,{0}\" />", imageString); } } else { var link = format.AnchorHref(); var bold = (format.FontWeight() == (int)QFont.Weight.Bold); var underline = format.FontUnderline() && String.IsNullOrEmpty(link); var italic = format.FontItalic(); var strike = format.FontStrikeOut(); if (!String.IsNullOrEmpty(link)) { link = Util.EscapeHtml(link); builder.AppendFormat("<a href=\"{0}\" title=\"{0}\">", link); } if (bold) { builder.Append("<b>"); } if (underline) { builder.Append("<u>"); } if (italic) { builder.Append("<i>"); } if (strike) { builder.Append("<s>"); } var text = fragment.Text(); text = Util.EscapeHtml(text); text = text.Replace(" ", " "); text = text.Replace("\t", "    "); text = text.Replace("\r\n", "<br/>"); text = text.Replace("\r", "<br/>"); text = text.Replace("\n", "<br/>"); text = text.Replace("\u2028", "<br/>"); builder.Append(text); if (strike) { builder.Append("</s>"); } if (italic) { builder.Append("</i>"); } if (underline) { builder.Append("</u>"); } if (bold) { builder.Append("</b>"); } if (!String.IsNullOrEmpty(link)) { builder.Append("</a>"); } } } block = block.Next(); } return(builder.ToString()); }
public static void Init(string[] argv, QByteArray appname, QByteArray catalog, KLocalizedString programName, QByteArray version, KLocalizedString description, uint stdargs) { string[] args = new string[argv.Length + 1]; args[0] = System.Reflection.Assembly.GetExecutingAssembly().Location; argv.CopyTo(args, 1); staticInterceptor.Invoke("init$?#####$", "init(int, char**, const QByteArray&, const QByteArray&, const KLocalizedString&, const QByteArray&, const KLocalizedString&, KCmdLineArgs::StdCmdLineArgs)", typeof(void), false, typeof(int), args.Length, typeof(string[]), args, typeof(QByteArray), appname, typeof(QByteArray), catalog, typeof(KLocalizedString), programName, typeof(QByteArray), version, typeof(KLocalizedString), description, typeof(uint), stdargs); }
public UncontrolledAnimation(QObject target, QByteArray propertyName, QObject parent = null) : base(target, propertyName, parent) { SetDuration(250); EndValue = new QVariant(0); }