Skip to content

Commit 71c196d

Browse files
committed
Fixes #3663. Renamed View Class to Open Class.
1 parent 616b347 commit 71c196d

File tree

6 files changed

+29
-26
lines changed

6 files changed

+29
-26
lines changed

OMEdit/OMEditGUI/Component/Component.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,10 +1158,10 @@ void Component::createActions()
11581158
mpAttributesAction = new QAction(Helper::attributes, mpGraphicsView);
11591159
mpAttributesAction->setStatusTip(tr("Shows the component attributes"));
11601160
connect(mpAttributesAction, SIGNAL(triggered()), SLOT(showAttributes()));
1161-
// View Class Action
1162-
mpViewClassAction = new QAction(QIcon(":/Resources/icons/model.svg"), Helper::viewClass, mpGraphicsView);
1163-
mpViewClassAction->setStatusTip(Helper::viewClassTip);
1164-
connect(mpViewClassAction, SIGNAL(triggered()), SLOT(viewClass()));
1161+
// Open Class Action
1162+
mpOpenClassAction = new QAction(QIcon(":/Resources/icons/model.svg"), Helper::openClass, mpGraphicsView);
1163+
mpOpenClassAction->setStatusTip(Helper::openClassTip);
1164+
connect(mpOpenClassAction, SIGNAL(triggered()), SLOT(openClass()));
11651165
// View Documentation Action
11661166
mpViewDocumentationAction = new QAction(QIcon(":/Resources/icons/info-icon.svg"), Helper::viewDocumentation, mpGraphicsView);
11671167
mpViewDocumentationAction->setStatusTip(Helper::viewDocumentationTip);
@@ -2028,8 +2028,11 @@ void Component::showAttributes()
20282028
pComponentAttributes->exec();
20292029
}
20302030

