• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Plasma类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Plasma的典型用法代码示例。如果您正苦于以下问题:C# Plasma类的具体用法?C# Plasma怎么用?C# Plasma使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Plasma类属于命名空间,在下文中一共展示了Plasma类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InitExtenderItem

        //Implement this function to make ExtenderItems persistent.
        //This function will get called on plasma start for every
        //ExtenderItem that belonged to this applet, and is still
        //around. Instantiate the widget to be wrapped in the
        //ExtenderItem here.
        public override void InitExtenderItem(Plasma.ExtenderItem item)
        {
            //Create a Meter widget and wrap it in the ExtenderItem
            Plasma.Meter meter = new Plasma.Meter(item) {
                meterType = Plasma.Meter.MeterType.BarMeterHorizontal,
                Svg = "widgets/bar_meter_horizontal",
                Maximum = 100,
                Value = 0
            };

            meter.SetMinimumSize(new QSizeF(250, 45));
            meter.SetPreferredSize(new QSizeF(250, 45));

            //often, you'll want to connect dataengines or set properties
            //depending on information contained in item.config().
            //In this situation that won't be necessary though.
            item.Widget = meter;

            //Job names are not unique across plasma restarts (kuiserver
            //engine just starts with Job1 again), so avoid problems and
            //just don't give reinstantiated items a name.
            item.Name = "";

            //Show a close button.
            item.ShowCloseButton();
        }
开发者ID:KDE,项目名称:kimono,代码行数:31,代码来源:extender_tutorial.cs


示例2: LoadScriptEngine

 /// <remarks>
 ///  Loads an DataEngine script engine for the given language.
 /// <param> name="language" the language to load for
 /// </param><param> name="dataEngine" the Plasma.DataEngine for this script;
 /// </param></remarks>        <return> pointer to the DataEngineScript or 0 on failure; the caller is responsible
 ///          for the return object which will be parented to the DataEngine
 /// </return>
 ///         <short>    Loads an DataEngine script engine for the given language.</short>
 public static Plasma.DataEngineScript LoadScriptEngine(string language, Plasma.DataEngine dataEngine)
 {
     return (Plasma.DataEngineScript) staticInterceptor.Invoke("loadScriptEngine$#", "loadScriptEngine(const QString&, Plasma::DataEngine*)", typeof(Plasma.DataEngineScript), typeof(string), language, typeof(Plasma.DataEngine), dataEngine);
 }
开发者ID:KDE,项目名称:kimono,代码行数:12,代码来源:Plasma.cs


示例3: ConnectVisualization

 /// <remarks>
 ///  Connects an object to this DataContainer.
 ///  May be called repeatedly for the same visualization without
 ///  side effects
 /// <param> name="visualization" the object to connect to this DataContainer
 /// </param><param> name="pollingInterval" the time in milliseconds between updates
 /// </param><param> name="alignment" the clock position to align updates to
 /// </param></remarks>        <short>    Connects an object to this DataContainer.</short>
 public void ConnectVisualization(QObject visualization, uint pollingInterval, Plasma.IntervalAlignment alignment)
 {
     interceptor.Invoke("connectVisualization#$$", "connectVisualization(QObject*, uint, Plasma::IntervalAlignment)", typeof(void), typeof(QObject), visualization, typeof(uint), pollingInterval, typeof(Plasma.IntervalAlignment), alignment);
 }
开发者ID:KDE,项目名称:kimono,代码行数:12,代码来源:Plasma_DataContainer.cs


示例4: ConnectSource

 /// <remarks>
 ///  Connects a source to an object for data updates. The object must
 ///  have a slot with the following signature:
 ///  dataUpdated(stringsourceName, const Plasma.DataEngine.Data &data)
 ///  The data is a QHash of QVariants keyed by string names, allowing
 ///  one data source to provide sets of related data.
 /// <param> name="source" the name of the data source
 /// </param><param> name="visualization" the object to connect the data source to
 /// </param><param> name="pollingInterval" the frequency, in milliseconds, with which to check for updates;
 ///                         a value of 0 (the default) means to update only
 ///                         when there is new data spontaneously generated
 ///                         (e.g. by the engine); any other value results in
 ///                         periodic updates from this source. This value is
 ///                         per-visualization and can be handy for items that require
 ///                         constant updates such as scrolling graphs or clocks.
 ///                         If the data has not changed, no update will be sent.
 /// </param><param> name="intervalAlignment" the number of ms to align the interval to
 /// </param></remarks>        <short>    Connects a source to an object for data updates.</short>
 public void ConnectSource(string source, QObject visualization, uint pollingInterval, Plasma.IntervalAlignment intervalAlignment)
 {
     interceptor.Invoke("connectSource$#$$", "connectSource(const QString&, QObject*, uint, Plasma::IntervalAlignment) const", typeof(void), typeof(string), source, typeof(QObject), visualization, typeof(uint), pollingInterval, typeof(Plasma.IntervalAlignment), intervalAlignment);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:22,代码来源:Plasma_DataEngine.cs


示例5: QueryMatch

 /// <remarks>
 ///  Copy constructor
 ///          </remarks>        <short>    Copy constructor          </short>
 public QueryMatch(Plasma.QueryMatch other)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("QueryMatch#", "QueryMatch(const Plasma::QueryMatch&)", typeof(void), typeof(Plasma.QueryMatch), other);
 }
开发者ID:KDE,项目名称:kimono,代码行数:9,代码来源:Plasma_QueryMatch.cs


示例6: SetType

 /// <remarks>
 ///  Sets the type of match this action represents.
 ///          </remarks>        <short>    Sets the type of match this action represents.</short>
 public void SetType(Plasma.QueryMatch.TypeOf type)
 {
     interceptor.Invoke("setType$", "setType(Plasma::QueryMatch::Type)", typeof(void), typeof(Plasma.QueryMatch.TypeOf), type);
 }
开发者ID:KDE,项目名称:kimono,代码行数:7,代码来源:Plasma_QueryMatch.cs


示例7: SetImmutability

 public void SetImmutability(Plasma.ImmutabilityType immutable)
 {
     applet.SetImmutability(immutable);
 }
开发者ID:KDE,项目名称:kimono,代码行数:4,代码来源:PlasmaScripting_Applet.cs


示例8: InitExtenderItem

 public virtual void InitExtenderItem(Plasma.ExtenderItem item)
 {
     Console.WriteLine("Missing implementation of initExtenderItem in the applet {0}!",
                       item.Config().ReadEntry("SourceAppletPluginName", ""));
     Console.WriteLine("Any applet that uses extenders should implement initExtenderItem to instantiate a widget.");
 }
开发者ID:KDE,项目名称:kimono,代码行数:6,代码来源:PlasmaScripting_Applet.cs


示例9: SetAspectRatioMode

 /// <remarks>
 ///  Sets the preferred aspect ratio mode for placement and resizing
 /// </remarks>        <short>    Sets the preferred aspect ratio mode for placement and resizing </short>
 public void SetAspectRatioMode(Plasma.AspectRatioMode mode)
 {
     interceptor.Invoke("setAspectRatioMode$", "setAspectRatioMode(Plasma::AspectRatioMode)", typeof(void), typeof(Plasma.AspectRatioMode), mode);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:7,代码来源:Plasma_Dialog.cs


示例10: AnimatedShow

 /// <remarks>
 ///  Causes an animated show; requires compositing to work, otherwise
 ///  the dialog will simply show.
 /// </remarks>        <short>    Causes an animated show; requires compositing to work, otherwise  the dialog will simply show.</short>
 public void AnimatedShow(Plasma.Direction direction)
 {
     interceptor.Invoke("animatedShow$", "animatedShow(Plasma::Direction)", typeof(void), typeof(Plasma.Direction), direction);
 }
开发者ID:0xd34df00d,项目名称:Qross,代码行数:8,代码来源:Plasma_Dialog.cs


示例11: Open

        public void Open(string file)
        {
            objects = new List<MapObject>();
            BufferReader reader = new BufferReader(file);

            if (Path.GetExtension(file) != ".adm")
            {
                throw new ArgumentException("File does not have *.adm extension.");
            }
            if (reader.ReadString() != "ADmapv2")
            {
                throw new ArgumentException("Not a valid Adrenaline map file.");
            }

            // general map info
            this.version = reader.ReadByte();
            this.gridSize = reader.ReadByte();

            // spare slots
            reader.Skip(15);

            this.Name = reader.ReadString();
            this.Author = reader.ReadString();
            this.floorType = reader.ReadByte();

            // objects
            while (reader.HasMore())
            {
                string objectType = reader.ReadString();
                int instances = (int)reader.ReadUShort();

                for (int i = 0; i < instances; i++)
                {
                    ushort x = reader.ReadUShort();
                    ushort y = reader.ReadUShort();
                    MapObject obj = null;

                    #region Object Creation
                    switch (objectType)
                    {
                        // pickups
                        case "objAbArmor":
                            obj = new BulletArmorPickup();
                            break;
                        case "objAbIncendary":
                            obj = new BulletIncendiaryPickup();
                            break;
                        case "objAbDefault":
                            obj = new BulletNormalPickup();
                            break;
                        case "objAbVelocity":
                            obj = new BulletVelocityPickup();
                            break;
                        case "objAnades":
                            obj = new GrenadePickup();
                            break;
                        case "objMedkit":
                            obj = new HealthPickup();
                            break;
                        case "objAeNormal":
                            obj = new LaserPickup();
                            break;
                        case "objAmines":
                            obj = new MinePickup();
                            break;
                        case "objApDisc":
                            obj = new PlasmaDiscPickup();
                            break;
                        case "objApFragma":
                            obj = new PlasmaFragmaPickup();
                            break;
                        case "objApHigh":
                            obj = new PlasmaHighPickup();
                            break;
                        case "objApNormal":
                            obj = new PlasmaNormalPickup();
                            break;
                        case "objAmNormal":
                            obj = new RocketDualPickup();
                            break;
                        case "objAmNade":
                            obj = new RocketNukePickup();
                            break;
                        case "objAcSniper":
                            obj = new SniperPickup();
                            break;
                        case "objAeSuper":
                            obj = new SuperLaserPickup();
                            break;

                        // static
                        case "objSpawn":
                            obj = new AllSpawn();
                            break;
                        case "objFlagBlue":
                            obj = new BlueFlag();
                            break;
                        case "objFlagRed":
                            obj = new RedFlag();
                            break;
//.........这里部分代码省略.........
开发者ID:Gupocca,项目名称:AdMapperIO,代码行数:101,代码来源:Map.cs


示例12: ScalingFactor

 /// <remarks>
 /// </remarks>        <return> the scaling factor (0..1) for a ZoomLevel
 /// </return>
 ///         <short>   </short>
 public static double ScalingFactor(Plasma.ZoomLevel level)
 {
     return (double) staticInterceptor.Invoke("scalingFactor$", "scalingFactor(Plasma::ZoomLevel)", typeof(double), typeof(Plasma.ZoomLevel), level);
 }
开发者ID:KDE,项目名称:kimono,代码行数:8,代码来源:Plasma.cs


示例13: PackageStructure

 /// <remarks>
 ///  Loads an appropriate PackageStructure for the given language and type
 /// <param> name="language" the language to load the PackageStructure for
 /// </param><param> name="type" the component type
 /// </param></remarks>        <return> a guarded PackageStructure pointer
 ///  </return>
 ///         <short>    Loads an appropriate PackageStructure for the given language and type </short>
 public static Plasma.PackageStructure PackageStructure(string language, Plasma.ComponentType type)
 {
     return (Plasma.PackageStructure) staticInterceptor.Invoke("packageStructure$$", "packageStructure(const QString&, Plasma::ComponentType)", typeof(Plasma.PackageStructure), typeof(string), language, typeof(Plasma.ComponentType), type);
 }
开发者ID:KDE,项目名称:kimono,代码行数:11,代码来源:Plasma.cs


示例14: LocationToInverseDirection

 /// <remarks>
 ///  Converts a location to the direction facing it. Handy for figuring out which way to collapse
 ///  a popup or to point arrows at the item itself.
 /// <param> name="location" the location of the container the element will appear in
 /// </param></remarks>        <return> the visual direction the element should be oriented in
 /// </return>
 ///         <short>    Converts a location to the direction facing it.</short>
 public static Plasma.Direction LocationToInverseDirection(Plasma.Location location)
 {
     return (Plasma.Direction) staticInterceptor.Invoke("locationToInverseDirection$", "locationToInverseDirection(Plasma::Location)", typeof(Plasma.Direction), typeof(Plasma.Location), location);
 }
开发者ID:KDE,项目名称:kimono,代码行数:11,代码来源:Plasma.cs


示例15: Run

 /// <remarks>
 ///  Runs a given match
 ///  @arg match the match to be executed
 ///          </remarks>        <short>    Runs a given match  @arg match the match to be executed          </short>
 public void Run(Plasma.QueryMatch match)
 {
     interceptor.Invoke("run#", "run(const Plasma::QueryMatch&)", typeof(void), typeof(Plasma.QueryMatch), match);
 }
开发者ID:KDE,项目名称:kimono,代码行数:8,代码来源:Plasma_RunnerManager.cs


示例16: ActionsForMatch

 /// <remarks>
 ///  Retrieves the list of actions, if any, for a match
 ///          </remarks>        <short>    Retrieves the list of actions, if any, for a match          </short>
 public List<QAction> ActionsForMatch(Plasma.QueryMatch match)
 {
     return (List<QAction>) interceptor.Invoke("actionsForMatch#", "actionsForMatch(const Plasma::QueryMatch&)", typeof(List<QAction>), typeof(Plasma.QueryMatch), match);
 }
开发者ID:KDE,项目名称:kimono,代码行数:7,代码来源:Plasma_RunnerManager.cs


示例17: CustomAnimation

 /// <remarks>
 ///  Starts a custom animation, preventing the need to create a timeline
 ///  with its own timer tick.
 ///  @arg frames the number of frames this animation should persist for
 ///  @arg duration the length, in milliseconds, the animation will take
 ///  @arg curve the curve applied to the frame rate
 ///  @arg receive the object that will handle the actual animation
 ///  @arg method the method name of slot to be invoked on each update.
 ///              It must take a qreal. So if the slot is animate(qreal),
 ///              pass in "animate" as the method parameter.
 ///              It has an optional integer paramenter that takes an
 ///              integer that reapresents the animation id, useful if
 ///              you want to manage multiple animations with a sigle slot
 /// </remarks>        <return> an id that can be used to identify this animation.
 ///      </return>
 ///         <short>    Starts a custom animation, preventing the need to create a timeline  with its own timer tick.</short>
 public int CustomAnimation(int frames, int duration, Plasma.Animator.CurveShape curve, QObject receiver, string method)
 {
     return (int) interceptor.Invoke("customAnimation$$$#$", "customAnimation(int, int, Plasma::Animator::CurveShape, QObject*, const char*)", typeof(int), typeof(int), frames, typeof(int), duration, typeof(Plasma.Animator.CurveShape), curve, typeof(QObject), receiver, typeof(string), method);
 }
开发者ID:KDE,项目名称:kimono,代码行数:20,代码来源:Plasma_Animator.cs


示例18: SetAspectRatioMode

 /// <remarks>
 ///  Sets the preferred aspect ratio mode for placement and resizing
 ///          </remarks>        <short>    Sets the preferred aspect ratio mode for placement and resizing          </short>
 public void SetAspectRatioMode(Plasma.AspectRatioMode arg1)
 {
     applet.SetAspectRatioMode(arg1);
 }
开发者ID:KDE,项目名称:kimono,代码行数:7,代码来源:PlasmaScripting_Applet.cs


示例19: MoveItem

 /// <remarks>
 ///  Starts a standard animation on a QGraphicsItem.
 ///  @arg item the item to animate in some fashion
 ///  @arg anim the type of animation to perform
 /// </remarks>        <return> the id of the animation
 /// </return>
 ///         <short>    Starts a standard animation on a QGraphicsItem.</short>
 public int MoveItem(IQGraphicsItem item, Plasma.Animator.Movement movement, QPoint destination)
 {
     return (int) interceptor.Invoke("moveItem#$#", "moveItem(QGraphicsItem*, Plasma::Animator::Movement, const QPoint&)", typeof(int), typeof(IQGraphicsItem), item, typeof(Plasma.Animator.Movement), movement, typeof(QPoint), destination);
 }
开发者ID:KDE,项目名称:kimono,代码行数:11,代码来源:Plasma_Animator.cs


示例20: Run

 /// <remarks>
 ///  Requests this match to activae using the given context
 /// <param> name="context" the context to use in conjunction with this run
 /// </param> @sa AbstractRunner.Run
 ///          </remarks>        <short>    Requests this match to activae using the given context </short>
 public void Run(Plasma.RunnerContext context)
 {
     interceptor.Invoke("run#", "run(const Plasma::RunnerContext&) const", typeof(void), typeof(Plasma.RunnerContext), context);
 }
开发者ID:KDE,项目名称:kimono,代码行数:9,代码来源:Plasma_QueryMatch.cs



注:本文中的Plasma类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Platform类代码示例发布时间:2022-05-24
下一篇:
C# PlantType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap