Skip to content

Commit

Permalink
*Added range options to graphcells
Browse files Browse the repository at this point in the history
*Added "save parameters" command
*Fixed minor bugs

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2932 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Henrik Eriksson committed Sep 25, 2007
1 parent 57b8649 commit ab51bdd
Show file tree
Hide file tree
Showing 7 changed files with 334 additions and 116 deletions.
2 changes: 1 addition & 1 deletion OMNotebook/OMNotebookQT4/trunk.vcproj
Expand Up @@ -121,7 +121,7 @@
AdditionalDependencies="qtmaind.lib QtCored4.lib QtGuid4.lib QtNetworkd4.lib QtXmld4.lib antlrd.lib NotebookParser.lib mico2311.lib pltpkg2.lib"
OutputFile="Debug\\OMNotebook.exe"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="$(OMDEV)\lib\antlr-win32-msvc\md-mdd\;..\NotebookParser\Release;"$(QTHOME)\lib";..\Pltpkg2\release;"$(OMDEV)\lib\mico-win32-msvc""
AdditionalLibraryDirectories=""$(OMDEV)\lib\antlr-win32-msvc\md-mdd\";..\NotebookParser\Debug;"$(QTHOME)\lib";..\Pltpkg2\Debug;"$(OMDEV)\lib\mico-win32-msvc""
IgnoreDefaultLibraryNames=""
DelayLoadDLLs=""
GenerateDebugInformation="TRUE"
Expand Down
29 changes: 15 additions & 14 deletions OMNotebook/OMNotebookQT4/xmlparser.cpp
Expand Up @@ -518,6 +518,7 @@ namespace IAEX
text = e.text();
GraphCell *gCell = dynamic_cast<GraphCell*>(graphcell);
gCell->setText(text);
gCell->compoundwidget->gwMain->currentExpr = e.text();
//fjass gCell->setText( text );
}
/* else if( e.tagName() == XML_OUTPUTPART )
Expand Down Expand Up @@ -696,23 +697,23 @@ namespace IAEX
gCell->compoundwidget->gwMain->variables.clear();

gCell->compoundwidget->plotTitle->setText(element.attribute(XML_GRAPHCELL_TITLE, "Plot by OpenModelica"));
gCell->compoundwidget->xLabel->setText(element.attribute(XML_GRAPHCELL_XLABEL));
gCell->compoundwidget->yLabel->setText(element.attribute(XML_GRAPHCELL_YLABEL));
gCell->compoundwidget->gwMain->showGrid((element.attribute(XML_GRAPHCELL_GRID) == XML_TRUE)?true:false);
gCell->compoundwidget->xLabel->setText(element.attribute(XML_GRAPHCELL_XLABEL,"" ));
gCell->compoundwidget->yLabel->setText(element.attribute(XML_GRAPHCELL_YLABEL, ""));
gCell->compoundwidget->gwMain->showGrid((element.attribute(XML_GRAPHCELL_GRID, XML_TRUE) == XML_TRUE)?true:false);

gCell->compoundwidget->gwMain->fixedXSize = (element.attribute(XML_GRAPHCELL_GRIDAUTOX) == XML_TRUE)?false:true;
gCell->compoundwidget->gwMain->fixedYSize = (element.attribute(XML_GRAPHCELL_GRIDAUTOY) == XML_TRUE)?false:true;

gCell->compoundwidget->gwMain->xMajorDist = element.attribute(XML_GRAPHCELL_GRIDMAJORX).toDouble();
gCell->compoundwidget->gwMain->xMinorDist = element.attribute(XML_GRAPHCELL_GRIDMINORX).toDouble();
gCell->compoundwidget->gwMain->yMajorDist = element.attribute(XML_GRAPHCELL_GRIDMAJORY).toDouble();
gCell->compoundwidget->gwMain->yMinorDist = element.attribute(XML_GRAPHCELL_GRIDMINORY).toDouble();
gCell->compoundwidget->gwMain->fixedXSize = (element.attribute(XML_GRAPHCELL_GRIDAUTOX, XML_TRUE) == XML_TRUE)?false:true;
gCell->compoundwidget->gwMain->fixedYSize = (element.attribute(XML_GRAPHCELL_GRIDAUTOY, XML_TRUE) == XML_TRUE)?false:true;
gCell->compoundwidget->gwMain->xMajorDist = element.attribute(XML_GRAPHCELL_GRIDMAJORX, "1").toDouble();
gCell->compoundwidget->gwMain->xMinorDist = element.attribute(XML_GRAPHCELL_GRIDMINORX, ".1").toDouble();
gCell->compoundwidget->gwMain->yMajorDist = element.attribute(XML_GRAPHCELL_GRIDMAJORY, "1").toDouble();
gCell->compoundwidget->gwMain->yMinorDist = element.attribute(XML_GRAPHCELL_GRIDMINORY, ".1").toDouble();

gCell->compoundwidget->gwMain->xLog = (element.attribute(XML_GRAPHCELL_LOGX) == XML_TRUE)?true:false;
gCell->compoundwidget->gwMain->yLog = (element.attribute(XML_GRAPHCELL_LOGY) == XML_TRUE)?true:false;
gCell->compoundwidget->legendFrame->setVisible((element.attribute(XML_GRAPHCELL_LEGEND) == XML_TRUE)?true:false);
gCell->compoundwidget->gwMain->xLog = (element.attribute(XML_GRAPHCELL_LOGX, XML_FALSE) == XML_TRUE)?true:false;
gCell->compoundwidget->gwMain->yLog = (element.attribute(XML_GRAPHCELL_LOGY, XML_FALSE) == XML_TRUE)?true:false;
gCell->compoundwidget->legendFrame->setVisible((element.attribute(XML_GRAPHCELL_LEGEND, XML_TRUE) == XML_TRUE)?true:false);

if(element.attribute(XML_GRAPHCELL_AA) == XML_TRUE)
if(element.attribute(XML_GRAPHCELL_AA, XML_FALSE) == XML_TRUE)
{
gCell->compoundwidget->gwMain->setRenderHint(QPainter::Antialiasing);
gCell->compoundwidget->gwMain->antiAliasing = true;
Expand Down
44 changes: 33 additions & 11 deletions OMNotebook/Pltpkg2/Pltpkg2.vcproj
Expand Up @@ -160,18 +160,18 @@
RelativePath="lineGroup.cpp">
</File>
<File
RelativePath="release\moc_compoundWidget.cpp">
RelativePath="debug\moc_compoundWidget.cpp">
<FileConfiguration
Name="Debug|Win32"
Name="Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="debug\moc_compoundWidget.cpp">
RelativePath="release\moc_compoundWidget.cpp">
<FileConfiguration
Name="Release|Win32"
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
Expand All @@ -195,6 +195,15 @@
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="release\moc_graphWindow.cpp">
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath="debug\moc_graphWindow.cpp">
<FileConfiguration
Expand All @@ -205,12 +214,19 @@
</FileConfiguration>
</File>
<File
RelativePath="release\moc_graphWindow.cpp">
RelativePath=".\release\moc_legendLabel.cpp">
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File
Expand All @@ -223,24 +239,30 @@
</FileConfiguration>
</File>
<File
RelativePath=".\release\moc_legendLabel.cpp">
RelativePath=".\release\moc_preferenceWindow.cpp">
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath=".\debug\moc_preferenceWindow.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
Name="Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File
RelativePath=".\release\moc_preferenceWindow.cpp">
</File>
<File
RelativePath="Point.cpp">
</File>
Expand Down
1 change: 1 addition & 0 deletions OMNotebook/Pltpkg2/graphWidget.cpp
Expand Up @@ -569,6 +569,7 @@ void GraphWidget::getData()
}

connect(activeSocket, SIGNAL(readyRead()), this, SLOT(getData()));
connect(activeSocket, SIGNAL(disconnected()), this, SLOT(getData()));
}

void GraphWidget::acCon()
Expand Down
3 changes: 2 additions & 1 deletion OMNotebook/Pltpkg2/graphWidget.h
Expand Up @@ -248,9 +248,10 @@ public slots:
QString zoomStr, gridStr, aAStr;
QRectF range;
double dataStreamVersion;
QString currentExpr;

public:
QString currentExpr;

QRectF originalArea;


Expand Down
1 change: 1 addition & 0 deletions OMNotebook/Pltpkg2/preferenceWindow.cpp
Expand Up @@ -106,6 +106,7 @@ void PreferenceWindow::apply()

if(vMin->isEnabled())
{

top = QVariant(vMin->text()).toDouble();
bottom = QVariant(vMax->text()).toDouble();
}
Expand Down

0 comments on commit ab51bdd

Please sign in to comment.