initial port to cxx_qt 6.0

This commit is contained in:
Chris Cochrun 2023-11-27 11:07:55 -06:00
parent 62daf316a3
commit 744481587f
31 changed files with 1992 additions and 1860 deletions

View file

@ -121,12 +121,12 @@ Kirigami.ApplicationWindow {
Controls.Label {
Layout.alignment: Qt.AlignRight
Layout.rightMargin: Kirigami.Units.smallSpacing * 2
text: "Total Service Items: " + ServiceItemModel.count()
text: "Total Service Items: " + ServiceItemModel.count
}
Controls.Label {
Layout.alignment: Qt.AlignRight
Layout.rightMargin: Kirigami.Units.smallSpacing * 2
text: "Total Slides: " + SlideMod.count()
text: "Total Slides: " + SlideModel.count
}
}
}

View file

@ -40,11 +40,11 @@ Item {
headerLabel: "Songs"
itemIcon: "folder-music-symbolic"
/* itemSubtitle: model.author */
count: innerModel.count()
count: innerModel.count
newItemFunction: (function() {
songProxyModel.setFilterRegularExpression("");
innerModel.newSong();
libraryList.currentIndex = innerModel.count() - 1;
libraryList.currentIndex = innerModel.count - 1;
if (!editMode)
editMode = true;
editSwitch(libraryList.currentIndex, "song");
@ -67,7 +67,7 @@ Item {
headerLabel: "Videos"
itemIcon: "folder-videos-symbolic"
/* itemSubtitle: model.path */
count: innerModel.count()
count: innerModel.count
newItemFunction: (function() {
videoProxyModel.setFilterRegularExpression("");
newVideo.open();
@ -102,7 +102,7 @@ Item {
headerLabel: "Images"
itemIcon: "folder-pictures-symbolic"
/* itemSubtitle: model.path */
count: innerModel.count()
count: innerModel.count
newItemFunction: (function() {
imageProxyModel.setFilterRegularExpression("");
})
@ -123,7 +123,7 @@ Item {
headerLabel: "Presentations"
itemIcon: "x-office-presentation-symbolic"
/* itemSubtitle: model.path */
count: innerModel.count()
count: innerModel.count
newItemFunction: (function() {
presProxyModel.setFilterRegularExpression("");
})
@ -320,7 +320,7 @@ Item {
function addVideo(url) {
videoProxyModel.videoModel.newItem(url);
selectedLibrary = "video";
videoLibrary.libraryList.currentIndex = videoProxyModel.videoModel.count() - 1;
videoLibrary.libraryList.currentIndex = videoProxyModel.videoModel.count - 1;
if (!editMode)
editMode = true;
editSwitch(videoLibrary.libraryList.currentIndex, "video");
@ -329,7 +329,7 @@ Item {
function addImg(url) {
imageProxyModel.newItem(url);
selectedLibrary = "image";
imageLibrary.libraryList.currentIndex = imageProxyModel.imageModel.count() - 1;
imageLibrary.libraryList.currentIndex = imageProxyModel.imageModel.count - 1;
if (!editMode)
editMode = true;
editSwitch(imageLibrary.libraryList.currentIndex, "image");
@ -350,7 +350,7 @@ Item {
presProxyModel.presentationModel.newItem(url, pageCount);
selectedLibrary = "presentation";
presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count() - 1;
presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count - 1;
if (!editMode)
editMode = true;
editSwitch(presentationLibrary.libraryList.currentIndex, "presentation");

View file

@ -15,8 +15,8 @@ Controls.Page {
// properties passed around for the slides
property int currentServiceItem
property int currentSlide
property int totalServiceItems: ServiceItemModel.rowCount()
property int totalSlides: SlideMod.count()
property int totalServiceItems: ServiceItemModel.rowCount
property int totalSlides: SlideModel.count
property url imageBackground: presentation.imageBackground
property url videoBackground: presentation.vidBackground
property url webSource
@ -184,9 +184,9 @@ Controls.Page {
console.log("change-service-item: " + index);
const item = ServiceItemC.getRust(index, ServiceItemModel);
currentServiceItem = index;
const slideId = SlideMod.getSlideFromService(index);
const slideId = SlideModel.getSlideFromService(index);
currentSlide = slideId;
const slide = SlideModel.getItemRust(slideId, SlideMod);
const slide = SlideMod.getItemRust(slideId, SlideModel);
console.log("index grabbed: " + index);
console.log(slideId);
console.log("Time to start changing");
@ -217,8 +217,8 @@ Controls.Page {
function changeSlide(index) {
console.log("index grabbed: " + index);
const currentItem = SlideModel.getItemRust(currentServiceItem, SlideMod);
const item = SlideModel.getItemRust(index, SlideMod);
const currentItem = SlideMod.getItemRust(currentServiceItem, SlideModel);
const item = SlideMod.getItemRust(index, SlideModel);
const isMoveDown = currentSlide < index;
console.log(item + " " + currentItem);
currentSlide = index;
@ -250,7 +250,7 @@ Controls.Page {
ServiceItemModel.activate(currentServiceItem);
/* SlideObject.changeSlide(slide, slideId); */
slideHelper.chngSlide(item, index, SlideObject);
/* SlideMod.activate(index); */
/* SlideModel.activate(index); */
presentation.textIndex = 0;
console.log("Slide changed to: ", item.imageBackground);
activeServiceItem = ServiceItemC.getRust(currentServiceItem, ServiceItemModel).name;

View file

@ -202,7 +202,7 @@ FocusScope {
spacing: Kirigami.Units.smallSpacing * 2
cacheBuffer: 900
reuseItems: true
model: SlideMod
model: SlideModel
delegate: Presenter.PreviewSlideListDelegate {}
highlight: highlightBar
highlightFollowsCurrentItem: false
@ -233,7 +233,7 @@ FocusScope {
Connections {
target: SlideMod
target: SlideModel
function onActiveChanged(index) {
console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
console.log(index);
@ -282,7 +282,7 @@ FocusScope {
cacheBuffer: 800
reuseItems: true
clip: true
model: SlideMod
model: SlideModel
delegate: Presenter.PreviewSlideListDelegate { showVidBG: false }
Kirigami.WheelHandler {
@ -355,8 +355,8 @@ FocusScope {
/* target: ServiceItemModel */
/* function onActivateChanged(index) { */
/* console.log("$$$$$$$$$$$$$$$$$$$$"); */
/* const slide = SlideModel.getSlideFromService(index); */
/* SlideMod.activate(slide); */
/* const slide = SlideMod.getSlideFromService(index); */
/* SlideModel.activate(slide); */
/* } */
/* } */

View file

@ -14,7 +14,7 @@ Item {
/* property var previewSlidesList: parent */
/* Component.onCompleted: { */
/* if (model.videoBackground != "") */
/* SlideModel.thumbnailVideoRust(model.videoBackground, model.serviceItemId, index, SlideMod); */
/* SlideMod.thumbnailVideoRust(model.videoBackground, model.serviceItemId, index, SlideModel); */
/* } */
Rectangle {

View file

@ -73,7 +73,7 @@ Item {
onEntered: (drag) => {
if (drag.keys[0] === "library") {
dropHighlightLine.visible = true;
var lastItem = serviceItemList.itemAtIndex(ServiceItemModel.count() - 1);
var lastItem = serviceItemList.itemAtIndex(ServiceItemModel.count - 1);
dropHighlightLine.y = lastItem.y + lastItem.height;
}
}

View file

@ -513,8 +513,8 @@ Item {
}
function changeSong(index) {
console.log("Preparing to change song: " + index + 1 + " out of " + songProxyModel.songModel.count());
if (songProxyModel.songModel.count() - 1 === index)
console.log("Preparing to change song: " + index + 1 + " out of " + songProxyModel.songModel.count);
if (songProxyModel.songModel.count - 1 === index)
newSong(index)
else {
clearSlides();