Exemplo n.º 1
0
void ScalePicker::mouseDblClicked(const QwtScaleWidget *scale, const QPoint &pos)
{
	if (scaleRect(scale).contains(pos) ) 
		emit axisDblClicked(scale->alignment());
	else
	{// Click on the title
		switch(scale->alignment())   
		{
			case QwtScaleDraw::LeftScale:
				{
					emit yAxisTitleDblClicked();
					break;
				}
			case QwtScaleDraw::RightScale:
				{
					emit rightAxisTitleDblClicked();
					break;
				}
			case QwtScaleDraw::BottomScale:
				{
					emit xAxisTitleDblClicked();
					break;
				}
			case QwtScaleDraw::TopScale:
				{
					emit topAxisTitleDblClicked();
					break;
				}
		}
	}
}
Exemplo n.º 2
0
void ScalePicker::mouseDblClicked(const QwtScale *scale, const QPoint &pos) 
{
QRect rect = scaleRect(scale);

int margin = 2; // pixels tolerance
rect.setRect(rect.x() - margin, rect.y() - margin, rect.width() + 2 * margin, rect.height() +  2 * margin);

if ( rect.contains(pos) ) 
	{
	emit axisDblClicked(scale->position());
	}
else
	{// Click on the title
    switch(scale->position())   
        {
        case QwtScale::Left:
            {
			emit yAxisTitleDblClicked();
            break;
            }
        case QwtScale::Right:
            {
			emit rightAxisTitleDblClicked();
            break;
            }
        case QwtScale::Bottom:
            {
			emit xAxisTitleDblClicked();
            break;
            }
        case QwtScale::Top:
            {
			emit topAxisTitleDblClicked();
            break;
            }
		}
	}
}
Exemplo n.º 3
0
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*)));
}
Exemplo n.º 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 &)));
}