diff --git a/src/declarativeimports/core/plugins.qmltypes b/src/declarativeimports/core/plugins.qmltypes index b78040db5..b66b7d769 100644 --- a/src/declarativeimports/core/plugins.qmltypes +++ b/src/declarativeimports/core/plugins.qmltypes @@ -1,894 +1,893 @@ import QtQuick.tooling 1.2 // This file describes the plugin-supplied types contained in the library. // It is used for QML tooling purposes only. // // This file was auto-generated by: // 'qmlplugindump-qt5 -nonrelocatable org.kde.plasma.core 2.0 /home/koder/System/opt/kf5/lib64/qml' Module { dependencies: [ "QtQml 2.0", "QtQuick 2.6", "QtQuick.Controls 1.5", "QtQuick.Controls.Styles 1.4", "QtQuick.Controls.Styles.Plasma 2.0", "QtQuick.Layouts 1.1", "QtQuick.Window 2.2", "org.kde.kconfig 1.0", "org.kde.kquickcontrolsaddons 2.0", "org.kde.plasma.components 2.0", "org.kde.plasma.extras 2.0" ] Component { name: "ColorScope" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.plasma.core/ColorScope 2.0"] exportMetaObjectRevisions: [0] Property { name: "colorGroup"; type: "Plasma::Theme::ColorGroup" } Property { name: "textColor"; type: "QColor"; isReadonly: true } Property { name: "highlightColor"; type: "QColor"; isReadonly: true } Property { name: "highlightedTextColor"; type: "QColor"; isReadonly: true } Property { name: "backgroundColor"; type: "QColor"; isReadonly: true } Property { name: "positiveTextColor"; type: "QColor"; isReadonly: true } Property { name: "neutralTextColor"; type: "QColor"; isReadonly: true } Property { name: "negativeTextColor"; type: "QColor"; isReadonly: true } Property { name: "inherit"; type: "bool" } Signal { name: "colorsChanged" } } Component { name: "IconItem" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.plasma.core/IconItem 2.0"] exportMetaObjectRevisions: [0] Property { name: "source"; type: "QVariant" } Property { name: "colorGroup"; type: "Plasma::Theme::ColorGroup" } Property { name: "overlays"; type: "QStringList" } Property { name: "active"; type: "bool" } Property { name: "status"; type: "Plasma::Svg::Status" } Property { name: "animated"; type: "bool" } Property { name: "usesPlasmaTheme"; type: "bool" } Property { name: "roundToIconSize"; type: "bool" } Property { name: "valid"; type: "bool"; isReadonly: true } Property { name: "paintedWidth"; type: "int"; isReadonly: true } Property { name: "paintedHeight"; type: "int"; isReadonly: true } Property { name: "implicitHeight"; type: "int" } Property { name: "implicitWidth"; type: "int" } Signal { name: "paintedSizeChanged" } Signal { name: "implicitHeightChanged2" } Signal { name: "implicitWidthChanged2" } } Component { name: "Plasma::DataModel" prototype: "QAbstractItemModel" exports: ["org.kde.plasma.core/DataModel 2.0"] exportMetaObjectRevisions: [0] Property { name: "dataSource"; type: "QObject"; isPointer: true } Property { name: "keyRoleFilter"; type: "string" } Property { name: "sourceFilter"; type: "string" } Property { name: "count"; type: "int"; isReadonly: true } Signal { name: "sourceModelChanged" Parameter { type: "QObject"; isPointer: true } } Signal { name: "filterRegExpChanged" Parameter { type: "string" } } Method { name: "get" type: "QVariantMap" Parameter { name: "i"; type: "int" } } } Component { name: "Plasma::DataSource" prototype: "QObject" exports: ["org.kde.plasma.core/DataSource 2.0"] exportMetaObjectRevisions: [0] Property { name: "valid"; type: "bool"; isReadonly: true } Property { name: "interval"; type: "int" } Property { name: "intervalAlignment"; type: "Plasma::Types::IntervalAlignment" } Property { name: "dataEngine"; type: "string" } Property { name: "engine"; type: "string" } Property { name: "connectedSources"; type: "QStringList" } Property { name: "sources"; type: "QStringList"; isReadonly: true } Property { name: "data"; type: "QQmlPropertyMap"; isReadonly: true; isPointer: true } Property { name: "models"; type: "QQmlPropertyMap"; isReadonly: true; isPointer: true } Signal { name: "newData" Parameter { name: "sourceName"; type: "string" } Parameter { name: "data"; type: "QVariantMap" } } Signal { name: "sourceAdded" Parameter { name: "source"; type: "string" } } Signal { name: "sourceRemoved" Parameter { name: "source"; type: "string" } } Signal { name: "sourceConnected" Parameter { name: "source"; type: "string" } } Signal { name: "sourceDisconnected" Parameter { name: "source"; type: "string" } } Method { name: "dataUpdated" Parameter { name: "sourceName"; type: "string" } Parameter { name: "data"; type: "Plasma::DataEngine::Data" } } Method { name: "modelChanged" Parameter { name: "sourceName"; type: "string" } Parameter { name: "model"; type: "QAbstractItemModel"; isPointer: true } } Method { name: "serviceForSource" type: "QObject*" Parameter { name: "source"; type: "string" } } Method { name: "connectSource" Parameter { name: "source"; type: "string" } } Method { name: "disconnectSource" Parameter { name: "source"; type: "string" } } } Component { name: "Plasma::FrameSvg" prototype: "Plasma::Svg" exports: ["org.kde.plasma.core/FrameSvg 2.0"] exportMetaObjectRevisions: [0] Enum { name: "EnabledBorders" values: { "NoBorder": 0, "TopBorder": 1, "BottomBorder": 2, "LeftBorder": 4, "RightBorder": 8, "AllBorders": 15 } } Property { name: "enabledBorders"; type: "EnabledBorders" } Method { name: "setImagePath" Parameter { name: "path"; type: "string" } } Method { name: "resizeFrame" Parameter { name: "size"; type: "QSizeF" } } Method { name: "frameSize"; type: "QSizeF" } Method { name: "marginSize" type: "double" Parameter { name: "edge"; type: "Plasma::Types::MarginEdge" } } Method { name: "getMargins" Parameter { name: "left"; type: "qreal&" } Parameter { name: "top"; type: "qreal&" } Parameter { name: "right"; type: "qreal&" } Parameter { name: "bottom"; type: "qreal&" } } Method { name: "fixedMarginSize" type: "double" Parameter { name: "edge"; type: "Plasma::Types::MarginEdge" } } Method { name: "getFixedMargins" Parameter { name: "left"; type: "qreal&" } Parameter { name: "top"; type: "qreal&" } Parameter { name: "right"; type: "qreal&" } Parameter { name: "bottom"; type: "qreal&" } } Method { name: "contentsRect"; type: "QRectF" } Method { name: "setElementPrefix" Parameter { name: "location"; type: "Plasma::Types::Location" } } Method { name: "setElementPrefix" Parameter { name: "prefix"; type: "string" } } Method { name: "hasElementPrefix" type: "bool" Parameter { name: "prefix"; type: "string" } } Method { name: "hasElementPrefix" type: "bool" Parameter { name: "location"; type: "Plasma::Types::Location" } } Method { name: "prefix"; type: "string" } Method { name: "mask"; type: "QRegion" } Method { name: "setCacheAllRenderedFrames" Parameter { name: "cache"; type: "bool" } } Method { name: "cacheAllRenderedFrames"; type: "bool" } Method { name: "clearCache" } Method { name: "framePixmap"; type: "QPixmap" } Method { name: "paintFrame" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "target"; type: "QRectF" } Parameter { name: "source"; type: "QRectF" } } Method { name: "paintFrame" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "target"; type: "QRectF" } } Method { name: "paintFrame" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "pos"; type: "QPointF" } } Method { name: "paintFrame" Parameter { name: "painter"; type: "QPainter"; isPointer: true } } } Component { name: "Plasma::FrameSvgItem" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.plasma.core/FrameSvgItem 2.0"] exportMetaObjectRevisions: [0] Property { name: "imagePath"; type: "string" } Property { name: "prefix"; type: "QVariant" } Property { name: "usedPrefix"; type: "string"; isReadonly: true } Property { name: "margins"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "fixedMargins"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "enabledBorders"; type: "Plasma::FrameSvg::EnabledBorders" } Property { name: "fromCurrentTheme"; type: "bool"; isReadonly: true } Property { name: "colorGroup"; type: "Plasma::Theme::ColorGroup" } Property { name: "status"; type: "Plasma::Svg::Status" } Property { name: "mask"; type: "QRegion"; isReadonly: true } Signal { name: "repaintNeeded" } Method { name: "hasElementPrefix" type: "bool" Parameter { name: "prefix"; type: "string" } } } Component { name: "Plasma::FrameSvgItemMargins" prototype: "QObject" Property { name: "left"; type: "double"; isReadonly: true } Property { name: "top"; type: "double"; isReadonly: true } Property { name: "right"; type: "double"; isReadonly: true } Property { name: "bottom"; type: "double"; isReadonly: true } Property { name: "horizontal"; type: "double"; isReadonly: true } Property { name: "vertical"; type: "double"; isReadonly: true } Signal { name: "marginsChanged" } Method { name: "update" } } Component { name: "Plasma::QuickTheme" prototype: "Plasma::Theme" exports: ["org.kde.plasma.core/Theme 2.0"] isCreatable: false exportMetaObjectRevisions: [0] Property { name: "textColor"; type: "QColor"; isReadonly: true } Property { name: "highlightColor"; type: "QColor"; isReadonly: true } Property { name: "highlightedTextColor"; type: "QColor"; isReadonly: true } Property { name: "backgroundColor"; type: "QColor"; isReadonly: true } Property { name: "linkColor"; type: "QColor"; isReadonly: true } Property { name: "visitedLinkColor"; type: "QColor"; isReadonly: true } Property { name: "positiveTextColor"; type: "QColor"; isReadonly: true } Property { name: "neutralTextColor"; type: "QColor"; isReadonly: true } Property { name: "negativeTextColor"; type: "QColor"; isReadonly: true } Property { name: "buttonTextColor"; type: "QColor"; isReadonly: true } Property { name: "buttonBackgroundColor"; type: "QColor"; isReadonly: true } Property { name: "buttonHoverColor"; type: "QColor"; isReadonly: true } Property { name: "buttonFocusColor"; type: "QColor"; isReadonly: true } Property { name: "buttonHighlightedTextColor"; type: "QColor"; isReadonly: true } Property { name: "buttonPositiveTextColor"; type: "QColor"; isReadonly: true } Property { name: "buttonNeutralTextColor"; type: "QColor"; isReadonly: true } Property { name: "buttonNegativeTextColor"; type: "QColor"; isReadonly: true } Property { name: "viewTextColor"; type: "QColor"; isReadonly: true } Property { name: "viewBackgroundColor"; type: "QColor"; isReadonly: true } Property { name: "viewHoverColor"; type: "QColor"; isReadonly: true } Property { name: "viewFocusColor"; type: "QColor"; isReadonly: true } Property { name: "viewHighlightedTextColor"; type: "QColor"; isReadonly: true } Property { name: "viewPositiveTextColor"; type: "QColor"; isReadonly: true } Property { name: "viewNeutralTextColor"; type: "QColor"; isReadonly: true } Property { name: "viewNegativeTextColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryTextColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryBackgroundColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryHoverColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryFocusColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryHighlightedTextColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryPositiveTextColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryNeutralTextColor"; type: "QColor"; isReadonly: true } Property { name: "complementaryNegativeTextColor"; type: "QColor"; isReadonly: true } Signal { name: "themeChangedProxy" } } Component { name: "Plasma::SortFilterModel" prototype: "QSortFilterProxyModel" exports: [ "org.kde.plasma.core/SortFilterModel 2.0", "org.kde.plasma.core/SortFilterModel 2.1" ] exportMetaObjectRevisions: [0, 1] Property { name: "sourceModel"; type: "QAbstractItemModel"; isPointer: true } Property { name: "filterRegExp"; type: "string" } Property { name: "filterString"; revision: 1; type: "string" } Property { name: "filterCallback"; revision: 1; type: "QJSValue" } Property { name: "filterRole"; type: "string" } Property { name: "sortRole"; type: "string" } Property { name: "sortOrder"; type: "Qt::SortOrder" } Property { name: "count"; type: "int"; isReadonly: true } Signal { name: "sourceModelChanged" Parameter { type: "QObject"; isPointer: true } } Signal { name: "filterRegExpChanged" Parameter { type: "string" } } Signal { name: "filterStringChanged" revision: 1 Parameter { type: "string" } } Signal { name: "filterCallbackChanged" revision: 1 Parameter { type: "QJSValue" } } Method { name: "get" type: "QVariantMap" Parameter { name: "i"; type: "int" } } Method { name: "mapRowToSource" type: "int" Parameter { name: "i"; type: "int" } } Method { name: "mapRowFromSource" type: "int" Parameter { name: "i"; type: "int" } } } Component { name: "Plasma::Svg" prototype: "QObject" exports: ["org.kde.plasma.core/Svg 2.0"] exportMetaObjectRevisions: [0] Enum { name: "Status" values: { "Normal": 0, "Selected": 1 } } Property { name: "size"; type: "QSize" } Property { name: "multipleImages"; type: "bool" } Property { name: "imagePath"; type: "string" } Property { name: "usingRenderingCache"; type: "bool" } Property { name: "fromCurrentTheme"; type: "bool"; isReadonly: true } Property { name: "colorGroup"; type: "Plasma::Theme::ColorGroup" } Property { name: "status"; type: "Plasma::Svg::Status" } Signal { name: "repaintNeeded" } Signal { name: "colorHintChanged" } Signal { name: "fromCurrentThemeChanged" Parameter { name: "fromCurrentTheme"; type: "bool" } } Signal { name: "statusChanged" Parameter { name: "status"; type: "Plasma::Svg::Status" } } Method { name: "pixmap" type: "QPixmap" Parameter { name: "elementID"; type: "string" } } Method { name: "pixmap"; type: "QPixmap" } Method { name: "image" type: "QImage" Parameter { name: "size"; type: "QSize" } Parameter { name: "elementID"; type: "string" } } Method { name: "image" type: "QImage" Parameter { name: "size"; type: "QSize" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "point"; type: "QPointF" } Parameter { name: "elementID"; type: "string" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "point"; type: "QPointF" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "x"; type: "int" } Parameter { name: "y"; type: "int" } Parameter { name: "elementID"; type: "string" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "x"; type: "int" } Parameter { name: "y"; type: "int" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "rect"; type: "QRectF" } Parameter { name: "elementID"; type: "string" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "rect"; type: "QRectF" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "x"; type: "int" } Parameter { name: "y"; type: "int" } Parameter { name: "width"; type: "int" } Parameter { name: "height"; type: "int" } Parameter { name: "elementID"; type: "string" } } Method { name: "paint" Parameter { name: "painter"; type: "QPainter"; isPointer: true } Parameter { name: "x"; type: "int" } Parameter { name: "y"; type: "int" } Parameter { name: "width"; type: "int" } Parameter { name: "height"; type: "int" } } Method { name: "resize" Parameter { name: "width"; type: "double" } Parameter { name: "height"; type: "double" } } Method { name: "resize" Parameter { name: "size"; type: "QSizeF" } } Method { name: "resize" } Method { name: "elementSize" type: "QSize" Parameter { name: "elementId"; type: "string" } } Method { name: "elementRect" type: "QRectF" Parameter { name: "elementId"; type: "string" } } Method { name: "hasElement" type: "bool" Parameter { name: "elementId"; type: "string" } } Method { name: "isValid"; type: "bool" } } Component { name: "Plasma::SvgItem" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.plasma.core/SvgItem 2.0"] exportMetaObjectRevisions: [0] Property { name: "elementId"; type: "string" } Property { name: "svg"; type: "Plasma::Svg"; isPointer: true } Property { name: "naturalSize"; type: "QSizeF"; isReadonly: true } } Component { name: "Plasma::Theme" prototype: "QObject" Enum { name: "ColorGroup" values: { "NormalColorGroup": 0, "ButtonColorGroup": 1, "ViewColorGroup": 2, "ComplementaryColorGroup": 3 } } Property { name: "themeName"; type: "string"; isReadonly: true } Property { name: "useGlobalSettings"; type: "bool"; isReadonly: true } Property { name: "wallpaperPath"; type: "string"; isReadonly: true } Property { name: "defaultFont"; type: "QFont"; isReadonly: true } Property { name: "smallestFont"; type: "QFont"; isReadonly: true } Property { name: "styleSheet"; type: "string"; isReadonly: true } Signal { name: "themeChanged" } Method { name: "wallpaperPathForSize" type: "string" Parameter { name: "width"; type: "int" } Parameter { name: "height"; type: "int" } } Method { name: "wallpaperPathForSize" type: "string" Parameter { name: "width"; type: "int" } } Method { name: "wallpaperPathForSize"; type: "string" } Method { name: "mSize" type: "QSizeF" Parameter { name: "font"; type: "QFont" } } Method { name: "mSize"; type: "QSizeF" } } Component { name: "Plasma::Types" prototype: "QObject" exports: ["org.kde.plasma.core/Types 2.0"] isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Constraint" values: { "NoConstraint": 0, "FormFactorConstraint": 1, "LocationConstraint": 2, "ScreenConstraint": 4, "ImmutableConstraint": 8, "StartupCompletedConstraint": 16, "ContextConstraint": 32, "UiReadyConstraint": 64, "AllConstraints": 15 } } Enum { name: "FormFactor" values: { "Planar": 0, "MediaCenter": 1, "Horizontal": 2, "Vertical": 3, "Application": 4 } } Enum { name: "ContainmentType" values: { "NoContainmentType": -1, "DesktopContainment": 0, "PanelContainment": 1, "CustomContainment": 127, "CustomPanelContainment": 128, "CustomEmbeddedContainment": 129 } } Enum { name: "ActionType" values: { "AddAction": 0, "ConfigureAction": 100, "ControlAction": 200, "MiscAction": 300, "DestructiveAction": 400, "UserAction": 1400 } } Enum { name: "Direction" values: { "Down": 0, "Up": 1, "Left": 2, "Right": 3 } } Enum { name: "Location" values: { "Floating": 0, "Desktop": 1, "FullScreen": 2, "TopEdge": 3, "BottomEdge": 4, "LeftEdge": 5, "RightEdge": 6 } } Enum { name: "Position" values: { "LeftPositioned": 0, "RightPositioned": 1, "TopPositioned": 2, "BottomPositioned": 3, "CenterPositioned": 4 } } Enum { name: "PopupPlacement" values: { "FloatingPopup": 0, "TopPosedLeftAlignedPopup": 1, "TopPosedRightAlignedPopup": 2, "LeftPosedTopAlignedPopup": 3, "LeftPosedBottomAlignedPopup": 4, "BottomPosedLeftAlignedPopup": 5, "BottomPosedRightAlignedPopup": 6, "RightPosedTopAlignedPopup": 7, "RightPosedBottomAlignedPopup": 8 } } Enum { name: "FlipDirection" values: { "NoFlip": 0, "HorizontalFlip": 1, "VerticalFlip": 2 } } Enum { name: "IntervalAlignment" values: { "NoAlignment": 0, "AlignToMinute": 1, "AlignToHour": 2 } } Enum { name: "ImmutabilityType" values: { "Mutable": 1, "UserImmutable": 2, "SystemImmutable": 4 } } Enum { name: "ComponentType" values: { "AppletComponent": 1, "DataEngineComponent": 2, "ContainmentComponent": 4, "WallpaperComponent": 8, "GenericComponent": 16 } } Enum { name: "MarginEdge" values: { "TopMargin": 0, "BottomMargin": 1, "LeftMargin": 2, "RightMargin": 3 } } Enum { name: "ItemStatus" values: { "UnknownStatus": 0, "PassiveStatus": 1, "ActiveStatus": 2, "NeedsAttentionStatus": 3, "RequiresAttentionStatus": 4, "AcceptingInputStatus": 5, "HiddenStatus": 6 } } Enum { name: "TrustLevel" values: { "UnverifiableTrust": 0, "CompletelyUntrusted": 1, "UnknownTrusted": 2, "UserTrusted": 3, "SelfTrusted": 4, "FullyTrusted": 5, "UltimatelyTrusted": 6 } } Enum { name: "BackgroundHints" values: { "NoBackground": 0, "StandardBackground": 1, "TranslucentBackground": 2, "DefaultBackground": 1 } } } Component { name: "Plasma::WindowThumbnail" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.plasma.core/WindowThumbnail 2.0"] exportMetaObjectRevisions: [0] Property { name: "winId"; type: "uint" } Property { name: "paintedWidth"; type: "double"; isReadonly: true } Property { name: "paintedHeight"; type: "double"; isReadonly: true } Property { name: "thumbnailAvailable"; type: "bool"; isReadonly: true } Signal { name: "paintedSizeChanged" } } Component { name: "PlasmaQuick::Dialog" defaultProperty: "mainItem" prototype: "QQuickWindow" exports: ["org.kde.plasma.core/Dialog 2.0"] exportMetaObjectRevisions: [0] Enum { name: "WindowType" values: { "Normal": 0, "Dock": 2, "DialogWindow": 5, "PopupMenu": 11, "Tooltip": 12, "Notification": 13, "OnScreenDisplay": 16, "CriticalNotification": 17 } } Enum { name: "BackgroundHints" values: { "NoBackground": 0, "StandardBackground": 1 } } Property { name: "mainItem"; type: "QQuickItem"; isPointer: true } Property { name: "visualParent"; type: "QQuickItem"; isPointer: true } Property { name: "margins"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "location"; type: "Plasma::Types::Location" } Property { name: "type"; type: "WindowType" } Property { name: "hideOnWindowDeactivate"; type: "bool" } Property { name: "outputOnly"; type: "bool" } Property { name: "flags"; type: "Qt::WindowFlags" } Property { name: "backgroundHints"; type: "BackgroundHints" } Property { name: "visible"; type: "bool" } Signal { name: "visibleChangedProxy" } Signal { name: "windowDeactivated" } } Component { name: "QAbstractProxyModel" prototype: "QAbstractItemModel" Property { name: "sourceModel"; type: "QAbstractItemModel"; isPointer: true } Method { name: "mapToSource" type: "QModelIndex" Parameter { name: "proxyIndex"; type: "QModelIndex" } } Method { name: "mapFromSource" type: "QModelIndex" Parameter { name: "sourceIndex"; type: "QModelIndex" } } Method { name: "mapSelectionToSource" type: "QItemSelection" Parameter { name: "selection"; type: "QItemSelection" } } Method { name: "mapSelectionFromSource" type: "QItemSelection" Parameter { name: "selection"; type: "QItemSelection" } } } Component { name: "QQmlPropertyMap" prototype: "QObject" Signal { name: "valueChanged" Parameter { name: "key"; type: "string" } Parameter { name: "value"; type: "QVariant" } } Method { name: "keys"; type: "QStringList" } } Component { name: "QSortFilterProxyModel" prototype: "QAbstractProxyModel" Property { name: "filterRegExp"; type: "QRegExp" } Property { name: "filterRegularExpression"; type: "QRegularExpression" } Property { name: "filterKeyColumn"; type: "int" } Property { name: "dynamicSortFilter"; type: "bool" } Property { name: "filterCaseSensitivity"; type: "Qt::CaseSensitivity" } Property { name: "sortCaseSensitivity"; type: "Qt::CaseSensitivity" } Property { name: "isSortLocaleAware"; type: "bool" } Property { name: "sortRole"; type: "int" } Property { name: "filterRole"; type: "int" } Property { name: "recursiveFilteringEnabled"; type: "bool" } Method { name: "setFilterRegExp" Parameter { name: "pattern"; type: "string" } } Method { name: "setFilterRegExp" Parameter { name: "regExp"; type: "QRegExp" } } Method { name: "setFilterRegularExpression" Parameter { name: "pattern"; type: "string" } } Method { name: "setFilterRegularExpression" Parameter { name: "regularExpression"; type: "QRegularExpression" } } Method { name: "setFilterWildcard" Parameter { name: "pattern"; type: "string" } } Method { name: "setFilterFixedString" Parameter { name: "pattern"; type: "string" } } Method { name: "clear" } Method { name: "invalidate" } } Component { name: "ServiceOperationStatus" prototype: "QObject" exports: ["org.kde.plasma.core/ServiceOperationStatus 2.0"] exportMetaObjectRevisions: [0] Property { name: "service"; type: "Plasma::Service"; isPointer: true } Property { name: "operation"; type: "string" } Property { name: "enabled"; type: "bool" } } Component { name: "ToolTip" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.plasma.core/ToolTipArea 2.0"] exportMetaObjectRevisions: [0] Property { name: "mainItem"; type: "QQuickItem"; isPointer: true } Property { name: "mainText"; type: "string" } Property { name: "subText"; type: "string" } Property { name: "textFormat"; type: "int" } Property { name: "icon"; type: "QVariant" } Property { name: "containsMouse"; type: "bool"; isReadonly: true } Property { name: "location"; type: "Plasma::Types::Location" } Property { name: "image"; type: "QVariant" } Property { name: "active"; type: "bool" } Property { name: "interactive"; type: "bool" } Signal { name: "aboutToShow" } Method { name: "hideToolTip" } } Component { name: "Units" prototype: "QObject" exports: ["org.kde.plasma.core/Units 2.0"] isCreatable: false exportMetaObjectRevisions: [0] Property { name: "gridUnit"; type: "int"; isReadonly: true } Property { name: "iconSizes"; type: "QQmlPropertyMap"; isReadonly: true; isPointer: true } Property { name: "iconSizeHints"; type: "QQmlPropertyMap"; isReadonly: true; isPointer: true } Property { name: "smallSpacing"; type: "int"; isReadonly: true } Property { name: "largeSpacing"; type: "int"; isReadonly: true } Property { name: "devicePixelRatio"; type: "double"; isReadonly: true } Property { name: "longDuration"; type: "int"; isReadonly: true } Property { name: "shortDuration"; type: "int"; isReadonly: true } - Property { name: "veryLongDuration"; type: "int"; isReadonly: true } Signal { name: "spacingChanged" } Signal { name: "durationChanged" } Method { name: "roundToIconSize" type: "int" Parameter { name: "size"; type: "int" } } } } diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp index edb853476..146ce8525 100644 --- a/src/declarativeimports/core/units.cpp +++ b/src/declarativeimports/core/units.cpp @@ -1,284 +1,279 @@ /*************************************************************************** * Copyright 2013 Marco Martin * * Copyright 2014 Sebastian Kügler * * Copyright 2014 David Edmundson * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #include "units.h" #include #include #include #include #include #include #include #include #include #include -const int defaultLongDuration = 250; +const int defaultLongDuration = 120; SharedAppFilter::SharedAppFilter(QObject *parent) : QObject(parent) { QCoreApplication::instance()->installEventFilter(this); } SharedAppFilter::~SharedAppFilter() {} bool SharedAppFilter::eventFilter(QObject *watched, QEvent *event) { if (watched == QCoreApplication::instance()) { if (event->type() == QEvent::ApplicationFontChange) { emit fontChanged(); } } return QObject::eventFilter(watched, event); } SharedAppFilter *Units::s_sharedAppFilter = nullptr; Units::Units(QObject *parent) : QObject(parent), m_gridUnit(-1), m_devicePixelRatio(-1), m_smallSpacing(-1), m_largeSpacing(-1), m_longDuration(defaultLongDuration) // default base value for animations { if (!s_sharedAppFilter) { s_sharedAppFilter = new SharedAppFilter(); } m_iconSizes = new QQmlPropertyMap(this); m_iconSizeHints = new QQmlPropertyMap(this); updateDevicePixelRatio(); // also updates icon sizes updateSpacing(); // updates gridUnit and *Spacing properties connect(KIconLoader::global(), &KIconLoader::iconLoaderSettingsChanged, this, &Units::iconLoaderSettingsChanged); QObject::connect(s_sharedAppFilter, &SharedAppFilter::fontChanged, this, &Units::updateSpacing); m_animationSpeedWatcher = KConfigWatcher::create(KSharedConfig::openConfig()); connect(m_animationSpeedWatcher.data(), &KConfigWatcher::configChanged, this, [this](const KConfigGroup &group, const QByteArrayList &names) { if (group.name() == QLatin1String("KDE") && names.contains(QByteArrayLiteral("AnimationDurationFactor"))) { updateAnimationSpeed(); } }); updateAnimationSpeed(); } Units::~Units() { } Units &Units::instance() { static Units units; return units; } void Units::updateAnimationSpeed() { KConfigGroup generalCfg = KConfigGroup(KSharedConfig::openConfig(), QStringLiteral("KDE")); const qreal animationSpeedModifier = qMax(0.0, generalCfg.readEntry("AnimationDurationFactor", 1.0)); // Read the old longDuration value for compatibility KConfigGroup cfg = KConfigGroup(KSharedConfig::openConfig(QStringLiteral("plasmarc")), QStringLiteral("Units")); int longDuration = cfg.readEntry("longDuration", defaultLongDuration); longDuration = qRound(longDuration * animationSpeedModifier); // Animators with a duration of 0 do not fire reliably // see Bug 357532 and QTBUG-39766 longDuration = qMax(1, longDuration); if (longDuration != m_longDuration) { m_longDuration = longDuration; emit durationChanged(); } } void Units::iconLoaderSettingsChanged() { m_iconSizes->insert(QStringLiteral("desktop"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Desktop))); m_iconSizes->insert(QStringLiteral("tiny"), devicePixelIconSize(KIconLoader::SizeSmall) / 2); m_iconSizes->insert(QStringLiteral("small"), devicePixelIconSize(KIconLoader::SizeSmall)); m_iconSizes->insert(QStringLiteral("smallMedium"), devicePixelIconSize(KIconLoader::SizeSmallMedium)); m_iconSizes->insert(QStringLiteral("medium"), devicePixelIconSize(KIconLoader::SizeMedium)); m_iconSizes->insert(QStringLiteral("large"), devicePixelIconSize(KIconLoader::SizeLarge)); m_iconSizes->insert(QStringLiteral("huge"), devicePixelIconSize(KIconLoader::SizeHuge)); m_iconSizes->insert(QStringLiteral("enormous"), devicePixelIconSize(KIconLoader::SizeEnormous)); m_iconSizeHints->insert(QStringLiteral("panel"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Panel))); m_iconSizeHints->insert(QStringLiteral("desktop"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Desktop))); emit iconSizesChanged(); emit iconSizeHintsChanged(); } QQmlPropertyMap *Units::iconSizes() const { return m_iconSizes; } QQmlPropertyMap *Units::iconSizeHints() const { return m_iconSizeHints; } int Units::roundToIconSize(int size) { /*Do *not* use devicePixelIconSize here, we want to use the sizes of the pixmaps of the smallest icons on the disk. And those are unaffected by dpi*/ if (size <= 0) { return 0; } else if (size < KIconLoader::SizeSmall) { return KIconLoader::SizeSmall/2; } else if (size < KIconLoader::SizeSmallMedium) { return KIconLoader::SizeSmall; } else if (size < KIconLoader::SizeMedium) { return KIconLoader::SizeSmallMedium; } else if (size < KIconLoader::SizeLarge) { return KIconLoader::SizeMedium; } else if (size < KIconLoader::SizeHuge) { return KIconLoader::SizeLarge; } else { return size; } } int Units::devicePixelIconSize(const int size) const { /* in kiconloader.h enum StdSizes { SizeSmall=16, SizeSmallMedium=22, SizeMedium=32, SizeLarge=48, SizeHuge=64, SizeEnormous=128 }; */ // Scale the icon sizes up using the devicePixelRatio // This function returns the next stepping icon size // and multiplies the global settings with the dpi ratio. const qreal ratio = devicePixelRatio(); if (ratio < 1.5) { return size; } else if (ratio < 2.0) { return size * 1.5; } else if (ratio < 2.5) { return size * 2.0; } else if (ratio < 3.0) { return size * 2.5; } else if (ratio < 3.5) { return size * 3.0; } else { return size * ratio; } // FIXME: Add special casing for < 64 cases: align to kiconloader size } qreal Units::devicePixelRatio() const { return m_devicePixelRatio; } void Units::updateDevicePixelRatio() { // Using QGuiApplication::devicePixelRatio() gives too coarse values, // i.e. it directly jumps from 1.0 to 2.0. We want tighter control on // sizing, so we compute the exact ratio and use that. // TODO: make it possible to adapt to the dpi for the current screen dpi // instead of assuming that all of them use the same dpi which applies for // X11 but not for other systems. QScreen *primary = QGuiApplication::primaryScreen(); if (!primary) { return; } const qreal dpi = primary->logicalDotsPerInchX(); // Usual "default" is 96 dpi // that magic ratio follows the definition of "device independent pixel" by Microsoft m_devicePixelRatio = (qreal)dpi / (qreal)96; iconLoaderSettingsChanged(); emit devicePixelRatioChanged(); } int Units::gridUnit() const { return m_gridUnit; } int Units::smallSpacing() const { return m_smallSpacing; } int Units::largeSpacing() const { return m_largeSpacing; } void Units::updateSpacing() { int gridUnit = QFontMetrics(QGuiApplication::font()).boundingRect(QStringLiteral("M")).height(); if (gridUnit % 2 != 0) { gridUnit++; } if (gridUnit != m_gridUnit) { m_gridUnit = gridUnit; emit gridUnitChanged(); } if (gridUnit != m_largeSpacing) { m_smallSpacing = qMax(2, (int)(gridUnit / 4)); // 1/4 of gridUnit, at least 2 m_largeSpacing = gridUnit; // msize.height emit spacingChanged(); } } int Units::longDuration() const { return m_longDuration; } int Units::shortDuration() const { - return qMax(1, qRound(m_longDuration * 0.6)); -} - -int Units::veryLongDuration() const -{ - return m_longDuration * 2; + return qMax(1, m_longDuration / 5); } #include "moc_units.cpp" diff --git a/src/declarativeimports/core/units.h b/src/declarativeimports/core/units.h index 129a3bfcf..f3d444c7f 100644 --- a/src/declarativeimports/core/units.h +++ b/src/declarativeimports/core/units.h @@ -1,253 +1,241 @@ /*************************************************************************** * Copyright 2013 Marco Martin * * Copyright 2014 Sebastian Kügler * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ #ifndef UNITS_H #define UNITS_H #include #include #include #include class QQuickItem; class SharedAppFilter : public QObject { Q_OBJECT public: explicit SharedAppFilter(QObject *parent = nullptr); ~SharedAppFilter() override; Q_SIGNALS: void fontChanged(); protected: bool eventFilter(QObject *watched, QEvent *event) override; }; /** * @class Units * @short Expose sizes to QML */ class Units : public QObject { Q_OBJECT /** * The fundamental unit of space that should be used for sizes, expressed in pixels. * Given the screen has an accurate DPI settings, it corresponds to a width of * the capital letter M */ Q_PROPERTY(int gridUnit READ gridUnit NOTIFY gridUnitChanged) /** * units.iconSizes provides access to platform-dependent icon sizing * * The icon sizes provided are normalized for different DPI, so icons * will scale depending on the DPI. * * Icon sizes from KIconLoader, adjusted to devicePixelRatio: * * small * * smallMedium * * medium * * large * * huge * * enormous * * desktop (DEPRECATED: use iconSizeHints instead) * */ //note the iconSizeChanged signal indicates that one (or more) of these icons have changed //but the property map itself remains constant Q_PROPERTY(QQmlPropertyMap *iconSizes READ iconSizes CONSTANT) /** * units.iconSizeHints provides access to user-configurable icon size hints, * to be used where appropriate in the user interface. * * Conceptually, an icon size hint is a key that has one of the sizes from * @iconSizes property as value. * * Currently available hints: * * panel * * desktop */ //note the iconSizeHintsChanged signal indicates that one (or more) of these icons have changed //but the property map itself remains constant Q_PROPERTY(QQmlPropertyMap *iconSizeHints READ iconSizeHints CONSTANT) // layout hints /** * units.smallSpacing is the amount of spacing that should be used around smaller UI elements, * for example as spacing in Columns. Internally, this size depends on the size of * the default font as rendered on the screen, so it takes user-configured font size and DPI * into account. */ Q_PROPERTY(int smallSpacing READ smallSpacing NOTIFY spacingChanged) /** * units.largeSpacing is the amount of spacing that should be used inside bigger UI elements, * for example between an icon and the corresponding text. Internally, this size depends on * the size of the default font as rendered on the screen, so it takes user-configured font * size and DPI into account. */ Q_PROPERTY(int largeSpacing READ largeSpacing NOTIFY spacingChanged) /** * The ratio between physical and device-independent pixels. This value does not depend on the \ * size of the configured font. If you want to take font sizes into account when scaling elements, * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing. * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft. */ Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY devicePixelRatioChanged) /** * units.longDuration should be used for longer, screen-covering animations, for opening and * closing of dialogs and other "not too small" animations */ Q_PROPERTY(int longDuration READ longDuration NOTIFY durationChanged) /** * units.shortDuration should be used for short animations, such as accentuating a UI event, * hover events, etc.. */ Q_PROPERTY(int shortDuration READ shortDuration NOTIFY durationChanged) - /** - * units.veryLongDuration should be used for specialty animations that benefit - * from being even longer than longDuration. - */ - Q_PROPERTY(int veryLongDuration READ veryLongDuration NOTIFY durationChanged) - public: /// @cond INTERNAL_DOCS ~Units(); /** * @return a reference to the global Units instance * @since 5.31 */ static Units &instance(); /** * @return pixel value for a grid Unit. Depends on DPI and font size. */ int gridUnit() const; /** * @return The ratio between physical and device-independent pixels. */ qreal devicePixelRatio() const; /** * @return map with iconsizes, indexed by name */ QQmlPropertyMap *iconSizes() const; /** * @return map with user-configurable icon size hints, indexed by name * @since 5.33 */ QQmlPropertyMap *iconSizeHints() const; /** * @return Pixel value for large spacing between elements. * @since 5.0 */ int smallSpacing() const; /** * @return Pixel value for large spacing between elements. * @since 5.0 */ int largeSpacing() const; /** * @return Duration for long animations, in milliseconds. * @since 5.0 */ int longDuration() const; /** * @return Duration for short animations, in milliseconds. * @since 5.0 */ int shortDuration() const; - - /** - * @return Duration for very long animations, in milliseconds. - * @since 5.69 - */ - int veryLongDuration() const; /// @endcond /** * @return a size rounded tothe nearest inferior standard icon size. * sizes larger than iconSizes.huge, it will be returned unmodified * @param int size the size we want to be rounded down * @see iconSizes */ Q_INVOKABLE static int roundToIconSize(int size); Q_SIGNALS: void devicePixelRatioChanged(); void gridUnitChanged(); void iconSizesChanged(); void iconSizeHintsChanged(); void spacingChanged(); void durationChanged(); private Q_SLOTS: void iconLoaderSettingsChanged(); void updateSpacing(); private: Units(QObject *parent = nullptr); Units(Units const&) = delete; // Copy construct Units(Units&&) = delete; // Move construct Units& operator=(Units const&) = delete; // Copy assign Units& operator=(Units &&) = delete; // Move assign void updateDevicePixelRatio(); void updateAnimationSpeed(); /** * @return The dpi-adjusted size for a given icon size */ int devicePixelIconSize(const int size) const; int m_gridUnit; qreal m_devicePixelRatio; QQmlPropertyMap *m_iconSizes; QQmlPropertyMap *m_iconSizeHints; static SharedAppFilter *s_sharedAppFilter; int m_smallSpacing; int m_largeSpacing; KConfigWatcher::Ptr m_animationSpeedWatcher; int m_longDuration; }; #endif //UNITS_H diff --git a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml index 9ddb24a8e..40903b7aa 100644 --- a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml @@ -1,136 +1,130 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.4 import QtQuick.Window 2.2 import org.kde.plasma.core 2.0 as PlasmaCore import QtQuick.Controls 1.4 as QtQuickControls import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate import org.kde.kirigami 2.4 pragma Singleton QtObject { id: unitsRoot /** * The fundamental unit of space that should be used for sizes, expressed in pixels. * Given the screen has an accurate DPI settings, it corresponds to a width of * the capital letter M */ property int gridUnit: fontMetrics.height /** * units.iconSizes provides access to platform-dependent icon sizing * * The icon sizes provided are normalized for different DPI, so icons * will scale depending on the DPI. * * Icon sizes from KIconLoader, adjusted to devicePixelRatio: * * small * * smallMedium * * medium * * large * * huge * * enormous * * Not devicePixelRation-adjusted:: * * desktop */ property QtObject iconSizes: QtObject { property int small: Math.floor(fontMetrics.roundedIconSize(16 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int smallMedium: Math.floor(fontMetrics.roundedIconSize(22 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int medium: Math.floor(fontMetrics.roundedIconSize(32 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int large: Math.floor(fontMetrics.roundedIconSize(48 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int huge: Math.floor(fontMetrics.roundedIconSize(64 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int enormous: Math.floor(128 * devicePixelRatio * (Settings.isMobile ? 1.5 : 1)) } /** * units.smallSpacing is the amount of spacing that should be used around smaller UI elements, * for example as spacing in Columns. Internally, this size depends on the size of * the default font as rendered on the screen, so it takes user-configured font size and DPI * into account. */ property int smallSpacing: Math.floor(gridUnit/4) /** * units.largeSpacing is the amount of spacing that should be used inside bigger UI elements, * for example between an icon and the corresponding text. Internally, this size depends on * the size of the default font as rendered on the screen, so it takes user-configured font * size and DPI into account. */ property int largeSpacing: smallSpacing * 2 /** * The ratio between physical and device-independent pixels. This value does not depend on the \ * size of the configured font. If you want to take font sizes into account when scaling elements, * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing. * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft. */ property real devicePixelRatio: Math.max(1, (fontMetrics.font.pixelSize / fontMetrics.font.pointSize)) /** * units.longDuration should be used for longer, screen-covering animations, for opening and * closing of dialogs and other "not too small" animations */ property int longDuration: units.longDuration /** * units.shortDuration should be used for short animations, such as accentuating a UI event, * hover events, etc.. */ property int shortDuration: units.shortDuration - /** - * units.veryLongDuration should be used for specialty animations that benefit - * from being even longer than longDuration. - */ - property int veryLongDuration: units.veryLongDuration - readonly property QtObject __styleItem: QtQuickControlsPrivate.StyleItem {elementType: "frame" } /** * How much the mouse scroll wheel scrolls, expressed in lines of text. * Note: this is strictly for classical mouse wheels, touchpads 2 figer scrolling won't be affected */ readonly property int wheelScrollLines: __styleItem.styleHint("wheelScrollLines") property int toolTipDelay: 700 property variant fontMetrics: TextMetrics { text: "M" function roundedIconSize(size) { if (size < 16) { return size; } else if (size < 22) { return 16; } else if (size < 32) { return 22; } else if (size < 48) { return 32; } else if (size < 64) { return 48; } else { return size; } } } } diff --git a/src/declarativeimports/kirigamiplasmastyle/Units.qml b/src/declarativeimports/kirigamiplasmastyle/Units.qml index 19bd59d60..ef4b6b8d1 100644 --- a/src/declarativeimports/kirigamiplasmastyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmastyle/Units.qml @@ -1,131 +1,125 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ pragma Singleton import QtQuick 2.4 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.4 QtObject { /** * The fundamental unit of space that should be used for sizes, expressed in pixels. * Given the screen has an accurate DPI settings, it corresponds to a width of * the capital letter M */ property int gridUnit: units.gridUnit /** * units.iconSizes provides access to platform-dependent icon sizing * * The icon sizes provided are normalized for different DPI, so icons * will scale depending on the DPI. * * Icon sizes from KIconLoader, adjusted to devicePixelRatio: * * small * * smallMedium * * medium * * large * * huge * * enormous * * Not devicePixelRation-adjusted:: * * desktop */ property QtObject iconSizes: QtObject { property int small: Math.floor(fontMetrics.roundedIconSize(16 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int smallMedium: Math.floor(fontMetrics.roundedIconSize(22 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int medium: Math.floor(fontMetrics.roundedIconSize(32 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int large: Math.floor(fontMetrics.roundedIconSize(48 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int huge: Math.floor(fontMetrics.roundedIconSize(64 * devicePixelRatio) * (Settings.isMobile ? 1.5 : 1)) property int enormous: Math.floor(128 * devicePixelRatio * (Settings.isMobile ? 1.5 : 1)) } /** * units.smallSpacing is the amount of spacing that should be used around smaller UI elements, * for example as spacing in Columns. Internally, this size depends on the size of * the default font as rendered on the screen, so it takes user-configured font size and DPI * into account. */ property int smallSpacing: Math.floor(gridUnit/4) /** * units.largeSpacing is the amount of spacing that should be used inside bigger UI elements, * for example between an icon and the corresponding text. Internally, this size depends on * the size of the default font as rendered on the screen, so it takes user-configured font * size and DPI into account. */ property int largeSpacing: smallSpacing * 2 /** * The ratio between physical and device-independent pixels. This value does not depend on the \ * size of the configured font. If you want to take font sizes into account when scaling elements, * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing. * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft. */ property real devicePixelRatio: units.devicePixelRatio /** * units.longDuration should be used for longer, screen-covering animations, for opening and * closing of dialogs and other "not too small" animations */ property int longDuration: units.longDuration /** * units.shortDuration should be used for short animations, such as accentuating a UI event, * hover events, etc.. */ property int shortDuration: units.shortDuration - /** - * units.veryLongDuration should be used for specialty animations that benefit - * from being even longer than longDuration. - */ - property int veryLongDuration: units.veryLongDuration - /** * How much the mouse scroll wheel scrolls, expressed in lines of text. * Note: this is strictly for classical mouse wheels, touchpads 2 figer scrolling won't be affected */ property int wheelScrollLines: 3 property int toolTipDelay: Settings.tabletMode ? Qt.styleHints.mousePressAndHoldInterval : 700 /** * metrics used by the default font */ property variant fontMetrics: TextMetrics { text: "M" function roundedIconSize(size) { if (size < 16) { return size; } else if (size < 22) { return 16; } else if (size < 32) { return 22; } else if (size < 48) { return 32; } else if (size < 64) { return 48; } else { return size; } } } }