- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.JavaScript pack. It includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are more details and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Flow diagramming for QT?
Read 839 times

Kyle Chen   Offline
Full Member
***
Posts: 102
I Love MindFusion!


   
     
 
Flow diagramming for QT?
Jun 21st, 2019 at 2:47pm
 
Hi,

Is that possible you guys make a lib for QT? Or you already have a plan, that will be great!

Thanks,

Kyle Chen
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1829
Gender: male
tech.support


   
     
 
Re: Flow diagramming for QT?
Reply #1 - Jun 24th, 2019 at 8:52am
 
Hi,

We've looked a few times at it and don't have current plans, but we could probably jump on the WebAssembly bandwagon Smiley Are you using QT Quick or QT Widgets? You might also try running our JavaScript library from inside a QWebView.

Regards,
Slavcho
MindFusion
 
 
 
IP Logged    
 
     

Kyle Chen   Offline
Full Member
***
Posts: 102
I Love MindFusion!


   
     
 
Re: Flow diagramming for QT?
Reply #2 - Jun 26th, 2019 at 7:30pm
 
Hi Slavcho,

For QT, I'm not sure what I will use now. The target platform could be embedded system (Ubuntu something), mobile phone application and/or desktop. Probably performance will be first to consider, so QWebView+JavaScript could not be the first choice for embedded system.

Please keep me updated if you will start a plan for QT.

Thanks,

Kyle Chen
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1829
Gender: male
tech.support


   
     
 
Re: Flow diagramming for QT?
Reply #3 - Jun 27th, 2019 at 9:56am
 
You'll be probably using QT Quick / QML then. What diagram features from our other supported platforms would you need, in case we decide to start planning? Smiley
 
 
 
IP Logged    
 
     

Kyle Chen   Offline
Full Member
***
Posts: 102
I Love MindFusion!


   
     
 
Re: Flow diagramming for QT?
Reply #4 - Jun 27th, 2019 at 5:15pm
 
Slavcho wrote on Jun 27th, 2019 at 9:56am:
You'll be probably using QT Quick / QML then. What diagram features from our other supported platforms would you need, in case we decide to start planning? Smiley


You're right, QT Quick/QML would be better.

If possible we expect it similar as desktop as much as possible. Basically we use diagram as a WYSWYG editor(Attached is a sample screen). All the text, barcode, graphic here are diagram nodes. We'll create bitmap for all of them. Some special requirement I can think about for now (based on WinForm version):
1. The most important, the application will run with touch screen which need an easy touch screen operation like easy to move node (maybe hold a node for a while then it turns into moving mode?)
2. Lane needs to be support because the nodes will be split into different lane.
3. Better group/ungroup - once nodes are grouped, the relative position should be always kept same like in Word canvas.

Thanks and looking forward to your early planning!

Kyle Chen
 
 

Screen_Sample.png (70 KB | 10 )
Screen_Sample.png
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1829
Gender: male
tech.support


   
     
 
Re: Flow diagramming for QT?
Reply #5 - Sep 30th, 2019 at 7:15pm
 
We got some proof of concept code running -
https://mindfusion.eu/_beta/QuickTest.zip

Code:
import QtQuick 2.12
import QtQuick.Window 2.12

import MindFusion.Diagramming 0.1


Window {
	visible: true
	width: 640
	height: 480
	title: qsTr("Hello World")

	DiagramView {
		objectName: "diagramView"
	}
}

auto diagramView = object->
	findChild<DiagramView*>("diagramView");
if (diagramView)
{
	auto diagram = diagramView->diagram();

	auto node1 = QSharedPointer<DiagramNode>::create();
	node1->setText("Hello,");
	node1->setBounds(QRectF(40, 20, 200, 200));
	diagram->items().add(node1);

	auto node2 = QSharedPointer<DiagramNode>::create();
	node2->setText("World!");
	node2->setImageLocation(
		QUrl("qrc:/tajmahal200.png"));
	node2->setBounds(QRectF(300, 140, 180, 140));
	diagram->items().add(node2);

	QObject::connect(
		diagram.get(), &Diagram::nodeCreated,
		[=] (auto node)
		{
			node->setText("I'm new here");
		});
} 



...

- We'd prefer to use shared pointers for the various references kept between items. Unfortunately shared pointers cannot be used from QML, so you'll need to do the diagram controller code in C++ at this time as shown in example above. We'll probably have to add some parallel APIs to access raw QObject* pointers if you want to manipulate the diagram entirely in QML.

- DiagramNode is mostly a data object and rendering is done via a QML component bound to its properties. So we'll probably expose some templating system based on that down the line.

- We have no idea how to handle all the kits and platforms supported by Qt; the archive above contains Qt 5.13.1 / Windows / VC2017 64bit build. We guess we'll have to ship binaries on demand for the various combinations. From what we've heard, the Qt company is developing a marketplace to go along with their Qt 6 release, so that might be something they handle if we upload the source code with them.

Our developer will play with multi-touch APIs next.

Regards,
Slavcho
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print