阻抗弹窗

This commit is contained in:
zxj
2024-11-29 17:47:45 +08:00
parent d5f31c8108
commit 4ce8544582
997 changed files with 255048 additions and 1110 deletions

View File

@@ -0,0 +1,42 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick.Controls.Styles 1.3
ApplicationWindowStyle { }

View File

@@ -0,0 +1,42 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick.Controls.Styles 1.1
BusyIndicatorStyle { }

View File

@@ -0,0 +1,62 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
property Component panel: StyleItem {
id: styleitem
elementType: "button"
sunken: control.pressed || (control.checkable && control.checked)
raised: !(control.pressed || (control.checkable && control.checked))
hover: control.hovered
text: control.iconSource === "" ? "" : control.text
hasFocus: control.activeFocus
hints: control.styleHints
// If no icon, let the style do the drawing
activeControl: control.isDefault ? "default" : "f"
properties: {
"icon": control.__iconAction.__icon,
"menu": control.menu
}
}
}

View File

@@ -0,0 +1,42 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick.Controls.Styles 1.1
CalendarStyle {}

View File

@@ -0,0 +1,91 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
property Component panel: Item {
anchors.fill: parent
implicitWidth: styleitem.implicitWidth
implicitHeight: styleitem.implicitHeight
baselineOffset: styleitem.baselineOffset
StyleItem {
id: styleitem
elementType: "checkbox"
sunken: control.pressed
on: control.checked || control.pressed
hover: control.hovered
enabled: control.enabled
hasFocus: control.activeFocus && styleitem.style == "mac"
hints: control.styleHints
properties: {"partiallyChecked": (control.checkedState === Qt.PartiallyChecked) }
contentHeight: textitem.implicitHeight
contentWidth: Math.ceil(textitem.implicitWidth) + 4
property int indicatorWidth: pixelMetric("indicatorwidth") + (macStyle ? 2 : 4)
property bool macStyle: (style === "mac")
Text {
id: textitem
text: control.text
anchors.left: parent.left
anchors.leftMargin: parent.indicatorWidth
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: parent.macStyle ? 1 : 0
anchors.right: parent.right
renderType: Text.NativeRendering
elide: Text.ElideRight
enabled: control.enabled
color: SystemPaletteSingleton.windowText(control.enabled)
StyleItem {
elementType: "focusrect"
anchors.margins: -1
anchors.leftMargin: -2
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
width: textitem.implicitWidth + 3
visible: control.activeFocus
}
}
}
}
}

View File

@@ -0,0 +1,127 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Window 2.1
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
import "." as Desktop
Style {
readonly property ComboBox control: __control
property int renderType: Text.NativeRendering
padding { top: 4 ; left: 6 ; right: 6 ; bottom:4 }
property Component panel: Item {
property bool popup: !!styleItem.styleHint("comboboxpopup")
property color textColor: SystemPaletteSingleton.text(control.enabled)
property color selectionColor: SystemPaletteSingleton.highlight(control.enabled)
property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
property int dropDownButtonWidth: 24
implicitWidth: 125
implicitHeight: styleItem.implicitHeight
baselineOffset: styleItem.baselineOffset
anchors.fill: parent
StyleItem {
id: styleItem
height: parent.height
width: parent.width
elementType: "combobox"
sunken: control.pressed
raised: !sunken
hover: control.hovered
enabled: control.enabled
// The style makes sure the text rendering won't overlap the decoration.
// In that case, 35 pixels margin in this case looks good enough. Worst
// case, the ellipsis will be truncated (2nd worst, not visible at all).
text: elidedText(control.currentText, Text.ElideRight, parent.width - 35)
hasFocus: control.activeFocus
// contentHeight as in QComboBox
contentHeight: Math.max(Math.ceil(textHeight("")), 14) + 2
hints: control.styleHints
properties: {
"popup": control.__popup,
"editable" : control.editable
}
}
}
property Component __popupStyle: MenuStyle {
__menuItemType: "comboboxitem"
}
property Component __dropDownStyle: Style {
id: dropDownStyleRoot
property int __maxPopupHeight: 600
property int submenuOverlap: 0
property int submenuPopupDelay: 0
property Component frame: StyleItem {
elementType: "frame"
Component.onCompleted: {
var defaultFrameWidth = pixelMetric("defaultframewidth")
dropDownStyleRoot.padding.left = defaultFrameWidth
dropDownStyleRoot.padding.right = defaultFrameWidth
dropDownStyleRoot.padding.top = defaultFrameWidth
dropDownStyleRoot.padding.bottom = defaultFrameWidth
}
}
property Component menuItemPanel: StyleItem {
elementType: "itemrow"
selected: styleData.selected
implicitWidth: textItem.implicitWidth
implicitHeight: textItem.implicitHeight
StyleItem {
id: textItem
elementType: "item"
contentWidth: textWidth(text)
contentHeight: textHeight(text)
text: styleData.text
selected: parent ? parent.selected : false
}
}
property Component __scrollerStyle: Desktop.ScrollViewStyle { }
}
}

