@wysota - maybe I don't get it, but the buttons, textboxes, labels, etc are children of each of the respective forms.
@jpn - by loop I meant instead of having to use:
void MyFancyWidget::setFancyMode()
{
myTextObject = fancyUi.myTextObject;
myButtonObjectt = fancyUi.myButtonObject;
}
void MyFancyWidget::setPlainMode()
{
...
myTextObject = plainUi.myTextObject;
myButtonObject = plainUi.myButtonObject;
}
void MyFancyWidget::setFancyMode()
{
myTextObject = fancyUi.myTextObject;
myButtonObjectt = fancyUi.myButtonObject;
}
void MyFancyWidget::setPlainMode()
{
...
myTextObject = plainUi.myTextObject;
myButtonObject = plainUi.myButtonObject;
}
To copy to clipboard, switch view to plain text mode
I could use:
for(int i=0; i<fancyUi.children().size(); i++) {
childrenList[i]
}
for(int i=0; i<fancyUi.children().size(); i++) {
childrenList[i]
}
To copy to clipboard, switch view to plain text mode
I don't really know how to make this, but what I'm trying to do is to dynamically convert all of fancyUi's children into names which wouldn't require prefixing fancyUi.
Or, could I use this?
using namespace fancyUi
using namespace fancyUi
To copy to clipboard, switch view to plain text mode
But this has to be globally declared right? I can't put it in each of the mode-changing functions can I? What I'm trying to do is somehow "fake" the multi-inheritance approach from single inheritance to make life easier. I can make pointers to each single object, but as my program grows this looks like it would involve lots of unneeded code.
Thanks!
Bookmarks