Saving configuration and reopening it Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
dcruise546
In need of some credit
In need of some credit
Posts: 3
Joined: Tue Nov 10, 2020 8:36 am

Saving configuration and reopening it

Post by dcruise546 »

I am posting here since I am looking only for an idea.

As a part of my ongoing image processing software using OpenCV. The user can add a set of algorithms (in chronological order), can save it as a .xml file.

I have visualized the following in my mind, but I need help moving forward using wxWidgets.

a. User chooses picture
b. Selects the ROI (Region of Interest)
c. Choose one algorithm from the drop-down box
d. Enter parameters required for that particular algorithm
e. Choose another algorithm
f. Enter parameters for that particular algorithm and so on.

Finally, the user can preview the resulting image. If he wants, he can save this sequence of algorithms and the associated parameters as a .xml file. Next time, he can simply load the .xml and use the same pipeline for another image or a video stream, etc.

I already looked for something similar in wxWidgets examples. I had no luck. Any starting point or guidance will certainly help me.

If this question goes beyond the scope of the wxWidgets forum, please mention it.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Saving configuration and reopening it

Post by ONEEYEMAN »

Hi,
So what exactly is the problem?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Saving configuration and reopening it

Post by doublemax »

Does it have to be a XML file? If yes, you can use wxXmlDocument
https://docs.wxwidgets.org/trunk/classw ... ument.html

If not, i'd suggest wxFileConfig, which is much easier to use (IMHO):
https://docs.wxwidgets.org/trunk/classw ... onfig.html
Make sure to check its base class wxConfigBase, where you'll find the most import methods.
https://docs.wxwidgets.org/trunk/classw ... _base.html
Use the source, Luke!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Saving configuration and reopening it

Post by PB »

If you were asking if wxWidgets can automatically save and restore values from the controls in a form-like window, then the answer is NO.
Post Reply