Show updated help text from menu Help -> Command line help

This commit is contained in:
Magne Sjaastad 2013-12-19 10:45:15 +01:00
parent c3cd245ffa
commit f13f91d74d
2 changed files with 13 additions and 7 deletions

View File

@ -824,20 +824,20 @@ bool RiaApplication::parseArguments()
progOpt.setOptionPrefix(cvf::ProgramOptions::DOUBLE_DASH);
m_helpText = QString("\n%1 v. %2\n").arg(RI_APPLICATION_NAME).arg(getVersionStringApp(false));
m_helpText += "Copyright Statoil ASA, Ceetron AS 2011, 2012\n\n";
const cvf::String usageText = progOpt.usageText(110, 30);
m_helpText += cvfqt::Utils::toQString(usageText);
QStringList arguments = QCoreApplication::arguments();
bool parseOk = progOpt.parse(cvfqt::Utils::toStringVector(arguments));
if (!parseOk || progOpt.hasOption("help") || progOpt.hasOption("?"))
{
QString helpText = QString("\n%1 v. %2\n").arg(RI_APPLICATION_NAME).arg(getVersionStringApp(false));
helpText += "Copyright Statoil ASA, Ceetron AS 2011, 2012\n\n";
const cvf::String usageText = progOpt.usageText(110, 30);
helpText += cvfqt::Utils::toQString(usageText);
#if defined(_MSC_VER) && defined(_WIN32)
showFormattedTextInMessageBox(helpText);
showFormattedTextInMessageBox(m_helpText);
#else
fprintf(stdout, "%s\n", helpText.toAscii().data());
fflush(stdout);
@ -1752,6 +1752,9 @@ void RiaApplication::showFormattedTextInMessageBox(const QString& text)
//--------------------------------------------------------------------------------------------------
QString RiaApplication::commandLineParameterHelp() const
{
return m_helpText;
/*
QString text = QString("\n%1 v. %2\n").arg(RI_APPLICATION_NAME).arg(getVersionStringApp(false));
text += "Copyright Statoil ASA, Ceetron AS 2011, 2012\n\n";
@ -1784,6 +1787,7 @@ QString RiaApplication::commandLineParameterHelp() const
"-----------------------------------------------------------------";
return text;
*/
}
//--------------------------------------------------------------------------------------------------

View File

@ -190,4 +190,6 @@ private:
std::list<RimCommandObject*> m_commandQueue;
QMutex m_commandQueueLock;
QString m_helpText;
};