Diamond: How committed to Settings as a structure
Posted: Mon Jun 22 2020 8:44 pm
Hello,
As part of my tire kicking of CopperSpice I wanted to try adding some enhancements/functionality to Diamond. Some of you might have read all or part of the post series.
https://www.logikalsolutions.com/wordpress/uncategorized/copperspice-and-diamond/
One of the first things I wanted to do was give it themes. Everybody seems to want to change colors to match mood or whatever. Now that I'm older, sometimes I need to do it just because of my eyes. I finally got around to looking at the code today.
Just how much religious conviction is there behind keeping Settings a structure and passing it around like a satchel?
Part of the following rambling is my mental process. I haven't actually tried any of this yet nor do I have any religious conviction about it.
My knee-jerk design impulse was to use a QMap<QString, ThemAttributes> but that means gutting the existing Settings logic to use a class (by reference hopefully).
I could keep it mostly the same by moving the QMap outside of Settings and just keeping the values for the CurrentTheme in Settings. The dialog would have to request a reference/pointer to the QMap so it could list all settings, change/copy/delete.
Would like to know your thoughts before I start writing lots of stuff that won't be accepted.
Is there a link to the coding standards for Diamond?
As part of my tire kicking of CopperSpice I wanted to try adding some enhancements/functionality to Diamond. Some of you might have read all or part of the post series.
https://www.logikalsolutions.com/wordpress/uncategorized/copperspice-and-diamond/
One of the first things I wanted to do was give it themes. Everybody seems to want to change colors to match mood or whatever. Now that I'm older, sometimes I need to do it just because of my eyes. I finally got around to looking at the code today.
Just how much religious conviction is there behind keeping Settings a structure and passing it around like a satchel?
Part of the following rambling is my mental process. I haven't actually tried any of this yet nor do I have any religious conviction about it.
My knee-jerk design impulse was to use a QMap<QString, ThemAttributes> but that means gutting the existing Settings logic to use a class (by reference hopefully).
I could keep it mostly the same by moving the QMap outside of Settings and just keeping the values for the CurrentTheme in Settings. The dialog would have to request a reference/pointer to the QMap so it could list all settings, change/copy/delete.
Would like to know your thoughts before I start writing lots of stuff that won't be accepted.
Is there a link to the coding standards for Diamond?