View File

@@ -0,0 +1,55 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
/*!
\qmltype FocusFrameStyle
\internal
\inqmlmodule QtQuick.Controls.Styles
*/
StyleItem {
property int margin: -3
anchors.fill: parent
elementType: "focusframe"
}

View File

@@ -0,0 +1,76 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
readonly property GroupBox control: __control
property var __style: StyleItem { id: style }
property int titleHeight: 18
Component.onCompleted: {
var stylename = __style.style
if (stylename.indexOf("windows") > -1)
titleHeight = 9
}
padding {
top: Math.round(Settings.dpiScaleFactor * (control.title.length > 0 || control.checkable ? titleHeight : 0) + (style.style == "mac" ? 9 : 6))
left: Math.round(Settings.dpiScaleFactor * 8)
right: Math.round(Settings.dpiScaleFactor * 8)
bottom: Math.round(Settings.dpiScaleFactor * 7 + (style.style.indexOf("windows") > -1 ? 2 : 0))
}
property Component panel: StyleItem {
anchors.fill: parent
id: styleitem
elementType: "groupbox"
text: control.title
on: control.checked
hasFocus: control.__checkbox.activeFocus
activeControl: control.checkable ? "checkbox" : ""
properties: { "checkable" : control.checkable , "sunken" : !control.flat}
border {top: 32 ; bottom: 8}
Accessible.role: Accessible.Grouping
}
}

View File

@@ -0,0 +1,76 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
import "." as Desktop
Style {
id: styleRoot
property Component background: StyleItem {
elementType: "menubar"
Component.onCompleted: {
styleRoot.padding.left = pixelMetric("menubarhmargin") + pixelMetric("menubarpanelwidth")
styleRoot.padding.right = pixelMetric("menubarhmargin") + pixelMetric("menubarpanelwidth")
styleRoot.padding.top = pixelMetric("menubarvmargin") + pixelMetric("menubarpanelwidth")
styleRoot.padding.bottom = pixelMetric("menubarvmargin") + pixelMetric("menubarpanelwidth")
}
}
property Component itemDelegate: StyleItem {
elementType: "menubaritem"
text: styleData.text
property string plainText: StyleHelpers.removeMnemonics(text)
contentWidth: textWidth(plainText)
contentHeight: textHeight(plainText)
width: implicitWidth
enabled: styleData.enabled
sunken: styleData.open
selected: (parent && styleData.selected) || sunken
hints: { "showUnderlined": styleData.underlineMnemonic }
}
property Component menuStyle: Desktop.MenuStyle { }
}

View File

@@ -0,0 +1,115 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Window 2.1
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
id: styleRoot
property string __menuItemType: "menuitem"
property int submenuOverlap: 0
property int submenuPopupDelay: 0
property int __maxPopupHeight: 0
property Component frame: StyleItem {
elementType: "menu"
Rectangle {
visible: anchors.margins > 0
anchors {
fill: parent
margins: pixelMetric("menupanelwidth")
}
color: SystemPaletteSingleton.window(control.enabled)
}
Component.onCompleted: {
var menuHMargin = pixelMetric("menuhmargin")
var menuVMargin = pixelMetric("menuvmargin")
var menuPanelWidth = pixelMetric("menupanelwidth")
styleRoot.padding.left = menuHMargin + menuPanelWidth
styleRoot.padding.right = menuHMargin + menuPanelWidth
styleRoot.padding.top = menuVMargin + menuPanelWidth
styleRoot.padding.bottom = menuVMargin + menuPanelWidth
styleRoot.submenuOverlap = 2 * menuPanelWidth
styleRoot.submenuPopupDelay = styleHint("submenupopupdelay")
}
// ### The Screen attached property can only be set on an Item,
// ### and will get its values only when put on a Window.
readonly property int desktopAvailableHeight: Screen.desktopAvailableHeight
Binding {
target: styleRoot
property: "__maxPopupHeight"
value: desktopAvailableHeight * 0.99
}
}
property Component menuItemPanel: StyleItem {
elementType: __menuItemType
text: styleData.text
property string textAndShorcut: text + (styleData.shortcut ? "\t" + styleData.shortcut : "")
contentWidth: textWidth(textAndShorcut)
contentHeight: textHeight(textAndShorcut)
enabled: styleData.enabled
selected: styleData.selected
on: styleData.checkable && styleData.checked
hints: { "showUnderlined": styleData.underlineMnemonic }
properties: {
"checkable": styleData.checkable,
"exclusive": styleData.exclusive,
"shortcut": styleData.shortcut,
"type": styleData.type,
"scrollerDirection": styleData.scrollerDirection,
"icon": !!__menuItem && __menuItem.__icon
}
}
property Component scrollIndicator: menuItemPanel
property Component __scrollerStyle: null
}

View File

@@ -0,0 +1,61 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
property Component panel: StyleItem {
anchors.fill: parent
elementType: "progressbar"
// XXX: since desktop uses int instead of real, the progressbar
// range [0..1] must be stretched to a good precision
property int factor : 1000
property int decimals: 3
value: indeterminate ? 0 : control.value.toFixed(decimals) * factor // does indeterminate value need to be 1 on windows?
minimum: indeterminate ? 0 : control.minimumValue.toFixed(decimals) * factor
maximum: indeterminate ? 0 : control.maximumValue.toFixed(decimals) * factor
enabled: control.enabled
horizontal: control.orientation === Qt.Horizontal
hints: control.styleHints
contentWidth: horizontal ? 200 : 23
contentHeight: horizontal ? 23 : 200
}
}

View File

@@ -0,0 +1,94 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
readonly property RadioButton control: __control
property Component panel: Item {
anchors.fill: parent
implicitWidth: styleitem.implicitWidth
implicitHeight: styleitem.implicitHeight
baselineOffset: styleitem.baselineOffset
StyleItem {
id: styleitem
elementType: "radiobutton"
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: macStyle ? -1 : 0
sunken: control.pressed
on: control.checked || control.pressed
hover: control.hovered
enabled: control.enabled
hasFocus: control.activeFocus && styleitem.style == "mac"
hints: control.styleHints
contentHeight: textitem.implicitHeight
contentWidth: Math.ceil(textitem.implicitWidth) + 4
property int indicatorWidth: pixelMetric("indicatorwidth") + (macStyle ? 2 : 4)
property bool macStyle: (style === "mac")
Text {
id: textitem
text: control.text
anchors.left: parent.left
anchors.leftMargin: parent.indicatorWidth
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: parent.macStyle ? 2 : 0
anchors.right: parent.right
renderType: Text.NativeRendering
elide: Text.ElideRight
enabled: control.enabled
color: SystemPaletteSingleton.windowText(control.enabled)
StyleItem {
elementType: "focusrect"
anchors.margins: -1
anchors.leftMargin: -2
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
width: textitem.implicitWidth + 3
visible: control.activeFocus
}
}
}
}
}

