Skip to content

Commit

Permalink
Added the contextMenu to Modelica Files Tree.
Browse files Browse the repository at this point in the history
Updated the simulation and icon properties dialogues.
Deleted the simulation and icon properties ui files.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6492 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Oct 20, 2010
1 parent 9e6843f commit bc719f8
Show file tree
Hide file tree
Showing 21 changed files with 862 additions and 1,077 deletions.
4 changes: 4 additions & 0 deletions OMEdit/OMEditGUI/Helper.cpp
Expand Up @@ -36,11 +36,15 @@
QString Helper::applicationName = "OMEdit";
QString Helper::applicationVersion = "0.0.1";
QString Helper::applicationIntroText = "Open Modelica Connection Editor";
QString Helper::OpenModelicaHome = getenv("OPENMODELICAHOME");
QString Helper::omcServerName = "OMEditor";
QString Helper::omFileTypes = "*.mo";
QString Helper::omFileOpenText = "Modelica Files (*.mo)";
qreal Helper::globalXScale = 0.15;
qreal Helper::globalYScale = 0.15;
int Helper::treeIndentation = 13;
QSize Helper::iconSize = QSize(20, 20);
int Helper::headingFontSize = 18;

QString Helper::ModelicaSimulationMethods = "DASSL,DASSL2,Euler,Runge-Kutta";

Expand Down
6 changes: 6 additions & 0 deletions OMEdit/OMEditGUI/Helper.h
Expand Up @@ -34,20 +34,26 @@
#ifndef HELPER_H
#define HELPER_H

#include <stdlib.h>
#include <QString>
#include <QSize>

class Helper
{
public:
static QString applicationName;
static QString applicationVersion;
static QString applicationIntroText;
static QString OpenModelicaHome;
static QString omcServerName;
static QString omFileTypes;
static QString omFileOpenText;
static qreal globalXScale;
static qreal globalYScale;
static QString ModelicaSimulationMethods;
static int treeIndentation;
static QSize iconSize;
static int headingFontSize;
};

class GUIMessages
Expand Down
12 changes: 12 additions & 0 deletions OMEdit/OMEditGUI/IconAnnotation.cpp
Expand Up @@ -352,6 +352,17 @@ QVariant IconAnnotation::itemChange(GraphicsItemChange change, const QVariant &v
emit componentMoved();
updateSelectionBox();
}
else if (change == QGraphicsItem::ItemRotationHasChanged)
{
emit componentRotated();
//! @todo the selection box inverts with rotation. Fix it!!!!!!!!
updateSelectionBox();
}
else if (change == QGraphicsItem::ItemScaleHasChanged)
{
emit componentScaled();
/*updateSelectionBox();*/
}
return QGraphicsItem::itemChange(change, value);
}

Expand Down Expand Up @@ -397,6 +408,7 @@ void IconAnnotation::updateSelectionBox()
void IconAnnotation::addConnector(Connector *item)
{
connect(this, SIGNAL(componentMoved()), item, SLOT(drawConnector()));
connect(this, SIGNAL(componentRotated()), item, SLOT(drawConnector()));
}

void IconAnnotation::resizeIcon(qreal resizeFactorX, qreal resizeFactorY)
Expand Down
2 changes: 2 additions & 0 deletions OMEdit/OMEditGUI/IconAnnotation.h
Expand Up @@ -119,6 +119,8 @@ class IconAnnotation : public ShapeAnnotation
void componentMoved();
void componentDeleted();
void componentSelected();
void componentRotated();
void componentScaled();
public slots:
void showSelectionBox();
void resizeIcon(qreal resizeFactorX, qreal resizeFactorY);
Expand Down

0 comments on commit bc719f8

Please sign in to comment.