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*)));
}
示例#2
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 &)));
}
示例#3
0
DataManager::DataManager(QWidget *parent, Document *doc)
  : QDialog(parent), _doc(doc) {

  setupUi(this);
  _session->header()->setResizeMode(QHeaderView::ResizeToContents);
  _session->setModel(doc->session());

  _objects->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
  _objects->setStyleSheet("background-color: white;");


  _primitives = new QToolBar(_objects);
  _primitives->setOrientation(Qt::Vertical);
  _primitives->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

  _dataObjects = new QToolBar(_objects);
  _dataObjects->setOrientation(Qt::Vertical);
  _dataObjects->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

  _fits = new QToolBar(_objects);
  _fits->setOrientation(Qt::Vertical);
  _fits->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

  _filters = new QToolBar(_objects);
  _filters->setOrientation(Qt::Vertical);
  _filters->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

  _objects->addItem(_primitives, tr("Create Primitive"));
  _objects->addItem(_dataObjects, tr("Create Data Object"));
  _objects->addItem(_fits, tr("Create Fit"));
  _objects->addItem(_filters, tr("Create Filter"));

//   Create canonical items...

  QAction *action = new DataButtonAction(tr("Vector"));
  connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showVectorDialog()));
  _primitives->addAction(action);

   action = new DataButtonAction(tr("Matrix"));
   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showMatrixDialog()));
   _primitives->addAction(action);
 
   action = new DataButtonAction(tr("Scalar"));
   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showScalarDialog()));
   _primitives->addAction(action);
// 
//   action = new DataButtonAction(tr("String"));
//   connect(action, SIGNAL(triggered()), this, SLOT(showStringDialog()));
//   _primitives->addAction(action);

  action = new DataButtonAction(tr("Curve"));
  connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showCurveDialog()));
  _dataObjects->addAction(action);

  action = new DataButtonAction(tr("Equation"));
  connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showEquationDialog()));
  _dataObjects->addAction(action);

   action = new DataButtonAction(tr("Histogram"));
   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showHistogramDialog()));
   _dataObjects->addAction(action);
 
   action = new DataButtonAction(tr("Power Spectrum"));
   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showPowerSpectrumDialog()));
   _dataObjects->addAction(action);
 
   action = new DataButtonAction(tr("Event Monitor"));
   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showEventMonitorDialog()));
   _dataObjects->addAction(action);
 
   action = new DataButtonAction(tr("Image"));
   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showImageDialog()));
   _dataObjects->addAction(action);
 
   action = new DataButtonAction(tr("Spectrogram"));
   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showCSDDialog()));
   _dataObjects->addAction(action);
}