I am trying to make an options dialog that saves as much time as possible when applying the settings.
The widgets used are spread across 4 tabs and are a selection of group boxes, check boxes, radio buttons, text entry fields, spin counters and combo-boxes amongst possible others but these are most common.
I've got a boolean flag in each tab that I want changed to true if any single widget on it changed in some way. this would mean that when the apply method is invoked the dialog can check the each tab's flag to see if the tab has been altered and ignore it if it's unchanged.
A sample of my current solution follows, setModified() is the function that sets the flag:
connect(chkShowFormula, SIGNAL(stateChanged(int)), this, SLOT(setModified()));
connect(chkShowAxis, SIGNAL(stateChanged(int)), this, SLOT(setModified()));
connect(cmbAxisType, SIGNAL(currentIndexChanged(int)), this, SLOT(setModified()));
connect(cmbAxisType, SIGNAL(editTextChanged(QString)), this, SLOT(setModified()));
connect(cmbFormat, SIGNAL(currentIndexChanged(int)), this, SLOT(setModified()));
connect(grpShowLabels, SIGNAL(clicked(bool)), this, SLOT(setModified()));
connect(btnAxesFont, SIGNAL(clicked()), this, SLOT(setModified()));
connect(btnLabelFont, SIGNAL(clicked()), this, SLOT(setModified()));
Is there a tidier way to tie all these signals to the same slot? as this is but a fraction of the amount of signals I'm dealing with.
My other concern is that this method would fire almost constantly, so i'm also looking for another solution if possible.