Skip to content

Commit

Permalink
- switched all plot<->plot2
Browse files Browse the repository at this point in the history
- switched all plotParameteric<->plotParametric2
- now val(var, integer) works!


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@3698 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Oct 18, 2008
1 parent 7c6b916 commit a67e34a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 21 deletions.
6 changes: 5 additions & 1 deletion OMNotebook/OMNotebookQT4/commands.xml
Expand Up @@ -64,7 +64,11 @@
<field name="$1">var2</field>
<helptext>Plot var2 relative to var1 from the most recently simulated model. Ex: plotParametric(x,y).</helptext>
</command>
<command name="readFile($0)">
<command name="plotAll($0)">
<field name="$0">className</field>
<helptext>Plot all variables from the specified model. Ex: plotAll(Class).</helptext>
</command>
<command name="readFile($0)">
<field name="$0">str</field>
<helptext>Load file given as string and return a string of the file content. Ex: readFile("myModel/myModelr.mo").</helptext>
</command>
Expand Down
6 changes: 3 additions & 3 deletions OMNotebook/OMNotebookQT4/graphcell.cpp
Expand Up @@ -1638,7 +1638,7 @@ namespace IAEX
bool GraphCell::isPlot(QString text)
{
// QRegExp exp( "plot\\((.*)|plotParametric\\((.*)|simulate" );
QRegExp exp( "plot\\((.*)|plotParametric\\((.*)" );
QRegExp exp( "plot2\\((.*)|plotParametric2\\((.*)" );
if( text.isNull() )
{
if( 0 <= input_->toPlainText().indexOf( exp, 0 ) )
Expand Down Expand Up @@ -1672,7 +1672,7 @@ namespace IAEX
}
bool GraphCell::isPlot2(QString text)
{
QRegExp exp("plot2\\(.*\\)|plotParametric2\\(.*\\)|simulate|plotAll" );
QRegExp exp("plot\\(.*\\)|plotParametric\\(.*\\)|plotAll" );

if( text.isNull() )
{
Expand Down Expand Up @@ -2331,7 +2331,7 @@ namespace IAEX
{
output_->selectAll();
output_->textCursor().insertText( "[Error] Unable to find plot image \"" + filename + "\"" );
// output_->setPlainText( "[Error] Unable to found plot image \"" + imagename + "\"" );
// output_->setPlainText( "[Error] Unable to find plot image \"" + imagename + "\"" );
break;
}
Expand Down
2 changes: 1 addition & 1 deletion OMNotebook/OMNotebookQT4/inputcell.cpp
Expand Up @@ -1122,7 +1122,7 @@ namespace IAEX
*/
bool InputCell::isPlot(QString text)
{
QRegExp exp( "plot\\((.*)|plotParametric\\((.*)" );
QRegExp exp( "plot2\\((.*)|plotParametric2\\((.*)" );


if( text.isNull() )
Expand Down
32 changes: 16 additions & 16 deletions OMNotebook/OMNotebookQT4/omc_communicator.cpp
Expand Up @@ -280,22 +280,22 @@ QString OmcCommunicator::callOmc(const QString& fnCall)

// PORT >> returnString = returnString.stripWhiteSpace();
returnString = returnString.trimmed();
if (fnCall.startsWith("list(")) {
//emit omcOutput("...");
// qDebug("...");
} else {
//emit omcOutput(returnString);
//qDebug(QString(returnString).replace("%"," "));
}

if (returnString == "-1") {
string tmp = "[Internal Error] OmcCommunicator::callOmc():\nOmc call \""
+ fnCall.toStdString() + "\" failed!\n\n";

qWarning( tmp.c_str() );
//throw OmcError(fnCall, returnString);
cout << "OmcError(" << fnCall.toStdString() << ", " << returnString.toStdString() << ")" << endl;
}
//if (fnCall.startsWith("list(")) {
// //emit omcOutput("...");
// // qDebug("...");
//} else {
// //emit omcOutput(returnString);
// //qDebug(QString(returnString).replace("%"," "));
//}

//if (returnString == "-1") {
// string tmp = "[Internal Error] OmcCommunicator::callOmc():\nOmc call \""
// + fnCall.toStdString() + "\" failed!\n\n";

// qWarning( tmp.c_str() );
// //throw OmcError(fnCall, returnString);
// cout << "OmcError(" << fnCall.toStdString() << ", " << returnString.toStdString() << ")" << endl;
//}

return returnString;
}
Expand Down
7 changes: 7 additions & 0 deletions OMNotebook/OMNotebookQT4/trunk.sln
Expand Up @@ -25,6 +25,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ext", "..\ext\ext.vcproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "3Dpkg", "..\3Dpkg\3Dpkg.vcproj", "{286F13C0-0E92-4179-A57E-E8C949054F46}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xml", "xml", "{1D94A336-1A53-4554-B9BA-5A875920F4FB}"
ProjectSection(SolutionItems) = preProject
commands.xml = commands.xml
modelicacolors.xml = modelicacolors.xml
stylesheet.xml = stylesheet.xml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Expand Down

0 comments on commit a67e34a

Please sign in to comment.