-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,099 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
PyQt5/Qt/qml/soloman/Controls/SButton.qml → PyQt5/Qt5/qml/soloman/Controls/SButton.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import QtQuick 2.10 | ||
import QtQuick.Controls 2.3 | ||
import QtQuick.Controls 2.0 | ||
|
||
Button { | ||
id: btn | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import QtQuick 2.10 | ||
import QtQuick.Controls 2.0 | ||
|
||
ComboBox { | ||
id: cbox | ||
|
||
SProperties { id: props} | ||
|
||
|
||
// For background | ||
property color bgColor: cbox.down ? palette.mid : palette.button | ||
property color borderColor | ||
property int borderWidth | ||
property int radius | ||
|
||
// For contentItem | ||
property color color: palette.buttonText | ||
|
||
// For indicator | ||
property string indicatorText: "bell" | ||
property color indicatorColor: cbox.color | ||
|
||
rightPadding: cbox.indicator.width + cbox.spacing | ||
|
||
background: Rectangle { | ||
implicitWidth: 120 | ||
implicitHeight: 40 | ||
color: cbox.bgColor | ||
border.width: cbox.borderWidth | ||
border.color: cbox.borderColor | ||
radius: cbox.radius | ||
} | ||
|
||
contentItem: Text { | ||
leftPadding: cbox.leftPadding | ||
|
||
rightPadding: cbox.rightPadding | ||
|
||
text: cbox.displayText | ||
font: cbox.font | ||
color: cbox.color | ||
verticalAlignment: Text.AlignVCenter | ||
elide: Text.ElideRight | ||
|
||
} | ||
|
||
indicator: Text { | ||
rightPadding: 0 | ||
leftPadding: 0 | ||
font.family: props.fontFAR.name | ||
color: cbox.indicatorColor | ||
verticalAlignment: Text.AlignVCenter | ||
text: cbox.indicatorText | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import QtQuick 2.10 | ||
|
||
QtObject { | ||
|
||
property FontLoader fontFAR: FontLoader {source: "./fa_regular.otf"} | ||
|
||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import QtQuick 2.10 | ||
|
||
Rectangle { | ||
id: basev | ||
anchors.fill: parent | ||
|
||
property int currentIndex: 0 | ||
property QtObject currentItem: this.items[currentIndex] | ||
property int count: 0 | ||
property url url: "" | ||
|
||
property var items: [QtObject] | ||
property var secret_items: [QtObject] | ||
|
||
|
||
function addChild(qml=null) { | ||
var obj; | ||
var comp_str = '' | ||
|
||
comp_str = 'import QtQuick; Rectangle {property int index:' + basev.count +';'; | ||
comp_str += 'anchors.fill: parent;color: "transparent";'; | ||
comp_str += 'visible: index == parent.currentIndex;}'; | ||
|
||
var mComp = Qt.createQmlObject(comp_str, basev); | ||
|
||
basev.count += 1; | ||
|
||
if(!basev.url) { | ||
obj = Qt.createQmlObject(qml, mComp); | ||
} else { | ||
var comp = Qt.createComponent(basev.url); | ||
obj = comp.createObject(mComp); | ||
} | ||
secret_items[basev.count] = mComp; | ||
items[basev.count] = obj; | ||
|
||
return basev.count; | ||
} | ||
|
||
function removeChild(ind) { | ||
var mComp = secret_items[ind]; | ||
basev.count -= 1; // decrement count | ||
mComp.destroy(); | ||
} | ||
|
||
|
||
Component.onCompleted: { | ||
var child = this.children | ||
var lent = child.length | ||
|
||
if(lent > 0) { | ||
|
||
for(var i=0; i<lent; i++) { | ||
this.children[i].index = i | ||
count++ | ||
} | ||
|
||
} | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
PyQt5/Qt/qml/soloman/Controls/STextArea.qml → PyQt5/Qt5/qml/soloman/Controls/STextArea.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import QtQuick 2.10 | ||
import QtQuick.Controls 2.3 | ||
import QtQuick.Controls 2.0 | ||
|
||
TextArea { | ||
id: tArea | ||
|
4 changes: 2 additions & 2 deletions
4
PyQt5/Qt/qml/soloman/Controls/STextField.qml → ...5/Qt5/qml/soloman/Controls/STextField.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module soloman.Controls | ||
SButton 2.0 SButton.qml | ||
SButton 3.0 SButton.qml | ||
SButton 3.1 SButton.qml | ||
SButton 6.0 SButton.qml | ||
SComboBox 2.0 SComboBox.qml | ||
SComboBox 3.0 SComboBox.qml | ||
SComboBox 3.1 SComboBox.qml | ||
SComboBox 6.0 SComboBox.qml | ||
SProperties 2.0 SProperties.qml | ||
SProperties 3.0 SProperties.qml | ||
SProperties 3.1 SProperties.qml | ||
SProperties 6.0 SProperties.qml | ||
STab 2.0 STab.qml | ||
STab 3.0 STab.qml | ||
STab 3.1 STab.qml | ||
STab 6.0 STab.qml | ||
STabView 2.0 STabView.qml | ||
STabView 3.0 STabView.qml | ||
STabView 3.1 STabView.qml | ||
STabView 6.0 STabView.qml | ||
STextArea 2.0 STextArea.qml | ||
STextArea 3.0 STextArea.qml | ||
STextArea 3.1 STextArea.qml | ||
STextArea 6.0 STextArea.qml | ||
STextField 2.0 STextField.qml | ||
STextField 3.0 STextField.qml | ||
STextField 3.1 STextField.qml | ||
STextField 6.0 STextField.qml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import QtQuick | ||
import QtQuick.Controls.Basic | ||
|
||
Button { | ||
id: btn | ||
|
||
// For contentItem | ||
property color color: palette.buttonText | ||
property int horizontalAlignment: Text.AlignHCenter | ||
property int vertilAlignment: Text.AlignVCenter | ||
property color bgColor: palette.button | ||
|
||
// For background | ||
property color borderColor | ||
property int borderWidth | ||
property int radius | ||
|
||
background: Rectangle { | ||
implicitWidth: 100 | ||
implicitHeight: 40 | ||
color: btn.bgColor | ||
border.width: btn.borderWidth | ||
border.color: btn.borderColor | ||
radius: btn.radius | ||
} | ||
|
||
contentItem: Text { | ||
text: btn.text | ||
font: btn.font | ||
color: btn.color | ||
verticalAlignment: btn.vertilAlignment | ||
horizontalAlignment: btn.horizontalAlignment | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import QtQuick | ||
import QtQuick.Controls.Basic | ||
|
||
ComboBox { | ||
id: cbox | ||
|
||
SProperties { id: props} | ||
|
||
|
||
// For background | ||
property color bgColor: cbox.down ? palette.mid : palette.button | ||
property color borderColor | ||
property int borderWidth | ||
property int radius | ||
|
||
// For contentItem | ||
property color color: palette.buttonText | ||
|
||
// For indicator | ||
property string indicatorText: "bell" | ||
property color indicatorColor: cbox.color | ||
|
||
rightPadding: cbox.indicator.width + cbox.spacing | ||
|
||
background: Rectangle { | ||
implicitWidth: 120 | ||
implicitHeight: 40 | ||
color: cbox.bgColor | ||
border.width: cbox.borderWidth | ||
border.color: cbox.borderColor | ||
radius: cbox.radius | ||
} | ||
|
||
contentItem: Text { | ||
leftPadding: cbox.leftPadding | ||
|
||
rightPadding: cbox.rightPadding | ||
|
||
text: cbox.displayText | ||
font: cbox.font | ||
color: cbox.color | ||
verticalAlignment: Text.AlignVCenter | ||
elide: Text.ElideRight | ||
|
||
} | ||
|
||
indicator: Text { | ||
rightPadding: 0 | ||
leftPadding: 0 | ||
font.family: props.fontFAR.name | ||
color: cbox.indicatorColor | ||
verticalAlignment: Text.AlignVCenter | ||
text: cbox.indicatorText | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import QtQuick | ||
|
||
QtObject { | ||
|
||
property FontLoader fontFAR: FontLoader {source: "./fa_regular.otf"} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import QtQuick | ||
|
||
Rectangle { | ||
|
||
property int index | ||
|
||
anchors.fill: parent | ||
color: "transparent" | ||
visible: index === parent.currentIndex | ||
objectName: "CustTabItem" | ||
|
||
} |
Oops, something went wrong.