Jan
21
2010
Working with QT
By Chris Bruner
I’ve been working on a fuzzy logic program and the windows version is close to complete. What this does is allow you to translate values from input through various connections to the output.
The connections can be
-
In (input from sensor, or program)
-
Or (the maximum of all inputs)
-
And (the minimum of all inputs)
-
Xor (the difference between the maximum of all inputs and the Minimum of all inputs)
-
Fuzzy Logic Block (a range of outputs mapped to a range of inputs)
-
Out (the resulting value)
The program allows you to adjust values in the Fuzzy’s and the Inputs and will show the resulting values at each component’s output.

Where this becomes useful is in robotics, where you want to quickly determine output levels according to the inputs.
My FuzzyBuilder program saves it’s datafiles as include files (.h) which when linked with a fuzzy.c file produces the desired effect.
So what does this have to do with QT you ask? Well my first version was written using Embecardaro’s Rad Studio (c++ version) and while it works well enough it is a windows only solution. I want to be able to run this on Linux as well, so it made sense to recreate it using QT http://qt.nokia.com/products/developer-tools which is a cross platform solution.
My biggest problem so far has been understanding QT’s graphic system. I want to have the same functionality that I have on the windows system where I can move components around, and draw connections between them. I’ve been spending some time learning about scenes and view ports and such. Last night I made some progress and was able to finally make a blue box, which knows when it’s been clicked.

I know, not exciting. Just a programmer doing his thing, but to me it’s a wonderful breakthrough!








