Commit 80576a2c authored by Marc R.'s avatar Marc R.

abstract actor factory: added optional dialog that displays warning about experimental actors

parent 438ea903
......@@ -1033,6 +1033,7 @@ void MActor::printDebugOutputOnUserRequest()
*******************************************************************************/
MAbstractActorFactory::MAbstractActorFactory()
: isInitialized(false)
{
}
......@@ -1052,6 +1053,7 @@ void MAbstractActorFactory::initialize()
name = actor->getActorType();
settingsID = actor->getSettingsID();
delete actor;
isInitialized = true;
}
}
......@@ -1094,5 +1096,23 @@ bool MAbstractActorFactory::acceptSettings(const QString& configfile)
}
void MAbstractActorFactory::displayWarningExperimentalStatus()
{
if (isInitialized)
{
QString text = QString(
"Actors of type '%1' are still in experimental "
"status. Some options may not yet be fully functional, "
"there also may be bugs. Please double-check "
"when interpreting the displayed data.").arg(getName());
QMessageBox msg;
msg.setWindowTitle("Warning");
msg.setText(text);
msg.setIcon(QMessageBox::Warning);
msg.exec();
}
}
} // namespace Met3D
......@@ -788,8 +788,16 @@ public:
protected:
virtual MActor* createInstance() = 0;
/**
Call this function in the derived @ref createInstance() method to display
a warning that the actor is still in an "experimental" state -- useful
for development versions.
*/
void displayWarningExperimentalStatus();
QString name;
QString settingsID;
bool isInitialized;
};
} // namespace Met3D
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment