QML元素

来源:互联网 发布:js 精确计时 编辑:程序博客网 时间:2024/04/29 19:20

这是Qt Quick子部分的QML元素的功能分组列表.

These are the functionally grouped lists of QML elements as part of Qt Quick.

声明元素时要带有名称和两个花括号.元素可能被嵌入到其他元素中,从而在两个元素间创建了父子关系.

Elements are declared with the their name and two curly braces. Elements may be nested in elements, thereby creating a parent-child relationship between the two elements.

要查看QML元素的功能列表,请见Groups Of Related QML Elements

To see the QML elements listed by functional area, see the Groups Of Related QML Elements page.

基本QML元素

  • Item -被其他QML元素继承的基本项 Basic item element inherited by QML elements
  • Component - 导入时封装了QML元素Encapsulates QML elements during importing
  • QtObject - 仅容纳一个objectName属性的基本元素Basic element containing only the objectName property

图形

  • Rectangle - 一个矩形元素A rectangle element
  • Image -屏幕上的一个位图 For incorporating bitmaps into a scene
  • BorderImage - 可使用图片作为边缘 Allows the use of images as borders
  • AnimatedImage - 未播放动画而存储的一系列帧 For playing animations stored in a series of frames
  • Gradient - 定义颜色渐变 For defining a color gradient
  • GradientStop -  为Gradient定义一个颜色 Used to define a color within a Gradient
  • SystemPalette -  提供访问Qt调色板的接口 Provides access to the Qt palettes

文字处理

  • Text -  向屏幕上插入格式化的文字 For inserting formatted text into a scene
  • TextInput -  获取用户键盘输入 Captures user key input
  • TextEdit - 显示多行可编辑的格式化文本 Displays multiple lines of editable formatted text
  • IntValidator -  验证整数Validates values as integers
  • DoubleValidator - 验证实数 Validates real values
  • RegExpValidator - 字符串正则表达式验证器 Validator for string regular expressions
  • FontLoader - 按名称或URL加载字体 Loads fonts by name or URL

鼠标和交互区域

  • MouseArea - 设置一块用于鼠标交互的区域 Sets up an area for mouse interaction
  • Keys - 提供一个带有附加属性的组件用于处理键盘输入Provides components with attached properties to handle key input.
  • FocusScope - 传递键盘焦点变化的元素 Element that mediate keyboard focus changes
  • Flickable - 提供实现"flicked"(弹性)效果的表面组件 Provides a surface that can be "flicked"
  • Flipable - 提供处理”flipping”(翻转)效果的表面组件 Provides a surface that produces "flipping" effects
  • PinchArea - 简单的挤压手势处理 Enables simple pinch gesture handling

定位器和重复器(Repeater)

  • Column - 垂直排列子元素 Arranges its children vertically
  • Row -  水平排列子元素 Arranges its children horizontally
  • Grid -  在网格中定位子元素 Positions its children in a grid
  • Flow - 按坐标定位子元素 Positions its children with wrapping support
  • Repeater - 使用一个模型创建多个组件 Uses a model to create multiple components

转换Transformations

  • Scale - 设置item的缩放行为 Assigns item scaling behaviors
  • Rotation - 设置item的选择行为 Assigns item rotation behaviors
  • Translate - 设置item的移动行为 Assigns item translation behaviors

状态States

  • State - 定义对象和属性的一系列配置值 Defines sets of configurations of objects and properties
  • PropertyChanges - 描述在状态中的属性变化 Describes property changes within a state
  • StateGroup - 包含一系列的状态和状态变换 Contains a set of states and state transitions
  • StateChangeScript - 时脚本绑定到一个状态上 Allows script binding in a state
  • ParentChange - 在状态改变时重定义item的父项 Re-parent an Item in a state change
  • AnchorChanges - 在状态中改变item的描点 Change the anchors of an item in a state

动画和过度(Transitions)

  • Transition - 状态改变时动画的过度 Animates transitions during state changes
  • SequentialAnimation - 顺序执行动画 Runs animations sequentially
  • ParallelAnimation - 并行执行动画 Runs animations in parallel
  • Behavior - 为属性变换指定默认动画 Specifies a default animation for property changes
  • PropertyAction - 在动画中设置直接的属性变化 Sets immediate property changes during animation
  • PauseAnimation - 暂停动画 Introduces a pause in an animation
  • SmoothedAnimation - 使属性平滑的到达指定值 Allows a property to smoothly track a value
  • SpringAnimation - 使属性向弹簧效果一样达到指定值 Allows a property to track a value in a spring-like motion
  • ScriptAction -  动画时执行脚本 Runs scripts during an animation

