Skip to content

Commit

Permalink
chore(style): format with qt6 qmlformat
Browse files Browse the repository at this point in the history
Signed-off-by: yshalsager <[email protected]>
  • Loading branch information
yshalsager committed Jul 15, 2023
1 parent 36c8e95 commit 9fd0dc9
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: area28technologies/qmlformat-action@db44f99341ff1c54bc4b75a5a0f0be7fd2ded11c
- uses: area28technologies/qmlformat-action@752e3c5bc6813020569ce58f780b99a288e62aa4
3 changes: 2 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# ruff: noqa
"""Entry point for the application."""
import sys
from pathlib import Path

# noinspection PyUnresolvedReferences
import resources_rc # noqa: F401
import resources_rc
from PySide6.QtCore import QUrl
from PySide6.QtQml import QQmlApplicationEngine
from PySide6.QtQuickControls2 import QQuickStyle
Expand Down
15 changes: 3 additions & 12 deletions src/qml/components/ConvertPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Rectangle {
topMargin: 64
rightMargin: 75
}

}

Image {
Expand All @@ -53,7 +52,6 @@ Rectangle {
topMargin: title.anchors.topMargin + 48
rightMargin: 60
}

}

Text {
Expand All @@ -73,7 +71,6 @@ Rectangle {
topMargin: 6
rightMargin: 10
}

}

Text {
Expand All @@ -91,18 +88,17 @@ Rectangle {
right: title.right
topMargin: 16
}

}

AcceptTasks {
id: acceptTasks

onAddedNewAudio: (audio) => {
onAddedNewAudio: audio => {
console.log('From ConverPage ', audio);
console.log("The list ", audioFilesModel.count);
audioFilesModel.append({
"audioUrl": audio
});
"audioUrl": audio
});
}

anchors {
Expand All @@ -112,7 +108,6 @@ Rectangle {
rightMargin: 72
leftMargin: 72
}

}

Rectangle {
Expand Down Expand Up @@ -147,9 +142,7 @@ Rectangle {
audioFilesModel.remove(index); // Remove the audio file from the model
}
}

}

}

RowLayout {
Expand Down Expand Up @@ -186,7 +179,5 @@ Rectangle {
Layout.fillWidth: true
onClicked: audioFilesModel.clear()
}

}

}
20 changes: 0 additions & 20 deletions src/qml/components/SettingsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ Rectangle {
text: qsTr("الانجليزية")
value: "en"
}

}

}

SettingsDropDown {
Expand All @@ -91,9 +89,7 @@ Rectangle {
text: "Whisper"
value: "Whisper"
}

}

}

SettingsDropDown {
Expand Down Expand Up @@ -133,9 +129,7 @@ Rectangle {
text: qsTr("كبير (أفضل دقة)")
value: "large-v2"
}

}

}

SettingsItem {
Expand Down Expand Up @@ -166,7 +160,6 @@ Rectangle {
// Sets the font size to a small value

}

}

SettingsItem {
Expand Down Expand Up @@ -200,9 +193,7 @@ Rectangle {
bottom: 0
top: 999
}

}

}

SettingsItem {
Expand All @@ -219,7 +210,6 @@ Rectangle {

implicitWidth: parent.width / 3
}

}

SettingsItem {
Expand All @@ -235,7 +225,6 @@ Rectangle {
CustomCheckBox {
id: checkbox
}

}

SettingsItem {
Expand Down Expand Up @@ -274,9 +263,7 @@ Rectangle {

text: "vtt"
}

}

}

SettingsItem {
Expand Down Expand Up @@ -339,9 +326,7 @@ Rectangle {
console.log("Canceled");
}
}

}

}

SettingsItem {
Expand All @@ -355,7 +340,6 @@ Rectangle {
CustomCheckBox {
id: jsonCheck
}

}

SettingsItem {
Expand All @@ -370,9 +354,7 @@ Rectangle {
themeChanged(checked);
}
}

}

}

