|
ATLAS Offline Software
|
Go to the documentation of this file.
21 #include <Inventor/C/errors/debugerror.h>
22 #include <Inventor/nodes/SoSwitch.h>
23 #include <Inventor/nodes/SoMaterial.h>
24 #include <Inventor/nodes/SoSeparator.h>
76 QString safetext(
text());
77 safetext.replace(
' ',
'_');
78 safetext.replace(
'[',
'_');
79 safetext.replace(
']',
'_');
80 safetext.replace(
'/',
'_');
81 safetext.replace(
'.',
'_');
82 safetext.replace(
',',
'_');
83 safetext.replace(
'<',
'_');
84 safetext.replace(
'>',
'_');
85 safetext.replace(
'&',
'_');
89 m_d->
theswitch->setName((
"StdCollSwitch"+safetext).toStdString().c_str());
93 m_d->
material->setName((
"StdCollMat"+safetext).toStdString().c_str());
99 m_d->
matButton->setObjectName(
"matButtonColl_"+safetext);
107 m_d->
checkBox->setObjectName(
"checkBoxColl_"+safetext);
113 m_d->
collsep->setName((
"StdCollSep"+safetext).toStdString().c_str());
177 m_d->
checkBox->setToolTip(
"Problems encountered during attempt to load this collection");
179 w->setEnabled(
false);
207 message(
"ERROR: collSwitch() called before init()");
215 message(
"ERROR: collSep() called before init()");
223 message(
"ERROR: material() called before init()");
231 message(
"ERROR: largeChangesBegin() called before init()");
242 message(
"ERROR: largeChangesEnd() called before init()");
272 messageDebug(
"VP1StdCollection::persistifiableState()");
275 message(
"ERROR: persistifiableState() called before init()");
281 Q_ASSERT(
m_d->
material&&
"Did you forget to call init() on this VP1StdCollection?");
291 message(
"ERROR: setState(..) called before init()");
295 des.disableUnrestoredChecks();
296 if (
des.version()!=0&&
des.version()!=1) {
297 messageDebug(
"Warning: Ignoring state with wrong version");
300 bool vis =
des.restoreBool();
302 QByteArray matState =
des.restoreByteArray();
303 QByteArray extraWidgetState =
des.version()>=1 ?
des.restoreByteArray() : QByteArray();
310 if (extraWidgetState!=QByteArray())
double collMaterialTransparency() const
virtual QString checkBoxToolTip() const
VP1StdCollection(IVP1System *, const QString &helperClassName)
SoMaterial * material() const
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
virtual ~VP1StdCollection()
qint32 collTypeID() const
void possibleChangeMatTranspOrBrightness()
void messageVerbose(const QString &) const
SoSwitch * collSwitch() const
Add this somewhere in your scenegraph (do not add any children here!)
virtual void init(VP1MaterialButtonBase *button=0)
virtual void largeChangesBegin()
virtual QByteArray extraWidgetsState() const
virtual QByteArray providePersistifiableID() const
static QString str(const QString &s)
void messageDebug(const QString &) const
static bool deserialiseSoMaterial(QByteArray &, SoMaterial *&)
def save(self, fileName="./columbo.out")
VP1MaterialButtonBase * matButton
void visibilityChanged(bool)
virtual QList< QWidget * > provideExtraWidgetsForGuiRow() const
QList< QWidget * > extraWidgets
double collMaterialBrightness() const
bool problemsLoading() const
virtual void collMaterialTransparencyAndBrightnessChanged()
double lastMatTransparency
virtual QList< QWidget * > widgetsForGuiRow() const
virtual void largeChangesEnd()
virtual void assignDefaultMaterial(SoMaterial *) const =0
int largechangescount_sep
int largechangescount_switch
SoSeparator * collSep() const
All 3D objects from this coll.
virtual QString matButtonToolTip() const
void message(const QString &) const
virtual QByteArray persistifiableState() const
Provide default implementation based on widget list + version.
virtual QString provideText() const =0
virtual void setState(const QByteArray &)
Provide default implementation based on widget list + version.
virtual qint32 provideCollTypeID() const
virtual void setExtraWidgetsState(const QByteArray &)
QList< QWidget * > provideWidgetsForGuiRow() const