tycho: add test object for qobject bindings
parent
c9b21a19c0
commit
24ad25257b
|
@ -2,9 +2,16 @@
|
|||
"cppFile": "",
|
||||
"rust": {
|
||||
"dir": "",
|
||||
"interfaceModule": "interface",
|
||||
"implementationModule": "implementation"
|
||||
"interfaceModule": "qintr",
|
||||
"implementationModule": "qimpl"
|
||||
},
|
||||
"objects": {
|
||||
"Project": {
|
||||
"type": "Object",
|
||||
"properties": {
|
||||
},
|
||||
"itemProperties": {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "menu.h"
|
||||
#include "../ui/ui_menu.h"
|
||||
#include "../ui/ui_about.h"
|
||||
#include "bindings.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <iostream>
|
||||
|
@ -23,7 +24,7 @@ Menu::~Menu()
|
|||
|
||||
void Menu::mapNew()
|
||||
{
|
||||
// TODO
|
||||
Project obj{this};
|
||||
}
|
||||
|
||||
void Menu::mapOpen()
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
use maraiah::durandal::{err::*, ffi};
|
||||
|
||||
mod qimpl;
|
||||
mod qintr;
|
||||
|
||||
extern "C" {
|
||||
fn main_cc(app_name: *mut ffi::c_char);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
use crate::qintr::*;
|
||||
|
||||
pub struct Project
|
||||
{
|
||||
emit: ProjectEmitter,
|
||||
}
|
||||
|
||||
impl Drop for Project
|
||||
{
|
||||
fn drop(&mut self)
|
||||
{
|
||||
println!("drop Project");
|
||||
}
|
||||
}
|
||||
|
||||
impl ProjectTrait for Project
|
||||
{
|
||||
fn new(emit: ProjectEmitter) -> Project
|
||||
{
|
||||
println!("new Project");
|
||||
Project{emit}
|
||||
}
|
||||
|
||||
fn emit(&mut self) -> &mut ProjectEmitter
|
||||
{
|
||||
&mut self.emit
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
|
@ -0,0 +1,8 @@
|
|||
#![allow(unused_imports)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use maraiah::durandal::ffi as libc;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/src/qintr.rs"));
|
||||
|
||||
// EOF
|
Loading…
Reference in New Issue