Trying to build the song_editor
This commit is contained in:
parent
e1a6e65295
commit
e1cfa5e843
2 changed files with 29 additions and 7 deletions
|
@ -48,7 +48,6 @@
|
|||
#include "cpp/slideobject.h"
|
||||
|
||||
// RUST
|
||||
// #include "cxx-qt-gen/my_object.cxxqt.h"
|
||||
#include "cxx-qt-gen/service_thing.cxxqt.h"
|
||||
#include "cxx-qt-gen/file_helper.cxxqt.h"
|
||||
#include "cxx-qt-gen/slide_obj.cxxqt.h"
|
||||
|
@ -61,7 +60,7 @@
|
|||
#include "cxx-qt-gen/video_model.cxxqt.h"
|
||||
#include "cxx-qt-gen/image_model.cxxqt.h"
|
||||
#include "cxx-qt-gen/utilities.cxxqt.h"
|
||||
// #include "cxx-qt-gen/image_model.cxxqt.h"
|
||||
#include "cxx-qt-gen/song_editor.cxxqt.h"
|
||||
|
||||
static QWindow *windowFromEngine(QQmlApplicationEngine *engine)
|
||||
{
|
||||
|
|
|
@ -10,12 +10,14 @@ mod song_editor {
|
|||
type QVariant = cxx_qt_lib::QVariant;
|
||||
include!("cxx-qt-lib/qstring.h");
|
||||
type QString = cxx_qt_lib::QString;
|
||||
include!("cxx-qt-lib/qurl.h");
|
||||
type QUrl = cxx_qt_lib::QUrl;
|
||||
include!("cxx-qt-lib/qstringlist.h");
|
||||
type QStringList = cxx_qt_lib::QStringList;
|
||||
include!("cxx-qt-lib/qlist.h");
|
||||
type QList_QString = cxx_qt_lib::QList<QString>;
|
||||
#[cxx_name = "SongModel"]
|
||||
type SongModel = SongModel;
|
||||
type CxxSongs = SongModel;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
@ -48,14 +50,35 @@ mod song_editor {
|
|||
#[qproperty]
|
||||
font_size: i32,
|
||||
#[qproperty]
|
||||
song_model: *mut SongModel,
|
||||
song_model: *mut CxxSongs,
|
||||
}
|
||||
|
||||
impl Default for SongEditor {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
title: QString::default(),
|
||||
lyrics: QString::default(),
|
||||
author: QString::default(),
|
||||
ccli: QString::default(),
|
||||
audio: QUrl::default(),
|
||||
verse_order: QString::default(),
|
||||
verse_order_format: true,
|
||||
background: QUrl::default(),
|
||||
background_type: QString::default(),
|
||||
horizontal_text_alignment: QString::default(),
|
||||
vertical_text_alignment: QString::default(),
|
||||
font: QString::default(),
|
||||
font_size: 50,
|
||||
song_model: std::ptr::null_mut(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl SongEditor {
|
||||
fn idk(mut self: Pin<&mut Self>) {
|
||||
// let mut model = self.song_model().as_mut().unwrap();
|
||||
// let pinned_model = Pin::new_unchecked(model);
|
||||
// pinned_model.update_ccli(0, QString::from("idk"));
|
||||
let mut model = self.song_model().as_mut().unwrap();
|
||||
let pinned_model = Pin::new_unchecked(model);
|
||||
pinned_model.update_ccli(0, QString::from("idk"));
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue