Gui: replace SbBool with bool in View3DInventorViewer
This commit is contained in:
@@ -331,7 +331,7 @@ const SbViewportRegion & SIM::Coin3D::Quarter::SoQTQuarterAdaptor::getViewportRe
|
||||
return getSoRenderManager()->getViewportRegion();
|
||||
}
|
||||
|
||||
void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setViewing(SbBool enable)
|
||||
void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setViewing(bool enable)
|
||||
{
|
||||
m_viewingflag = enable;
|
||||
|
||||
@@ -346,7 +346,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setViewing(SbBool enable)
|
||||
}
|
||||
}
|
||||
|
||||
SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isViewing() const
|
||||
bool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isViewing() const
|
||||
{
|
||||
return m_viewingflag;
|
||||
}
|
||||
@@ -406,12 +406,12 @@ float SIM::Coin3D::Quarter::SoQTQuarterAdaptor::getSeekTime() const
|
||||
return m_seekperiod;
|
||||
}
|
||||
|
||||
SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isSeekMode() const
|
||||
bool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isSeekMode() const
|
||||
{
|
||||
return m_inseekmode;
|
||||
}
|
||||
|
||||
SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isSeekValuePercentage() const
|
||||
bool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isSeekValuePercentage() const
|
||||
{
|
||||
return !m_seekdistanceabs;
|
||||
}
|
||||
@@ -428,7 +428,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setPickRadius(float pickRadius)
|
||||
}
|
||||
}
|
||||
|
||||
SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::seekToPoint(const SbVec2s& screenpos)
|
||||
bool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::seekToPoint(const SbVec2s& screenpos)
|
||||
{
|
||||
|
||||
SoRayPickAction rpaction(getSoRenderManager()->getViewportRegion());
|
||||
@@ -502,7 +502,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekDistance(const float dista
|
||||
m_seekdistance = distance;
|
||||
}
|
||||
|
||||
void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekMode(SbBool enable)
|
||||
void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekMode(bool enable)
|
||||
{
|
||||
if(!enable && m_seeksensor->isScheduled()) {
|
||||
m_seeksensor->unschedule();
|
||||
@@ -517,7 +517,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekTime(const float seconds)
|
||||
m_seekperiod = seconds;
|
||||
}
|
||||
|
||||
void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekValueAsPercentage(SbBool on)
|
||||
void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekValueAsPercentage(bool on)
|
||||
{
|
||||
m_seekdistanceabs = !on;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::seeksensorCB(void* data, SoSensor
|
||||
par = 1.0F;
|
||||
}
|
||||
|
||||
SbBool end = (par == 1.0F);
|
||||
bool end = (par == 1.0F);
|
||||
|
||||
par = (float)((1.0 - cos(M_PI * par)) * 0.5); // NOLINT
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ public:
|
||||
|
||||
const SbViewportRegion & getViewportRegion() const;
|
||||
|
||||
virtual void setViewing(SbBool enable);
|
||||
SbBool isViewing() const;
|
||||
virtual void setViewing(bool enable);
|
||||
bool isViewing() const;
|
||||
|
||||
void interactiveCountInc();
|
||||
void interactiveCountDec();
|
||||
@@ -83,16 +83,16 @@ public:
|
||||
void removeStartCallback(SoQTQuarterAdaptorCB* func, void* data = nullptr);
|
||||
void removeFinishCallback(SoQTQuarterAdaptorCB* func, void* data = nullptr);
|
||||
|
||||
virtual void setSeekMode(SbBool enable);
|
||||
SbBool isSeekMode() const;
|
||||
SbBool seekToPoint(const SbVec2s& screenpos);
|
||||
virtual void setSeekMode(bool enable);
|
||||
bool isSeekMode() const;
|
||||
bool seekToPoint(const SbVec2s& screenpos);
|
||||
void seekToPoint(const SbVec3f& scenepos);
|
||||
void setSeekTime(float seconds);
|
||||
float getSeekTime() const;
|
||||
void setSeekDistance(float distance);
|
||||
float getSeekDistance() const;
|
||||
void setSeekValueAsPercentage(SbBool on);
|
||||
SbBool isSeekValuePercentage() const;
|
||||
void setSeekValueAsPercentage(bool on);
|
||||
bool isSeekValuePercentage() const;
|
||||
|
||||
virtual float getPickRadius() const {return this->pickRadius;}
|
||||
virtual void setPickRadius(float pickRadius);
|
||||
@@ -138,11 +138,11 @@ private:
|
||||
// Seek functionality
|
||||
SoTimerSensor* m_seeksensor = nullptr;
|
||||
float m_seekperiod = 0.0F;
|
||||
SbBool m_inseekmode = false;
|
||||
bool m_inseekmode = false;
|
||||
SbVec3f m_camerastartposition, m_cameraendposition;
|
||||
SbRotation m_camerastartorient, m_cameraendorient;
|
||||
float m_seekdistance = 0.0F;
|
||||
SbBool m_seekdistanceabs = false;
|
||||
bool m_seekdistanceabs = false;
|
||||
SoSearchAction searchaction;
|
||||
SoGetMatrixAction matrixaction;
|
||||
float pickRadius = 0.0F;
|
||||
|
||||
@@ -769,7 +769,7 @@ void View3DInventorViewer::onSelectionChanged(const SelectionChanges & reason)
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
SbBool View3DInventorViewer::searchNode(SoNode* node) const
|
||||
bool View3DInventorViewer::searchNode(SoNode* node) const
|
||||
{
|
||||
SoSearchAction searchAction;
|
||||
searchAction.setNode(node);
|
||||
@@ -779,12 +779,12 @@ SbBool View3DInventorViewer::searchNode(SoNode* node) const
|
||||
return selectionPath ? true : false;
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::hasViewProvider(ViewProvider* pcProvider) const
|
||||
bool View3DInventorViewer::hasViewProvider(ViewProvider* pcProvider) const
|
||||
{
|
||||
return _ViewProviderSet.find(pcProvider) != _ViewProviderSet.end();
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::containsViewProvider(const ViewProvider* vp) const
|
||||
bool View3DInventorViewer::containsViewProvider(const ViewProvider* vp) const
|
||||
{
|
||||
SoSearchAction sa;
|
||||
sa.setNode(vp->getRoot());
|
||||
@@ -1083,7 +1083,7 @@ void View3DInventorViewer::resetEditingViewProvider()
|
||||
}
|
||||
|
||||
/// reset from edit mode
|
||||
SbBool View3DInventorViewer::isEditingViewProvider() const
|
||||
bool View3DInventorViewer::isEditingViewProvider() const
|
||||
{
|
||||
return this->editViewProvider != nullptr;
|
||||
}
|
||||
@@ -1732,13 +1732,13 @@ const std::vector<SbVec2s>& View3DInventorViewer::getPolygon(SelectionRole* role
|
||||
return navigation->getPolygon(role);
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setSelectionEnabled(SbBool enable)
|
||||
void View3DInventorViewer::setSelectionEnabled(bool enable)
|
||||
{
|
||||
SoNode* root = getSceneGraph();
|
||||
static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.setValue(enable); // NOLINT
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::isSelectionEnabled() const
|
||||
bool View3DInventorViewer::isSelectionEnabled() const
|
||||
{
|
||||
SoNode* root = getSceneGraph();
|
||||
return static_cast<Gui::SoFCUnifiedSelection*>(root)->selectionRole.getValue(); // NOLINT
|
||||
@@ -2406,7 +2406,7 @@ void View3DInventorViewer::renderScene()
|
||||
}
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setSeekMode(SbBool on)
|
||||
void View3DInventorViewer::setSeekMode(bool on)
|
||||
{
|
||||
// Overrides this method to make sure any animations are stopped
|
||||
// before we go into seek mode.
|
||||
@@ -2550,7 +2550,7 @@ bool View3DInventorViewer::processSoEvent(const SoEvent* ev)
|
||||
return navigation->processEvent(ev);
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::processSoEventBase(const SoEvent* const ev)
|
||||
bool View3DInventorViewer::processSoEventBase(const SoEvent* const ev)
|
||||
{
|
||||
return inherited::processSoEvent(ev);
|
||||
}
|
||||
@@ -2896,7 +2896,7 @@ const SoPickedPoint* View3DInventorViewer::getPickedPoint(SoEventCallback* n) co
|
||||
return n->getPickedPoint();
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::pubSeekToPoint(const SbVec2s& pos)
|
||||
bool View3DInventorViewer::pubSeekToPoint(const SbVec2s& pos)
|
||||
{
|
||||
return this->seekToPoint(pos);
|
||||
}
|
||||
@@ -2906,7 +2906,7 @@ void View3DInventorViewer::pubSeekToPoint(const SbVec3f& pos)
|
||||
this->seekToPoint(pos);
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setCameraOrientation(const SbRotation& orientation, SbBool moveToCenter)
|
||||
void View3DInventorViewer::setCameraOrientation(const SbRotation& orientation, bool moveToCenter)
|
||||
{
|
||||
navigation->setCameraOrientation(orientation, moveToCenter);
|
||||
}
|
||||
@@ -3224,7 +3224,7 @@ void View3DInventorViewer::viewSelection()
|
||||
spin will be stopped.
|
||||
*/
|
||||
void
|
||||
View3DInventorViewer::setAnimationEnabled(SbBool enable)
|
||||
View3DInventorViewer::setAnimationEnabled(bool enable)
|
||||
{
|
||||
navigation->setAnimationEnabled(enable);
|
||||
}
|
||||
@@ -3234,7 +3234,7 @@ View3DInventorViewer::setAnimationEnabled(SbBool enable)
|
||||
releasing the left mouse button while dragging the mouse.
|
||||
*/
|
||||
|
||||
SbBool
|
||||
bool
|
||||
View3DInventorViewer::isAnimationEnabled() const
|
||||
{
|
||||
return navigation->isAnimationEnabled();
|
||||
@@ -3244,7 +3244,7 @@ View3DInventorViewer::isAnimationEnabled() const
|
||||
Query if the model in the viewer is currently in spinning mode after
|
||||
a user drag.
|
||||
*/
|
||||
SbBool View3DInventorViewer::isAnimating() const
|
||||
bool View3DInventorViewer::isAnimating() const
|
||||
{
|
||||
return navigation->isAnimating();
|
||||
}
|
||||
@@ -3297,12 +3297,12 @@ void View3DInventorViewer::stopAnimating()
|
||||
navigation->stopAnimating();
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setPopupMenuEnabled(SbBool on)
|
||||
void View3DInventorViewer::setPopupMenuEnabled(bool on)
|
||||
{
|
||||
navigation->setPopupMenuEnabled(on);
|
||||
}
|
||||
|
||||
SbBool View3DInventorViewer::isPopupMenuEnabled() const
|
||||
bool View3DInventorViewer::isPopupMenuEnabled() const
|
||||
{
|
||||
return navigation->isPopupMenuEnabled();
|
||||
}
|
||||
@@ -3312,7 +3312,7 @@ SbBool View3DInventorViewer::isPopupMenuEnabled() const
|
||||
*/
|
||||
|
||||
void
|
||||
View3DInventorViewer::setFeedbackVisibility(SbBool enable)
|
||||
View3DInventorViewer::setFeedbackVisibility(bool enable)
|
||||
{
|
||||
if (enable == this->axiscrossEnabled) {
|
||||
return;
|
||||
@@ -3329,7 +3329,7 @@ View3DInventorViewer::setFeedbackVisibility(SbBool enable)
|
||||
Check if the feedback axis cross is visible.
|
||||
*/
|
||||
|
||||
SbBool
|
||||
bool
|
||||
View3DInventorViewer::isFeedbackVisible() const
|
||||
{
|
||||
return this->axiscrossEnabled;
|
||||
@@ -3368,7 +3368,7 @@ View3DInventorViewer::getFeedbackSize() const
|
||||
Decide whether or not the mouse pointer cursor should be visible in
|
||||
the rendering canvas.
|
||||
*/
|
||||
void View3DInventorViewer::setCursorEnabled(SbBool /*enable*/)
|
||||
void View3DInventorViewer::setCursorEnabled(bool /*enable*/)
|
||||
{
|
||||
this->setCursorRepresentation(navigation->getViewingMode());
|
||||
}
|
||||
@@ -3381,7 +3381,7 @@ void View3DInventorViewer::afterRealizeHook()
|
||||
|
||||
// Documented in superclass. This method overridden from parent class
|
||||
// to make sure the mouse pointer cursor is updated.
|
||||
void View3DInventorViewer::setViewing(SbBool enable)
|
||||
void View3DInventorViewer::setViewing(bool enable)
|
||||
{
|
||||
if (this->isViewing() == enable) {
|
||||
return;
|
||||
@@ -3716,7 +3716,7 @@ void View3DInventorViewer::setCursorRepresentation(int modearg)
|
||||
}
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setEditing(SbBool edit)
|
||||
void View3DInventorViewer::setEditing(bool edit)
|
||||
{
|
||||
this->editing = edit;
|
||||
this->getWidget()->setCursor(QCursor(Qt::ArrowCursor));
|
||||
|
||||
@@ -156,22 +156,22 @@ public:
|
||||
void setBacklightEnabled(bool on);
|
||||
bool isBacklightEnabled() const;
|
||||
void setSceneGraph (SoNode *root) override;
|
||||
SbBool searchNode(SoNode*) const;
|
||||
bool searchNode(SoNode*) const;
|
||||
|
||||
void setAnimationEnabled(SbBool enable);
|
||||
SbBool isAnimationEnabled() const;
|
||||
void setAnimationEnabled(bool enable);
|
||||
bool isAnimationEnabled() const;
|
||||
|
||||
void setPopupMenuEnabled(SbBool on);
|
||||
SbBool isPopupMenuEnabled() const;
|
||||
void setPopupMenuEnabled(bool on);
|
||||
bool isPopupMenuEnabled() const;
|
||||
|
||||
void startAnimation(const SbRotation& orientation, const SbVec3f& rotationCenter,
|
||||
const SbVec3f& translation, int duration = -1, bool wait = false);
|
||||
void startSpinningAnimation(const SbVec3f& axis, float velocity);
|
||||
void stopAnimating();
|
||||
SbBool isAnimating() const;
|
||||
bool isAnimating() const;
|
||||
|
||||
void setFeedbackVisibility(SbBool enable);
|
||||
SbBool isFeedbackVisible() const;
|
||||
void setFeedbackVisibility(bool enable);
|
||||
bool isFeedbackVisible() const;
|
||||
|
||||
void setFeedbackSize(int size);
|
||||
int getFeedbackSize() const;
|
||||
@@ -185,8 +185,8 @@ public:
|
||||
void imageFromFramebuffer(int width, int height, int samples,
|
||||
const QColor& bgcolor, QImage& img);
|
||||
|
||||
void setViewing(SbBool enable) override;
|
||||
virtual void setCursorEnabled(SbBool enable);
|
||||
void setViewing(bool enable) override;
|
||||
virtual void setCursorEnabled(bool enable);
|
||||
|
||||
void addGraphicsItem(GLGraphicsItem*);
|
||||
void removeGraphicsItem(GLGraphicsItem*);
|
||||
@@ -197,11 +197,11 @@ public:
|
||||
/** @name Handling of view providers */
|
||||
//@{
|
||||
/// Checks if the view provider is a top-level object of the scene
|
||||
SbBool hasViewProvider(ViewProvider*) const;
|
||||
bool hasViewProvider(ViewProvider*) const;
|
||||
/// Checks if the view provider is part of the scene.
|
||||
/// In contrast to hasViewProvider() this method also checks if the view
|
||||
/// provider is a child of another view provider
|
||||
SbBool containsViewProvider(const ViewProvider*) const;
|
||||
bool containsViewProvider(const ViewProvider*) const;
|
||||
/// adds an ViewProvider to the view, e.g. from a feature
|
||||
void addViewProvider(ViewProvider*);
|
||||
/// remove a ViewProvider
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
/// set the ViewProvider in special edit mode
|
||||
void setEditingViewProvider(Gui::ViewProvider* vp, int ModNum);
|
||||
/// return whether a view provider is edited
|
||||
SbBool isEditingViewProvider() const;
|
||||
bool isEditingViewProvider() const;
|
||||
/// reset from edit mode
|
||||
void resetEditingViewProvider();
|
||||
void setupEditingRoot(SoNode *node=nullptr, const Base::Matrix4D *mat=nullptr);
|
||||
@@ -257,8 +257,8 @@ public:
|
||||
std::vector<SbVec2f> getGLPolygon(SelectionRole* role=nullptr) const;
|
||||
std::vector<SbVec2f> getGLPolygon(const std::vector<SbVec2s>&) const;
|
||||
const std::vector<SbVec2s>& getPolygon(SelectionRole* role=nullptr) const;
|
||||
void setSelectionEnabled(SbBool enable);
|
||||
SbBool isSelectionEnabled() const;
|
||||
void setSelectionEnabled(bool enable);
|
||||
bool isSelectionEnabled() const;
|
||||
//@}
|
||||
|
||||
/// Returns the screen coordinates of the origin of the path's tail object
|
||||
@@ -267,14 +267,14 @@ public:
|
||||
|
||||
/** @name Edit methods */
|
||||
//@{
|
||||
void setEditing(SbBool edit);
|
||||
SbBool isEditing() const { return this->editing; }
|
||||
void setEditing(bool edit);
|
||||
bool isEditing() const { return this->editing; }
|
||||
void setEditingCursor (const QCursor& cursor);
|
||||
void setComponentCursor(const QCursor& cursor);
|
||||
void setRedirectToSceneGraph(SbBool redirect) { this->redirected = redirect; }
|
||||
SbBool isRedirectedToSceneGraph() const { return this->redirected; }
|
||||
void setRedirectToSceneGraphEnabled(SbBool enable) { this->allowredir = enable; }
|
||||
SbBool isRedirectToSceneGraphEnabled() const { return this->allowredir; }
|
||||
void setRedirectToSceneGraph(bool redirect) { this->redirected = redirect; }
|
||||
bool isRedirectedToSceneGraph() const { return this->redirected; }
|
||||
void setRedirectToSceneGraphEnabled(bool enable) { this->allowredir = enable; }
|
||||
bool isRedirectToSceneGraphEnabled() const { return this->allowredir; }
|
||||
//@}
|
||||
|
||||
/** @name Pick actions */
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
bool pickPoint(const SbVec2s& pos,SbVec3f &point,SbVec3f &norm) const;
|
||||
SoPickedPoint* pickPoint(const SbVec2s& pos) const;
|
||||
const SoPickedPoint* getPickedPoint(SoEventCallback * n) const;
|
||||
SbBool pubSeekToPoint(const SbVec2s& pos);
|
||||
bool pubSeekToPoint(const SbVec2s& pos);
|
||||
void pubSeekToPoint(const SbVec3f& pos);
|
||||
//@}
|
||||
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
* \a true the reorientation is animated, otherwise its directly
|
||||
* set.
|
||||
*/
|
||||
void setCameraOrientation(const SbRotation& orientation, SbBool moveToCenter = false);
|
||||
void setCameraOrientation(const SbRotation& orientation, bool moveToCenter = false);
|
||||
void setCameraType(SoType type) override;
|
||||
void moveCameraTo(const SbRotation& orientation, const SbVec3f& position, int duration = -1);
|
||||
/**
|
||||
@@ -444,14 +444,14 @@ protected:
|
||||
void renderGLImage();
|
||||
void animatedViewAll(int steps, int ms);
|
||||
void actualRedraw() override;
|
||||
void setSeekMode(SbBool on) override;
|
||||
void setSeekMode(bool on) override;
|
||||
void afterRealizeHook() override;
|
||||
bool processSoEvent(const SoEvent * ev) override;
|
||||
void dropEvent (QDropEvent * ev) override;
|
||||
void dragEnterEvent (QDragEnterEvent * ev) override;
|
||||
void dragMoveEvent(QDragMoveEvent* ev) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent* ev) override;
|
||||
SbBool processSoEventBase(const SoEvent * const ev);
|
||||
bool processSoEventBase(const SoEvent * const ev);
|
||||
void printDimension() const;
|
||||
void selectAll();
|
||||
|
||||
@@ -506,11 +506,11 @@ private:
|
||||
RenderType renderType;
|
||||
QtGLFramebufferObject* framebuffer;
|
||||
QImage glImage;
|
||||
SbBool shading;
|
||||
bool shading;
|
||||
SoSwitch *dimensionRoot;
|
||||
|
||||
// small axis cross in the corner
|
||||
SbBool axiscrossEnabled;
|
||||
bool axiscrossEnabled;
|
||||
int axiscrossSize;
|
||||
// big one in the middle
|
||||
SoShapeScale* axisCross;
|
||||
@@ -521,12 +521,12 @@ private:
|
||||
//stuff needed to draw the fps counter
|
||||
bool fpsEnabled;
|
||||
bool vboEnabled;
|
||||
SbBool naviCubeEnabled;
|
||||
bool naviCubeEnabled;
|
||||
|
||||
SbBool editing;
|
||||
bool editing;
|
||||
QCursor editCursor, zoomCursor, panCursor, spinCursor;
|
||||
SbBool redirected;
|
||||
SbBool allowredir;
|
||||
bool redirected;
|
||||
bool allowredir;
|
||||
|
||||
std::string overrideMode;
|
||||
Gui::Document* guiDocument = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user