Skip to content

Commit

Permalink
- Fix build
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20532 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed May 9, 2014
1 parent dd28aa9 commit 5d3dd90
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions OMPlot/OMPlotGUI/PlotWindow.cpp
Expand Up @@ -776,7 +776,9 @@ QString PlotWindow::getLegendPosition()

void PlotWindow::setFooter(QString footer)
{
#if QWT_VERSION > 0x060000
mpPlot->setFooter(footer);
#endif
}

void PlotWindow::checkForErrors(QStringList variables, QStringList variablesPlotted)
Expand Down Expand Up @@ -1158,7 +1160,11 @@ SetupDialog::SetupDialog(PlotWindow *pPlotWindow)
mpHorizontalAxisLabel = new QLabel(tr("Horizontal Axis Title"));
mpHorizontalAxisTextBox = new QLineEdit(mpPlotWindow->getPlot()->axisTitle(QwtPlot::xBottom).text());
mpPlotFooterLabel = new QLabel(tr("Plot Footer"));
#if QWT_VERSION > 0x060000
mpPlotFooterTextBox = new QLineEdit(mpPlotWindow->getPlot()->footer().text());
#else
mpPlotFooterTextBox = new QLineEdit;
#endif
// title tab layout
QGridLayout *pTitlesTabGridLayout = new QGridLayout;
pTitlesTabGridLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
Expand All @@ -1168,8 +1174,10 @@ SetupDialog::SetupDialog(PlotWindow *pPlotWindow)
pTitlesTabGridLayout->addWidget(mpVerticalAxisTextBox, 1, 1);
pTitlesTabGridLayout->addWidget(mpHorizontalAxisLabel, 2, 0);
pTitlesTabGridLayout->addWidget(mpHorizontalAxisTextBox, 2, 1);
#if QWT_VERSION > 0x060000
pTitlesTabGridLayout->addWidget(mpPlotFooterLabel, 3, 0);
pTitlesTabGridLayout->addWidget(mpPlotFooterTextBox, 3, 1);
#endif
mpTitlesTab->setLayout(pTitlesTabGridLayout);
// add tabs
mpSetupTabWidget->addTab(mpVariablesTab, tr("Variables"));
Expand Down Expand Up @@ -1280,7 +1288,9 @@ void SetupDialog::applySetup()
mpPlotWindow->getPlot()->setTitle(mpPlotTitleTextBox->text());
mpPlotWindow->getPlot()->setAxisTitle(QwtPlot::yLeft, mpVerticalAxisTextBox->text());
mpPlotWindow->getPlot()->setAxisTitle(QwtPlot::xBottom, mpHorizontalAxisTextBox->text());
#if QWT_VERSION > 0x060000
mpPlotWindow->getPlot()->setFooter(mpPlotFooterTextBox->text());
#endif
// replot
mpPlotWindow->getPlot()->replot();
}
4 changes: 4 additions & 0 deletions OMPlot/OMPlotGUI/PlotWindow.h
Expand Up @@ -208,6 +208,10 @@ class SetupDialog : public QDialog
QLineEdit *mpHorizontalAxisTextBox;
QLabel *mpPlotFooterLabel;
QLineEdit *mpPlotFooterTextBox;
/* legend tab */
QWidget *mpLegendTab;
QLabel *mpLegendPositionLabel;
QLineEdit *mpLegendPositionTextBox;
/* buttons */
QPushButton *mpOkButton;
QPushButton *mpApplyButton;
Expand Down

0 comments on commit 5d3dd90

Please sign in to comment.