View File

@@ -0,0 +1,44 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
pragma Singleton
import QtQuick.Controls.Private 1.0
StyleItem {
elementType: "itemrow"
}

View File

@@ -0,0 +1,99 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
id: root
padding {
property int frameWidth: __styleitem.pixelMetric("defaultframewidth")
left: frameWidth
top: frameWidth
bottom: frameWidth
right: frameWidth
}
property StyleItem __styleitem: StyleItem { elementType: "frame" }
property Component frame: StyleItem {
id: styleitem
elementType: "frame"
sunken: true
visible: control.frameVisible
textureHeight: 64
textureWidth: 64
border {
top: 16
left: 16
right: 16
bottom: 16
}
}
property Component corner: StyleItem { elementType: "scrollareacorner" }
readonly property bool __externalScrollBars: __styleitem.styleHint("externalScrollBars")
readonly property int __scrollBarSpacing: __styleitem.pixelMetric("scrollbarspacing")
readonly property bool scrollToClickedPosition: __styleitem.styleHint("scrollToClickPosition") !== 0
property bool transientScrollBars: false
readonly property int __wheelScrollLines: __styleitem.styleHint("wheelScrollLines")
property Component __scrollbar: StyleItem {
anchors.fill:parent
elementType: "scrollbar"
hover: activeControl != "none"
activeControl: "none"
sunken: __styleData.upPressed | __styleData.downPressed | __styleData.handlePressed
minimum: __control.minimumValue
maximum: __control.maximumValue
value: __control.value
horizontal: __styleData.horizontal
enabled: __control.enabled
implicitWidth: horizontal ? 200 : pixelMetric("scrollbarExtent")
implicitHeight: horizontal ? pixelMetric("scrollbarExtent") : 200
onIsTransientChanged: root.transientScrollBars = isTransient
}
}

View File

@@ -0,0 +1,67 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
readonly property Item control: __control
property Component panel: StyleItem {
elementType: "slider"
sunken: control.pressed
implicitWidth: 200
contentHeight: horizontal ? 22 : 200
contentWidth: horizontal ? 200 : 22
maximum: control.maximumValue*100
minimum: control.minimumValue*100
step: control.stepSize*100
value: control.__handlePos*100
horizontal: control.orientation === Qt.Horizontal
enabled: control.enabled
hasFocus: control.activeFocus
hover: control.hovered
hints: control.styleHints
activeControl: control.tickmarksEnabled ? "ticks" : ""
property int handleWidth: 15
property int handleHeight: 15
}
padding { top: 0 ; left: 0 ; right: 0 ; bottom: 0 }
}

View File

