Skip to content

Commit

Permalink
Gui: replace SbBool with bool in View3DInventorViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 25, 2023
1 parent 387a298 commit 41503d6
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 68 deletions.
16 changes: 8 additions & 8 deletions src/Gui/Quarter/SoQTQuarterAdaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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());
Expand Down Expand Up @@ -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();
Expand All @@ -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;
}
Expand Down Expand Up @@ -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

Expand Down
18 changes: 9 additions & 9 deletions src/Gui/Quarter/SoQTQuarterAdaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class QUARTER_DLL_API SoQTQuarterAdaptor : public QuarterWidget {

const SbViewportRegion & getViewportRegion() const;

virtual void setViewing(SbBool enable);
SbBool isViewing() const;
virtual void setViewing(bool enable);
bool isViewing() const;

void interactiveCountInc();
void interactiveCountDec();
Expand All @@ -83,16 +83,16 @@ class QUARTER_DLL_API SoQTQuarterAdaptor : public QuarterWidget {
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);
Expand Down Expand Up @@ -138,11 +138,11 @@ class QUARTER_DLL_API SoQTQuarterAdaptor : public QuarterWidget {
// 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;
Expand Down
40 changes: 20 additions & 20 deletions src/Gui/View3DInventorViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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());
Expand Down Expand Up @@ -1083,7 +1083,7 @@ void View3DInventorViewer::resetEditingViewProvider()
}

/// reset from edit mode
SbBool View3DInventorViewer::isEditingViewProvider() const
bool View3DInventorViewer::isEditingViewProvider() const
{
return this->editViewProvider != nullptr;
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down Expand Up @@ -3224,7 +3224,7 @@ void View3DInventorViewer::viewSelection()
spin will be stopped.
*/
void
View3DInventorViewer::setAnimationEnabled(SbBool enable)
View3DInventorViewer::setAnimationEnabled(bool enable)
{
navigation->setAnimationEnabled(enable);
}
Expand All @@ -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();
Expand All @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand All @@ -3312,7 +3312,7 @@ SbBool View3DInventorViewer::isPopupMenuEnabled() const
*/

void
View3DInventorViewer::setFeedbackVisibility(SbBool enable)
View3DInventorViewer::setFeedbackVisibility(bool enable)
{
if (enable == this->axiscrossEnabled) {
return;
Expand All @@ -3329,7 +3329,7 @@ View3DInventorViewer::setFeedbackVisibility(SbBool enable)
Check if the feedback axis cross is visible.
*/

SbBool
bool
View3DInventorViewer::isFeedbackVisible() const
{
return this->axiscrossEnabled;
Expand Down Expand Up @@ -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());
}
Expand All @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
Loading

0 comments on commit 41503d6

Please sign in to comment.