Skip to content

Commit

Permalink
remove evalthread class from compilation as it is not used
Browse files Browse the repository at this point in the history
extend command list by frequently used expressions
update help texts in command list
possibly fix bug freezing cells
  • Loading branch information
hkiel committed Jan 30, 2018
1 parent ab34299 commit 860a012
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 23 deletions.
4 changes: 2 additions & 2 deletions OMNotebook/OMNotebookGUI/OMNotebookGUI.pro
Expand Up @@ -45,8 +45,8 @@ SOURCES += \
serializingvisitor.cpp \
graphcell.cpp \
latexcell.cpp \
evalthread.cpp \
indent.cpp \
# evalthread.cpp \
# ../OMSketch/Tools.cpp \
# ../OMSketch/Sketch_files.cpp \
# ../OMSketch/Shapes.cpp \
Expand Down Expand Up @@ -118,8 +118,8 @@ HEADERS += \
searchform.h \
graphcell.h \
latexcell.h \
evalthread.h \
indent.h \
# evalthread.h \
# ../OMSketch/Tools.h \
# ../OMSketch/Sketch_files.h \
# ../OMSketch/Shapes.h \
Expand Down
51 changes: 35 additions & 16 deletions OMNotebook/OMNotebookGUI/commands.xml
Expand Up @@ -28,7 +28,7 @@
<helptext>Clear the variables.</helptext>
</command>
<command name="help()">
<helptext>Print helptext (returned as a string).</helptext>
<helptext>Print help text (returned as a string).</helptext>
</command>
<command name='help("omc")'>
<helptext>The command-line options available for omc.</helptext>
Expand All @@ -37,13 +37,13 @@
<helptext>Flags that enable debugging, diagnostics, and research prototypes.</helptext>
</command>
<command name='help("optmodules")'>
<helptext>Flags that enable debugging, diagnostics, and research prototypes.</helptext>
<helptext>Flags that determine which symbolic methods are used to produce the causalized equation system.</helptext>
</command>
<command name='help("simulation")'>
<helptext>Flags that enable debugging, diagnostics, and research prototypes.</helptext>
<helptext>The command-line options available for simulation executables generated by OpenModelica.</helptext>
</command>
<command name='help("$0")'>
<helptext>Flags that enable debugging, diagnostics, and research prototypes.</helptext>
<helptext>Displays option descriptions for multi-option flag &lt;flagname>.</helptext>
<field name="$0">flagname</field>
</command>
<command name="instantiateModel($0)">
Expand All @@ -66,11 +66,11 @@
</command>
<command name='loadFiles({"$0"})'>
<field name="$0">strFiles</field>
<helptext>Load modelica files given as string arrray. Ex: loadFile({"modelA.mo", "modelB.mo").</helptext>
<helptext>Load modelica files given as string arrray. Ex: loadFiles({"modelA.mo", "modelB.mo").</helptext>
</command>
<command name="loadModel($0)">
<field name="$0">name</field>
<helptext>Load model, function, or package relative to $OPENMODELICALIBRARY. Ex: loadModel(Modelica.Electrical). Note: if e.g. loadModel(Modelica) fails, you may have OPENMODELICALIBRARY pointing at the wrong location.</helptext>
<helptext>Load model, function, or package relative to $OPENMODELICALIBRARY. Ex: loadModel(Modelica.Electrical).</helptext>
</command>
<command name="plot($0)">
<field name="$0">var</field>
Expand All @@ -85,11 +85,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='plotAll("$0")'>
<field name="$0">"className_res.mat"</field>
<helptext>Plot all variables from the specified file. Ex: plotAll("Class_res.mat").</helptext>
</command>
<command name='readFile("$0")'>
<command name='plotAll("$0")'>
<field name="$0">"className_res.mat"</field>
<helptext>Plot all variables from the specified file. Ex: plotAll("Class_res.mat").</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 Expand Up @@ -123,8 +123,8 @@
<field name="$2">1</field>
<field name="$3">500</field>
<field name="$4">1e-6</field>
<field name="$5">"dassl"</field>
<field name="$6">"mat"</field>
<field name="$5">"dassl"</field>
<field name="$6">"mat"</field>
<helptext>Translates a model and simulates it. Ex: simulate(dcmotor). Ex: simulate(dcmotor, startTime=0, stopTime=10, numberOfIntervals=1000).</helptext>
</command>
<command name="buildModel($0, startTime=$1, stopTime=$2, numberOfIntervals=$3, tolerance=$4, storeInTemp=$5, method=$6, outputFormat=$7)">
Expand All @@ -134,8 +134,8 @@
<field name="$3">500</field>
<field name="$4">1e-6</field>
<field name="$5">false</field>
<field name="$6">"dassl"</field>
<field name="$7">"mat"</field>
<field name="$6">"dassl"</field>
<field name="$7">"mat"</field>
<helptext>Translates a model and build it. It does not run the code! Ex: buildModel(dcmotor). Ex: buildMotor(dcmotor, startTime=0, stopTime=10, numberOfIntervals=1000).</helptext>
</command>
<command name='system("$0")'>
Expand Down Expand Up @@ -163,7 +163,7 @@
<helptext>New generic class.</helptext>
</command>
<command name="model $0">
<field name="$0">name</field>
<field name="$0">name</field>
<helptext>New model.</helptext>
</command>
<command name="block $0">
Expand Down Expand Up @@ -251,6 +251,25 @@
<helptext>New function.</helptext>
</element>
<element name="equation"></element>
<element name="algorithm"></element>
<element name="annotation(experiment(StartTime=$0, StopTime=$1, Interval=$2, Tolerance=$3));">
<field name="$0">0</field>
<field name="$1">1</field>
<field name="$2">500</field>
<field name="$3">1e-6</field>
</element>
<element name="else"></element>
<element name="elseif"></element>
<element name="true"></element>
<element name="false"></element>
<element name="partial"></element>
<element name="protected"></element>
<element name="public"></element>
<element name="return"></element>
<element name="import $0;">
<field name="$0">packagename;</field>
<helptext>Make public definitions in some package available for use by shorted names.</helptext>
</element>
<element name="extends $0">
<field name="$0">BaseClass</field>
<helptext>Extends existing class (inheritance).</helptext>
Expand Down
9 changes: 4 additions & 5 deletions OMNotebook/OMNotebookGUI/graphcell.cpp
Expand Up @@ -78,7 +78,7 @@
#include "omcinteractiveenvironment.h"
#include "indent.h"

#include "evalthread.h"
//#include "evalthread.h"

using namespace OMPlot;

Expand Down Expand Up @@ -1586,7 +1586,7 @@ namespace IAEX {
setClosed(false);

// 2006-02-17 AF, set text '{evaluation expression}" during
// evaluation of expressiuon
// evaluation of expression
output_->selectAll();
output_->textCursor().insertText( "{evaluating expression}" );
setOutputStyle();
Expand Down Expand Up @@ -1618,10 +1618,9 @@ namespace IAEX {
getDelegate()->evalExpression(expr);
delegateFinished(getDelegate());
}

input_->blockSignals(false);
output_->blockSignals(false);
}
input_->blockSignals(false);
output_->blockSignals(false);
}

void GraphCell::delegateFinished(InputCellDelegate *delegate)
Expand Down

0 comments on commit 860a012

Please sign in to comment.