@@ -0,0 +1,128 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
readonly property SpinBox control: __control
padding {
top: control.__panel ? control.__panel.topPadding + (styleitem.style === "mac" ? 2 : 0) : 0
left: control.__panel ? control.__panel.leftPadding : 0
right: control.__panel ? control.__panel.rightPadding : 0
bottom: control.__panel ? control.__panel.bottomPadding : 0
}
StyleItem {id: styleitem ; visible: false}
property int renderType: Text.NativeRendering
property Component panel: Item {
id: style
property rect upRect
property rect downRect
property int horizontalAlignment: Qt.platform.os === "osx" ? Qt.AlignRight : Qt.AlignLeft
property int verticalAlignment: Qt.AlignVCenter
property alias font: styleitem.font
property color foregroundColor: SystemPaletteSingleton.text(control.enabled)
property color backgroundColor: SystemPaletteSingleton.base(control.enabled)
property color selectionColor: SystemPaletteSingleton.highlight(control.enabled)
property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
property int topPadding: edit.anchors.topMargin
property int leftPadding: 3 + edit.anchors.leftMargin
property int rightPadding: 3 + edit.anchors.rightMargin
property int bottomPadding: edit.anchors.bottomMargin
width: 100
height: styleitem.implicitHeight
implicitWidth: 2 + styleitem.implicitWidth
implicitHeight: styleitem.implicitHeight
baselineOffset: styleitem.baselineOffset
Item {
id: edit
anchors.fill: parent
FocusFrame {
anchors.fill: parent
focusMargin:-6
visible: spinbox.activeFocus && styleitem.styleHint("focuswidget")
}
}
function updateRect() {
style.upRect = styleitem.subControlRect("up");
style.downRect = styleitem.subControlRect("down");
var inputRect = styleitem.subControlRect("edit");
edit.anchors.topMargin = inputRect.y
edit.anchors.leftMargin = inputRect.x
edit.anchors.rightMargin = style.width - inputRect.width - edit.anchors.leftMargin
edit.anchors.bottomMargin = style.height - inputRect.height - edit.anchors.topMargin
}
Component.onCompleted: updateRect()
onWidthChanged: updateRect()
onHeightChanged: updateRect()
StyleItem {
id: styleitem
elementType: "spinbox"
anchors.fill: parent
sunken: (styleData.downEnabled && styleData.downPressed) || (styleData.upEnabled && styleData.upPressed)
hover: control.hovered
hints: control.styleHints
hasFocus: control.activeFocus
enabled: control.enabled
value: (styleData.upPressed ? 1 : 0) |
(styleData.downPressed ? 1<<1 : 0) |
(styleData.upEnabled ? (1<<2) : 0) |
(styleData.downEnabled ? (1<<3) : 0)
contentWidth: styleData.contentWidth
contentHeight: styleData.contentHeight
textureHeight: implicitHeight
border {top: 6 ; bottom: 6}
}
}
}

View File

@@ -0,0 +1,64 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
/*!
\qmltype StatusBarStyle
\internal
\inqmlmodule QtQuick.Controls.Styles
*/
Style {
padding.left: 4
padding.right: 4
padding.top: 3
padding.bottom: 2
property Component panel: StyleItem {
implicitHeight: 16
implicitWidth: 200
anchors.fill: parent
elementType: "statusbar"
textureWidth: 64
border {left: 16 ; right: 16}
}
}

View File

@@ -0,0 +1,46 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.1
SwitchStyle {
}

View File

@@ -0,0 +1,116 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.1
Style {
id: root
property bool tabsMovable: false
property int tabsAlignment: __barstyle.styleHint("tabbaralignment") === "center" ? Qt.AlignHCenter : Qt.AlignLeft;
property int tabOverlap: __barstyle.pixelMetric("taboverlap");
property int frameOverlap: __barstyle.pixelMetric("tabbaseoverlap");
property StyleItem __barstyle: StyleItem {
elementType: "tab"
properties: { "tabposition" : (control.tabPosition === Qt.TopEdge ? "Top" : "Bottom") }
visible: false
}
property Component frame: StyleItem {
id: styleitem
anchors.fill: parent
anchors.topMargin: 1//stack.baseOverlap
z: style == "oxygen" ? 1 : 0
elementType: "tabframe"
value: tabbarItem && tabsVisible && tabbarItem.tab(currentIndex) ? tabbarItem.tab(currentIndex).x : 0
minimum: tabbarItem && tabsVisible && tabbarItem.tab(currentIndex) ? tabbarItem.tab(currentIndex).width : 0
maximum: tabbarItem && tabsVisible ? tabbarItem.width : width
properties: { "selectedTabRect" : tabbarItem.__selectedTabRect, "orientation" : control.tabPosition }
hints: control.styleHints
Component.onCompleted: {
stack.frameWidth = styleitem.pixelMetric("defaultframewidth");
stack.style = style;
}
border{
top: 16
bottom: 16
}
textureHeight: 64
}
property Component tab: Item {
id: item
property string tabpos: control.count === 1 ? "only" : index === 0 ? "beginning" : index === control.count - 1 ? "end" : "middle"
property string selectedpos: styleData.nextSelected ? "next" : styleData.previousSelected ? "previous" : ""
property string orientation: control.tabPosition === Qt.TopEdge ? "Top" : "Bottom"
property int tabHSpace: __barstyle.pixelMetric("tabhspace");
property int tabVSpace: __barstyle.pixelMetric("tabvspace");
property int totalOverlap: tabOverlap * (control.count - 1)
property real maxTabWidth: control.count > 0 ? (control.width + totalOverlap) / control.count : 0
implicitWidth: Math.min(maxTabWidth, Math.max(50, styleitem.textWidth(styleData.title)) + tabHSpace + 2)
implicitHeight: Math.max(styleitem.font.pixelSize + tabVSpace + 6, 0)
StyleItem {
id: styleitem
elementType: "tab"
paintMargins: style === "mac" ? 0 : 2
anchors.fill: parent
anchors.topMargin: style === "mac" ? 2 : 0
anchors.rightMargin: -paintMargins
anchors.bottomMargin: -1
anchors.leftMargin: -paintMargins + (style === "mac" && selected ? -1 : 0)
properties: { "hasFrame" : true, "orientation": orientation, "tabpos": tabpos, "selectedpos": selectedpos }
hints: control.styleHints
enabled: styleData.enabled
selected: styleData.selected
text: elidedText(styleData.title, tabbarItem.elide, item.width - item.tabHSpace)
hover: styleData.hovered
hasFocus: tabbarItem.activeFocus && selected
}
}
property Component leftCorner: null
property Component rightCorner: null
}

View File

@@ -0,0 +1,116 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
import "."
ScrollViewStyle {
id: root
readonly property BasicTableView control: __control
property int __indentation: 8
property bool activateItemOnSingleClick: __styleitem.styleHint("activateItemOnSingleClick")
property color textColor: __styleitem.textColor
property color backgroundColor: SystemPaletteSingleton.base(control.enabled)
property color highlightedTextColor: __styleitem.highlightedTextColor
property StyleItem __styleitem: StyleItem{
property color textColor: styleHint("textColor")
property color highlightedTextColor: styleHint("highlightedTextColor")
elementType: "item"
visible: false
active: control.activeFocus
onActiveChanged: {
highlightedTextColor = styleHint("highlightedTextColor")
textColor = styleHint("textColor")
}
}
property Component headerDelegate: StyleItem {
elementType: "header"
activeControl: itemSort
raised: true
sunken: styleData.pressed
text: styleData.value
hover: styleData.containsMouse
hints: control.styleHints
properties: {"headerpos": headerPosition, "textalignment": styleData.textAlignment}
property string itemSort: (control.sortIndicatorVisible && styleData.column === control.sortIndicatorColumn) ? (control.sortIndicatorOrder == Qt.AscendingOrder ? "up" : "down") : "";
property string headerPosition: !styleData.resizable && control.columnCount === 1 ? "only" :
!styleData.resizable && styleData.column === control.columnCount-1 ? "end" :
styleData.column === 0 ? "beginning" : ""
}
property Component rowDelegate: BorderImage {
visible: styleData.selected || styleData.alternate
source: "image://__tablerow/" + (styleData.alternate ? "alternate_" : "")
+ (styleData.selected ? "selected_" : "")
+ (control.activeFocus ? "active" : "")
height: Math.max(16, RowItemSingleton.implicitHeight)
border.left: 4 ; border.right: 4
}
property Component itemDelegate: Item {
height: Math.max(16, label.implicitHeight)
property int implicitWidth: label.implicitWidth + 16
Text {
id: label
objectName: "label"
width: parent.width
font: __styleitem.font
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: styleData.hasOwnProperty("depth") && styleData.column === 0 ? 0 :
horizontalAlignment === Text.AlignRight ? 1 : 8
anchors.rightMargin: (styleData.hasOwnProperty("depth") && styleData.column === 0)
|| horizontalAlignment !== Text.AlignRight ? 1 : 8
horizontalAlignment: styleData.textAlignment
anchors.verticalCenter: parent.verticalCenter
elide: styleData.elideMode
text: styleData.value !== undefined ? styleData.value : ""
color: styleData.textColor
renderType: Text.NativeRendering
}
}
property Component __branchDelegate: null
}

