void BaselineDialog::setGraph(Graph *g)
{
	if (!g)
		return;

	graph = g;
	DataCurve *c = g->dataCurve(0);
	if (c)
		boxPoints->setValue(c->dataSize());

	boxInputName->addItems(g->analysableCurvesList());
	if (g->rangeSelectorsEnabled())
		boxInputName->setCurrentIndex(boxInputName->findText(g->curveRange(g->rangeSelectorTool()->selectedCurve())));

	connect (graph, SIGNAL(destroyed()), this, SLOT(close()));
	connect (graph, SIGNAL(modifiedGraph()), this, SLOT(updateGraphCurves()));
}
void BaselineDialog::setGraph(Graph *g)
{
	if (!g)
		return;

	graph = g;
	DataCurve *c = g->dataCurve(0);
	if (c)
		boxPoints->setValue(c->dataSize());

	boxInputName->addItems(g->analysableCurvesList());

	QString selectedCurve = g->selectedCurveTitle();
	if (!selectedCurve.isEmpty())
		boxInputName->setCurrentIndex(boxInputName->findText(selectedCurve));

	connect (graph, SIGNAL(destroyed()), this, SLOT(close()));
	connect (graph, SIGNAL(modifiedGraph()), this, SLOT(updateGraphCurves()));
}
void MultiLayer::connectLayer(Graph *g)
{
connect (g,SIGNAL(drawTextOff()),this,SIGNAL(drawTextOff()));
connect (g,SIGNAL(showPlotDialog(long)),this,SIGNAL(showPlotDialog(long)));
connect (g,SIGNAL(createTable(const QString&,int,int,const QString&)),this,SIGNAL(createTable(const QString&,int,int,const QString&)));
connect (g,SIGNAL(viewLineDialog()),this,SIGNAL(showLineDialog()));
connect (g,SIGNAL(showContextMenu()),this,SIGNAL(showGraphContextMenu()));
connect (g,SIGNAL(showAxisDialog(int)),this,SIGNAL(showAxisDialog(int)));
connect (g,SIGNAL(axisDblClicked(int)),this,SIGNAL(showScaleDialog(int)));
connect (g,SIGNAL(xAxisTitleDblClicked()),this,SIGNAL(showXAxisTitleDialog()));		
connect (g,SIGNAL(yAxisTitleDblClicked()),this,SIGNAL(showYAxisTitleDialog()));
connect (g,SIGNAL(rightAxisTitleDblClicked()),this,SIGNAL(showRightAxisTitleDialog()));
connect (g,SIGNAL(topAxisTitleDblClicked()),this,SIGNAL(showTopAxisTitleDialog()));
connect (g,SIGNAL(showMarkerPopupMenu()),this,SIGNAL(showMarkerPopupMenu()));
connect (g,SIGNAL(cursorInfo(const QString&)),this,SIGNAL(cursorInfo(const QString&)));
connect (g,SIGNAL(viewImageDialog()),this,SIGNAL(showImageDialog()));
connect (g,SIGNAL(createTablePlot(const QString&,int,int,const QString&)),this,SIGNAL(createTablePlot(const QString&,int,int,const QString&)));
connect (g,SIGNAL(showPieDialog()),this,SIGNAL(showPieDialog()));
connect (g,SIGNAL(viewTitleDialog()),this,SIGNAL(viewTitleDialog()));
connect (g,SIGNAL(modifiedGraph()),this,SIGNAL(modifiedPlot()));
connect (g,SIGNAL(selectedGraph(Graph*)),this, SLOT(setActiveGraph(Graph*)));
connect (g,SIGNAL(viewTextDialog()),this,SIGNAL(showTextDialog()));
connect (g,SIGNAL(updateTable(const QString&,int,const QString&)),this,SIGNAL(updateTable(const QString&,int,const QString&)));
connect (g,SIGNAL(updateTableColumn(const QString&, double *, int)),
		 this,SIGNAL(updateTableColumn(const QString&, double *, int)));
connect (g,SIGNAL(clearCell(const QString&,double)),this,SIGNAL(clearCell(const QString&,double)));	
connect (g,SIGNAL(moveGraph(Graph*, const QPoint& )),this, SLOT(moveGraph(Graph*, const QPoint&)));
connect (g,SIGNAL(releaseGraph(Graph*)),this, SLOT(releaseGraph(Graph*)));
connect (g,SIGNAL(modifiedGraph(Graph*)), this, SLOT(updateLayerTransparency(Graph*)));
connect (g,SIGNAL(createIntensityTable(const QPixmap&)),
				this,SIGNAL(createIntensityTable(const QPixmap&)));
connect (g,SIGNAL(createHistogramTable(const QString&,int,int,const QString&)),
		this,SIGNAL(createHistogramTable(const QString&,int,int,const QString&)));

//when resizing a layer by mouse-dragging
connect (g,SIGNAL(resizeGraph(Graph*, const QPoint& )),this, SLOT(resizeGraph(Graph*, const QPoint&)));
connect (g,SIGNAL(newSizeGraph(Graph*)),this, SLOT(newSizeGraph(Graph*)));
}
示例#4
0
void MultiLayer::connectLayer(Graph *g) {
  connect(g, SIGNAL(drawLineEnded(bool)), this, SIGNAL(drawLineEnded(bool)));
  connect(g, SIGNAL(drawTextOff()), this, SIGNAL(drawTextOff()));
  connect(g, SIGNAL(showPlotDialog(int)), this, SIGNAL(showPlotDialog(int)));
  connect(
      g, SIGNAL(createTable(const QString &, const QString &, QList<Column *>)),
      this,
      SIGNAL(createTable(const QString &, const QString &, QList<Column *>)));
  connect(g, SIGNAL(viewLineDialog()), this, SIGNAL(showLineDialog()));
  connect(g, SIGNAL(showContextMenu()), this, SIGNAL(showGraphContextMenu()));
  connect(g, SIGNAL(showLayerButtonContextMenu()), this,
          SIGNAL(showLayerButtonContextMenu()));
  connect(g, SIGNAL(showAxisDialog(int)), this, SIGNAL(showAxisDialog(int)));
  connect(g, SIGNAL(axisDblClicked(int)), this, SIGNAL(showScaleDialog(int)));
  connect(g, SIGNAL(xAxisTitleDblClicked()), this,
          SIGNAL(showXAxisTitleDialog()));
  connect(g, SIGNAL(yAxisTitleDblClicked()), this,
          SIGNAL(showYAxisTitleDialog()));
  connect(g, SIGNAL(rightAxisTitleDblClicked()), this,
          SIGNAL(showRightAxisTitleDialog()));
  connect(g, SIGNAL(topAxisTitleDblClicked()), this,
          SIGNAL(showTopAxisTitleDialog()));
  connect(g, SIGNAL(showMarkerPopupMenu()), this,
          SIGNAL(showMarkerPopupMenu()));
  connect(g, SIGNAL(showCurveContextMenu(int)), this,
          SIGNAL(showCurveContextMenu(int)));
  connect(g, SIGNAL(cursorInfo(const QString &)), this,
          SIGNAL(cursorInfo(const QString &)));
  connect(g, SIGNAL(viewImageDialog()), this, SIGNAL(showImageDialog()));
  connect(g, SIGNAL(viewTitleDialog()), this, SIGNAL(viewTitleDialog()));
  connect(g, SIGNAL(modifiedGraph()), this, SIGNAL(modifiedPlot()));
  connect(g, SIGNAL(selectedGraph(Graph *)), this,
          SLOT(setActiveGraph(Graph *)));
  connect(g, SIGNAL(viewTextDialog()), this, SIGNAL(showTextDialog()));
  connect(g, SIGNAL(createIntensityTable(const QString &)), this,
          SIGNAL(createIntensityTable(const QString &)));
}
示例#5
0
void LegendWidget::setSelected(bool on)
{
	if (on){
		if (d_selector)
			return;
		else {
			d_selector = new SelectionMoveResizer(this);
      connect(d_selector, SIGNAL(targetsChanged()), dynamic_cast<Graph*>(d_plot->parent()), SIGNAL(modifiedGraph()));
      (dynamic_cast<Graph *>(d_plot->parent()))->setSelectedText(this);
		}
	} else if (d_selector){
		d_selector->close();
		d_selector = NULL;
    (dynamic_cast<Graph *>(d_plot->parent()))->setSelectedText(NULL);
	}
}
示例#6
0
void LegendWidget::mousePressEvent (QMouseEvent *)
{
    if (d_selector){
        delete d_selector;
		d_selector = NULL;
	}

  (dynamic_cast<Graph *>(d_plot->parent()))->activateGraph();
  (dynamic_cast<Graph *>(d_plot->parent()))->deselectMarker();

    d_selector = new SelectionMoveResizer(this);
  connect(d_selector, SIGNAL(targetsChanged()), dynamic_cast<Graph*>(d_plot->parent()), SIGNAL(modifiedGraph()));
  (dynamic_cast<Graph *>(d_plot->parent()))->setSelectedText(this);
}