public UncontrolledAnimation(QObject target, QByteArray propertyName, QObject parent = null) : base(target, propertyName, parent) { _id = 0; SetDuration(250); EndValue = new QVariant(0); }
public void Start(string name, string oldValue, string newValue) { if (name != SERVICE_NAME || newValue == "") { return; } // find our remote iface = new QDBusInterface(SERVICE_NAME, "/", "com.trolltech.QtDBus.ComplexPong.Pong", QDBusConnection.SessionBus(), this); if (!iface.IsValid()) { Console.Error.WriteLine(QDBusConnection.SessionBus().LastError().Message()); QCoreApplication.Quit(); } Connect(iface, SIGNAL("aboutToQuit()"), QCoreApplication.Instance(), SLOT("quit()")); while (true) { Console.Write("Ask your question: "); string line = Console.ReadLine().Trim(); if (line == "") { iface.Call("quit"); return; } else if (line == "value") { QVariant reply = iface.Property("value"); if (!reply.IsNull()) { Console.WriteLine("value = {0}",reply.ToString()); } } else if (line.StartsWith("value=")) { iface.SetProperty("value",new QVariant(line.Substring(6))); } else { QDBusReply <string> reply = new QDBusReply <string>(iface.Call("query",new QVariant(line))); if (reply.IsValid()) { Console.WriteLine("Reply was: {0}",reply.Value()); } } if (iface.LastError().IsValid()) { Console.Error.WriteLine("Call failed: {0}",iface.LastError().Message()); } } }
public void Handle(QVariant packet) { switch (packet.Type) { case QMetaType.QVariantList: Handle(packet.Value as List<QVariant>); break; case QMetaType.QVariantMap: Handle (packet.Value as Dictionary<string, QVariant>); break; } }
public QVariant ToVariant() { Dictionary <string, QVariant> map = new Dictionary <string, QVariant>(); foreach (KeyValuePair <string, string> pair in this) { map.Add(pair.Key, (QVariant)pair.Value); } return(QVariant.FromValue(map)); }
protected QVariant ItemChange(GraphicsItemChange change, QVariant val) { if (change == GraphicsItemChange.ItemPositionHasChanged) { foreach (EdgeItem ein in inList) { ein.SetToPoint(X(), Y()); } foreach (EdgeItem eout in outList) { eout.SetFromPoint(X(), Y()); } } return(base.ItemChange(change, val)); }
public virtual void UpdateCurrentValue(ref QVariant value) { }
public QVariant GetClientLoginPacket() { Dictionary<string, QVariant> packet = new Dictionary<string, QVariant>(); packet["MsgType"] = new QVariant("ClientLogin"); packet["User"] = new QVariant(User); packet["Password"] = new QVariant(Password); return new QVariant(packet); }
public QVariant GetConnectionPacket() { Dictionary<string, QVariant> packet = new Dictionary<string, QVariant>(); packet["ClientDate"] = new QVariant(DateTime.Now.ToString("MMM dd yyyy HH:mm:ss")); packet["UseSsl"] = new QVariant(SSL); packet["ClientVersion"] = new QVariant(@"v0.6.1 (dist-<a href='http://git.quassel-irc.org/?p=quassel.git;a=commit;h=611ebccdb6a2a4a89cf1f565bee7e72bcad13ffb'>611ebcc</a>)"); packet["UseCompression"] = new QVariant(false); packet["MsgType"] = new QVariant("ClientInit"); packet["ProtocolVersion"] = new QVariant(10); return new QVariant(packet); }
public void Send(QVariant qvariant) { MiscUtil.IO.EndianBinaryWriter bw = new MiscUtil.IO.EndianBinaryWriter(MiscUtil.Conversion.EndianBitConverter.Big, ns); MemoryStream ms = new MemoryStream(); QTypeManager.Serialize(ms, qvariant); ms.Seek(0, SeekOrigin.Begin); bw.Write((int)ms.Length); QTypeManager.Serialize(ns, qvariant); ns.Flush(); }
protected void OnReceivePacket(QVariant packet) { if (ReceivePacket != null) { ReceivePacket(packet); } }
public virtual void UpdateCurrentValue(ref QVariant value) { }
public UncontrolledAnimation(QObject target, QByteArray propertyName, QObject parent = null) : base(target, propertyName, parent) { _id = 0; SetDuration(250); EndValue = new QVariant(0); }
public EffectParameter(int parameterId, string name, uint hints, QVariant defaultValue) : this((Type)null) { CreateProxy(); interceptor.Invoke("EffectParameter$$$#", "EffectParameter(int, const QString&, Phonon::EffectParameter::Hints, const QVariant&)", typeof(void), typeof(int), parameterId, typeof(string), name, typeof(uint), hints, typeof(QVariant), defaultValue); }
public EffectParameter(int parameterId, string name, uint hints, QVariant defaultValue, QVariant min, QVariant max, List <QVariant> values) : this((Type)null) { CreateProxy(); interceptor.Invoke("EffectParameter$$$###?", "EffectParameter(int, const QString&, Phonon::EffectParameter::Hints, const QVariant&, const QVariant&, const QVariant&, const QList<QVariant>&)", typeof(void), typeof(int), parameterId, typeof(string), name, typeof(uint), hints, typeof(QVariant), defaultValue, typeof(QVariant), min, typeof(QVariant), max, typeof(List <QVariant>), values); }
public void SetParameterValue(Phonon.EffectParameter arg1, QVariant value) { interceptor.Invoke("setParameterValue##", "setParameterValue(const Phonon::EffectParameter&, const QVariant&)", typeof(void), typeof(Phonon.EffectParameter), arg1, typeof(QVariant), value); }
string GetString(QVariant variable) { var tmp = variable.GetValue<byte[]>(); if (tmp == null) { return null; } return Encoding.ASCII.GetString(tmp); }
internal void Send(QVariant variant) { connection.Send(variant); }