View File

@@ -0,0 +1,59 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
ScrollViewStyle {
property font font: __styleitem.font
property color textColor: SystemPaletteSingleton.text(control.enabled)
property color selectionColor: SystemPaletteSingleton.highlight(control.enabled)
property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
property color backgroundColor: control.backgroundVisible ? SystemPaletteSingleton.base(control.enabled) : "transparent"
property StyleItem __styleitem: StyleItem{
elementType: "edit"
visible: false
active: control.activeFocus
}
property int renderType: Text.NativeRendering
property real textMargin: 4
}

View File

@@ -0,0 +1,81 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
property int renderType: Text.NativeRendering
property Component panel: StyleItem {
id: textfieldstyle
elementType: "edit"
anchors.fill: parent
sunken: true
hasFocus: control.activeFocus
hover: hovered
hints: control.styleHints
property color textColor: SystemPaletteSingleton.text(control.enabled)
property color placeholderTextColor: "darkGray"
property color selectionColor: SystemPaletteSingleton.highlight(control.enabled)
property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
property bool rounded: !!hints["rounded"]
property int topMargin: style === "mac" ? 3 : 2
property int leftMargin: rounded ? 12 : 4
property int rightMargin: leftMargin
property int bottomMargin: 2
contentWidth: 100
// Form QLineEdit::sizeHint
contentHeight: Math.max(control.__contentHeight, 16)
FocusFrame {
anchors.fill: parent
visible: textfield.activeFocus && textfieldstyle.styleHint("focuswidget") && !rounded
}
textureHeight: implicitHeight
textureWidth: 32
border {top: 8 ; bottom: 8 ; left: 8 ; right: 8}
}
}

View File

@@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
/*!
\qmltype StatusBarStyle
\internal
\inqmlmodule QtQuick.Controls.Styles
*/
Style {
padding.left: 6
padding.right: 6
padding.top: 1
padding.bottom: style.style === "mac" ? 1 : style.style === "fusion" ? 3 : 2
StyleItem { id: style ; visible: false}
property Component panel: StyleItem {
id: toolbar
anchors.fill: parent
elementType: "toolbar"
textureWidth: 64
border {left: 16 ; right: 16}
}
}

View File

@@ -0,0 +1,64 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
Style {
property Component panel: StyleItem {
id: styleitem
anchors.fill: parent
elementType: "toolbutton"
on: control.checkable && control.checked
sunken: control.pressed
raised: !(control.checkable && control.checked) && control.hovered
hover: control.hovered
hasFocus: control.activeFocus
hints: control.styleHints
text: control.text
properties: {
"icon": control.__iconAction.__icon,
"position": control.__position,
"menu" : control.menu !== null
}
}
}

View File

@@ -0,0 +1,70 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Private 1.0
import "." as Desktop
Desktop.TableViewStyle {
id: root
__indentation: 12
__branchDelegate: StyleItem {
id: si
elementType: "itembranchindicator"
properties: {
"hasChildren": styleData.hasChildren,
"hasSibling": styleData.hasSibling && !styleData.isExpanded
}
on: styleData.isExpanded
selected: styleData.selected
hasFocus: __styleitem.active
Component.onCompleted: {
root.__indentation = si.pixelMetric("treeviewindentation")
implicitWidth = root.__indentation
implicitHeight = implicitWidth
var rect = si.subControlRect("dummy");
width = rect.width
height = rect.height
}
}
}

View File

@@ -0,0 +1,2 @@
singleton RowItemSingleton 1.0 RowItemSingleton.qml
designersupported