ColumnLayout {
Expand All @@ -398,7 +380,6 @@ Rectangle {
horizontalAlignment: Text.AlignHCenter
color: theme.fontPrimary
}

}

Settings {
Expand All @@ -423,5 +404,4 @@ Rectangle {

location: "file:settings.ini"
}

}
8 changes: 0 additions & 8 deletions src/qml/components/SideBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Rectangle {
right: parent.right
topMargin: 16
}

}

ColumnLayout {
Expand All @@ -48,7 +47,6 @@ Rectangle {
sidebarButtonClicked(0);
}
}

}

IconImage {
Expand All @@ -64,7 +62,6 @@ Rectangle {
sidebarButtonClicked(1);
}
}

}

Rectangle {
Expand All @@ -84,7 +81,6 @@ Rectangle {
onClicked: {
}
}

}

IconImage {
Expand All @@ -97,7 +93,6 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
onClicked: mainWindow.showMinimized()
}

}

IconImage {
Expand All @@ -110,9 +105,6 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
onClicked: Qt.quit()
}

}

}

}
7 changes: 1 addition & 6 deletions src/qml/components/convert/AcceptTasks.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DropArea {

height: 350
width: parent.width
onDropped: (dragEvent) => {
onDropped: dragEvent => {
//Drag Drop logic
console.log(dragEvent.urls);
console.log(dropArea.data);
Expand Down Expand Up @@ -60,7 +60,6 @@ DropArea {
ctx.stroke();
}
}

}

ColumnLayout {
Expand Down Expand Up @@ -91,7 +90,6 @@ DropArea {
font.pixelSize: 22
font.weight: Font.Medium
}

}

Text {
Expand Down Expand Up @@ -121,7 +119,6 @@ DropArea {
console.log("Canceled");
}
}

}

PasteConfirm {
Expand All @@ -135,11 +132,9 @@ DropArea {
let text = clipboard.getClipboardText();
if (AudioHelper.isYoutubeLink(text))
pasteConfirm.openWithUrl(text);

}

target: clipboard
enabled: parent.visible
}

}
4 changes: 1 addition & 3 deletions src/qml/components/convert/AudioTask.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QtQuick.Layouts 6.4
RowLayout {
property string fileName

signal removeAudioRequested()
signal removeAudioRequested

width: parent ? parent.width : 0
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Expand Down Expand Up @@ -48,7 +48,5 @@ RowLayout {
cursorShape: Qt.PointingHandCursor
onClicked: removeAudioRequested()
}

}

}
1 change: 0 additions & 1 deletion src/qml/components/convert/CustomButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ Button {
opacity: enabled ? 1 : 0.3
radius: 15
}

}
2 changes: 1 addition & 1 deletion src/qml/components/convert/PasteConfirm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ MessageDialog {

property url urlStr

signal pasteConfirmed()
signal pasteConfirmed

function openWithUrl(_url) {
urlStr = _url;
Expand Down
2 changes: 0 additions & 2 deletions src/qml/components/custom/CustomCheckBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,5 @@ CheckBox {
color: theme.primary
visible: checkbox.checked
}

}

}
7 changes: 1 addition & 6 deletions src/qml/components/settings/SettingsDropDown.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SettingsItem {
valueRole: "value"
font.family: poppinsFontLoader.font.family
model: dropdownModel
onActivated: (index) => {
onActivated: index => {
var selectedValue = model.get(index)[combo.valueRole];
console.log(selectedValue);
changedSelection(index, selectedValue);
Expand Down Expand Up @@ -52,7 +52,6 @@ SettingsItem {
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
}

}

contentItem: Text {
Expand Down Expand Up @@ -87,19 +86,15 @@ SettingsItem {

ScrollIndicator.vertical: ScrollIndicator {
}

}

background: Rectangle {
color: theme.field
radius: 8
}

}

}

dropdownModel: ListModel {
}

}
2 changes: 0 additions & 2 deletions src/qml/components/settings/SettingsItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,5 @@ Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
}

}

}
Loading

0 comments on commit 9fd0dc9

Please sign in to comment.