Development/Tutorials/Plasma4/JavaScript/API-Enumerations: Difference between revisions

From KDE TechBase
(Created page with '== Global Enumerations == In the global namespace are a set of useful enumerations that can be used with various classes in the Simplified Javascript Plasmoid API. These include:...')
 
 
(No difference)

Latest revision as of 23:27, 11 September 2014

Global Enumerations

In the global namespace are a set of useful enumerations that can be used with various classes in the Simplified Javascript Plasmoid API. These include:

AspectRatioMode

  • IgnoreAspectRatio: The Plasmoid can be freely resized
  • KeepAspectRatio: The Plasmoid keeps a fixed aspect ratio
  • Square: The Plasmoid is always a square
  • ConstrainedSquare: The Plasmoid is no wider (in horizontal formfactors) or no higher (in vertical ones) than a square
  • FixedSize: The Plasmoid cannot be resized

FormFactor

  • Planar: The Plasmoid lives in a plane and has two degrees of freedom to grow. Optimize for desktop, laptop or tablet usage: a high resolution screen 1-3 feet distant from the viewer.
  • MediaCenter: As with Plasmoid the applet lives in a but the interface should be optimized for medium-to-high resolution screens that 5-15 feet distant from the viewer. Sometimes referred to as a "ten foot interface".
  • Horizontal: The Plasmoid is constrained vertically, but can expand horizontally.
  • Vertical: The Plasmoid is constrained horizontally, but can expand vertically.

Location

  • Floating: Free floating. Neither geometry or z-ordering is described precisely by this value.
  • Desktop: On the planar desktop layer, extending across the full screen from edge to edge
  • FullScreen
  • TopEdge
  • BottomEdge
  • LeftEdge
  • RightEdge

AnimationDirection

  • AnimationForward
  • AnimationBackward

BackgroundHints

  • NoBackground
  • StandardBackground
  • TranslucentBackground
  • DefaultBackground

QtAlignment

  • QtAlignLeft
  • QtAlignRight
  • QtAlignHCenter
  • QtAlignJustify
  • QtAlignTop
  • QtAlignBottom
  • QtAlignVCenter

If you need to align something in the center (both horizontally and vertically) you can sum the constans.

QtAnchorPoint

  • QtAnchorLeft
  • QtAnchorRight
  • QtAnchorBottom
  • QtAnchorTop
  • QtAnchorHorizontalCenter
  • QtAnchorVerticalCenter

QtCorner

  • QtTopLeftCorner
  • QtTopRightCorner
  • QtBottomLeftCorner
  • QtBottomRightCorner

QtMouseButton

  • QtNoButton
  • QtLeftButton
  • QtRightButton
  • QtMidButton
  • QtXButton1
  • QtXButton2

QtOrientation

  • QtHorizontal
  • QtVertical

QtScrollBarPolicy

  • QtScrollBarAsNeeded
  • QtScrollBarAlwaysOff
  • QtScrollBarAlwaysOn

QtSizePolicy

  • QSizePolicyFixed
  • QSizePolicyMinimum
  • QSizePolicyMaximum
  • QSizePolicyPreferred
  • QSizePolicyExpanding
  • QSizePolicyMinimumExpanding
  • QSizePolicyIgnored

Theme Colors (API v3)

  • TextColor
  • HighlightColor
  • BackgroundColor
  • ButtonTextColor
  • ButtonBackgroundColor
  • LinkColor
  • VisitedLinkColor

Status

  • UnknownStatus The status is unknown
  • PassiveStatus The Item is passive
  • ActiveStatus The Item is active
  • NeedsAttentionStatus The Item needs attention
  • AcceptingInputStatus The Item is accepting input