2031-
//! Slot that opens up the component Modelica class in a new tab/window.
2032-
void Component::viewClass()
2031+
/*!
2032+
* \brief Component::openClass
2033+
* Slot that opens up the component Modelica class in a new tab/window.
2034+
*/
2035+
void Component::openClass()
20332036
{
20342037
MainWindow *pMainWindow = mpGraphicsView->getModelWidget()->getModelWidgetContainer()->getMainWindow();
20352038
pMainWindow->getLibraryWidget()->openLibraryTreeItem(mpLibraryTreeItem->getNameStructure());
@@ -2096,7 +2099,7 @@ void Component::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
20962099
menu.addAction(pComponent->getParametersAction());
20972100
menu.addAction(pComponent->getAttributesAction());
20982101
menu.addSeparator();
2099-
menu.addAction(pComponent->getViewClassAction());
2102+
menu.addAction(pComponent->getOpenClassAction());
21002103
menu.addAction(pComponent->getViewDocumentationAction());
21012104
menu.addSeparator();
21022105
LibraryTreeItem *pLibraryTreeItem = mpGraphicsView->getModelWidget()->getLibraryTreeItem();
@@ -2108,7 +2111,7 @@ void Component::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
21082111
menu.addAction(pComponent->getParametersAction());
21092112
menu.addAction(pComponent->getAttributesAction());
21102113
menu.addSeparator();
2111-
menu.addAction(pComponent->getViewClassAction());
2114+
menu.addAction(pComponent->getOpenClassAction());
21122115
menu.addAction(pComponent->getViewDocumentationAction());
21132116
menu.addSeparator();
21142117
if (pComponent->isInheritedComponent()) {

OMEdit/OMEditGUI/Component/Component.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class Component : public QObject, public QGraphicsItem
166166
OriginItem* getOriginItem() {return mpOriginItem;}
167167
QAction* getParametersAction() {return mpParametersAction;}
168168
QAction* getAttributesAction() {return mpAttributesAction;}
169-
QAction* getViewClassAction() {return mpViewClassAction;}
169+
QAction* getOpenClassAction() {return mpOpenClassAction;}
170170
QAction* getViewDocumentationAction() {return mpViewDocumentationAction;}
171171
QAction* getTLMAttributesAction() {return mpTLMAttributesAction;}
172172
ComponentInfo* getComponentInfo() {return mpComponentInfo;}
@@ -222,7 +222,7 @@ class Component : public QObject, public QGraphicsItem
222222
TextAnnotation *mpDefaultComponentText;
223223
QAction *mpParametersAction;
224224
QAction *mpAttributesAction;
225-
QAction *mpViewClassAction;
225+
QAction *mpOpenClassAction;
226226
QAction *mpViewDocumentationAction;
227227
QAction *mpTLMAttributesAction;
228228
ResizerItem *mpBottomLeftResizerItem;
@@ -307,7 +307,7 @@ public slots:
307307
void moveCtrlRight();
308308
void showParameters();
309309
void showAttributes();
310-
void viewClass();
310+
void openClass();
311311
void viewDocumentation();
312312
void showTLMAttributes();
313313
protected:

OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,10 +2105,10 @@ LibraryTreeView::LibraryTreeView(LibraryWidget *pLibraryWidget)
21052105
*/
21062106
void LibraryTreeView::createActions()
21072107
{
2108-
// show Model Action
2109-
mpViewClassAction = new QAction(QIcon(":/Resources/icons/modeling.png"), Helper::viewClass, this);
2110-
mpViewClassAction->setStatusTip(Helper::viewClassTip);
2111-
connect(mpViewClassAction, SIGNAL(triggered()), SLOT(viewClass()));
2108+
// open class action
2109+
mpOpenClassAction = new QAction(QIcon(":/Resources/icons/modeling.png"), Helper::openClass, this);
2110+
mpOpenClassAction->setStatusTip(Helper::openClassTip);
2111+
connect(mpOpenClassAction, SIGNAL(triggered()), SLOT(openClass()));
21122112
// view documentation Action
21132113
mpViewDocumentationAction = new QAction(QIcon(":/Resources/icons/info-icon.svg"), Helper::viewDocumentation, this);
21142114
mpViewDocumentationAction->setStatusTip(Helper::viewDocumentationTip);
@@ -2297,7 +2297,7 @@ void LibraryTreeView::showContextMenu(QPoint point)
22972297
switch (pLibraryTreeItem->getLibraryType()) {
22982298
case LibraryTreeItem::Modelica:
22992299
default:
2300-
menu.addAction(mpViewClassAction);
2300+
menu.addAction(mpOpenClassAction);
23012301
menu.addAction(mpViewDocumentationAction);
23022302
if (!pLibraryTreeItem->isSystemLibrary()) {
23032303
menu.addSeparator();
@@ -2364,10 +2364,10 @@ void LibraryTreeView::showContextMenu(QPoint point)
23642364
}
23652365

23662366
/*!
2367-
* \brief LibraryTreeView::viewClass
2367+
* \brief LibraryTreeView::openClass
23682368
* Shows the class view of the selected LibraryTreeItem.
23692369
*/
2370-
void LibraryTreeView::viewClass()
2370+
void LibraryTreeView::openClass()
23712371
{
23722372
LibraryTreeItem *pLibraryTreeItem = getSelectedLibraryTreeItem();
23732373
if (pLibraryTreeItem) {

OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class LibraryTreeView : public QTreeView
272272
LibraryWidget* getLibraryWidget() {return mpLibraryWidget;}
273273
private:
274274
LibraryWidget *mpLibraryWidget;
275-
QAction *mpViewClassAction;
275+
QAction *mpOpenClassAction;
276276
QAction *mpViewDocumentationAction;
277277
QAction *mpNewModelicaClassAction;
278278
QAction *mpSaveAction;
@@ -304,7 +304,7 @@ class LibraryTreeView : public QTreeView
304304
public slots:
305305
void libraryTreeItemExpanded(QModelIndex index);
306306
void showContextMenu(QPoint point);
307-
void viewClass();
307+
void openClass();
308308
void viewDocumentation();
309309
void createNewModelicaClass();
310310
void saveClass();

OMEdit/OMEditGUI/Util/Helper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ QString Helper::center;
254254
QString Helper::right;
255255
QString Helper::createConnection;
256256
QString Helper::findVariables;
257-
QString Helper::viewClass;
258-
QString Helper::viewClassTip;
257+
QString Helper::openClass;
258+
QString Helper::openClassTip;
259259
QString Helper::viewDocumentation;
260260
QString Helper::viewDocumentationTip;
261261
QString Helper::dontShowThisMessageAgain;
@@ -444,8 +444,8 @@ void Helper::initHelperVariables()
444444
Helper::right = tr("Right");
445445
Helper::createConnection = tr("Create Connection");
446446
Helper::findVariables = tr("Find Variables");
447-
Helper::viewClass = tr("View Class");
448-
Helper::viewClassTip = tr("Opens the class details");
447+
Helper::openClass = tr("Open Class");
448+
Helper::openClassTip = tr("Opens the class details");
449449
Helper::viewDocumentation = tr("View Documentation");
450450
Helper::viewDocumentationTip = tr("Opens the class documentation");
451451
Helper::dontShowThisMessageAgain = tr("Don't show this message again");

OMEdit/OMEditGUI/Util/Helper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ class Helper : public QObject
261261
static QString right;
262262
static QString createConnection;
263263
static QString findVariables;
264-
static QString viewClass;
265-
static QString viewClassTip;
264+
static QString openClass;
265+
static QString openClassTip;
266266
static QString viewDocumentation;
267267
static QString viewDocumentationTip;
268268
static QString dontShowThisMessageAgain;

0 commit comments

Comments
 (0)