8 #include "ui_permuoncollectionsettings_form.h"
9 #include "ui_settings_cuts_form.h"
19 #include "Inventor/nodes/SoDrawStyle.h"
20 #include "Inventor/nodes/SoLightModel.h"
21 #include "Inventor/nodes/SoMaterial.h"
27 #include <QDataStream>
28 #include <QMouseEvent>
29 #include <QDragEnterEvent>
78 editwindow =
new QWidget(0,Qt::WindowStaysOnTopHint);
150 setAcceptDrops(
true);
171 if (objectName().isEmpty())
172 setObjectName(
"MuonCollectionSettingsButton");
306 message(
"ERROR! MuonCollectionSettingsButton::minimumQuality - unknown value! Returning 'Very Loose'.");
314 ShownAssociatedObjects
parts = ShownAssociatedObject::Nothing;
317 if (
m_d->
editwindow_ui.comboBox_shownTrackParticles->currentIndex()==0)
parts |= ShownAssociatedObject::TrackParticlesPrimary;
318 if (
m_d->
editwindow_ui.comboBox_shownTrackParticles->currentIndex()==1)
parts |= ShownAssociatedObject::TrackParticlesCB;
319 if (
m_d->
editwindow_ui.comboBox_shownTrackParticles->currentIndex()==2)
parts |= ShownAssociatedObject::TrackParticlesID;
320 if (
m_d->
editwindow_ui.comboBox_shownTrackParticles->currentIndex()==3)
parts |= ShownAssociatedObject::TrackParticlesMS;
321 if (
m_d->
editwindow_ui.comboBox_shownTrackParticles->currentIndex()==4)
parts |= ShownAssociatedObject::TrackParticlesME;
323 if (
m_d->
editwindow_ui.checkBox_showCaloClusters->isChecked())
parts |= ShownAssociatedObject::CaloClusters;
338 if (
event->button() == Qt::LeftButton)
340 QPushButton::mousePressEvent(
event);
346 if (
event->source()!=
this &&
event->mimeData()->hasFormat(
"vp1/material"))
347 event->acceptProposedAction();
353 if (!(
event->buttons() & Qt::LeftButton))
356 < QApplication::startDragDistance())
359 QDrag *drag =
new QDrag(
this);
360 QMimeData *mimeData =
new QMimeData;
369 mimeData->setData(
"vp1/material", byteArray);
398 drag->setMimeData(mimeData);
399 drag->exec(Qt::CopyAction | Qt::MoveAction);
405 QByteArray
data =
event->mimeData()->data(
"vp1/material");
406 event->acceptProposedAction();
465 const double minFromInterface=
m_d->
editwindow_ui.doubleSpinBox_cut_minpt_gev->value()*1000;
466 const double maxFromInterface=
m_d->
editwindow_ui.doubleSpinBox_cut_maxpt_gev->value()*1000;
471 min = (
m_d->
editwindow_ui.checkBox_cut_minpt->isChecked() ? minFromInterface : -std::numeric_limits<double>::infinity());
472 max = (
m_d->
editwindow_ui.checkBox_cut_maxpt->isChecked() ? maxFromInterface : std::numeric_limits<double>::infinity());
474 min = (
m_d->
editwindow_ui.checkBox_cut_maxpt->isChecked() ? -maxFromInterface : -std::numeric_limits<double>::infinity());
475 max = (
m_d->
editwindow_ui.checkBox_cut_minpt->isChecked() ? -minFromInterface : std::numeric_limits<double>::infinity());