Skip to content

Commit

Permalink
SimulationExperiment view: added some menu items to get access to our…
Browse files Browse the repository at this point in the history
… Graph Panel and Graphs settings (opencor#1426).
  • Loading branch information
agarny committed Oct 29, 2017
1 parent 9d9eb91 commit 0fe40ba
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/plugins/widget/GraphPanelWidget/i18n/GraphPanelWidget_fr.ts
Expand Up @@ -50,6 +50,22 @@
<source>Specify custom axes for the graph panel</source>
<translation>Spécifier des axes personnalisés pour le panneau graphique</translation>
</message>
<message>
<source>Graph Panel Settings...</source>
<translation>Paramètres Panneau Graphique...</translation>
</message>
<message>
<source>Customise the graph panel</source>
<translation>Paramètrer le panneau graphique</translation>
</message>
<message>
<source>Graphs Settings...</source>
<translation>Paramètres Graphes...</translation>
</message>
<message>
<source>Customise the graphs</source>
<translation>Paramètrer les graphes</translation>
</message>
<message>
<source>Logarithmic X Axis</source>
<translation>Logarithmique Axe des X</translation>
Expand Down
29 changes: 29 additions & 0 deletions src/plugins/widget/GraphPanelWidget/src/graphpanelplotwidget.cpp
Expand Up @@ -727,6 +727,8 @@ GraphPanelPlotWidget::GraphPanelPlotWidget(const GraphPanelPlotWidgets &pNeighbo
mExportToAction = Core::newAction(this);
mCopyToClipboardAction = Core::newAction(this);
mCustomAxesAction = Core::newAction(this);
mGraphPanelSettingsAction = Core::newAction(this);
mGraphsSettingsAction = Core::newAction(this);
mLogarithmicXAxisAction = Core::newAction(true, this);
mLogarithmicYAxisAction = Core::newAction(true, this);
mZoomInAction = Core::newAction(this);
Expand All @@ -739,6 +741,10 @@ GraphPanelPlotWidget::GraphPanelPlotWidget(const GraphPanelPlotWidgets &pNeighbo
this, SLOT(copyToClipboard()));
connect(mCustomAxesAction, SIGNAL(triggered(bool)),
this, SLOT(customAxes()));
connect(mGraphPanelSettingsAction, SIGNAL(triggered(bool)),
this, SLOT(graphPanelSettings()));
connect(mGraphsSettingsAction, SIGNAL(triggered(bool)),
this, SLOT(graphsSettings()));
connect(mLogarithmicXAxisAction, SIGNAL(triggered(bool)),
this, SLOT(toggleLogAxisX()));
connect(mLogarithmicYAxisAction, SIGNAL(triggered(bool)),
Expand All @@ -760,6 +766,9 @@ GraphPanelPlotWidget::GraphPanelPlotWidget(const GraphPanelPlotWidgets &pNeighbo
mContextMenu->addAction(pSynchronizeYAxisAction);
}

mContextMenu->addSeparator();
mContextMenu->addAction(mGraphPanelSettingsAction);
mContextMenu->addAction(mGraphsSettingsAction);
mContextMenu->addSeparator();
mContextMenu->addAction(mLogarithmicXAxisAction);
mContextMenu->addAction(mLogarithmicYAxisAction);
Expand Down Expand Up @@ -807,6 +816,10 @@ void GraphPanelPlotWidget::retranslateUi()
tr("Copy the contents of the graph panel to the clipboard"));
I18nInterface::retranslateAction(mCustomAxesAction, tr("Custom Axes..."),
tr("Specify custom axes for the graph panel"));
I18nInterface::retranslateAction(mGraphPanelSettingsAction, tr("Graph Panel Settings..."),
tr("Customise the graph panel"));
I18nInterface::retranslateAction(mGraphsSettingsAction, tr("Graphs Settings..."),
tr("Customise the graphs"));
I18nInterface::retranslateAction(mLogarithmicXAxisAction, tr("Logarithmic X Axis"),
tr("Enable/disable logarithmic scaling on the X axis"));
I18nInterface::retranslateAction(mLogarithmicYAxisAction, tr("Logarithmic Y Axis"),
Expand Down Expand Up @@ -1937,6 +1950,22 @@ void GraphPanelPlotWidget::customAxes()

//==============================================================================

void GraphPanelPlotWidget::graphPanelSettings()
{
//---ISSUE1426--- TO BE DONE...
qDebug(">>> GraphPanelPlotWidget::graphPanelSettings()...");
}

//==============================================================================

void GraphPanelPlotWidget::graphsSettings()
{
//---ISSUE1426--- TO BE DONE...
qDebug(">>> GraphPanelPlotWidget::graphsSettings()...");
}

//==============================================================================

void GraphPanelPlotWidget::toggleLogAxisX()
{
// Enable/disable logarithmic scaling on the X axis
Expand Down
Expand Up @@ -311,6 +311,8 @@ class GRAPHPANELWIDGET_EXPORT GraphPanelPlotWidget : public QwtPlot,
QAction *mCopyToClipboardAction;
QAction *mSynchronizeXAxisAction;
QAction *mSynchronizeYAxisAction;
QAction *mGraphPanelSettingsAction;
QAction *mGraphsSettingsAction;
QAction *mLogarithmicXAxisAction;
QAction *mLogarithmicYAxisAction;
QAction *mCustomAxesAction;
Expand Down Expand Up @@ -370,6 +372,8 @@ private slots:
void exportTo();
void copyToClipboard();
void customAxes();
void graphPanelSettings();
void graphsSettings();
void toggleLogAxisX();
void toggleLogAxisY();
void zoomIn();
Expand Down

0 comments on commit 0fe40ba

Please sign in to comment.