Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Flow diagramming for QT? (Read 9358 times)
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Flow diagramming for QT?
Jun 21st, 2019 at 1:47pm
Print Post  
Hi,

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

Thanks,

Kyle Chen
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Flow diagramming for QT?
Reply #1 - Jun 24th, 2019 at 7:52am
Print Post  
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
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Flow diagramming for QT?
Reply #2 - Jun 26th, 2019 at 6:30pm
Print Post  
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
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Flow diagramming for QT?
Reply #3 - Jun 27th, 2019 at 8:56am
Print Post  
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
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Flow diagramming for QT?
Reply #4 - Jun 27th, 2019 at 4:15pm
Print Post  
Slavcho wrote on Jun 27th, 2019 at 8: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 | 258 Downloads )
Screen_Sample.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Flow diagramming for QT?
Reply #5 - Sep 30th, 2019 at 6:15pm
Print Post  
We got some proof of concept code running -
https://mindfusion.eu/_beta/QuickTest.zip

Code
Select All
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
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Flow diagramming for QT?
Reply #6 - Aug 3rd, 2020 at 10:01pm
Print Post  
Hi Slavcho,

Thank you for looking into this.

Is that possible for you to make a lib targetting the system on the following cpu board (TQMa6x with revision 0114 - QT 5.6.3 supported) so I can do some test?
https://support.tq-group.com/en/arm/tqma6x/linux/ptxdist/overview

My coding environment will be a Ubuntu VMvare machine (v18.0.4 with QT 5.6.3 support) running on Windows 10.

Controller code in C++ is OK to me. For Node rendering, basically I will need to pass a bitmap to the node. And might need to draw different layer over the bitmap (add a "lock" icon on the corner for an example). Example code will help.

Thank you very much,

Kyle
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Flow diagramming for QT?
Reply #7 - Aug 5th, 2020 at 12:22pm
Print Post  
Hi,

Do you mean you are using some special QT kit to compile for that board, or the standard GCC / desktop will do?

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Flow diagramming for QT?
Reply #8 - Aug 10th, 2020 at 1:31pm
Print Post  
Hi Slavcho,

Please hold until I find out what I really want.  Cheesy
Thanks,

Kyle
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint