Commit d237a205 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Neutral doesn't really have a reason to be anymore

parent 4816fee6
import QtQuick 2.0
Item {
property alias text: display.text
signal clicked
width: display.width+15
height: display.height+15
property alias implicitWidth: display.implicitWidth
property alias implicitHeight: display.implicitHeight
SystemPalette { id: palette }
Rectangle {
radius: 5
opacity: 0.3
anchors.fill: parent
anchors.margins: 2
color: palette.button
border.width: buttonArea.containsMouse ? 5 : 1
border.color: palette.buttonText
}
Text { id: display; anchors.centerIn: parent; color: palette.buttonText }
MouseArea {
anchors.fill: parent
hoverEnabled: true
id: buttonArea
onClicked: parent.clicked()
}
}
install( FILES
Label.qml Button.qml CalcButton.qml ExpressionInput.qml
RealInput.qml SimpleListView.qml ScrollDecorator.qml
KAlgebraPage.qml KAlgebraMobile.qml
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/widgets/
)
import QtQuick 2.0
Button
{
onClicked: doOp(text)
}
\ No newline at end of file
import QtQuick 2.0
TextInput
{
SystemPalette { id: palette }
height: input.font.pixelSize+5
Rectangle {
color: palette.base
anchors.fill: parent
z: parent.z-1
}
// placeholderText: "Expression to calculate..."
inputMethodHints: Qt.ImhPreferNumbers | Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
}
import org.kde.analitza 1.0
import QtQuick 2.0
import QtQuick.Window 2.1
import org.kde.kalgebra.mobile 1.0
Window
{
id: rootItem
SystemPalette { id: palette }
color: palette.window
height: 600
width: 600
visible: true
function goToPage(path) {
try {
var component = Qt.createComponent(path)
if (component.status == Component.Ready) {
var obj = component.createObject(rootItem)
// obj.z = rootItem+1
obj.anchors.fill = pluginsView
} else {
console.log("Error loading component:", component.errorString());
}
} catch (e) {
console.log("error: "+e)
}
}
ListView {
id: pluginsView
anchors.fill: parent
spacing: 10
header: Image {
source: "qrc:/kalgebra.png"
anchors.horizontalCenter: parent.horizontalCenter
MouseArea {
anchors.fill: parent
onClicked: Qt.openUrlExternally("http://edu.kde.org/applications/mathematics/kalgebra/")
}
}
footer: Image {
source: "qrc:/kde-edu-logo.png"
anchors.horizontalCenter: parent.horizontalCenter
MouseArea {
anchors.fill: parent
onClicked: Qt.openUrlExternally("http://edu.kde.org")
}
}
delegate:
Button {
text: title
onClicked: goToPage(model.path)
anchors.horizontalCenter: parent.horizontalCenter
}
model: PluginsModel { id: plugins }
}
}
import QtQuick 2.0
Rectangle
{
SystemPalette { id: palette }
color: palette.window
Button {
text: "<-"
width: 50
height: 50
anchors {
bottom: parent.bottom
right: parent.right
}
onClicked: parent.destroy()
z: parent.z+1
}
}
import QtQuick 2.0
Text {
SystemPalette { id: palette }
color: palette.text
onLinkActivated: Qt.openUrlExternally(link)
}
import QtQuick 2.0
TextInput
{
id: input
property alias minimumValue: realvalidator.bottom
property alias maximumValue: realvalidator.top
SystemPalette { id: palette }
Rectangle { color: palette.base; anchors.fill: parent; z: parent.z-1; opacity: 1 }
property double value: parseFloat(text)
inputMethodHints: Qt.ImhDigitsOnly | Qt.ImhNoPredictiveText
validator: DoubleValidator { id: realvalidator }
onTextChanged: value=parseFloat(text)
Component.onCompleted: text=value
Row {
anchors.right: parent.right
height: parent.height
Button {
text: "+"
height: parent.height
onClicked: {
if(input.value+1<maximumValue) {
input.text=(input.value+1)
}
}
}
Button {
text: "-"
onClicked: {
if(input.value-1>minimumValue) {
input.text=(input.value-1)
}
}
height: parent.height
}
}
}
\ No newline at end of file
import QtQuick 2.0
Rectangle {
property Flickable flickableItem: null
anchors {
right: flickableItem.right
rightMargin: 5
}
visible: flickableItem!=null
width: 5
opacity: 0.5
height: flickableItem.height/(flickableItem.contentHeight/flickableItem.height)
y: (flickableItem.contentY/flickableItem.contentHeight)*flickableItem.height
SystemPalette { id: palette }
color: palette.text
}
\ No newline at end of file
import QtQuick 2.0
ListView
{
id: viewItem
property string role: ""
property string title
SystemPalette { id: palette }
clip: true
header: Label {
height: ListView.view.title=="" ? 0 : 1.5*implicitHeight
text: ListView.view.title
font.weight: Font.Bold
verticalAlignment: Text.AlignVCenter
}
delegate: Label { text: model[role] }
highlight: Rectangle { color: palette.midlight }
ScrollDecorator {
flickableItem: viewItem
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment