atomic
11th April 2014, 15:55
Hi all,
in my MainWindow class i used QSettigns in order to set (save / load) some options who are connected with GUI. MainWindow class contain also Utility class who need few value from QSettings and now i make it like this
my MainWindow class
class MainWindow
{
public:
// rest methods
void loadSettings();
private:
QSettings settings;
Utility utility;
};
void MainWindow::loadSettings()
{
// here i load settings from .ini file
}
and method from Utility class
void Utility::getSettings( const QSettings & settings )
{
// here i take some values from QSettings
}
Now my question - is it a good solution to give some settings to other class?
Maybe are contraindication?
Thanks ;)
in my MainWindow class i used QSettigns in order to set (save / load) some options who are connected with GUI. MainWindow class contain also Utility class who need few value from QSettings and now i make it like this
my MainWindow class
class MainWindow
{
public:
// rest methods
void loadSettings();
private:
QSettings settings;
Utility utility;
};
void MainWindow::loadSettings()
{
// here i load settings from .ini file
}
and method from Utility class
void Utility::getSettings( const QSettings & settings )
{
// here i take some values from QSettings
}
Now my question - is it a good solution to give some settings to other class?
Maybe are contraindication?
Thanks ;)