 |
ATLAS Offline Software
|
Go to the documentation of this file.
25 #include <Inventor/nodes/SoMaterial.h>
29 #include <QDataStream>
35 #include <QDoubleSpinBox>
39 #include <QRadioButton>
63 +QString(
w->metaObject()->className())
64 +
", name="+
w->objectName());
103 message(
"WARNING: warnUnsaved(..) was never called!");
137 messageDebug(
"VP1Serialise::save(QCheckBox) - name: " + cb->objectName());
140 save(cb->isChecked());
147 messageDebug(
"VP1Serialise::save(QGroupBox) - name: " + gb->objectName());
149 if (!gb->isCheckable())
150 message(
"WARNING: Asked to handled GroupBox which is not checkable: "+gb->objectName());
152 save(gb->isChecked());
159 messageDebug(
"VP1Serialise::save(QComboBox) - name: " + cb->objectName());
162 save( cb->count() > 0 ? cb->currentText() : QString() );
169 messageDebug(
"\nVP1Serialise::save(QLineEdit) - name: " + le->objectName());
179 messageDebug(
"\nVP1Serialise::save(QDoubleSpinBox) - name: " +
sb->objectName());
189 messageDebug(
"\nVP1Serialise::save(QSpinBox) - name: " +
sb->objectName());
199 messageDebug(
"\nVP1Serialise::save(QSlider) - name: " +
s->objectName());
254 messageDebug(
"\nVP1Serialise::save(QToolBox) - name: " +
tb->objectName());
257 save(
tb &&
tb->count() > 0 ?
tb->currentIndex() : -1 );
264 messageDebug(
"\nVP1Serialise::save(QToolBox) - name: " +
tb->objectName());
267 int i =
tb ?
tb->currentIndex() : -1;
290 messageDebug(
"\nVP1Serialise::save(VP1MaterialButton) - name: " +
mb->objectName());
293 QList<SoMaterial*> mats =
mb ?
mb->handledMaterials() : QList<SoMaterial*>();
294 save(mats.isEmpty() ? 0 : mats.at(0));
301 messageDebug(
"\nVP1Serialise::save(QColor) - name: " +
c.name());
313 messageDebug(
"\nVP1Serialise::save(VP1ColorSelectButton) - name: " + cb->objectName());
323 messageDebug(
"\nVP1Serialise::save(PhiSectionWidget) - name: " +
phi->objectName());
344 QList<QRadioButton *>
l;
345 l << rb0 << rb1 << rb2 << rb3 << rb4 << rb5 << rb6 << rb7 << rb8 << rb9;
346 for (qint32
i = 0;
i <
l.count(); ++
i) {
349 messageDebug(
"\nVP1Serialise::save(QRadioButton) - name: " +
l.at(
i)->objectName());
355 for (qint32
i = 0;
i <
l.count(); ++
i) {
356 if (
l.at(
i)&&
l.at(
i)->isChecked()) {
368 messageDebug(
"\nVP1Serialise::save(VP1CollectionWidget) - name: " + cw->objectName());
369 messageDebug(
"VP1Serialise::save(VP1CollectionWidget)- start...");
375 buffer.open(QIODevice::WriteOnly);
382 messageDebug(
"VP1Serialise::save(VP1CollectionWidget)- end.");
397 messageDebug(
"\nVP1Serialise::save(VP1CollectionSettingsButtonBase) - name: " + jcb->objectName());
398 messageDebug(
"VP1Serialise::save(VP1CollectionSettingsButtonBase)- start...");
404 messageDebug(
"VP1Serialise::save(VP1CollectionSettingsButtonBase)- end.");
413 messageDebug(
"\nVP1Serialise::save(VP1EtaPhiCutWidget) - name: " +
w->objectName());
417 save(
w ?
w->saveState() : QByteArray());
424 messageDebug(
"\nVP1Serialise::save(VP1DrawOptionsWidget) - name: " +
w->objectName());
428 save(
w ?
w->state() : QByteArray());
435 messageDebug(
"\nVP1Serialise::ignoreWidget(QWidget) - name: " +
w->objectName());
456 if (
w->inherits(
"QGroupBox"))
457 return static_cast<const QGroupBox*
>(
w)->isCheckable();
459 return w->inherits(
"QCheckBox")
460 ||
w->inherits(
"QRadioButton")
461 ||
w->inherits(
"QComboBox")
462 ||
w->inherits(
"QAbstractSpinBox")
463 ||
w->inherits(
"QSlider")
464 ||
w->inherits(
"QToolBox")
465 ||
w->inherits(
"PhiSectionWidget")
466 ||
w->inherits(
"VP1EtaPhiCutWidget")
467 ||
w->inherits(
"VP1DrawOptionsWidget")
468 ||
w->inherits(
"QLineEdit")
469 ||
w->inherits(
"VP1ColorSelectButton")
470 ||
w->inherits(
"VP1MaterialButton");
493 if (
object->isWidgetType()&&!
object->objectName().startsWith(
"qt_")) {
494 const QWidget * wid =
static_cast<const QWidget*
>(
object);
496 QString
s(
"WARNING Unsaved widget of type: "+QString(wid->metaObject()->className())+
" and object name = "+wid->objectName());
506 for (
const QObject* o :
object->children())
Scalar phi() const
phi method
void messageVerbose(const QString &) const
static void decrementNumberOfInstantiations()
void warnUnsaved(const QObject *)
void widgetHandled(const QWidget *)
void handle(const QWidget *w)
static QString str(const QString &s)
void messageDebug(const QString &) const
static unsigned numberOfInstantiations()
QSet< const QWidget * > handledWidgets
static QByteArray serialiseSoMaterial(SoMaterial *)
static unsigned numberOfInstantiations
VP1Serialise(qint32 version, IVP1System *sys=0)
QSet< const QWidget * > ignoredWidgets
void saveByTitle(QToolBox *)
void ignoreWidget(const QWidget *)
void disableUnsavedChecks()
const double mb
1mb to cm2
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
bool expectsPersistification(const QWidget *w)
void message(const QString &) const
const QByteArray & result()