rovsuite / monterey

Monterey is the computer GUI for rov-suite, an open source ROV control system.
21 stars 14 forks source link

Change PushButtons to DelayButtons? #59

Closed chriskonstad closed 10 years ago

chriskonstad commented 10 years ago

@QuantumCD

https://github.com/chriskonstad/DelayButton

I'm writing a DelayButton QML widget for use in the main UI of Monterey to enable and disable relays. What do you think about moving those buttons to this? I think it'll be good because then people won't accidentally enable/disable relays.

I do want to make them rectangular, scalable, have text in the center, fix the colors, etc.

What do you think? Do you like the concept?

Chris

QuantumCD commented 10 years ago

I think that's a great idea. Since summer is approaching, perhaps we should consider that total UI redesign and/or a mobile rewrite as well? I should have some time to work on it this summer, even if it's just helping out with the QML stuff when I can. I have no idea how busy I'll be with stuff though.

chriskonstad commented 10 years ago

Thanks! Yeah, I'm thinking that a UI rewrite would make porting to mobile easier. Maybe a QML based UI? I know that I personally want to improve the C++ engine to make it safer and easier to extend. There are some parts that really need to be worked on. They work as is, but I don't trust them long-term. I would also like to add unit tests, but I'm not entirely sure how easy they'll be to add considering how Monterey is written.

I have a summer internship for 3 months this summer, so I won't be able to work on it much then, although I will have some free time to devote to Monterey. But my summer vacation is almost 4 months long, so I'll have plenty of time near the end of summer.

If we write more/all of the UI in QML, we'll need to figure out how to do graphs (probably with QML Canvas) because right now we use QCustomPlot to graph.

UI-wise, especially if we do a re-write, I want to make sure that we make it totally theme-able.

I want to add a feature where people can configure their ROVs in a .ini file and that is loaded at startup. That .ini file will have, for instance, the number of relays and servos, sensor names and units, etc.

QuantumCD commented 10 years ago

Hmm... the graphing thing in QML will make for an interesting challenge. Perhaps I will try to prototype that sometime. I have been meaning to take a look at the QML Canvas component.

And yeah, fully themable of course! I think the best option for this would to have a QML "Properties" file with color constants that we use in the QML code, and we can assign those from C++ with an INI file backend using QSettings. That should make it so that themes can be switched without a restart, as I think QML is stateless or whatnot, meaning that changing the color in the constants will change all the colors. IIRC, this is how all the Digia projects handle theming.

As for the INI file that determines things like relays/servos, I think it'd be best to initialize all our settings in main() and then pass the appropriate values onto the UI/engine objects. That way, we can set up everything in the respective constructors.

Also, on a slightly unrelated note, I'm thinking of purchasing some robotic stuff this summer. Perhaps I can use it for some hands-on Monterey testing. ;)

chriskonstad commented 10 years ago

QML's canvas is really cool. That's how I handled the DelayButton.

That sounds perfect!

Yeah, that's what I'm thinking. It would load those values from the .ini file at startup. I mean, people don't usually change too many ROV configuration settings during run time. Some settings are changed, but not usually the ROV configuration. Check out the latest commit or two to Monterey. Relay buttons are now automatically added to the UI based on a constant in QROVController.cpp, which is the beginning of loading the ROV config from a .ini file.

That would be absolutely awesome! Let me know if you want any help choosing components or something. I have plenty of experience building ROVs.... If you blog about your robot, that'd be even cooler! ;)

QuantumCD commented 10 years ago

Haha, my blog has basically died. I have been too busy, and I haven't had much to write about. :P The biggest thing stopping me from doing anything with robotics is what I would make. If I can figure something cool out, then I'll work from there!

chriskonstad commented 10 years ago

Yeah, mine too. I have things to write about but neither the time nor the energy to write about them. XD What about an ROV?

QuantumCD commented 10 years ago

Yeah, but what is said purpose of said ROV? :P I like to work around a goal. Also, perhaps we should carry this over to email if we are going to chat about what ROV I should make over the summer. XD