基于数据类型的元素动画属性 Elements that animate properties based on data types

  • PropertyAnimation - 基于属性变化的动画 Animates property changes
  • NumberAnimation - 基于greal类型属性的动画 Animates properties of type qreal
  • Vector3dAnimation - 基于QVector3d类型属性的动画 Animates properties of type QVector3d
  • ColorAnimation - 基于颜色属性的动画 Animates color changes
  • RotationAnimation - 基于旋转的动画 Animates rotations
  • ParentAnimation - 基于parent属性变化的动画 Animates parent changes
  • AnchorAnimation - 基于描点变化的动画 Animates anchor changes

模型和数据处理 Models and Data Handling

  • ListModel - 定义数据列表 Defines a list of data
  • ListElement - 在ListModel中定义数据项 Defines a data item in a ListModel
  • VisualItemModel - 包含定义在其可视化代理中的项 Contains items that already defines its own visual delegate
  • VisualDataModel - 封装一个模型和一个代理 Encapsulates a model and a delegate
  • XmlListModel - 使用XPath表达式指定一个模型 Specifies a model using XPath expressions
  • XmlRole - 为XmlListModel指定一个角色 Specifies a role for an XmlListModel
  • Binding - 在任意属性上绑定任意值 Binds any value to any property
  • Package - 可在不同视图中共享的项的集合 Collection that enables sharing of items within different views

视图Views

  • ListView - 提供一个可视化列表模型Provides a list visualization of a model
  • GridView - 提供一个可视化网格模型 Provides a grid visualization of a model
  • PathView - 假设模型的内容中含有一个路径.更多信息见Path Elements.Visualizes a model's contents along a path. See Path Elements for more information.

路径定义Path Definition

  • Path - 使用PathView定义一个路径 Defines a path used by PathView
  • PathLine - 在Path中定义一条线 Defines a line in Path
  • PathQuad - 在Path中定义一条二次方的贝塞尔曲线 Defines a quadratic Bezier curve in a Path
  • PathCubic - 在Path中定义一条三次方的贝塞尔曲线 Defines a cubic Bezier curve in a Path
  • PathAttribute - 允许设置Path的属性 Allows the setting of attributes along a Path
  • PathPercent - 修改Path中item的分布 Modifies the item distribution along a Path

功能Utility

  • Connections - 显示连接信号和槽 Explicitly connects signals and signal handlers
  • Timer - 提供定时器Provides timed triggers
  • Qt - QML中全局的Qt对象提供Qt中有用的枚举类型和函数.The QML global Qt object provides useful enums and functions from Qt.
  • WorkerScript - 可在QML中使用线程 Enables the use of threads in QML
  • Loader - 控制item或组件的加载 Controls the loading of items or components
  • LayoutItem - 允许在Qt的Graphics View布局中声明UI元素 Allows declarative UI elements inside Qt's Graphics View layouts

图像效果 Graphical Effects

  • 粒子(Particles) - 生成并播放粒子动画Generates and animates particles
  • ParticleMotionLinear - 向粒子增加直线运动行为 Adds linear motion behavior to Particles
  • ParticleMotionGravity - 向粒子增加自由落体运动行为 Adds gravitational motion to Particles
  • ParticleMotionWander - 向粒子增加不同的运动行为Adds varied motions to Particles
  • ShaderEffectItem - 允许在QML中使用OpenGL Shading Language(OpenGL阴影描述语言) Enables the use of OpenGL Shading Language together with QML
  • ShaderEffectSource - 封装QML对象树作为ShaderEffectItem 的元item Encapsulates QML item tree as a source item for ShaderEffectItem

扩展元素 Add-On Elements

这些元素不包括在QtQuick1.0模块中.要使用他们必须先获取并安装.These elements are not included in the QtQuick 1.0 module. Their respective QML bindings should first be obtained and installed.

  • QtWebKit QML模块 - WebView元素 - 显示web内容
  • Mobility QML Plugins
  • Qt Quick Components

 

0 0
原创粉丝点击