21 #include <QMessageBox>
26 PTreeContainerPreferencesObserver::PTreeContainerPreferencesObserver(QString
const & title,
QWidget* parent)
27 : PTreeContainer(title, parent) {}
37 if (QMessageBox::warning(
this,
"Preferences updated",
38 "Another entity has updated the preferences contained in this window to "
39 "a newer version. You have unsaved changes. Do you want to discard them "
40 "and use the most recent version, or keep your changes and ignore the"
42 QMessageBox::Discard | QMessageBox::Ignore, QMessageBox::Discard)
43 == QMessageBox::Ignore)
Event used to inform some observer that preferences have changed.
const boost::property_tree::ptree & GetPreferences() const
Get preferences.
Interface for PTreeContainerPreferencesObserver.
bool Open(boost::property_tree::ptree const &pt, QString const &edit_path="")
Open ptree with given edit path.
virtual ~PTreeContainerPreferencesObserver()
Virtual destructor.
void Update(const Ws::Event::PreferencesChanged &)
Call this method to update the maintained ptree.
void ForceClose()
Force this object and its children to go back to unopened state so it can be safely deleted...
see the online Qt documentation
virtual boost::property_tree::ptree GetPTreeState() const
virtual void SetPTreeState(const boost::property_tree::ptree &)
Namespace for generic graphical shell for simulators.