embedding the slide_model in the slide_object

This commit is contained in:
Chris Cochrun 2024-09-26 06:39:06 -05:00
parent 0d2b636bc9
commit 4c403d9f3c
4 changed files with 8 additions and 25 deletions

View file

@ -6,10 +6,8 @@ mod slide_object {
include!("cxx-qt-lib/qmap.h");
type QMap_QString_QVariant =
cxx_qt_lib::QMap<cxx_qt_lib::QMapPair_QString_QVariant>;
// include!("cxx-qt-lib/qvariant.h");
// type QVariant = cxx_qt_lib::QVariant;
// #[cxx_name = "SlideModel"]
// type SlideModel = crate::slide_model::SlideModelRust;
include!("cxx-qt-gen/slide_model.cxxqt.h");
type SlideModel = crate::slide_model::slide_model::SlideModel;
}
unsafe extern "RustQt" {
@ -56,7 +54,7 @@ mod slide_object {
#[qproperty(i32, font_size)]
#[qproperty(f32, video_start_time)]
#[qproperty(f32, video_end_time)]
// #[qproperty(*mut SlideModel, slide_model)]
#[qproperty(*mut SlideModel, slide_model)]
type SlideObject = super::SlideObjectRust;
#[qinvokable]
@ -91,8 +89,7 @@ use cxx_qt_lib::{CaseSensitivity, QString, QVariant};
use tracing::{debug, error};
use crate::{
slide_types::{PresType, SlideType},
songs::song_model::{song_model::SongModel, SongModelRust},
slide_model::slide_model, slide_types::{PresType, SlideType}, songs::song_model::{song_model::SongModel, SongModelRust}
};
use self::slide_object::QMap_QString_QVariant;
@ -116,7 +113,7 @@ pub struct SlideObjectRust {
font_size: i32,
video_start_time: f32,
video_end_time: f32,
// slide_model: *mut qobject::SlideModel,
slide_model: *mut slide_model::SlideModel,
}
impl Default for SlideObjectRust {
@ -139,7 +136,7 @@ impl Default for SlideObjectRust {
inner_slide_index: 0,
video_start_time: 0.0,
video_end_time: 0.0,
// slide_model: std::ptr::null_mut(),
slide_model: std::ptr::null_mut(),
}
}
}