@@ -51,51 +51,40 @@ PlotWindow::PlotWindow(QStringList arguments, QWidget *parent)
5151 // open the file
5252 openFile (QString (arguments[1 ]));
5353
54- // Set up arguments
55- // read the title
54+ // Set up arguments
5655 setTitle (QString (arguments[2 ]));
57- // read the legend
5856 if (QString (arguments[3 ]) == " true" )
5957 setLegend (true );
6058 else if (QString (arguments[3 ]) == " false" )
6159 setLegend (false );
6260 else
6361 throw PlotException (" Invalid input" );
64- // read the grid
6562 if (QString (arguments[4 ]) == " true" )
6663 setGrid (true );
6764 else if (QString (arguments[4 ]) == " false" )
6865 setGrid (false );
6966 else
7067 throw PlotException (" Invalid input" );
71- // read the plot type
7268 QString plotType = arguments[5 ];
73- // read the logx
7469 if (QString (arguments[6 ]) == " true" )
7570 setLogX (true );
7671 else if (QString (arguments[6 ]) == " false" )
7772 setLogX (false );
7873 else
7974 throw PlotException (" Invalid input" );
80- // read the logy
8175 if (QString (arguments[7 ]) == " true" )
8276 setLogY (true );
8377 else if (QString (arguments[7 ]) == " false" )
8478 setLogY (false );
8579 else
8680 throw PlotException (" Invalid input" );
87- // read the x label value
8881 setXLabel (QString (arguments[8 ]));
89- // read the y label value
9082 setYLabel (QString (arguments[9 ]));
91- // read the x range
9283 setXRange (QString (arguments[10 ]).toDouble (), QString (arguments[11 ]).toDouble ());
93- // read the y range
9484 setYRange (QString (arguments[12 ]).toDouble (), QString (arguments[13 ]).toDouble ());
95- // read the variables name
9685 QStringList variablesToRead;
9786 for (int i = 14 ; i < arguments.length (); i++)
98- variablesToRead.append (QString (arguments[i]));
87+ variablesToRead.append (QString (arguments[i]));
9988
10089 // Plot
10190 if (plotType == " plot" )
@@ -162,19 +151,18 @@ void PlotWindow::openFile(QString file)
162151void PlotWindow::setupToolbar ()
163152{
164153 QToolBar *toolBar = new QToolBar (this );
165- toolBar->setAutoFillBackground (true );
166- toolBar->setPalette (QPalette (Qt::gray));
154+ setContextMenuPolicy (Qt::NoContextMenu);
167155
168- // ZOOM
169- mpZoomButton = new QToolButton (toolBar);
156+ // //ZOOM
157+ mpZoomButton = new QToolButton (toolBar);
170158 mpZoomButton->setText (" Zoom" );
171- mpZoomButton->setCheckable (true );
159+ mpZoomButton->setCheckable (true );
172160 connect (mpZoomButton, SIGNAL (toggled (bool )), SLOT (enableZoomMode (bool )));
173161 toolBar->addWidget (mpZoomButton);
174162
175163 toolBar->addSeparator ();
176164
177- // PAN
165+ // //PAN
178166 mpPanButton = new QToolButton (toolBar);
179167 mpPanButton->setText (" Pan" );
180168 mpPanButton->setCheckable (true );
@@ -392,7 +380,7 @@ void PlotWindow::plot(QStringList variables)
392380 double stopTime = omc_matlab4_stopTime (&reader);
393381 if (reader.nvar < 1 )
394382 throw NoVariableException (" Variable doesnt exist: time" );
395- double *timeVals = omc_matlab4_read_vals (&reader,0 );
383+ double *timeVals = omc_matlab4_read_vals (&reader,0 );
396384
397385 if (variables[0 ] == " " )
398386 {
0 commit comments