diff --git a/src/Base/FileInfo.h b/src/Base/FileInfo.h index e4289b30e..a457e9878 100644 --- a/src/Base/FileInfo.h +++ b/src/Base/FileInfo.h @@ -70,9 +70,9 @@ public: /// Convert the path name into a UCS-2 encoded wide string format. std::wstring toStdWString() const; /** Returns the file's extension name. - * If complete is TRUE (the default), extension() returns the string of all + * If complete is true (the default), extension() returns the string of all * characters in the file name after (but not including) the first '.' character. - * If complete is FALSE, extension() returns the string of all characters in + * If complete is false, extension() returns the string of all characters in * the file name after (but not including) the last '.' character. * Example: *@code @@ -111,7 +111,7 @@ public: /** @name Directory management*/ //@{ - /// Creates a directory. Returns TRUE if successful; otherwise returns FALSE. + /// Creates a directory. Returns true if successful; otherwise returns false. bool createDirectory( void ) const; /// Get a list of the directory content std::vector getDirectoryContent(void) const; diff --git a/src/Base/Tools2D.cpp b/src/Base/Tools2D.cpp index e65871756..dafc605d3 100644 --- a/src/Base/Tools2D.cpp +++ b/src/Base/Tools2D.cpp @@ -107,16 +107,16 @@ bool BoundBox2D::Intersect(const Line2D &rclLine) const bool BoundBox2D::Intersect(const BoundBox2D &rclBB) const { //// compare bb2-points to this -//if (Contains (Vector2D (rclBB.fMinX, rclBB.fMinY))) return TRUE; -//if (Contains (Vector2D (rclBB.fMaxX, rclBB.fMinY))) return TRUE; -//if (Contains (Vector2D (rclBB.fMaxX, rclBB.fMaxY))) return TRUE; -//if (Contains (Vector2D (rclBB.fMinX, rclBB.fMaxY))) return TRUE; +//if (Contains (Vector2D (rclBB.fMinX, rclBB.fMinY))) return true; +//if (Contains (Vector2D (rclBB.fMaxX, rclBB.fMinY))) return true; +//if (Contains (Vector2D (rclBB.fMaxX, rclBB.fMaxY))) return true; +//if (Contains (Vector2D (rclBB.fMinX, rclBB.fMaxY))) return true; // //// compare this-points to bb2 -//if (rclBB.Contains (Vector2D (fMinX, fMinY))) return TRUE; -//if (rclBB.Contains (Vector2D (fMaxX, fMinY))) return TRUE; -//if (rclBB.Contains (Vector2D (fMaxX, fMaxY))) return TRUE; -//if (rclBB.Contains (Vector2D (fMinX, fMaxY))) return TRUE; +//if (rclBB.Contains (Vector2D (fMinX, fMinY))) return true; +//if (rclBB.Contains (Vector2D (fMaxX, fMinY))) return true; +//if (rclBB.Contains (Vector2D (fMaxX, fMaxY))) return true; +//if (rclBB.Contains (Vector2D (fMinX, fMaxY))) return true; if (fMinX < rclBB.fMaxX && rclBB.fMinX < fMaxX && @@ -222,7 +222,7 @@ bool Line2D::Intersect (const Line2D& rclLine, Vector2D &rclV) const rclV.fY = m1 * rclV.fX + b1; } - return true; /*** RETURN TRUE (intersection) **********/ + return true; /*** RETURN true (intersection) **********/ } bool Line2D::Intersect (const Vector2D &rclV, double eps) const diff --git a/src/Gui/BlenderNavigationStyle.cpp b/src/Gui/BlenderNavigationStyle.cpp index 28bb6cfe0..948acc6db 100644 --- a/src/Gui/BlenderNavigationStyle.cpp +++ b/src/Gui/BlenderNavigationStyle.cpp @@ -53,7 +53,7 @@ using namespace Gui; TYPESYSTEM_SOURCE(Gui::BlenderNavigationStyle, Gui::UserNavigationStyle); -BlenderNavigationStyle::BlenderNavigationStyle() : lockButton1(FALSE) +BlenderNavigationStyle::BlenderNavigationStyle() : lockButton1(false) { } @@ -98,11 +98,11 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) this->lastmouseposition = posn; - // Set to TRUE if any event processing happened. Note that it is not + // Set to true if any event processing happened. Note that it is not // necessary to restrict ourselves to only do one "action" for an // event, we only need this flag to see if any processing happened // at all. - SbBool processed = FALSE; + SbBool processed = false; const ViewerMode curmode = this->currentmode; ViewerMode newmode = curmode; @@ -123,13 +123,13 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) if (!processed && !viewer->isEditing()) { processed = handleEventInForeground(ev); if (processed) - return TRUE; + return true; } // Keyboard handling if (type.isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::LEFT_CONTROL: case SoKeyboardEvent::RIGHT_CONTROL: @@ -144,7 +144,7 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) this->altdown = press; break; case SoKeyboardEvent::H: - processed = TRUE; + processed = true; viewer->saveHomePosition(); break; case SoKeyboardEvent::S: @@ -165,37 +165,37 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) if (type.isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; //SoDebugError::postInfo("processSoEvent", "button = %d", button); switch (button) { case SoMouseButtonEvent::BUTTON1: - this->lockrecenter = TRUE; + this->lockrecenter = true; this->button1down = press; if (press && (this->currentmode == NavigationStyle::SEEK_WAIT_MODE)) { newmode = NavigationStyle::SEEK_MODE; this->seekToPoint(pos); // implicitly calls interactiveCountInc() - processed = TRUE; + processed = true; } //else if (press && (this->currentmode == NavigationStyle::IDLE)) { // this->setViewing(true); - // processed = TRUE; + // processed = true; //} else if (press && (this->currentmode == NavigationStyle::PANNING || this->currentmode == NavigationStyle::ZOOMING)) { newmode = NavigationStyle::DRAGGING; saveCursorPosition(ev); this->centerTime = ev->getTime(); - processed = TRUE; + processed = true; } else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) { - processed = TRUE; + processed = true; } break; case SoMouseButtonEvent::BUTTON2: // If we are in edit mode then simply ignore the RMB events // to pass the event to the base class. - this->lockrecenter = TRUE; + this->lockrecenter = true; if (!viewer->isEditing()) { // If we are in zoom or pan mode ignore RMB events otherwise // the canvas doesn't get any release events @@ -215,7 +215,7 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) newmode = NavigationStyle::DRAGGING; saveCursorPosition(ev); this->centerTime = ev->getTime(); - processed = TRUE; + processed = true; } this->button2down = press; break; @@ -225,7 +225,7 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) float ratio = vp.getViewportAspectRatio(); SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(ratio); this->panningplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue()); - this->lockrecenter = FALSE; + this->lockrecenter = false; } else { SbTime tmp = (ev->getTime() - this->centerTime); @@ -236,18 +236,18 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) panToCenter(panningplane, posn); this->interactiveCountDec(); } - processed = TRUE; + processed = true; } } this->button3down = press; break; case SoMouseButtonEvent::BUTTON4: - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); + processed = true; break; case SoMouseButtonEvent::BUTTON5: - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); + processed = true; break; default: break; @@ -256,22 +256,22 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) // Mouse Movement handling if (type.isDerivedFrom(SoLocation2Event::getClassTypeId())) { - this->lockrecenter = TRUE; + this->lockrecenter = true; const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (this->currentmode == NavigationStyle::ZOOMING) { this->zoomByCursor(posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::PANNING) { float ratio = vp.getViewportAspectRatio(); panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::DRAGGING) { this->addToLog(event->getPosition(), event->getTime()); this->spin(posn); moveCursorPosition(); - processed = TRUE; + processed = true; } } @@ -280,7 +280,7 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMotion3Event * const event = static_cast(ev); if (event) this->processMotionEvent(event); - processed = TRUE; + processed = true; } enum { @@ -304,8 +304,8 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) // The left mouse button has been released right now but // we want to avoid that the event is procesed elsewhere if (this->lockButton1) { - this->lockButton1 = FALSE; - processed = TRUE; + this->lockButton1 = false; + processed = true; } //if (curmode == NavigationStyle::DRAGGING) { @@ -351,14 +351,14 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) // but then button 3 is relaesed we shouldn't switch // into selection mode. if (this->button1down && this->button3down) - this->lockButton1 = TRUE; + this->lockButton1 = true; // If not handled in this class, pass on upwards in the inheritance // hierarchy. if (/*(curmode == NavigationStyle::SELECTION || viewer->isEditing()) && */!processed) processed = inherited::processSoEvent(ev); else - return TRUE; + return true; return processed; } diff --git a/src/Gui/CADNavigationStyle.cpp b/src/Gui/CADNavigationStyle.cpp index 7140e4245..a5a6db968 100644 --- a/src/Gui/CADNavigationStyle.cpp +++ b/src/Gui/CADNavigationStyle.cpp @@ -53,7 +53,7 @@ using namespace Gui; TYPESYSTEM_SOURCE(Gui::CADNavigationStyle, Gui::UserNavigationStyle); -CADNavigationStyle::CADNavigationStyle() : lockButton1(FALSE) +CADNavigationStyle::CADNavigationStyle() : lockButton1(false) { } @@ -102,11 +102,11 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) this->lastmouseposition = posn; - // Set to TRUE if any event processing happened. Note that it is not + // Set to true if any event processing happened. Note that it is not // necessary to restrict ourselves to only do one "action" for an // event, we only need this flag to see if any processing happened // at all. - SbBool processed = FALSE; + SbBool processed = false; const ViewerMode curmode = this->currentmode; ViewerMode newmode = curmode; @@ -127,13 +127,13 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) if (!processed && !viewer->isEditing()) { processed = handleEventInForeground(ev); if (processed) - return TRUE; + return true; } // Keyboard handling if (type.isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::LEFT_CONTROL: case SoKeyboardEvent::RIGHT_CONTROL: @@ -148,7 +148,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) this->altdown = press; break; case SoKeyboardEvent::H: - processed = TRUE; + processed = true; viewer->saveHomePosition(); break; case SoKeyboardEvent::S: @@ -169,12 +169,12 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) if (type.isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; // SoDebugError::postInfo("processSoEvent", "button = %d", button); switch (button) { case SoMouseButtonEvent::BUTTON1: - this->lockrecenter = TRUE; + this->lockrecenter = true; this->button1down = press; #if 0 // disable to avoid interferences where this key combination is used, too if (press && ev->wasShiftDown() && @@ -183,7 +183,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) float ratio = vp.getViewportAspectRatio(); SbViewVolume vv = viewer->getCamera()->getViewVolume(ratio); this->panningplane = vv.getPlane(viewer->getCamera()->focalDistance.getValue()); - this->lockrecenter = FALSE; + this->lockrecenter = false; } else if (!press && ev->wasShiftDown() && (this->currentmode != NavigationStyle::SELECTION)) { @@ -195,7 +195,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) panToCenter(panningplane, posn); this->interactiveCountDec(); } - processed = TRUE; + processed = true; } } else @@ -203,18 +203,18 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) if (press && (this->currentmode == NavigationStyle::SEEK_WAIT_MODE)) { newmode = NavigationStyle::SEEK_MODE; this->seekToPoint(pos); // implicitly calls interactiveCountInc() - processed = TRUE; + processed = true; } //else if (press && (this->currentmode == NavigationStyle::IDLE)) { // this->setViewing(true); - // processed = TRUE; + // processed = true; //} else if (press && (this->currentmode == NavigationStyle::PANNING || this->currentmode == NavigationStyle::ZOOMING)) { newmode = NavigationStyle::DRAGGING; saveCursorPosition(ev); this->centerTime = ev->getTime(); - processed = TRUE; + processed = true; } else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) { SbTime tmp = (ev->getTime() - this->centerTime); @@ -222,16 +222,16 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) if (tmp.getValue() < dci) { newmode = NavigationStyle::ZOOMING; } - processed = TRUE; + processed = true; } else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) { - processed = TRUE; + processed = true; } break; case SoMouseButtonEvent::BUTTON2: // If we are in edit mode then simply ignore the RMB events // to pass the event to the base class. - this->lockrecenter = TRUE; + this->lockrecenter = true; if (!viewer->isEditing()) { // If we are in zoom or pan mode ignore RMB events otherwise // the canvas doesn't get any release events @@ -251,7 +251,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) newmode = NavigationStyle::DRAGGING; saveCursorPosition(ev); this->centerTime = ev->getTime(); - processed = TRUE; + processed = true; } else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) { SbTime tmp = (ev->getTime() - this->centerTime); @@ -259,7 +259,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) if (tmp.getValue() < dci) { newmode = NavigationStyle::ZOOMING; } - processed = TRUE; + processed = true; } this->button2down = press; break; @@ -269,7 +269,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) float ratio = vp.getViewportAspectRatio(); SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(ratio); this->panningplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue()); - this->lockrecenter = FALSE; + this->lockrecenter = false; } else { SbTime tmp = (ev->getTime() - this->centerTime); @@ -280,18 +280,18 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) panToCenter(panningplane, posn); this->interactiveCountDec(); } - processed = TRUE; + processed = true; } } this->button3down = press; break; case SoMouseButtonEvent::BUTTON4: - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); + processed = true; break; case SoMouseButtonEvent::BUTTON5: - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); + processed = true; break; default: break; @@ -300,22 +300,22 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) // Mouse Movement handling if (type.isDerivedFrom(SoLocation2Event::getClassTypeId())) { - this->lockrecenter = TRUE; + this->lockrecenter = true; const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (this->currentmode == NavigationStyle::ZOOMING) { this->zoomByCursor(posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::PANNING) { float ratio = vp.getViewportAspectRatio(); panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::DRAGGING) { this->addToLog(event->getPosition(), event->getTime()); this->spin(posn); moveCursorPosition(); - processed = TRUE; + processed = true; } } @@ -324,7 +324,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMotion3Event * const event = static_cast(ev); if (event) this->processMotionEvent(event); - processed = TRUE; + processed = true; } enum { @@ -348,8 +348,8 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) // The left mouse button has been released right now but // we want to avoid that the event is procesed elsewhere if (this->lockButton1) { - this->lockButton1 = FALSE; - processed = TRUE; + this->lockButton1 = false; + processed = true; } //if (curmode == NavigationStyle::DRAGGING) { @@ -424,14 +424,14 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) // but then button 3 is relaesed we shouldn't switch // into selection mode. if (this->button1down && this->button3down) - this->lockButton1 = TRUE; + this->lockButton1 = true; // If not handled in this class, pass on upwards in the inheritance // hierarchy. if (/*(curmode == NavigationStyle::SELECTION || viewer->isEditing()) && */!processed) processed = inherited::processSoEvent(ev); else - return TRUE; + return true; return processed; } diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index c8190b823..5ccdc2d79 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -2147,7 +2147,7 @@ static void selectionCallback(void * ud, SoEventCallback * cb) Gui::View3DInventorViewer* view = reinterpret_cast(cb->getUserData()); view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), selectionCallback, ud); SoNode* root = view->getSceneGraph(); - static_cast(root)->selectionRole.setValue(TRUE); + static_cast(root)->selectionRole.setValue(true); std::vector picked = view->getGLPolygon(); SoCamera* cam = view->getSoRenderManager()->getCamera(); @@ -2202,7 +2202,7 @@ void StdBoxSelection::activated(int iMsg) viewer->startSelection(View3DInventorViewer::Rubberband); viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), selectionCallback); SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(FALSE); + static_cast(root)->selectionRole.setValue(false); } } } diff --git a/src/Gui/DlgActionsImp.cpp b/src/Gui/DlgActionsImp.cpp index 72397ba8f..6bce69c4a 100644 --- a/src/Gui/DlgActionsImp.cpp +++ b/src/Gui/DlgActionsImp.cpp @@ -53,7 +53,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgCustomActionsImp::DlgCustomActionsImp( QWidget* parent ) : CustomizeActionPage(parent), bShown( false ) diff --git a/src/Gui/DlgActivateWindowImp.cpp b/src/Gui/DlgActivateWindowImp.cpp index 80460d7ae..6ee7d5e4f 100644 --- a/src/Gui/DlgActivateWindowImp.cpp +++ b/src/Gui/DlgActivateWindowImp.cpp @@ -42,7 +42,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgActivateWindowImp::DlgActivateWindowImp(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl), ui(new Ui_DlgActivateWindow) diff --git a/src/Gui/DlgCommandsImp.cpp b/src/Gui/DlgCommandsImp.cpp index 3653057bd..7c6de872e 100644 --- a/src/Gui/DlgCommandsImp.cpp +++ b/src/Gui/DlgCommandsImp.cpp @@ -58,7 +58,7 @@ struct GroupMap_find { * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgCustomCommandsImp::DlgCustomCommandsImp( QWidget* parent ) : CustomizeActionPage(parent) diff --git a/src/Gui/DlgCustomizeImp.cpp b/src/Gui/DlgCustomizeImp.cpp index 7fd9ed911..c28997c1a 100644 --- a/src/Gui/DlgCustomizeImp.cpp +++ b/src/Gui/DlgCustomizeImp.cpp @@ -44,7 +44,7 @@ QList DlgCustomizeImp::_pages; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgCustomizeImp::DlgCustomizeImp(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl) diff --git a/src/Gui/DlgDisplayPropertiesImp.cpp b/src/Gui/DlgDisplayPropertiesImp.cpp index 7dbf655bc..fdbcbc559 100644 --- a/src/Gui/DlgDisplayPropertiesImp.cpp +++ b/src/Gui/DlgDisplayPropertiesImp.cpp @@ -62,7 +62,7 @@ using namespace std; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgDisplayPropertiesImp::DlgDisplayPropertiesImp( QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl ) diff --git a/src/Gui/DlgEditFileIncludeProptertyExternal.cpp b/src/Gui/DlgEditFileIncludeProptertyExternal.cpp index e53eba94c..5d1fe762b 100644 --- a/src/Gui/DlgEditFileIncludeProptertyExternal.cpp +++ b/src/Gui/DlgEditFileIncludeProptertyExternal.cpp @@ -41,7 +41,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgEditFileIncludePropertyExternal:: DlgEditFileIncludePropertyExternal(App::PropertyFileIncluded& Prop, diff --git a/src/Gui/DlgEditorImp.cpp b/src/Gui/DlgEditorImp.cpp index 5e97b2ff9..b2c5def74 100644 --- a/src/Gui/DlgEditorImp.cpp +++ b/src/Gui/DlgEditorImp.cpp @@ -51,7 +51,7 @@ struct DlgSettingsEditorP * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgSettingsEditorImp::DlgSettingsEditorImp( QWidget* parent ) : PreferencePage( parent ) diff --git a/src/Gui/DlgGeneralImp.cpp b/src/Gui/DlgGeneralImp.cpp index 39a8a2cde..7cab8a575 100644 --- a/src/Gui/DlgGeneralImp.cpp +++ b/src/Gui/DlgGeneralImp.cpp @@ -46,7 +46,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgGeneralImp::DlgGeneralImp( QWidget* parent ) : PreferencePage( parent ), watched(0) diff --git a/src/Gui/DlgInputDialogImp.cpp b/src/Gui/DlgInputDialogImp.cpp index e71f38979..9be19d6db 100644 --- a/src/Gui/DlgInputDialogImp.cpp +++ b/src/Gui/DlgInputDialogImp.cpp @@ -39,7 +39,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgInputDialogImp::DlgInputDialogImp( const QString& labelTxt, QWidget* parent, bool modal, Type type ) : QDialog( parent ) @@ -66,7 +66,7 @@ DlgInputDialogImp::~DlgInputDialogImp() void DlgInputDialogImp::textChanged( const QString &s ) { - bool on = TRUE; + bool on = true; if (lineEdit->validator()) { QString str = lineEdit->text(); diff --git a/src/Gui/DlgInputDialogImp.h b/src/Gui/DlgInputDialogImp.h index 4dfcc298d..58d69441c 100644 --- a/src/Gui/DlgInputDialogImp.h +++ b/src/Gui/DlgInputDialogImp.h @@ -43,7 +43,7 @@ class GuiExport DlgInputDialogImp : public QDialog, public Ui_DlgInputDialog public: enum Type { LineEdit, SpinBox, UIntBox, FloatSpinBox, ComboBox }; - DlgInputDialogImp( const QString& label, QWidget* parent = 0, bool modal = TRUE, Type = LineEdit ); + DlgInputDialogImp( const QString& label, QWidget* parent = 0, bool modal = true, Type = LineEdit ); ~DlgInputDialogImp(); void setType( Type t ); diff --git a/src/Gui/DlgKeyboardImp.cpp b/src/Gui/DlgKeyboardImp.cpp index 8263dc44e..a79ba7c77 100644 --- a/src/Gui/DlgKeyboardImp.cpp +++ b/src/Gui/DlgKeyboardImp.cpp @@ -61,7 +61,7 @@ struct GroupMap_find { * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgCustomKeyboardImp::DlgCustomKeyboardImp( QWidget* parent ) : CustomizeActionPage(parent), firstShow(true) diff --git a/src/Gui/DlgMacroExecuteImp.cpp b/src/Gui/DlgMacroExecuteImp.cpp index a7c109a22..ae1609d96 100644 --- a/src/Gui/DlgMacroExecuteImp.cpp +++ b/src/Gui/DlgMacroExecuteImp.cpp @@ -52,7 +52,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgMacroExecuteImp::DlgMacroExecuteImp( QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl ), WindowParameter( "Macro" ) diff --git a/src/Gui/DlgMacroRecordImp.cpp b/src/Gui/DlgMacroRecordImp.cpp index 471461ef0..cf90f1ddb 100644 --- a/src/Gui/DlgMacroRecordImp.cpp +++ b/src/Gui/DlgMacroRecordImp.cpp @@ -45,7 +45,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgMacroRecordImp::DlgMacroRecordImp( QWidget* parent, Qt::WindowFlags fl ) : QDialog(parent, fl), WindowParameter("Macro") diff --git a/src/Gui/DlgMaterialPropertiesImp.cpp b/src/Gui/DlgMaterialPropertiesImp.cpp index fc991dfcc..f18fd1103 100644 --- a/src/Gui/DlgMaterialPropertiesImp.cpp +++ b/src/Gui/DlgMaterialPropertiesImp.cpp @@ -41,7 +41,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgMaterialPropertiesImp::DlgMaterialPropertiesImp(const std::string& mat, QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl), material(mat) diff --git a/src/Gui/DlgOnlineHelpImp.cpp b/src/Gui/DlgOnlineHelpImp.cpp index 33ee537b7..60a7dc723 100644 --- a/src/Gui/DlgOnlineHelpImp.cpp +++ b/src/Gui/DlgOnlineHelpImp.cpp @@ -42,7 +42,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgOnlineHelpImp::DlgOnlineHelpImp( QWidget* parent ) : PreferencePage(parent) diff --git a/src/Gui/DlgParameterImp.cpp b/src/Gui/DlgParameterImp.cpp index 8bdb07bf9..6914bae4a 100644 --- a/src/Gui/DlgParameterImp.cpp +++ b/src/Gui/DlgParameterImp.cpp @@ -54,7 +54,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgParameterImp::DlgParameterImp( QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl|Qt::WindowMinMaxButtonsHint ) diff --git a/src/Gui/DlgPreferencesImp.cpp b/src/Gui/DlgPreferencesImp.cpp index 869f8ced3..5d1ea8134 100644 --- a/src/Gui/DlgPreferencesImp.cpp +++ b/src/Gui/DlgPreferencesImp.cpp @@ -56,7 +56,7 @@ std::list DlgPreferencesImp::_pages; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgPreferencesImp::DlgPreferencesImp( QWidget* parent, Qt::WindowFlags fl ) : QDialog(parent, fl), ui(new Ui_DlgPreferences), canEmbedScrollArea(true) diff --git a/src/Gui/DlgProjectInformationImp.cpp b/src/Gui/DlgProjectInformationImp.cpp index 7d25f7b51..6477b951f 100644 --- a/src/Gui/DlgProjectInformationImp.cpp +++ b/src/Gui/DlgProjectInformationImp.cpp @@ -44,7 +44,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'fl'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgProjectInformationImp::DlgProjectInformationImp(App::Document* doc, QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl), _doc(doc), ui(new Ui_DlgProjectInformation) diff --git a/src/Gui/DlgReportViewImp.cpp b/src/Gui/DlgReportViewImp.cpp index 0a07a3705..ead132d5c 100644 --- a/src/Gui/DlgReportViewImp.cpp +++ b/src/Gui/DlgReportViewImp.cpp @@ -39,7 +39,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgReportViewImp::DlgReportViewImp( QWidget* parent ) : PreferencePage(parent) diff --git a/src/Gui/DlgRunExternal.cpp b/src/Gui/DlgRunExternal.cpp index 607a16df7..948051c17 100644 --- a/src/Gui/DlgRunExternal.cpp +++ b/src/Gui/DlgRunExternal.cpp @@ -44,7 +44,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgRunExternal::DlgRunExternal( QWidget* parent, Qt::WindowFlags fl ) : QDialog(parent, fl),process(this),advancedHidden(true) diff --git a/src/Gui/DlgTipOfTheDayImp.cpp b/src/Gui/DlgTipOfTheDayImp.cpp index 919945a93..9085faefe 100644 --- a/src/Gui/DlgTipOfTheDayImp.cpp +++ b/src/Gui/DlgTipOfTheDayImp.cpp @@ -48,7 +48,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgTipOfTheDayImp::DlgTipOfTheDayImp( QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl | Qt::WindowTitleHint | Qt::WindowSystemMenuHint ), diff --git a/src/Gui/DlgToolbarsImp.cpp b/src/Gui/DlgToolbarsImp.cpp index 8c9ad1927..8ce87cfd7 100644 --- a/src/Gui/DlgToolbarsImp.cpp +++ b/src/Gui/DlgToolbarsImp.cpp @@ -64,7 +64,7 @@ struct GroupMap_find { * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgCustomToolbars::DlgCustomToolbars(DlgCustomToolbars::Type t, QWidget* parent) : CustomizeActionPage(parent), type(t) @@ -645,7 +645,7 @@ void DlgCustomToolbars::changeEvent(QEvent *e) * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgCustomToolbarsImp::DlgCustomToolbarsImp( QWidget* parent ) : DlgCustomToolbars(DlgCustomToolbars::Toolbar, parent) @@ -894,7 +894,7 @@ void DlgCustomToolbarsImp::changeEvent(QEvent *e) * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgCustomToolBoxbarsImp::DlgCustomToolBoxbarsImp( QWidget* parent ) : DlgCustomToolbars(DlgCustomToolbars::Toolboxbar, parent) diff --git a/src/Gui/DlgUnitsCalculatorImp.cpp b/src/Gui/DlgUnitsCalculatorImp.cpp index dd281a0e8..5fa46410d 100644 --- a/src/Gui/DlgUnitsCalculatorImp.cpp +++ b/src/Gui/DlgUnitsCalculatorImp.cpp @@ -40,7 +40,7 @@ using namespace Gui::Dialog; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgUnitsCalculator::DlgUnitsCalculator( QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl ) diff --git a/src/Gui/GestureNavigationStyle.cpp b/src/Gui/GestureNavigationStyle.cpp index efafd2607..37baea4a6 100644 --- a/src/Gui/GestureNavigationStyle.cpp +++ b/src/Gui/GestureNavigationStyle.cpp @@ -192,7 +192,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); const SbBool press //the button was pressed (if false -> released) - = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + = event->getState() == SoButtonEvent::DOWN ? true : false; switch (button) { case SoMouseButtonEvent::BUTTON1: this->button1down = press; @@ -268,7 +268,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) //----------all this were preparations. Now comes the event handling! ---------- - SbBool processed = FALSE;//a return value for the BlahblahblahNavigationStyle::processSoEvent + SbBool processed = false;//a return value for the BlahblahblahNavigationStyle::processSoEvent bool propagated = false;//an internal flag indicating that the event has been already passed to inherited, to suppress the automatic doing of this at the end. //goto finalize = return processed. Might be important to do something before done (none now). @@ -282,10 +282,10 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) // Mode-independent keyboard handling if (evIsKeyboard) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::H: - processed = TRUE; + processed = true; if(!press){ SbBool ret = NavigationStyle::lookAtPoint(event->getPosition()); if(!ret){ @@ -306,7 +306,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMotion3Event * const event = static_cast(ev); if (event) this->processMotionEvent(event); - processed = TRUE; + processed = true; } if (processed) goto finalize; @@ -321,7 +321,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) //keyboard if (evIsKeyboard) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch(event->getKey()){ case SoKeyboardEvent::S: @@ -335,15 +335,15 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) break; case SoKeyboardEvent::PAGE_UP: if(press){ - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); } - processed = TRUE; + processed = true; break; case SoKeyboardEvent::PAGE_DOWN: if(press){ - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); } - processed = TRUE; + processed = true; break; default: break; @@ -358,7 +358,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); const SbBool press //the button was pressed (if false -> released) - = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + = event->getState() == SoButtonEvent::DOWN ? true : false; switch(button){ case SoMouseButtonEvent::BUTTON1: case SoMouseButtonEvent::BUTTON2: @@ -399,7 +399,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) } break; case SoMouseButtonEvent::BUTTON3://press the wheel - processed = TRUE; + processed = true; if(press){ SbBool ret = NavigationStyle::lookAtPoint(event->getPosition()); if(!ret){ @@ -409,12 +409,12 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) } break; case SoMouseButtonEvent::BUTTON4: //(wheel?) - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); + processed = true; break; case SoMouseButtonEvent::BUTTON5: //(wheel?) - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); + processed = true; break; } } @@ -479,7 +479,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); //const SbBool press //the button was pressed (if false -> released) - // = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + // = event->getState() == SoButtonEvent::DOWN ? true : false; switch(button){ case SoMouseButtonEvent::BUTTON1: case SoMouseButtonEvent::BUTTON2: @@ -502,23 +502,23 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) //const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (curmode == NavigationStyle::ZOOMING) {//doesn't happen this->zoomByCursor(posn, prevnormalized); - processed = TRUE; + processed = true; } else if (curmode == NavigationStyle::PANNING) { panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized); - processed = TRUE; + processed = true; } else if (curmode == NavigationStyle::DRAGGING) { if (comboAfter & BUTTON1DOWN && comboAfter & BUTTON2DOWN) { //two mouse buttons down - tilting! NavigationStyle::doRotate(viewer->getSoRenderManager()->getCamera(), (posn - prevnormalized)[0]*(-2), SbVec2f(0.5,0.5)); - processed = TRUE; + processed = true; } else {//one mouse button - normal spinning //this will also handle the single-finger drag (there's no gesture used, pseudomouse is enough) //this->addToLog(event->getPosition(), event->getTime()); this->spin_simplified(viewer->getSoRenderManager()->getCamera(), posn, prevnormalized); - processed = TRUE; + processed = true; } } } @@ -564,7 +564,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) if (evIsButton) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; if (button == SoMouseButtonEvent::BUTTON1 && press) { this->seekToPoint(pos); // implicitly calls interactiveCountInc() this->setViewingMode(NavigationStyle::SEEK_MODE); diff --git a/src/Gui/HelpView.cpp b/src/Gui/HelpView.cpp index 3c983e438..0a86d3ad1 100644 --- a/src/Gui/HelpView.cpp +++ b/src/Gui/HelpView.cpp @@ -95,8 +95,8 @@ TextBrowser::TextBrowser(QWidget * parent) setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setAcceptDrops( TRUE ); - viewport()->setAcceptDrops( TRUE ); + setAcceptDrops( true ); + viewport()->setAcceptDrops( true ); connect( d->http, SIGNAL(done(bool)), this, SLOT(done(bool))); connect( d->http, SIGNAL(stateChanged(int)), this, SLOT(onStateChanged(int))); diff --git a/src/Gui/InventorNavigationStyle.cpp b/src/Gui/InventorNavigationStyle.cpp index f50f00139..12aed4c39 100644 --- a/src/Gui/InventorNavigationStyle.cpp +++ b/src/Gui/InventorNavigationStyle.cpp @@ -98,11 +98,11 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) this->lastmouseposition = posn; - // Set to TRUE if any event processing happened. Note that it is not + // Set to true if any event processing happened. Note that it is not // necessary to restrict ourselves to only do one "action" for an // event, we only need this flag to see if any processing happened // at all. - SbBool processed = FALSE; + SbBool processed = false; const ViewerMode curmode = this->currentmode; ViewerMode newmode = curmode; @@ -123,13 +123,13 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) if (!processed && !viewer->isEditing()) { processed = handleEventInForeground(ev); if (processed) - return TRUE; + return true; } // Keyboard handling if (type.isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::LEFT_CONTROL: case SoKeyboardEvent::RIGHT_CONTROL: @@ -144,7 +144,7 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) this->altdown = press; break; case SoKeyboardEvent::H: - processed = TRUE; + processed = true; viewer->saveHomePosition(); break; case SoKeyboardEvent::S: @@ -165,7 +165,7 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) if (type.isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; // SoDebugError::postInfo("processSoEvent", "button = %d", button); switch (button) { @@ -177,7 +177,7 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) float ratio = vp.getViewportAspectRatio(); SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(ratio); this->panningplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue()); - this->lockrecenter = FALSE; + this->lockrecenter = false; } else if (!press && ev->wasShiftDown() && (this->currentmode != NavigationStyle::SELECTION)) { @@ -189,34 +189,34 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) panToCenter(panningplane, posn); this->interactiveCountDec(); } - processed = TRUE; + processed = true; } } else if (press && (this->currentmode == NavigationStyle::SEEK_WAIT_MODE)) { newmode = NavigationStyle::SEEK_MODE; this->seekToPoint(pos); // implicitly calls interactiveCountInc() - processed = TRUE; - this->lockrecenter = TRUE; + processed = true; + this->lockrecenter = true; } else if (press && (this->currentmode == NavigationStyle::IDLE)) { this->setViewing(true); - processed = TRUE; - this->lockrecenter = TRUE; + processed = true; + this->lockrecenter = true; } else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) { this->setViewing(false); - processed = TRUE; - this->lockrecenter = TRUE; + processed = true; + this->lockrecenter = true; } else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) { - processed = TRUE; - this->lockrecenter = TRUE; + processed = true; + this->lockrecenter = true; } break; case SoMouseButtonEvent::BUTTON2: // If we are in edit mode then simply ignore the RMB events // to pass the event to the base class. - this->lockrecenter = TRUE; + this->lockrecenter = true; if (!viewer->isEditing()) { // If we are in zoom or pan mode ignore RMB events otherwise // the canvas doesn't get any release events @@ -237,7 +237,7 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) float ratio = vp.getViewportAspectRatio(); SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(ratio); this->panningplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue()); - this->lockrecenter = FALSE; + this->lockrecenter = false; } else { SbTime tmp = (ev->getTime() - this->centerTime); @@ -248,18 +248,18 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) panToCenter(panningplane, posn); this->interactiveCountDec(); } - processed = TRUE; + processed = true; } } this->button3down = press; break; case SoMouseButtonEvent::BUTTON4: - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); + processed = true; break; case SoMouseButtonEvent::BUTTON5: - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); + processed = true; break; default: break; @@ -268,22 +268,22 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) // Mouse Movement handling if (type.isDerivedFrom(SoLocation2Event::getClassTypeId())) { - this->lockrecenter = TRUE; + this->lockrecenter = true; const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (this->currentmode == NavigationStyle::ZOOMING) { this->zoomByCursor(posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::PANNING) { float ratio = vp.getViewportAspectRatio(); panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::DRAGGING) { this->addToLog(event->getPosition(), event->getTime()); this->spin(posn); moveCursorPosition(); - processed = TRUE; + processed = true; } } @@ -292,7 +292,7 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMotion3Event * const event = static_cast(ev); if (event) this->processMotionEvent(event); - processed = TRUE; + processed = true; } enum { @@ -370,7 +370,7 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) viewer->isEditing()) && !processed) processed = inherited::processSoEvent(ev); else - return TRUE; + return true; return processed; } diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index bb590df71..b7bfb1a01 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -489,7 +489,7 @@ public: rot_cam1 = rot; // copy the values - cam2->enableNotify(FALSE); + cam2->enableNotify(false); cam2->nearDistance = cam1->nearDistance; cam2->farDistance = cam1->farDistance; cam2->focalDistance = cam1->focalDistance; @@ -512,7 +512,7 @@ public: static_cast(cam1)->height; } - cam2->enableNotify(TRUE); + cam2->enableNotify(true); } static void syncCameraCB(void * data, SoSensor * s) diff --git a/src/Gui/MayaGestureNavigationStyle.cpp b/src/Gui/MayaGestureNavigationStyle.cpp index 1661d976f..a2c5e1ee4 100644 --- a/src/Gui/MayaGestureNavigationStyle.cpp +++ b/src/Gui/MayaGestureNavigationStyle.cpp @@ -202,7 +202,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); const SbBool press //the button was pressed (if false -> released) - = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + = event->getState() == SoButtonEvent::DOWN ? true : false; switch (button) { case SoMouseButtonEvent::BUTTON1: this->button1down = press; @@ -278,7 +278,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) //----------all this were preparations. Now comes the event handling! ---------- - SbBool processed = FALSE;//a return value for the BlahblahblahNavigationStyle::processSoEvent + SbBool processed = false;//a return value for the BlahblahblahNavigationStyle::processSoEvent bool propagated = false;//an internal flag indicating that the event has been already passed to inherited, to suppress the automatic doing of this at the end. //goto finalize = return processed. Might be important to do something before done (none now). @@ -292,10 +292,10 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) // Mode-independent keyboard handling if (evIsKeyboard) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::H: - processed = TRUE; + processed = true; if(!press){ SbBool ret = NavigationStyle::lookAtPoint(event->getPosition()); if(!ret){ @@ -316,7 +316,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMotion3Event * const event = static_cast(ev); if (event) this->processMotionEvent(event); - processed = TRUE; + processed = true; } if (processed) goto finalize; @@ -331,7 +331,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) //keyboard if (evIsKeyboard) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch(event->getKey()){ case SoKeyboardEvent::S: @@ -345,15 +345,15 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) break; case SoKeyboardEvent::PAGE_UP: if(press){ - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); } - processed = TRUE; + processed = true; break; case SoKeyboardEvent::PAGE_DOWN: if(press){ - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); } - processed = TRUE; + processed = true; break; default: break; @@ -368,7 +368,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); const SbBool press //the button was pressed (if false -> released) - = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + = event->getState() == SoButtonEvent::DOWN ? true : false; switch(button){ case SoMouseButtonEvent::BUTTON1: case SoMouseButtonEvent::BUTTON2: @@ -420,15 +420,15 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) "No object under cursor! Can't set new center of rotation.\n"); } } - processed = TRUE; + processed = true; break; case SoMouseButtonEvent::BUTTON4: //(wheel?) - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); + processed = true; break; case SoMouseButtonEvent::BUTTON5: //(wheel?) - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); + processed = true; break; } } @@ -516,23 +516,23 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) if (evIsLoc2 && ! this->inGesture && this->mouseMoveThresholdBroken) { if (curmode == NavigationStyle::ZOOMING) {//doesn't happen this->zoomByCursor(posn, prevnormalized); - processed = TRUE; + processed = true; } else if (curmode == NavigationStyle::PANNING) { panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized); - processed = TRUE; + processed = true; } else if (curmode == NavigationStyle::DRAGGING) { if (comboAfter & BUTTON1DOWN && comboAfter & BUTTON2DOWN) { //two mouse buttons down - tilting! NavigationStyle::doRotate(viewer->getSoRenderManager()->getCamera(), (posn - prevnormalized)[0]*(-2), SbVec2f(0.5,0.5)); - processed = TRUE; + processed = true; } else {//one mouse button - normal spinning //this will also handle the single-finger drag (there's no gesture used, pseudomouse is enough) //this->addToLog(event->getPosition(), event->getTime()); this->spin_simplified(viewer->getSoRenderManager()->getCamera(), posn, prevnormalized); - processed = TRUE; + processed = true; } } } @@ -578,7 +578,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev) if (evIsButton) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; if (button == SoMouseButtonEvent::BUTTON1 && press) { this->seekToPoint(pos); // implicitly calls interactiveCountInc() this->setViewingMode(NavigationStyle::SEEK_MODE); diff --git a/src/Gui/MouseSelection.cpp b/src/Gui/MouseSelection.cpp index e391ef691..9887ab026 100644 --- a/src/Gui/MouseSelection.cpp +++ b/src/Gui/MouseSelection.cpp @@ -90,7 +90,7 @@ int AbstractMouseSelection::handleEvent(const SoEvent* const ev, const SbViewpor if (ev->getTypeId().isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent* const event = (const SoMouseButtonEvent*) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; if (press) { _clPoly.push_back(ev->getPosition()); @@ -311,7 +311,7 @@ int PolyPickerSelection::popupMenu() int PolyPickerSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) { const int button = e->getButton(); - const SbBool press = e->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = e->getState() == SoButtonEvent::DOWN ? true : false; if (press) { switch(button) @@ -501,7 +501,7 @@ int BrushSelection::popupMenu() int BrushSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) { const int button = e->getButton(); - const SbBool press = e->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = e->getState() == SoButtonEvent::DOWN ? true : false; if (press) { switch(button) @@ -658,7 +658,7 @@ void RubberbandSelection::draw() int RubberbandSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) { const int button = e->getButton(); - const SbBool press = e->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = e->getState() == SoButtonEvent::DOWN ? true : false; int ret = Continue; diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index e9a895a29..0e3eaa515 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -64,9 +64,9 @@ struct NavigationStyleP { { this->animationsteps = 0; this->sensitivity = 2.0f; - this->resetcursorpos = FALSE; - this->dragPointFound = FALSE; - this->dragAtCursor = FALSE; + this->resetcursorpos = false; + this->dragPointFound = false; + this->dragAtCursor = false; } static void viewAnimationCB(void * data, SoSensor * sensor); }; @@ -81,7 +81,7 @@ public: Trackball }; - FCSphereSheetProjector(const SbSphere & sph, const SbBool orienttoeye = TRUE) + FCSphereSheetProjector(const SbSphere & sph, const SbBool orienttoeye = true) : SbSphereSheetProjector(sph, orienttoeye), orbit(Trackball) { } @@ -205,7 +205,7 @@ void NavigationStyle::initialize() { this->currentmode = NavigationStyle::IDLE; this->prevRedrawTime = SbTime::getTimeOfDay(); - this->spinanimatingallowed = TRUE; + this->spinanimatingallowed = true; this->spinsamplecounter = 0; this->spinincrement = SbRotation::identity(); this->spinRotation.setValue(SbVec3f(0, 0, -1), 0); @@ -223,13 +223,13 @@ void NavigationStyle::initialize() this->log.time = new SbTime [ 16 ]; this->log.historysize = 0; - this->menuenabled = TRUE; - this->button1down = FALSE; - this->button2down = FALSE; - this->button3down = FALSE; - this->ctrldown = FALSE; - this->shiftdown = FALSE; - this->altdown = FALSE; + this->menuenabled = true; + this->button1down = false; + this->button2down = false; + this->button3down = false; + this->ctrldown = false; + this->shiftdown = false; + this->altdown = false; this->invertZoom = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/View")->GetBool("InvertZoom",true); this->zoomAtCursor = App::GetApplication().GetParameterGroupByPath @@ -305,7 +305,7 @@ void NavigationStyle::seekToPoint(const SbVec3f& scenepos) SbBool NavigationStyle::lookAtPoint(const SbVec2s screenpos) { SoCamera* cam = viewer->getSoRenderManager()->getCamera(); - if (cam == 0) return FALSE; + if (cam == 0) return false; SoRayPickAction rpaction(viewer->getSoRenderManager()->getViewportRegion()); rpaction.setPoint(screenpos); @@ -315,20 +315,20 @@ SbBool NavigationStyle::lookAtPoint(const SbVec2s screenpos) SoPickedPoint * picked = rpaction.getPickedPoint(); if (!picked) { this->interactiveCountInc(); - return FALSE; + return false; } SbVec3f hitpoint; hitpoint = picked->getPoint(); lookAtPoint(hitpoint); - return TRUE; + return true; } void NavigationStyle::lookAtPoint(const SbVec3f& pos) { SoCamera* cam = viewer->getSoRenderManager()->getCamera(); if (cam == 0) return; - PRIVATE(this)->dragPointFound = FALSE; + PRIVATE(this)->dragPointFound = false; // Find global coordinates of focal point. SbVec3f direction; @@ -661,7 +661,7 @@ void NavigationStyle::panToCenter(const SbPlane & pplane, const SbVec2f & currpo const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion(); float ratio = vp.getViewportAspectRatio(); panCamera(viewer->getSoRenderManager()->getCamera(), ratio, pplane, SbVec2f(0.5,0.5), currpos); - PRIVATE(this)->dragPointFound = FALSE; + PRIVATE(this)->dragPointFound = false; } /** Dependent on the camera type this will either shrink or expand the @@ -693,12 +693,12 @@ void NavigationStyle::zoom(SoCamera * cam, float diffvalue) // frustum (similar to glFrustum()) if (!t.isDerivedFrom(SoPerspectiveCamera::getClassTypeId()) && tname != "FrustumCamera") { - /* static SbBool first = TRUE; + /* static SbBool first = true; if (first) { SoDebugError::postWarning("SoGuiFullViewerP::zoom", "Unknown camera type, " "will zoom by moving position, but this might not be correct."); - first = FALSE; + first = false; }*/ } @@ -975,12 +975,12 @@ SbBool NavigationStyle::doSpin() rot.getValue(axis, radians); if ((radians > 0.01f) && (deltatime < 0.300)) { this->spinRotation = rot; - return TRUE; + return true; } } } - return FALSE; + return false; } void NavigationStyle::saveCursorPosition(const SoEvent * const ev) @@ -997,7 +997,7 @@ void NavigationStyle::saveCursorPosition(const SoEvent * const ev) SoPickedPoint * picked = rpaction.getPickedPoint(); if (picked) { - PRIVATE(this)->dragPointFound = TRUE; + PRIVATE(this)->dragPointFound = true; PRIVATE(this)->startDragPoint = picked->getPoint(); } } @@ -1064,7 +1064,7 @@ SbBool NavigationStyle::handleEventInForeground(const SoEvent* const e) Decide if it should be possible to start a spin animation of the model in the viewer by releasing the mouse button while dragging. - If the \a enable flag is \c FALSE and we're currently animating, the + If the \a enable flag is \c false and we're currently animating, the spin will be stopped. */ void @@ -1219,7 +1219,7 @@ void NavigationStyle::stopSelection() SbBool NavigationStyle::isSelecting() const { - return (mouseSelection ? TRUE : FALSE); + return (mouseSelection ? true : false); } const std::vector& NavigationStyle::getPolygon(SbBool* clip_inner) const @@ -1332,7 +1332,7 @@ SbBool NavigationStyle::processEvent(const SoEvent * const ev) int hd=mouseSelection->handleEvent(ev,viewer->getSoRenderManager()->getViewportRegion()); if (hd==AbstractMouseSelection::Continue|| hd==AbstractMouseSelection::Restart) { - return TRUE; + return true; } else if (hd==AbstractMouseSelection::Finish) { pcPolygon = mouseSelection->getPositions(); @@ -1353,7 +1353,7 @@ SbBool NavigationStyle::processEvent(const SoEvent * const ev) const ViewerMode curmode = this->currentmode; - SbBool processed = FALSE; + SbBool processed = false; processed = this->processSoEvent(ev); // check for left click without selecting something @@ -1399,7 +1399,7 @@ void NavigationStyle::syncWithEvent(const SoEvent * const ev) // Keyboard handling if (type.isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::LEFT_CONTROL: case SoKeyboardEvent::RIGHT_CONTROL: @@ -1422,7 +1422,7 @@ void NavigationStyle::syncWithEvent(const SoEvent * const ev) if (type.isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; // SoDebugError::postInfo("processSoEvent", "button = %d", button); switch (button) { @@ -1445,7 +1445,7 @@ SbBool NavigationStyle::processMotionEvent(const SoMotion3Event * const ev) { SoCamera * const camera = viewer->getSoRenderManager()->getCamera(); if (!camera) - return FALSE; + return false; SbViewVolume volume(camera->getViewVolume()); SbVec3f center(volume.getSightPoint(camera->focalDistance.getValue())); @@ -1469,7 +1469,7 @@ SbBool NavigationStyle::processMotionEvent(const SoMotion3Event * const ev) camera->orientation.getValue().multVec(dir,dir); camera->position = newPosition + (dir * translationFactor); - return TRUE; + return true; } void NavigationStyle::setPopupMenuEnabled(const SbBool on) diff --git a/src/Gui/OpenCascadeNavigationStyle.cpp b/src/Gui/OpenCascadeNavigationStyle.cpp index 60e73f339..a343426d0 100644 --- a/src/Gui/OpenCascadeNavigationStyle.cpp +++ b/src/Gui/OpenCascadeNavigationStyle.cpp @@ -98,11 +98,11 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) this->lastmouseposition = posn; - // Set to TRUE if any event processing happened. Note that it is not + // Set to true if any event processing happened. Note that it is not // necessary to restrict ourselves to only do one "action" for an // event, we only need this flag to see if any processing happened // at all. - SbBool processed = FALSE; + SbBool processed = false; const ViewerMode curmode = this->currentmode; ViewerMode newmode = curmode; @@ -123,13 +123,13 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) if (!processed && !viewer->isEditing()) { processed = handleEventInForeground(ev); if (processed) - return TRUE; + return true; } // Keyboard handling if (type.isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::LEFT_CONTROL: case SoKeyboardEvent::RIGHT_CONTROL: @@ -144,7 +144,7 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) this->altdown = press; break; case SoKeyboardEvent::H: - processed = TRUE; + processed = true; viewer->saveHomePosition(); break; case SoKeyboardEvent::S: @@ -165,33 +165,33 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) if (type.isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (button) { case SoMouseButtonEvent::BUTTON1: - this->lockrecenter = TRUE; + this->lockrecenter = true; this->button1down = press; if (press && (this->currentmode == NavigationStyle::SEEK_WAIT_MODE)) { newmode = NavigationStyle::SEEK_MODE; this->seekToPoint(pos); // implicitly calls interactiveCountInc() - processed = TRUE; + processed = true; } else if (!press && (this->currentmode == NavigationStyle::ZOOMING)) { newmode = NavigationStyle::IDLE; - processed = TRUE; + processed = true; } else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) { this->setViewing(false); - processed = TRUE; + processed = true; } else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) { - processed = TRUE; + processed = true; } break; case SoMouseButtonEvent::BUTTON2: // If we are in edit mode then simply ignore the RMB events // to pass the event to the base class. - this->lockrecenter = TRUE; + this->lockrecenter = true; if (!viewer->isEditing()) { // If we are in zoom or pan mode ignore RMB events otherwise // the canvas doesn't get any release events @@ -211,11 +211,11 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) newmode = NavigationStyle::DRAGGING; saveCursorPosition(ev); this->centerTime = ev->getTime(); - processed = TRUE; + processed = true; } else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) { newmode = NavigationStyle::IDLE; - processed = TRUE; + processed = true; } this->button2down = press; break; @@ -225,18 +225,18 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) float ratio = vp.getViewportAspectRatio(); SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(ratio); this->panningplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue()); - this->lockrecenter = FALSE; + this->lockrecenter = false; } else if (!press && (this->currentmode == NavigationStyle::PANNING)) { newmode = NavigationStyle::IDLE; - processed = TRUE; + processed = true; } this->button3down = press; break; case SoMouseButtonEvent::BUTTON4: case SoMouseButtonEvent::BUTTON5: doZoom(viewer->getSoRenderManager()->getCamera(), button == SoMouseButtonEvent::BUTTON4, posn); - processed = TRUE; + processed = true; break; default: break; @@ -259,7 +259,7 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) // Mouse Movement handling if (type.isDerivedFrom(SoLocation2Event::getClassTypeId())) { - this->lockrecenter = TRUE; + this->lockrecenter = true; const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (this->currentmode == NavigationStyle::ZOOMING) { // OCCT uses horizontal mouse position, not vertical @@ -268,18 +268,18 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) if (this->invertZoom) value = -value; zoom(viewer->getSoRenderManager()->getCamera(), value); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::PANNING) { float ratio = vp.getViewportAspectRatio(); panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::DRAGGING) { this->addToLog(event->getPosition(), event->getTime()); this->spin(posn); moveCursorPosition(); - processed = TRUE; + processed = true; } else if (combo == (CTRLDOWN|BUTTON1DOWN)) { newmode = NavigationStyle::ZOOMING; @@ -291,7 +291,7 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMotion3Event * const event = static_cast(ev); if (event) this->processMotionEvent(event); - processed = TRUE; + processed = true; } switch (combo) { @@ -327,7 +327,7 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) if (/*(curmode == NavigationStyle::SELECTION || viewer->isEditing()) && */!processed) processed = inherited::processSoEvent(ev); else - return TRUE; + return true; return processed; } diff --git a/src/Gui/Quarter/ImageReader.cpp b/src/Gui/Quarter/ImageReader.cpp index aec789e46..9d8336e26 100644 --- a/src/Gui/Quarter/ImageReader.cpp +++ b/src/Gui/Quarter/ImageReader.cpp @@ -66,9 +66,9 @@ ImageReader::readImage(const SbString & filename, SbImage & sbimage) const } QtCoinCompatibility::QImageToSbImage(image,sbimage); - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/src/Gui/Quarter/QuarterWidget.cpp b/src/Gui/Quarter/QuarterWidget.cpp index 1cde88be0..08c300172 100644 --- a/src/Gui/Quarter/QuarterWidget.cpp +++ b/src/Gui/Quarter/QuarterWidget.cpp @@ -205,7 +205,7 @@ QuarterWidget::constructor(const QGLFormat & format, const QGLWidget * sharewidg // set up a cache context for the default SoGLRenderAction PRIVATE(this)->sorendermanager->getGLRenderAction()->setCacheContext(this->getCacheContextId()); - this->setMouseTracking(TRUE); + this->setMouseTracking(true); // Qt::StrongFocus means the widget will accept keyboard focus by // both tabbing and clicking @@ -720,7 +720,7 @@ void QuarterWidget::paintEvent(QPaintEvent* event) // processing the sensors might trigger a redraw in another // context. Release this context temporarily w->doneCurrent(); - SoDB::getSensorManager()->processDelayQueue(FALSE); + SoDB::getSensorManager()->processDelayQueue(false); w->makeCurrent(); } diff --git a/src/Gui/Quarter/SensorManager.cpp b/src/Gui/Quarter/SensorManager.cpp index e2fd5ae34..59d2d13b5 100644 --- a/src/Gui/Quarter/SensorManager.cpp +++ b/src/Gui/Quarter/SensorManager.cpp @@ -68,7 +68,7 @@ SensorManager::SensorManager(void) this->timerEpsilon = 1.0 / 5000.0; SoDB::setRealTimeInterval(1.0 / 25.0); - SoRenderManager::enableRealTimeUpdate(FALSE); + SoRenderManager::enableRealTimeUpdate(false); } SensorManager::~SensorManager() @@ -147,7 +147,7 @@ void SensorManager::idleTimeout(void) { SoDB::getSensorManager()->processTimerQueue(); - SoDB::getSensorManager()->processDelayQueue(TRUE); + SoDB::getSensorManager()->processDelayQueue(true); this->sensorQueueChanged(); } @@ -162,7 +162,7 @@ void SensorManager::delayTimeout(void) { SoDB::getSensorManager()->processTimerQueue(); - SoDB::getSensorManager()->processDelayQueue(FALSE); + SoDB::getSensorManager()->processDelayQueue(false); this->sensorQueueChanged(); } diff --git a/src/Gui/Quarter/SoQTQuarterAdaptor.cpp b/src/Gui/Quarter/SoQTQuarterAdaptor.cpp index 26c12a7fb..15bb0595e 100644 --- a/src/Gui/Quarter/SoQTQuarterAdaptor.cpp +++ b/src/Gui/Quarter/SoQTQuarterAdaptor.cpp @@ -158,9 +158,9 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::init() { m_interactionnesting = 0; m_seekdistance = 50.0f; - m_seekdistanceabs = FALSE; + m_seekdistanceabs = false; m_seekperiod = 2.0f; - m_inseekmode = FALSE; + m_inseekmode = false; m_storedcamera = 0; m_seeksensor = new SoTimerSensor(SoQTQuarterAdaptor::seeksensorCB, (void*)this); @@ -363,7 +363,7 @@ SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isSeekMode(void) const SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::isSeekValuePercentage(void) const { - return m_seekdistanceabs ? FALSE : TRUE; + return m_seekdistanceabs ? false : true; } SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::seekToPoint(const SbVec2s screenpos) @@ -377,16 +377,16 @@ SbBool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::seekToPoint(const SbVec2s scree SoPickedPoint* picked = rpaction.getPickedPoint(); if(!picked) { - this->interactiveCountInc(); // decremented in setSeekMode(FALSE) - this->setSeekMode(FALSE); - return FALSE; + this->interactiveCountInc(); // decremented in setSeekMode(false) + this->setSeekMode(false); + return false; } SbVec3f hitpoint; hitpoint = picked->getPoint(); this->seekToPoint(hitpoint); - return TRUE; + return true; } void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::seekToPoint(const SbVec3f& scenepos) @@ -455,13 +455,13 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekTime(const float seconds) void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setSeekValueAsPercentage(const SbBool on) { - m_seekdistanceabs = on ? FALSE : TRUE; + m_seekdistanceabs = on ? false : true; } void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::getCameraCoordinateSystem(SoCamera* camera, SoNode* root, SbMatrix& matrix, SbMatrix& inverse) { searchaction.reset(); - searchaction.setSearchingAll(TRUE); + searchaction.setSearchingAll(true); searchaction.setInterest(SoSearchAction::FIRST); searchaction.setNode(camera); searchaction.apply(root); @@ -500,7 +500,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::seeksensorCB(void* data, SoSensor thisp->m_cameraendorient, t); - if(end) thisp->setSeekMode(FALSE); + if(end) thisp->setSeekMode(false); } void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::saveHomePosition(void) @@ -643,19 +643,19 @@ bool SIM::Coin3D::Quarter::SoQTQuarterAdaptor::processSoEvent(const SoEvent* eve case SoKeyboardEvent::LEFT_ARROW: moveCameraScreen(SbVec2f(-0.1f, 0.0f)); - return TRUE; + return true; case SoKeyboardEvent::UP_ARROW: moveCameraScreen(SbVec2f(0.0f, 0.1f)); - return TRUE; + return true; case SoKeyboardEvent::RIGHT_ARROW: moveCameraScreen(SbVec2f(0.1f, 0.0f)); - return TRUE; + return true; case SoKeyboardEvent::DOWN_ARROW: moveCameraScreen(SbVec2f(0.0f, -0.1f)); - return TRUE; + return true; default: break; diff --git a/src/Gui/SoAxisCrossKit.cpp b/src/Gui/SoAxisCrossKit.cpp index f0e6a3df7..2c493e5dc 100644 --- a/src/Gui/SoAxisCrossKit.cpp +++ b/src/Gui/SoAxisCrossKit.cpp @@ -67,12 +67,12 @@ SoShapeScale::SoShapeScale(void) { SO_KIT_CONSTRUCTOR(SoShapeScale); - SO_KIT_ADD_FIELD(active, (TRUE)); + SO_KIT_ADD_FIELD(active, (true)); SO_KIT_ADD_FIELD(scaleFactor, (1.0f)); - SO_KIT_ADD_CATALOG_ENTRY(topSeparator, SoSeparator, FALSE, this, "", FALSE); - SO_KIT_ADD_CATALOG_ABSTRACT_ENTRY(shape, SoNode, SoCube, TRUE, topSeparator, "", TRUE); - SO_KIT_ADD_CATALOG_ENTRY(scale, SoScale, FALSE, topSeparator, shape, FALSE); + SO_KIT_ADD_CATALOG_ENTRY(topSeparator, SoSeparator, false, this, "", false); + SO_KIT_ADD_CATALOG_ABSTRACT_ENTRY(shape, SoNode, SoCube, true, topSeparator, "", true); + SO_KIT_ADD_CATALOG_ENTRY(scale, SoScale, false, topSeparator, shape, false); SO_KIT_INIT_INSTANCE(); } @@ -93,7 +93,7 @@ SoShapeScale::GLRender(SoGLRenderAction * action) { SoState * state = action->getState(); - SoScale * scale = static_cast(this->getAnyPart(SbName("scale"), TRUE)); + SoScale * scale = static_cast(this->getAnyPart(SbName("scale"), true)); if (!this->active.getValue()) { SbVec3f v(1.0f, 1.0f, 1.0f); if (scale->scaleFactor.getValue() != v) @@ -130,17 +130,17 @@ SoAxisCrossKit::SoAxisCrossKit() // Add the parts to the catalog... SO_KIT_ADD_CATALOG_ENTRY(xAxis, SoShapeKit, - TRUE, this,"", TRUE); + true, this,"", true); SO_KIT_ADD_CATALOG_ENTRY(xHead, SoShapeKit, - TRUE, this,"", TRUE); + true, this,"", true); SO_KIT_ADD_CATALOG_ENTRY(yAxis, SoShapeKit, - TRUE, this,"", TRUE); + true, this,"", true); SO_KIT_ADD_CATALOG_ENTRY(yHead, SoShapeKit, - TRUE, this,"", TRUE); + true, this,"", true); SO_KIT_ADD_CATALOG_ENTRY(zAxis, SoShapeKit, - TRUE, this,"", TRUE); + true, this,"", true); SO_KIT_ADD_CATALOG_ENTRY(zHead, SoShapeKit, - TRUE, this,"", TRUE); + true, this,"", true); SO_KIT_INIT_INSTANCE(); @@ -156,7 +156,7 @@ SoAxisCrossKit::~SoAxisCrossKit() SbBool SoAxisCrossKit::affectsState() const { - return FALSE; + return false; } void SoAxisCrossKit::addWriteReference(SoOutput * out, SbBool isfromfield) @@ -168,7 +168,7 @@ void SoAxisCrossKit::getBoundingBox(SoGetBoundingBoxAction * action) { inherited::getBoundingBox(action); action->resetCenter(); - action->setCenter(SbVec3f(0,0,0), FALSE); + action->setCenter(SbVec3f(0,0,0), false); } // Set up parts for default configuration of the jumping jack @@ -294,7 +294,7 @@ void SoRegPoint::GLRender(SoGLRenderAction *action) SoState* state = action->getState(); state->push(); SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); mb.sendFirst(); // make sure we have the correct material diff --git a/src/Gui/SoAxisCrossKit.h b/src/Gui/SoAxisCrossKit.h index f7f65c2b4..c5543e66d 100644 --- a/src/Gui/SoAxisCrossKit.h +++ b/src/Gui/SoAxisCrossKit.h @@ -77,7 +77,7 @@ public: // Overrides default method. All the parts are shapeKits, // so this node will not affect the state. virtual SbBool affectsState() const; - virtual void addWriteReference(SoOutput * out, SbBool isfromfield = FALSE); + virtual void addWriteReference(SoOutput * out, SbBool isfromfield = false); virtual void getBoundingBox(SoGetBoundingBoxAction * action); static void initClass(); diff --git a/src/Gui/SoFCBoundingBox.cpp b/src/Gui/SoFCBoundingBox.cpp index add299a2e..c67b96d8e 100644 --- a/src/Gui/SoFCBoundingBox.cpp +++ b/src/Gui/SoFCBoundingBox.cpp @@ -77,8 +77,8 @@ SoFCBoundingBox::SoFCBoundingBox () SO_NODE_ADD_FIELD(minBounds, (-1.0, -1.0, -1.0)); SO_NODE_ADD_FIELD(maxBounds, ( 1.0, 1.0, 1.0)); - SO_NODE_ADD_FIELD(coordsOn, (TRUE)); - SO_NODE_ADD_FIELD(dimensionsOn, (TRUE)); + SO_NODE_ADD_FIELD(coordsOn, (true)); + SO_NODE_ADD_FIELD(dimensionsOn, (true)); root = new SoSeparator(); SoSeparator *bboxSep = new SoSeparator(); diff --git a/src/Gui/SoFCDB.cpp b/src/Gui/SoFCDB.cpp index 4ee13e443..b51f2720d 100644 --- a/src/Gui/SoFCDB.cpp +++ b/src/Gui/SoFCDB.cpp @@ -61,7 +61,7 @@ using namespace Gui; using namespace Gui::Inventor; using namespace Gui::PropertyEditor; -static SbBool init_done = FALSE; +static SbBool init_done = false; SbBool Gui::SoFCDB::isInitialized(void) { @@ -155,7 +155,7 @@ void Gui::SoFCDB::init() qRegisterMetaType("Base::Vector3d"); qRegisterMetaType("Base::Quantity"); qRegisterMetaType >("Base::QuantityList"); - init_done = TRUE; + init_done = true; } void Gui::SoFCDB::finish() @@ -230,7 +230,7 @@ bool Gui::SoFCDB::writeToVRML(SoNode* node, const char* filename, bool binary) // We want to write compressed VRML but Coin 2.4.3 doesn't do it even though // SoOutput::getAvailableCompressionMethods() delivers a string list that // contains 'GZIP'. setCompression() was called directly after opening the file, - // returned TRUE and no error message appeared but anyway it didn't work. + // returned true and no error message appeared but anyway it didn't work. // Strange is that reading GZIPped VRML files works. // So, we do the compression on our own. Base::ofstream str(fi, std::ios::out | std::ios::binary); diff --git a/src/Gui/SoFCInteractiveElement.cpp b/src/Gui/SoFCInteractiveElement.cpp index 34b0fb92f..5e414fb57 100644 --- a/src/Gui/SoFCInteractiveElement.cpp +++ b/src/Gui/SoFCInteractiveElement.cpp @@ -113,7 +113,7 @@ void SoGLWidgetElement::pop(SoState * state, const SoElement * prevTopElement) SbBool SoGLWidgetElement::matches(const SoElement * element) const { - return TRUE; + return true; } SoElement * SoGLWidgetElement::copyMatchInfo(void) const @@ -168,7 +168,7 @@ void SoGLRenderActionElement::pop(SoState * state, const SoElement * prevTopElem SbBool SoGLRenderActionElement::matches(const SoElement * element) const { - return TRUE; + return true; } SoElement * SoGLRenderActionElement::copyMatchInfo(void) const diff --git a/src/Gui/SoFCOffscreenRenderer.cpp b/src/Gui/SoFCOffscreenRenderer.cpp index fd8bff30a..57151a3d6 100644 --- a/src/Gui/SoFCOffscreenRenderer.cpp +++ b/src/Gui/SoFCOffscreenRenderer.cpp @@ -400,7 +400,7 @@ void SoQtOffscreenRenderer::init(const SbViewportRegion & vpr, this->renderaction->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_BLEND); } - this->didallocation = glrenderaction ? FALSE : TRUE; + this->didallocation = glrenderaction ? false : true; this->viewport = vpr; this->pixelbuffer = NULL; // constructed later @@ -492,7 +492,7 @@ SoQtOffscreenRenderer::setGLRenderAction(SoGLRenderAction * action) if (PRIVATE(this)->didallocation) { delete PRIVATE(this)->renderaction; } PRIVATE(this)->renderaction = action; - PRIVATE(this)->didallocation = FALSE; + PRIVATE(this)->didallocation = false; } /*! @@ -534,7 +534,7 @@ void SoQtOffscreenRenderer::pre_render_cb(void * userdata, SoGLRenderAction * action) { glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT); - action->setRenderingIsRemote(FALSE); + action->setRenderingIsRemote(false); } void @@ -632,7 +632,7 @@ SoQtOffscreenRenderer::renderFromBase(SoBase * base) else if (base->isOfType(SoPath::getClassTypeId())) this->renderaction->apply((SoPath *)base); else { - assert(FALSE && "Cannot apply to anything else than an SoNode or an SoPath"); + assert(false && "Cannot apply to anything else than an SoNode or an SoPath"); } this->renderaction->removePreRenderCallback(pre_render_cb, NULL); @@ -646,7 +646,7 @@ SoQtOffscreenRenderer::renderFromBase(SoBase * base) this->renderaction->setCacheContext(oldcontext); // restore old - return TRUE; + return true; } /*! diff --git a/src/Gui/SoFCSelection.cpp b/src/Gui/SoFCSelection.cpp index 42cf388d3..27e939790 100644 --- a/src/Gui/SoFCSelection.cpp +++ b/src/Gui/SoFCSelection.cpp @@ -107,9 +107,9 @@ SoFCSelection::SoFCSelection() SO_NODE_DEFINE_ENUM_VALUE(Selected, SELECTED); SO_NODE_SET_SF_ENUM_TYPE(selected, Selected); - highlighted = FALSE; - bShift = FALSE; - bCtrl = FALSE; + highlighted = false; + bShift = false; + bCtrl = false; selected = NOTSELECTED; } @@ -332,9 +332,9 @@ SoFCSelection::handleEvent(SoHandleEventAction * action) SoFCSelection::turnoffcurrent(action); SoFCSelection::currenthighlight = (SoFullPath*)action->getCurPath()->copy(); SoFCSelection::currenthighlight->ref(); - highlighted = TRUE; + highlighted = true; this->touch(); // force scene redraw - this->redrawHighlighted(action, TRUE); + this->redrawHighlighted(action, true); } } @@ -353,7 +353,7 @@ SoFCSelection::handleEvent(SoHandleEventAction * action) SoFCSelection::turnoffcurrent(action); //FIXME: I think we should set 'highlighted' to false whenever no point is picked //else - highlighted = FALSE; + highlighted = false; Gui::Selection().rmvPreselect(); } } @@ -465,17 +465,17 @@ SoFCSelection::handleEvent(SoHandleEventAction * action) // if (event->isOfType(SoLocation2Event::getClassTypeId())) { // check to see if the mouse is over our geometry... - SbBool underTheMouse = FALSE; + SbBool underTheMouse = false; const SoPickedPoint * pp = this->getPickedPoint(action); SoFullPath *pPath = (pp != NULL) ? (SoFullPath *) pp->getPath() : NULL; if (pPath && pPath->containsPath(action->getCurPath())) { // Make sure I'm the lowest LocHL in the pick path! - underTheMouse = TRUE; + underTheMouse = true; for (int i = 0; i < pPath->getLength(); i++) { SoNode *node = pPath->getNodeFromTail(i); if (node->isOfType(SoFCSelection::getClassTypeId())) { if (node != this) - underTheMouse = FALSE; + underTheMouse = false; break; // found the lowest LocHL - look no further } } @@ -485,7 +485,7 @@ SoFCSelection::handleEvent(SoHandleEventAction * action) if (! underTheMouse) { // re-draw the object with it's normal color //if(mymode != OFF) - redrawHighlighted(action, FALSE); + redrawHighlighted(action, false); Gui::Selection().rmvPreselect(); } else { @@ -502,7 +502,7 @@ SoFCSelection::handleEvent(SoHandleEventAction * action) if (underTheMouse) { // draw this object highlighted if (mymode != OFF) - redrawHighlighted(action, TRUE); + redrawHighlighted(action, true); //const SoPickedPoint * pp = action->getPickedPoint(); Gui::Selection().setPreselect(documentName.getValue().getString() ,objectName.getValue().getString() @@ -513,10 +513,10 @@ SoFCSelection::handleEvent(SoHandleEventAction * action) } } //if(selected == SELECTED){ - // redrawHighlighted(action, TRUE); + // redrawHighlighted(action, true); //} //if(selectionCleared ){ - // redrawHighlighted(action, FALSE); + // redrawHighlighted(action, false); // selectionCleared = false; //} } @@ -696,7 +696,7 @@ SoFCSelection::preRender(SoGLRenderAction *action, GLint &oldDepthFunc) { // If not performing locate highlighting, just return. if (highlightMode.getValue() == OFF) - return FALSE; + return false; SoState *state = action->getState(); @@ -718,12 +718,12 @@ SoFCSelection::preRender(SoGLRenderAction *action, GLint &oldDepthFunc) // Emissive Color SoLazyElement::setEmissive(state, &col); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); // Diffuse Color if (style.getValue() == EMISSIVE_DIFFUSE) { SoLazyElement::setDiffuse(state, this, 1, &col, &colorpacker); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); } } @@ -759,7 +759,7 @@ SoFCSelection::redrawHighlighted(SoAction * action , SbBool doHighlight ) SoNode *tail = currenthighlight->getTail(); if (tail->isOfType( SoFCSelection::getClassTypeId())) - ((SoFCSelection *)tail)->redrawHighlighted(action, FALSE); + ((SoFCSelection *)tail)->redrawHighlighted(action, false); else { // Just get rid of the path. It's no longer valid for redraw. currenthighlight->unref(); @@ -823,9 +823,9 @@ SoFCSelection::redrawHighlighted(SoAction * action , SbBool doHighlight ) if (whichBuffer != GL_FRONT) glDrawBuffer(GL_FRONT); - highlighted = TRUE; + highlighted = true; glAction->apply(pathToRender); - highlighted = FALSE; + highlighted = false; // restore the buffering type if (whichBuffer != GL_FRONT) @@ -855,7 +855,7 @@ SoFCSelection::setOverride(SoGLRenderAction * action) SoLazyElement::setEmissive(state, &this->colorSelection.getValue()); else SoLazyElement::setEmissive(state, &this->colorHighlight.getValue()); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); Styles mystyle = (Styles) this->style.getValue(); if (mystyle == SoFCSelection::EMISSIVE_DIFFUSE) { @@ -863,7 +863,7 @@ SoFCSelection::setOverride(SoGLRenderAction * action) SoLazyElement::setDiffuse(state, this,1, &this->colorSelection.getValue(),&colorpacker); else SoLazyElement::setDiffuse(state, this,1, &this->colorHighlight.getValue(),&colorpacker); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); } } @@ -876,9 +876,9 @@ SoFCSelection::turnoffcurrent(SoAction * action) SoFCSelection::currenthighlight->getLength()) { SoNode * tail = SoFCSelection::currenthighlight->getTail(); if (tail->isOfType(SoFCSelection::getClassTypeId())) { - ((SoFCSelection*)tail)->highlighted = FALSE; + ((SoFCSelection*)tail)->highlighted = false; ((SoFCSelection*)tail)->touch(); // force scene redraw - if (action) ((SoFCSelection*)tail)->redrawHighlighted(action, FALSE); + if (action) ((SoFCSelection*)tail)->redrawHighlighted(action, false); } } if (SoFCSelection::currenthighlight) { @@ -896,7 +896,7 @@ SoFCSelection::turnoffcurrent(SoAction * action) // (processing events during render abort might cause this) SoState *state = action->getState(); if (state && state->getDepth() == 1) - ((SoFCSelection *)tail)->redrawHighlighted(action, FALSE); + ((SoFCSelection *)tail)->redrawHighlighted(action, false); } else { // Just get rid of the path. It's no longer valid for redraw. diff --git a/src/Gui/SoFCSelectionAction.cpp b/src/Gui/SoFCSelectionAction.cpp index a692728e8..14a798c92 100644 --- a/src/Gui/SoFCSelectionAction.cpp +++ b/src/Gui/SoFCSelectionAction.cpp @@ -645,7 +645,7 @@ void SoFCDocumentObjectAction::finish() atexit_cleanup(); } -SoFCDocumentObjectAction::SoFCDocumentObjectAction () : _handled(FALSE) +SoFCDocumentObjectAction::SoFCDocumentObjectAction () : _handled(false) { SO_ACTION_CONSTRUCTOR(SoFCDocumentObjectAction); } @@ -666,7 +666,7 @@ void SoFCDocumentObjectAction::callDoAction(SoAction *action,SoNode *node) void SoFCDocumentObjectAction::setHandled() { - this->_handled = TRUE; + this->_handled = true; } SbBool SoFCDocumentObjectAction::isHandled() const @@ -715,7 +715,7 @@ void SoGLSelectAction::initClass() SoGLSelectAction::SoGLSelectAction (const SbViewportRegion& region, const SbViewportRegion& select) - : vpregion(region), vpselect(select), _handled(FALSE) + : vpregion(region), vpselect(select), _handled(false) { SO_ACTION_CONSTRUCTOR(SoGLSelectAction); } @@ -742,7 +742,7 @@ void SoGLSelectAction::callDoAction(SoAction *action,SoNode *node) void SoGLSelectAction::setHandled() { - this->_handled = TRUE; + this->_handled = true; } SbBool SoGLSelectAction::isHandled() const @@ -790,7 +790,7 @@ void SoVisibleFaceAction::initClass() SO_ACTION_ADD_METHOD(SoFCSelection,callDoAction); } -SoVisibleFaceAction::SoVisibleFaceAction () : _handled(FALSE) +SoVisibleFaceAction::SoVisibleFaceAction () : _handled(false) { SO_ACTION_CONSTRUCTOR(SoVisibleFaceAction); } @@ -811,7 +811,7 @@ void SoVisibleFaceAction::callDoAction(SoAction *action,SoNode *node) void SoVisibleFaceAction::setHandled() { - this->_handled = TRUE; + this->_handled = true; } SbBool SoVisibleFaceAction::isHandled() const @@ -976,7 +976,7 @@ SoBoxSelectionRenderAction::constructorCommon(void) // Initialize local variables PRIVATE(this)->initBoxGraph(); - this->hlVisible = TRUE; + this->hlVisible = true; PRIVATE(this)->basecolor->rgb.setValue(1.0f, 0.0f, 0.0f); PRIVATE(this)->drawstyle->linePattern = 0xffff; diff --git a/src/Gui/SoFCSelectionAction.h b/src/Gui/SoFCSelectionAction.h index 08ca6a6d0..37ab54a21 100644 --- a/src/Gui/SoFCSelectionAction.h +++ b/src/Gui/SoFCSelectionAction.h @@ -300,7 +300,7 @@ public: virtual void apply(SoNode * node); virtual void apply(SoPath * path); - virtual void apply(const SoPathList & pathlist, SbBool obeysrules = FALSE); + virtual void apply(const SoPathList & pathlist, SbBool obeysrules = false); void setVisible(SbBool b) { hlVisible = b; } SbBool isVisible() const { return hlVisible; } void setColor(const SbColor & color); diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index 8cfb2aa9f..d5fa61b9a 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -100,14 +100,14 @@ SoFCUnifiedSelection::SoFCUnifiedSelection() : pcDocument(0) SO_NODE_ADD_FIELD(colorSelection, (SbColor(0.1f, 0.8f, 0.1f))); SO_NODE_ADD_FIELD(highlightMode, (AUTO)); SO_NODE_ADD_FIELD(selectionMode, (ON)); - SO_NODE_ADD_FIELD(selectionRole, (TRUE)); + SO_NODE_ADD_FIELD(selectionRole, (true)); SO_NODE_DEFINE_ENUM_VALUE(HighlightModes, AUTO); SO_NODE_DEFINE_ENUM_VALUE(HighlightModes, ON); SO_NODE_DEFINE_ENUM_VALUE(HighlightModes, OFF); SO_NODE_SET_SF_ENUM_TYPE (highlightMode, HighlightModes); - highlighted = FALSE; + highlighted = false; preSelection = -1; } @@ -176,7 +176,7 @@ void SoFCUnifiedSelection::write(SoWriteAction * action) SoOutput * out = action->getOutput(); if (out->getStage() == SoOutput::WRITE) { // Do not write out the fields of this class - if (this->writeHeader(out, TRUE, FALSE)) return; + if (this->writeHeader(out, true, false)) return; SoGroup::doAction((SoAction *)action); this->writeFooter(out); } @@ -358,7 +358,7 @@ SoFCUnifiedSelection::handleEvent(SoHandleEventAction * action) vpd = static_cast(vp); //SbBool old_state = highlighted; - highlighted = FALSE; + highlighted = false; if (vpd && vpd->useNewSelectionModel() && vpd->isSelectable()) { std::string documentName = vpd->getObject()->getDocument()->getName(); std::string objectName = vpd->getObject()->getNameInDocument(); @@ -386,10 +386,10 @@ SoFCUnifiedSelection::handleEvent(SoHandleEventAction * action) sa.setNode(vp->getRoot()); sa.apply(vp->getRoot()); if (sa.getPath()) { - highlighted = TRUE; + highlighted = true; if (currenthighlight && currenthighlight->getTail() != sa.getPath()->getTail()) { SoHighlightElementAction action; - action.setHighlighted(FALSE); + action.setHighlighted(false); action.apply(currenthighlight); currenthighlight->unref(); currenthighlight = 0; @@ -570,7 +570,7 @@ void SoHighlightElementAction::initClass() SO_ACTION_ADD_METHOD(SoPointSet,callDoAction); } -SoHighlightElementAction::SoHighlightElementAction () : _highlight(FALSE), _det(0) +SoHighlightElementAction::SoHighlightElementAction () : _highlight(false), _det(0) { SO_ACTION_CONSTRUCTOR(SoHighlightElementAction); } diff --git a/src/Gui/SoNavigationDragger.cpp b/src/Gui/SoNavigationDragger.cpp index 483f5e122..5d36a6ddd 100644 --- a/src/Gui/SoNavigationDragger.cpp +++ b/src/Gui/SoNavigationDragger.cpp @@ -61,30 +61,30 @@ RotTransDragger::RotTransDragger() // Don't create "surroundScale" by default. It's only put // to use if this dragger is used within a manipulator. - SO_KIT_ADD_CATALOG_ENTRY(surroundScale, SoSurroundScale, TRUE, - topSeparator, geomSeparator, TRUE); + SO_KIT_ADD_CATALOG_ENTRY(surroundScale, SoSurroundScale, true, + topSeparator, geomSeparator, true); // Create an anti-squish node by default. - SO_KIT_ADD_CATALOG_ENTRY(antiSquish, SoAntiSquish, FALSE, - topSeparator, geomSeparator, TRUE); + SO_KIT_ADD_CATALOG_ENTRY(antiSquish, SoAntiSquish, false, + topSeparator, geomSeparator, true); SO_KIT_ADD_CATALOG_ENTRY(translator, SoTranslate1Dragger, - TRUE, topSeparator, geomSeparator, - TRUE); - SO_KIT_ADD_CATALOG_ENTRY(XRotatorSep, SoSeparator, FALSE, - topSeparator, geomSeparator, FALSE); - SO_KIT_ADD_CATALOG_ENTRY(XRotatorRot, SoRotation, TRUE, - XRotatorSep,0 , FALSE); + true, topSeparator, geomSeparator, + true); + SO_KIT_ADD_CATALOG_ENTRY(XRotatorSep, SoSeparator, false, + topSeparator, geomSeparator, false); + SO_KIT_ADD_CATALOG_ENTRY(XRotatorRot, SoRotation, true, + XRotatorSep,0 , false); SO_KIT_ADD_CATALOG_ENTRY(XRotator,SoRotateCylindricalDragger, - TRUE, XRotatorSep, 0,TRUE); + true, XRotatorSep, 0,true); SO_KIT_ADD_CATALOG_ENTRY(YRotator, SoRotateCylindricalDragger, - TRUE, topSeparator, geomSeparator, TRUE); + true, topSeparator, geomSeparator, true); - SO_KIT_ADD_CATALOG_ENTRY(ZRotatorSep, SoSeparator, FALSE, - topSeparator, geomSeparator, FALSE); - SO_KIT_ADD_CATALOG_ENTRY(ZRotatorRot, SoRotation, TRUE, - ZRotatorSep,0 ,FALSE); + SO_KIT_ADD_CATALOG_ENTRY(ZRotatorSep, SoSeparator, false, + topSeparator, geomSeparator, false); + SO_KIT_ADD_CATALOG_ENTRY(ZRotatorRot, SoRotation, true, + ZRotatorSep,0 ,false); SO_KIT_ADD_CATALOG_ENTRY(ZRotator, SoRotateCylindricalDragger, - TRUE, ZRotatorSep, 0,TRUE); + true, ZRotatorSep, 0,true); // Read geometry resources. Only do this the first time we // construct one. 'geomBuffer' contains our compiled in @@ -165,7 +165,7 @@ RotTransDragger::RotTransDragger() &RotTransDragger::fieldSensorCB,this); translFieldSensor->setPriority(0); - setUpConnections(TRUE, TRUE); + setUpConnections(true, true); } RotTransDragger::~RotTransDragger() @@ -201,7 +201,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) // will be transferred into motion of the entire // dragger. SoDragger *tD = - (SoDragger *) getAnyPart("translator", FALSE); + (SoDragger *) getAnyPart("translator", false); // [a] Set up the parts in the child dragger... tD->setPartAsDefault("translator", "rotTransTranslatorTranslator"); @@ -219,7 +219,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) registerChildDragger(tD); SoDragger *XD = - (SoDragger *) getAnyPart("XRotator", FALSE); + (SoDragger *) getAnyPart("XRotator", false); // [a] Set up the parts in the child dragger... XD->setPartAsDefault("rotator", "rotTransRotatorRotator"); @@ -237,7 +237,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) registerChildDragger(XD); SoDragger *YD = - (SoDragger *) getAnyPart("YRotator", FALSE); + (SoDragger *) getAnyPart("YRotator", false); // [a] Set up the parts in the child dragger... YD->setPartAsDefault("rotator", "rotTransRotatorRotator"); @@ -255,7 +255,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) registerChildDragger(YD); SoDragger *ZD = - (SoDragger *) getAnyPart("ZRotator", FALSE); + (SoDragger *) getAnyPart("ZRotator", false); // [a] Set up the parts in the child dragger... ZD->setPartAsDefault("rotator", "rotTransRotatorRotator"); @@ -288,7 +288,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) // Remove the callbacks from the child draggers, // and unregister them as children. SoDragger *tD = - (SoDragger *) getAnyPart("translator", FALSE); + (SoDragger *) getAnyPart("translator", false); tD->removeStartCallback( &RotTransDragger::invalidateSurroundScaleCB, this); tD->removeFinishCallback( @@ -296,7 +296,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) unregisterChildDragger(tD); SoDragger *XD = - (SoDragger *) getAnyPart("XRotator", FALSE); + (SoDragger *) getAnyPart("XRotator", false); XD->removeStartCallback( &RotTransDragger::invalidateSurroundScaleCB, this); XD->removeFinishCallback( @@ -304,7 +304,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) unregisterChildDragger(XD); SoDragger *YD = - (SoDragger *) getAnyPart("YRotator", FALSE); + (SoDragger *) getAnyPart("YRotator", false); YD->removeStartCallback( &RotTransDragger::invalidateSurroundScaleCB, this); YD->removeFinishCallback( @@ -312,7 +312,7 @@ RotTransDragger::setUpConnections(SbBool onOff, SbBool doItAlways) unregisterChildDragger(YD); SoDragger *ZD = - (SoDragger *) getAnyPart("ZRotator", FALSE); + (SoDragger *) getAnyPart("ZRotator", false); ZD->removeStartCallback( &RotTransDragger::invalidateSurroundScaleCB, this); ZD->removeFinishCallback( @@ -389,8 +389,8 @@ RotTransDragger::setDefaultOnNonWritingFields() // The nodes pointed to by these part-fields may // change after construction, but we // don't want to write them out. - surroundScale.setDefault(TRUE); - antiSquish.setDefault(TRUE); + surroundScale.setDefault(true); + antiSquish.setDefault(true); SoDragger::setDefaultOnNonWritingFields(); } diff --git a/src/Gui/SoNavigationDragger.h b/src/Gui/SoNavigationDragger.h index 32d4ac7a5..5698cbf1b 100644 --- a/src/Gui/SoNavigationDragger.h +++ b/src/Gui/SoNavigationDragger.h @@ -106,7 +106,7 @@ class RotTransDragger : public SoDragger // and on the new copy at the start/end of SoBaseKit::copy() // Returns the state of the node when this was called. virtual SbBool setUpConnections( SbBool onOff, - SbBool doItAlways = FALSE); + SbBool doItAlways = false); // This allows us to specify that certain parts do not // write out. We'll use this on the antiSquish and diff --git a/src/Gui/SoTextLabel.cpp b/src/Gui/SoTextLabel.cpp index 2b9b7dfb2..c074389a5 100644 --- a/src/Gui/SoTextLabel.cpp +++ b/src/Gui/SoTextLabel.cpp @@ -105,7 +105,7 @@ SoTextLabel::SoTextLabel() { SO_NODE_CONSTRUCTOR(SoTextLabel); SO_NODE_ADD_FIELD(backgroundColor, (SbVec3f(1.0f,1.0f,1.0f))); - SO_NODE_ADD_FIELD(background, (TRUE)); + SO_NODE_ADD_FIELD(background, (true)); SO_NODE_ADD_FIELD(frameSize, (10.0f)); } @@ -131,7 +131,7 @@ void SoTextLabel::GLRender(SoGLRenderAction *action) SbVec3f center; this->computeBBox(action, box, center); - if (!SoCullElement::cullTest(state, box, TRUE)) { + if (!SoCullElement::cullTest(state, box, true)) { SoMaterialBundle mb(action); mb.sendFirst(); const SbMatrix & mat = SoModelMatrixElement::get(state); @@ -254,11 +254,11 @@ void SoTextLabel::GLRender(SoGLRenderAction *action) state->push(); // disable textures for all units - SoGLTextureEnabledElement::set(state, this, FALSE); + SoGLTextureEnabledElement::set(state, this, false); #if COIN_MAJOR_VERSION > 3 - SoMultiTextureEnabledElement::set(state, this, FALSE); + SoMultiTextureEnabledElement::set(state, this, false); #else - SoGLTexture3EnabledElement::set(state, this, FALSE); + SoGLTexture3EnabledElement::set(state, this, false); #endif glPushAttrib(GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT); @@ -406,7 +406,7 @@ SoFrameLabel::SoFrameLabel() SO_NODE_ADD_FIELD(justification, (LEFT)); SO_NODE_ADD_FIELD(name, ("Helvetica")); SO_NODE_ADD_FIELD(size, (12)); - SO_NODE_ADD_FIELD(frame, (TRUE)); + SO_NODE_ADD_FIELD(frame, (true)); //SO_NODE_ADD_FIELD(image, (SbVec2s(0,0), 0, NULL)); } diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index ed5390a38..87ee58813 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -317,9 +317,9 @@ static int getWordSizeOfOS() // determine if 32-bit process running on 64-bit windows in WOW64 emulation // or 32-bit process running on 32-bit windows - // default bIsWow64 to FALSE for 32-bit process on 32-bit windows + // default bIsWow64 to false for 32-bit process on 32-bit windows - BOOL bIsWow64 = FALSE; // must default to FALSE + BOOL bIsWow64 = false; // must default to false typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress( diff --git a/src/Gui/ToolBox.cpp b/src/Gui/ToolBox.cpp index ce24d4b0f..e27677f8b 100644 --- a/src/Gui/ToolBox.cpp +++ b/src/Gui/ToolBox.cpp @@ -100,7 +100,7 @@ void ToolBox::removeItem ( int index ) } /** - * If \a enabled is TRUE then the item at position \a index is enabled; otherwise item \a index is disabled. + * If \a enabled is true then the item at position \a index is enabled; otherwise item \a index is disabled. */ void ToolBox::setItemEnabled ( int index, bool enabled ) { @@ -108,7 +108,7 @@ void ToolBox::setItemEnabled ( int index, bool enabled ) } /** - * Returns TRUE if the item at position \a index is enabled; otherwise returns FALSE. + * Returns true if the item at position \a index is enabled; otherwise returns false. */ bool ToolBox::isItemEnabled ( int index ) const { diff --git a/src/Gui/TouchpadNavigationStyle.cpp b/src/Gui/TouchpadNavigationStyle.cpp index 8f3060a40..db3b30406 100644 --- a/src/Gui/TouchpadNavigationStyle.cpp +++ b/src/Gui/TouchpadNavigationStyle.cpp @@ -98,11 +98,11 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) this->lastmouseposition = posn; - // Set to TRUE if any event processing happened. Note that it is not + // Set to true if any event processing happened. Note that it is not // necessary to restrict ourselves to only do one "action" for an // event, we only need this flag to see if any processing happened // at all. - SbBool processed = FALSE; + SbBool processed = false; const ViewerMode curmode = this->currentmode; ViewerMode newmode = curmode; @@ -123,13 +123,13 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) if (!processed && !viewer->isEditing()) { processed = handleEventInForeground(ev); if (processed) - return TRUE; + return true; } // Keyboard handling if (type.isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { const SoKeyboardEvent * const event = (const SoKeyboardEvent *) ev; - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; switch (event->getKey()) { case SoKeyboardEvent::LEFT_CONTROL: case SoKeyboardEvent::RIGHT_CONTROL: @@ -144,7 +144,7 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) this->altdown = press; break; case SoKeyboardEvent::H: - processed = TRUE; + processed = true; viewer->saveHomePosition(); break; case SoKeyboardEvent::S: @@ -157,12 +157,12 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) this->setViewing(true); break; case SoKeyboardEvent::PAGE_UP: - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); + processed = true; break; case SoKeyboardEvent::PAGE_DOWN: - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); + processed = true; break; default: break; @@ -173,33 +173,33 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) if (type.isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; // SoDebugError::postInfo("processSoEvent", "button = %d", button); switch (button) { case SoMouseButtonEvent::BUTTON1: - this->lockrecenter = TRUE; + this->lockrecenter = true; this->button1down = press; if (press && (this->currentmode == NavigationStyle::SEEK_WAIT_MODE)) { newmode = NavigationStyle::SEEK_MODE; this->seekToPoint(pos); // implicitly calls interactiveCountInc() - processed = TRUE; + processed = true; } else if (press && (this->currentmode == NavigationStyle::PANNING || this->currentmode == NavigationStyle::ZOOMING)) { newmode = NavigationStyle::DRAGGING; saveCursorPosition(ev); this->centerTime = ev->getTime(); - processed = TRUE; + processed = true; } else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) { - processed = TRUE; + processed = true; } break; case SoMouseButtonEvent::BUTTON2: // If we are in edit mode then simply ignore the RMB events // to pass the event to the base class. - this->lockrecenter = TRUE; + this->lockrecenter = true; if (!viewer->isEditing()) { // If we are in zoom or pan mode ignore RMB events otherwise // the canvas doesn't get any release events @@ -219,17 +219,17 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) newmode = NavigationStyle::DRAGGING; saveCursorPosition(ev); this->centerTime = ev->getTime(); - processed = TRUE; + processed = true; } this->button2down = press; break; case SoMouseButtonEvent::BUTTON4: - doZoom(viewer->getSoRenderManager()->getCamera(), TRUE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), true, posn); + processed = true; break; case SoMouseButtonEvent::BUTTON5: - doZoom(viewer->getSoRenderManager()->getCamera(), FALSE, posn); - processed = TRUE; + doZoom(viewer->getSoRenderManager()->getCamera(), false, posn); + processed = true; break; default: break; @@ -238,22 +238,22 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) // Mouse Movement handling if (type.isDerivedFrom(SoLocation2Event::getClassTypeId())) { - this->lockrecenter = TRUE; + this->lockrecenter = true; const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (this->currentmode == NavigationStyle::ZOOMING) { this->zoomByCursor(posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::PANNING) { float ratio = vp.getViewportAspectRatio(); panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized); - processed = TRUE; + processed = true; } else if (this->currentmode == NavigationStyle::DRAGGING) { this->addToLog(event->getPosition(), event->getTime()); this->spin(posn); moveCursorPosition(); - processed = TRUE; + processed = true; } } @@ -262,7 +262,7 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) const SoMotion3Event * const event = static_cast(ev); if (event) this->processMotionEvent(event); - processed = TRUE; + processed = true; } enum { @@ -320,7 +320,7 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) if (!processed) processed = inherited::processSoEvent(ev); else - return TRUE; + return true; return processed; } diff --git a/src/Gui/View3DInventorExamples.cpp b/src/Gui/View3DInventorExamples.cpp index 9102681b8..7343c3161 100644 --- a/src/Gui/View3DInventorExamples.cpp +++ b/src/Gui/View3DInventorExamples.cpp @@ -300,7 +300,7 @@ void LightManip(SoSeparator * root) for (int i = 0; i < 3; i++) { sa.setName( pointlightnames[i] ); sa.setInterest( SoSearchAction::FIRST ); - sa.setSearchingAll( FALSE ); + sa.setSearchingAll( false ); sa.apply( root ); SoPath * path = sa.getPath(); if ( path == NULL) return; // Shouldn't happen. @@ -379,7 +379,7 @@ texture() static void timersensorcallback(void * data, SoSensor *) { - static SbBool direction = FALSE; + static SbBool direction = false; SoTexture2 * texnode = (SoTexture2*) data; diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 5b132c23a..403744957 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -332,16 +332,16 @@ public: // ************************************************************************* View3DInventorViewer::View3DInventorViewer(QWidget* parent, const QGLWidget* sharewidget) : Quarter::SoQTQuarterAdaptor(parent, sharewidget), editViewProvider(0), navigation(0), - renderType(Native), framebuffer(0), axisCross(0), axisGroup(0), editing(FALSE), redirected(FALSE), - allowredir(FALSE), overrideMode("As Is"), _viewerPy(0) + renderType(Native), framebuffer(0), axisCross(0), axisGroup(0), editing(false), redirected(false), + allowredir(false), overrideMode("As Is"), _viewerPy(0) { init(); } View3DInventorViewer::View3DInventorViewer(const QGLFormat& format, QWidget* parent, const QGLWidget* sharewidget) : Quarter::SoQTQuarterAdaptor(format, parent, sharewidget), editViewProvider(0), navigation(0), - renderType(Native), framebuffer(0), axisCross(0), axisGroup(0), editing(FALSE), redirected(FALSE), - allowredir(FALSE), overrideMode("As Is"), _viewerPy(0) + renderType(Native), framebuffer(0), axisCross(0), axisGroup(0), editing(false), redirected(false), + allowredir(false), overrideMode("As Is"), _viewerPy(0) { init(); } @@ -352,7 +352,7 @@ void View3DInventorViewer::init() // Coin should not clear the pixel-buffer, so the background image // is not removed. - this->setClearWindow(FALSE); + this->setClearWindow(false); // setting up the defaults for the spin rotation initialize(); @@ -369,7 +369,7 @@ void View3DInventorViewer::init() backlight->ref(); backlight->setName("backlight"); backlight->direction.setValue(-hl->direction.getValue()); - backlight->on.setValue(FALSE); // by default off + backlight->on.setValue(false); // by default off // Set up background scenegraph with image in it. backgroundroot = new SoSeparator; @@ -574,7 +574,7 @@ void View3DInventorViewer::initialize() navigation = new CADNavigationStyle(); navigation->setViewer(this); - this->axiscrossEnabled = TRUE; + this->axiscrossEnabled = true; this->axiscrossSize = 10; } @@ -2123,7 +2123,7 @@ void View3DInventorViewer::viewSelection() Decide if it should be possible to start a spin animation of the model in the viewer by releasing the mouse button while dragging. - If the \a enable flag is \c FALSE and we're currently animating, the + If the \a enable flag is \c false and we're currently animating, the spin will be stopped. */ void diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h index 2141a128b..48d815c80 100644 --- a/src/Gui/View3DInventorViewer.h +++ b/src/Gui/View3DInventorViewer.h @@ -299,7 +299,7 @@ public: /** * Set the camera's orientation. If isAnimationEnabled() returns - * \a TRUE the reorientation is animated, otherwise its directly + * \a true the reorientation is animated, otherwise its directly * set. */ void setCameraOrientation(const SbRotation& rot, SbBool moveTocenter=false); diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index 5d0d7c1d6..7aaa985c5 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -155,7 +155,7 @@ void ViewProvider::eventCallback(void * ud, SoEventCallback * node) // Keyboard events if (ev->getTypeId().isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { SoKeyboardEvent * ke = (SoKeyboardEvent *)ev; - const SbBool press = ke->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = ke->getState() == SoButtonEvent::DOWN ? true : false; switch (ke->getKey()) { case SoKeyboardEvent::ESCAPE: if (self->keyPressed (press, ke->getKey())) @@ -175,7 +175,7 @@ void ViewProvider::eventCallback(void * ud, SoEventCallback * node) const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; // call the virtual method if (self->mouseButtonPressed(button,press,ev->getPosition(),viewer)) diff --git a/src/Gui/ViewProviderAnnotation.cpp b/src/Gui/ViewProviderAnnotation.cpp index 7a63b65bd..0fb2802e4 100644 --- a/src/Gui/ViewProviderAnnotation.cpp +++ b/src/Gui/ViewProviderAnnotation.cpp @@ -414,7 +414,7 @@ bool ViewProviderAnnotationLabel::setEdit(int ModNum) { SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); - sa.setSearchingAll(FALSE); + sa.setSearchingAll(false); sa.setNode(this->pTextTranslation); sa.apply(pcRoot); SoPath * path = sa.getPath(); diff --git a/src/Gui/ViewProviderGeometryObject.cpp b/src/Gui/ViewProviderGeometryObject.cpp index d81bc9996..21626f6da 100644 --- a/src/Gui/ViewProviderGeometryObject.cpp +++ b/src/Gui/ViewProviderGeometryObject.cpp @@ -227,7 +227,7 @@ bool ViewProviderGeometryObject::setEdit(int ModNum) #if 1 SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); - sa.setSearchingAll(FALSE); + sa.setSearchingAll(false); sa.setNode(this->pcTransform); sa.apply(pcRoot); SoPath * path = sa.getPath(); @@ -336,7 +336,7 @@ void ViewProviderGeometryObject::setEditViewer(Gui::View3DInventorViewer* viewer { if (ModNum == (int)ViewProvider::Transform) { SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(FALSE); + static_cast(root)->selectionRole.setValue(false); } } @@ -345,7 +345,7 @@ void ViewProviderGeometryObject::unsetEditViewer(Gui::View3DInventorViewer* view int ModNum = this->getEditingMode(); if (ModNum == (int)ViewProvider::Transform) { SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(TRUE); + static_cast(root)->selectionRole.setValue(true); } } @@ -601,7 +601,7 @@ void ViewProviderGeometryObject::setSelectable(bool selectable) { SoSearchAction sa; sa.setInterest(SoSearchAction::ALL); - sa.setSearchingAll(TRUE); + sa.setSearchingAll(true); sa.setType(Gui::SoFCSelection::getClassTypeId()); sa.apply(pcRoot); diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index fbf36da6b..4318e169b 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -842,14 +842,14 @@ ContainerDialog::ContainerDialog( QWidget* templChild ) setWindowTitle( templChild->objectName() ); setObjectName( templChild->objectName() ); - setSizeGripEnabled( TRUE ); + setSizeGripEnabled( true ); MyDialogLayout = new QGridLayout(this); buttonOk = new QPushButton(this); buttonOk->setObjectName(QLatin1String("buttonOK")); buttonOk->setText( tr( "&OK" ) ); - buttonOk->setAutoDefault( TRUE ); - buttonOk->setDefault( TRUE ); + buttonOk->setAutoDefault( true ); + buttonOk->setDefault( true ); MyDialogLayout->addWidget( buttonOk, 1, 0 ); QSpacerItem* spacer = new QSpacerItem( 210, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); @@ -858,7 +858,7 @@ ContainerDialog::ContainerDialog( QWidget* templChild ) buttonCancel = new QPushButton(this); buttonCancel->setObjectName(QLatin1String("buttonCancel")); buttonCancel->setText( tr( "&Cancel" ) ); - buttonCancel->setAutoDefault( TRUE ); + buttonCancel->setAutoDefault( true ); MyDialogLayout->addWidget( buttonCancel, 1, 2 ); @@ -1029,8 +1029,8 @@ void PyResource::load( const char* name ) /** * Makes a connection between the sender widget \a sender and its signal \a signal * of the created resource and Python callback function \a cb. - * If the sender widget does not exist or no resource has been loaded this method returns FALSE, - * otherwise it returns TRUE. + * If the sender widget does not exist or no resource has been loaded this method returns false, + * otherwise it returns true. */ bool PyResource::connect(const char* sender, const char* signal, PyObject* cb) { diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 9ace1fac1..1dbc10d41 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -444,7 +444,7 @@ void AccelLineEdit::keyPressEvent ( QKeyEvent * e) * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ CheckListDialog::CheckListDialog( QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl ) diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index 51aed4e12..4ea339dfe 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -328,7 +328,7 @@ static LONG __stdcall MyCrashHandlerExceptionFilter(EXCEPTION_POINTERS* pEx) MINIDUMP_EXCEPTION_INFORMATION stMDEI; stMDEI.ThreadId = GetCurrentThreadId(); stMDEI.ExceptionPointers = pEx; - stMDEI.ClientPointers = TRUE; + stMDEI.ClientPointers = true; // try to create an miniDump: if (s_pMDWD( GetCurrentProcess(), diff --git a/src/Main/MainPy.cpp b/src/Main/MainPy.cpp index 702238e01..0bec9afee 100644 --- a/src/Main/MainPy.cpp +++ b/src/Main/MainPy.cpp @@ -69,7 +69,7 @@ BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserv break; } - return TRUE; + return true; } #elif defined(FC_OS_LINUX) # ifndef GNU_SOURCE diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp index d6de4f329..a7fa59b3f 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp @@ -472,7 +472,7 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) else { // the nearest picked point was not part of the view provider SoRayPickAction action(view->getSoRenderManager()->getViewportRegion()); - action.setPickAll(TRUE); + action.setPickAll(true); action.setPoint(mbe->getPosition()); action.apply(view->getSoRenderManager()->getSceneGraph()); diff --git a/src/Mod/Mesh/App/Core/Grid.h b/src/Mod/Mesh/App/Core/Grid.h index 200977f8c..3841becd9 100644 --- a/src/Mod/Mesh/App/Core/Grid.h +++ b/src/Mod/Mesh/App/Core/Grid.h @@ -459,7 +459,7 @@ inline void MeshFacetGrid::AddFacet (const MeshGeomFacet &rclFacet, unsigned lon { for (ulZ = ulZ1; ulZ <= ulZ2; ulZ++) { - if (CMeshFacetFunc::BBoxContainFacet(GetBoundBox(ulX, ulY, ulZ), rclFacet) == TRUE) + if (CMeshFacetFunc::BBoxContainFacet(GetBoundBox(ulX, ulY, ulZ), rclFacet) == true) _aulGrid[ulX][ulY][ulZ].insert(ulFacetIndex); } } diff --git a/src/Mod/Mesh/App/Core/Helpers.h b/src/Mod/Mesh/App/Core/Helpers.h index 62b4087b8..404644e17 100644 --- a/src/Mod/Mesh/App/Core/Helpers.h +++ b/src/Mod/Mesh/App/Core/Helpers.h @@ -106,7 +106,7 @@ inline bool MeshHelpPoint::operator < (const MeshHelpPoint &rclObj) const // if (fabs(_clPt.y - rclObj._clPt.y) < MeshDefinitions::_fMinPointDistanceD1) // { // if (fabs(_clPt.z - rclObj._clPt.z) < MeshDefinitions::_fMinPointDistanceD1) -// return FALSE; +// return false; // else // return _clPt.z < rclObj._clPt.z; // } @@ -136,15 +136,15 @@ inline bool MeshHelpPoint::operator == (const MeshHelpPoint &rclObj) const if (fabs(_clPt.y - rclObj._clPt.y) < (MeshDefinitions::_fMinPointDistanceD1 + 1.0e-2f)) { if (fabs(_clPt.z - rclObj._clPt.z) < (MeshDefinitions::_fMinPointDistanceD1 + 1.0e-2f)) - return TRUE; + return true; else - return FALSE; + return false; } else - return FALSE; + return false; } else - return FALSE; + return false; */ } diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index cf60bd6d7..cdb7461ea 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -2422,9 +2422,9 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const rstrOut << " ]\n }\n"; if (_material->binding == MeshIO::PER_VERTEX) - rstrOut << " colorPerVertex TRUE\n"; + rstrOut << " colorPerVertex true\n"; else - rstrOut << " colorPerVertex FALSE\n"; + rstrOut << " colorPerVertex false\n"; } // write face index diff --git a/src/Mod/Mesh/App/Core/tritritest.h b/src/Mod/Mesh/App/Core/tritritest.h index a8a3a485e..12bd28e0a 100644 --- a/src/Mod/Mesh/App/Core/tritritest.h +++ b/src/Mod/Mesh/App/Core/tritritest.h @@ -31,7 +31,7 @@ if |dv|& rkA, GMatrix& rkInvA); @@ -46,7 +46,7 @@ public: // A[iSize][iSize] coefficient matrix, entries are A[row][col] // B[iSize] vector, entries are B[row] // Output: - // return value is TRUE if successful, FALSE if pivoting failed + // return value is true if successful, false if pivoting failed // X[iSize] is solution X to AX = B bool Solve (const GMatrix& rkA, const Real* afB, Real* afX); @@ -57,7 +57,7 @@ public: // Upper diagonal C[iSize-1] // Right-hand side R[iSize] // Output: - // return value is TRUE if successful, FALSE if pivoting failed + // return value is true if successful, false if pivoting failed // U[iSize] is solution bool SolveTri (int iSize, Real* afA, Real* afB, Real* afC, Real* afR, Real* afU); @@ -69,7 +69,7 @@ public: // Upper diagonal is constant, C // Right-hand side Rr[iSize] // Output: - // return value is TRUE if successful, FALSE if pivoting failed + // return value is true if successful, false if pivoting failed // U[iSize] is solution bool SolveConstTri (int iSize, Real fA, Real fB, Real fC, Real* afR, Real* afU); @@ -102,7 +102,7 @@ public: // A, a banded matrix // B[iSize] vector, entries are B[row] // Output: - // return value is TRUE if successful, FALSE if pivoting failed + // return value is true if successful, false if pivoting failed // X[iSize] is solution X to AX = B bool SolveBanded (const BandedMatrix& rkA, const Real* afB, Real* afX); @@ -111,7 +111,7 @@ public: // Input: // A, a banded matrix // Output: - // return value is TRUE if the inverse exists, FALSE otherwise + // return value is true if the inverse exists, false otherwise // InvA, the inverse of A bool Invert (const BandedMatrix& rkA, GMatrix& rkInvA); diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp index 71b48f236..06a8c4b31 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp +++ b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp @@ -170,7 +170,7 @@ void DlgEvaluateMeshImp::slotDeletedDocument(const App::Document& Doc) * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgEvaluateMeshImp::DlgEvaluateMeshImp(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl), d(new Private()) diff --git a/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp b/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp index 940cd0344..902e2aa59 100644 --- a/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp +++ b/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp @@ -49,7 +49,7 @@ using namespace MeshGui; * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ MeshGui::DlgRegularSolidImp::DlgRegularSolidImp(QWidget* parent, Qt::WindowFlags fl) : QDialog( parent, fl ) diff --git a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp index b3b820a5f..6da35a4a8 100644 --- a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp +++ b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp @@ -95,7 +95,7 @@ void SoFCIndexedFaceSet::GLRender(SoGLRenderAction *action) SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); SbBool sendNormals = !mb.isColorOnly() || tb.isFunction(); this->getVertexData(state, coords, normals, cindices, @@ -129,14 +129,14 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli float size = std::min((float)mod,3.0f); glPointSize(size); - SbBool per_face = FALSE; - SbBool per_vert = FALSE; + SbBool per_face = false; + SbBool per_vert = false; switch (binding) { case SoMaterialBindingElement::PER_FACE: - per_face = TRUE; + per_face = true; break; case SoMaterialBindingElement::PER_VERTEX: - per_vert = TRUE; + per_vert = true; break; default: break; @@ -153,10 +153,10 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli for (int index=0; indexsend(ct, TRUE); + materials->send(ct, true); v1 = *viptr++; index++; if (per_vert) - materials->send(v1, TRUE); + materials->send(v1, true); if (normals) currnormal = &normals[*normalindices++]; glNormal3fv((const GLfloat*)currnormal); @@ -164,7 +164,7 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli v2 = *viptr++; index++; if (per_vert) - materials->send(v2, TRUE); + materials->send(v2, true); if (normals) currnormal = &normals[*normalindices++]; glNormal3fv((const GLfloat*)currnormal); @@ -172,7 +172,7 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli v3 = *viptr++; index++; if (per_vert) - materials->send(v3, TRUE); + materials->send(v3, true); if (normals) currnormal = &normals[*normalindices++]; glNormal3fv((const GLfloat*)currnormal); @@ -199,7 +199,7 @@ void SoFCIndexedFaceSet::doAction(SoAction * action) // thus we search there for it. SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); - sa.setSearchingAll(FALSE); + sa.setSearchingAll(false); sa.setType(SoCoordinate3::getClassTypeId(), 1); sa.apply(node); SoPath * path = sa.getPath(); @@ -221,7 +221,7 @@ void SoFCIndexedFaceSet::doAction(SoAction * action) // thus we search there for it. SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); - sa.setSearchingAll(FALSE); + sa.setSearchingAll(false); sa.setType(SoCoordinate3::getClassTypeId(), 1); sa.apply(node); SoPath * path = sa.getPath(); diff --git a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp index 61828924c..b15b39d76 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp @@ -176,7 +176,7 @@ void SoSFMeshObject::initClass() SO_SFIELD_INIT_CLASS(SoSFMeshObject, SoSField); } -// This reads the value of a field from a file. It returns FALSE if the value could not be read +// This reads the value of a field from a file. It returns false if the value could not be read // successfully. SbBool SoSFMeshObject::readValue(SoInput *in) { @@ -191,7 +191,7 @@ SbBool SoSFMeshObject::readValue(SoInput *in) // during initial scene graph import. this->valueChanged(); - return TRUE; + return true; } int32_t countPt; @@ -235,7 +235,7 @@ SbBool SoSFMeshObject::readValue(SoInput *in) // during initial scene graph import. this->valueChanged(); - return TRUE; + return true; } // This writes the value of a field to a file. @@ -626,9 +626,9 @@ void SoFCMeshObjectShape::GLRender(SoGLRenderAction *action) SbBool needNormals = !mb.isColorOnly()/* || tb.isFunction()*/; mb.sendFirst(); // make sure we have the correct material - SbBool ccw = TRUE; + SbBool ccw = true; if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) - ccw = FALSE; + ccw = false; if (mode == false || mesh->countFacets() <= this->renderTriangleLimit) { if (mbind != OVERALL) @@ -708,16 +708,16 @@ void SoFCMeshObjectShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBun n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); if(perFace) - mb->send(it-rFacets.begin(), TRUE); + mb->send(it-rFacets.begin(), true); glNormal(n); if(perVertex) - mb->send(it->_aulPoints[0], TRUE); + mb->send(it->_aulPoints[0], true); glVertex(v0); if(perVertex) - mb->send(it->_aulPoints[1], TRUE); + mb->send(it->_aulPoints[1], true); glVertex(v1); if(perVertex) - mb->send(it->_aulPoints[2], TRUE); + mb->send(it->_aulPoints[2], true); glVertex(v2); } } @@ -852,7 +852,7 @@ void SoFCMeshObjectShape::doAction(SoAction * action) // thus we search there for it. SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); - sa.setSearchingAll(FALSE); + sa.setSearchingAll(false); sa.setType(SoFCMeshObjectNode::getClassTypeId(), 1); sa.apply(node); SoPath * path = sa.getPath(); @@ -961,8 +961,8 @@ void SoFCMeshObjectShape::renderSelectionGeometry(const Mesh::MeshObject* mesh) //static SbBool //SoFCMeshObjectShape_ray_intersect(SoRayPickAction * action, const SbBox3f & box) //{ -// if (box.isEmpty()) return FALSE; -// return action->intersect(box, TRUE); +// if (box.isEmpty()) return false; +// return action->intersect(box, true); //} /** @@ -1163,9 +1163,9 @@ void SoFCMeshSegmentShape::GLRender(SoGLRenderAction *action) SbBool needNormals = !mb.isColorOnly()/* || tb.isFunction()*/; mb.sendFirst(); // make sure we have the correct material - SbBool ccw = TRUE; + SbBool ccw = true; if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) - ccw = FALSE; + ccw = false; if (mode == false || mesh->countFacets() <= this->renderTriangleLimit) { if (mbind != OVERALL) @@ -1250,16 +1250,16 @@ void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBu n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); if(perFace) - mb->send(*it, TRUE); + mb->send(*it, true); glNormal(n); if(perVertex) - mb->send(f._aulPoints[0], TRUE); + mb->send(f._aulPoints[0], true); glVertex(v0); if(perVertex) - mb->send(f._aulPoints[1], TRUE); + mb->send(f._aulPoints[1], true); glVertex(v1); if(perVertex) - mb->send(f._aulPoints[2], TRUE); + mb->send(f._aulPoints[2], true); glVertex(v2); } } @@ -1556,7 +1556,7 @@ void SoFCMeshObjectBoundary::GLRender(SoGLRenderAction *action) if (!mesh) return; SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); mb.sendFirst(); // make sure we have the correct material diff --git a/src/Mod/Mesh/Gui/SoPolygon.cpp b/src/Mod/Mesh/Gui/SoPolygon.cpp index 66818d898..21b6b7662 100644 --- a/src/Mod/Mesh/Gui/SoPolygon.cpp +++ b/src/Mod/Mesh/Gui/SoPolygon.cpp @@ -68,8 +68,8 @@ SoPolygon::SoPolygon() SO_NODE_ADD_FIELD(startIndex, (0)); SO_NODE_ADD_FIELD(numVertices, (0)); - SO_NODE_ADD_FIELD(highlight, (FALSE)); - SO_NODE_ADD_FIELD(render, (TRUE)); + SO_NODE_ADD_FIELD(highlight, (false)); + SO_NODE_ADD_FIELD(render, (true)); } /** @@ -86,7 +86,7 @@ void SoPolygon::GLRender(SoGLRenderAction *action) if (!points) return; SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); mb.sendFirst(); // make sure we have the correct material diff --git a/src/Mod/MeshPart/App/MeshAlgos.cpp b/src/Mod/MeshPart/App/MeshAlgos.cpp index 44130bf9e..b5b4d0cb9 100644 --- a/src/Mod/MeshPart/App/MeshAlgos.cpp +++ b/src/Mod/MeshPart/App/MeshAlgos.cpp @@ -172,8 +172,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore: GtsSurface * s1, * s2, * s3; GtsSurfaceInter * si; GNode * tree1, * tree2; - gboolean check_self_intersection = FALSE; - gboolean closed = TRUE, is_open1, is_open2; + gboolean check_self_intersection = false; + gboolean closed = true, is_open1, is_open2; // create a GTS surface @@ -224,11 +224,11 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore: /* build bounding box tree for first surface */ tree1 = gts_bb_tree_surface (s1); - is_open1 = gts_surface_volume (s1) < 0. ? TRUE : FALSE; + is_open1 = gts_surface_volume (s1) < 0. ? true : false; /* build bounding box tree for second surface */ tree2 = gts_bb_tree_surface (s2); - is_open2 = gts_surface_volume (s2) < 0. ? TRUE : FALSE; + is_open2 = gts_surface_volume (s2) < 0. ? true : false; si = gts_surface_inter_new (gts_surface_inter_class (), s1, s2, tree1, tree2, is_open1, is_open2); @@ -236,8 +236,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore: if (!closed) { gts_object_destroy (GTS_OBJECT (s1)); gts_object_destroy (GTS_OBJECT (s2)); - gts_bb_tree_destroy (tree1, TRUE); - gts_bb_tree_destroy (tree2, TRUE); + gts_bb_tree_destroy (tree1, true); + gts_bb_tree_destroy (tree2, true); throw"the intersection of 1 and 2 is not a closed curve\n"; } @@ -280,8 +280,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore: gts_object_destroy (GTS_OBJECT (s2)); gts_object_destroy (GTS_OBJECT (s3)); gts_object_destroy (GTS_OBJECT (si)); - gts_bb_tree_destroy (tree1, TRUE); - gts_bb_tree_destroy (tree2, TRUE); + gts_bb_tree_destroy (tree1, true); + gts_bb_tree_destroy (tree2, true); throw "the resulting surface is self-intersecting\n"; } } @@ -301,8 +301,8 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, MeshCore: // gts_object_destroy (GTS_OBJECT (si)); // destroy bounding box trees (including bounding boxes) -// gts_bb_tree_destroy (tree1, TRUE); -// gts_bb_tree_destroy (tree2, TRUE); +// gts_bb_tree_destroy (tree1, true); +// gts_bb_tree_destroy (tree2, true); #endif return pMesh1; diff --git a/src/Mod/Part/Gui/DlgPartBoxImp.cpp b/src/Mod/Part/Gui/DlgPartBoxImp.cpp index 19803c4d6..d1815b7bc 100644 --- a/src/Mod/Part/Gui/DlgPartBoxImp.cpp +++ b/src/Mod/Part/Gui/DlgPartBoxImp.cpp @@ -34,7 +34,7 @@ using namespace PartGui; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgPartBoxImp::DlgPartBoxImp(QWidget* parent, Qt::WindowFlags fl) : Gui::LocationInterface(parent, fl) diff --git a/src/Mod/Part/Gui/DlgPartCylinderImp.cpp b/src/Mod/Part/Gui/DlgPartCylinderImp.cpp index b80a59e37..ae926ff70 100644 --- a/src/Mod/Part/Gui/DlgPartCylinderImp.cpp +++ b/src/Mod/Part/Gui/DlgPartCylinderImp.cpp @@ -34,7 +34,7 @@ using namespace PartGui; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgPartCylinderImp::DlgPartCylinderImp(QWidget* parent, Qt::WindowFlags fl) : Gui::LocationInterface(parent, fl) diff --git a/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp b/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp index 2e189df36..7fd8dd2f5 100644 --- a/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp +++ b/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp @@ -40,7 +40,7 @@ using namespace PartGui; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgPartImportIgesImp::DlgPartImportIgesImp(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl) diff --git a/src/Mod/Part/Gui/DlgPartImportStepImp.cpp b/src/Mod/Part/Gui/DlgPartImportStepImp.cpp index 4f19ec8d1..02d2a1956 100644 --- a/src/Mod/Part/Gui/DlgPartImportStepImp.cpp +++ b/src/Mod/Part/Gui/DlgPartImportStepImp.cpp @@ -39,7 +39,7 @@ using namespace PartGui; * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DlgPartImportStepImp::DlgPartImportStepImp( QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl ) diff --git a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp index b47d1e573..6ff150313 100644 --- a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp +++ b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp @@ -131,9 +131,9 @@ void SoBrepEdgeSet::renderHighlight(SoGLRenderAction *action) //SoLineWidthElement::set(state, this, 4.0f); SoLazyElement::setEmissive(state, &this->highlightColor); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); SoLazyElement::setDiffuse(state, this,1, &this->highlightColor,&this->colorpacker1); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); const SoCoordinateElement * coords; @@ -146,7 +146,7 @@ void SoBrepEdgeSet::renderHighlight(SoGLRenderAction *action) SbBool normalCacheUsed; this->getVertexData(state, coords, normals, cindices, nindices, - tindices, mindices, numcindices, FALSE, normalCacheUsed); + tindices, mindices, numcindices, false, normalCacheUsed); SoMaterialBundle mb(action); mb.sendFirst(); // make sure we have the correct material @@ -174,9 +174,9 @@ void SoBrepEdgeSet::renderSelection(SoGLRenderAction *action) //SoLineWidthElement::set(state, this, 4.0f); SoLazyElement::setEmissive(state, &this->selectionColor); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); SoLazyElement::setDiffuse(state, this,1, &this->selectionColor,&this->colorpacker2); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); const SoCoordinateElement * coords; @@ -189,7 +189,7 @@ void SoBrepEdgeSet::renderSelection(SoGLRenderAction *action) SbBool normalCacheUsed; this->getVertexData(state, coords, normals, cindices, nindices, - tindices, mindices, numcindices, FALSE, normalCacheUsed); + tindices, mindices, numcindices, false, normalCacheUsed); SoMaterialBundle mb(action); mb.sendFirst(); // make sure we have the correct material diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.cpp b/src/Mod/Part/Gui/SoBrepFaceSet.cpp index 57c792865..63ce32a04 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.cpp +++ b/src/Mod/Part/Gui/SoBrepFaceSet.cpp @@ -194,7 +194,7 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) SoMaterialBundle mb(action); Binding mbind = this->findMaterialBinding(state); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); SbBool doTextures = tb.needCoordinates(); int32_t hl_idx = this->highlightIndex.getValue(); @@ -320,7 +320,7 @@ void SoBrepFaceSet::renderColoredArray(SoMaterialBundle *const materials) int tris = partIndex[part_id]; if (tris > 0) { - materials->send(part_id, TRUE); + materials->send(part_id, true); glDrawElements(GL_TRIANGLES, 3 * tris, GL_UNSIGNED_INT, ptr); ptr += 3 * tris; } @@ -363,7 +363,7 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); doTextures = tb.needCoordinates(); SbBool sendNormals = !mb.isColorOnly() || tb.isFunction(); @@ -461,13 +461,13 @@ void SoBrepFaceSet::generatePrimitives(SoAction * action) SbBool sendNormals; SbBool normalCacheUsed; - sendNormals = TRUE; // always generate normals + sendNormals = true; // always generate normals this->getVertexData(state, coords, normals, cindices, nindices, tindices, mindices, numindices, sendNormals, normalCacheUsed); - SoTextureCoordinateBundle tb(action, FALSE, FALSE); + SoTextureCoordinateBundle tb(action, false, false); doTextures = tb.needCoordinates(); if (!sendNormals) nbind = OVERALL; @@ -674,11 +674,11 @@ void SoBrepFaceSet::renderHighlight(SoGLRenderAction *action) state->push(); SoLazyElement::setEmissive(state, &this->highlightColor); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); #if 0 // disables shading effect - // sendNormals will be FALSE + // sendNormals will be false SoLazyElement::setDiffuse(state, this,1, &this->highlightColor,&this->colorpacker); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); #endif @@ -697,7 +697,7 @@ void SoBrepFaceSet::renderHighlight(SoGLRenderAction *action) SbBool normalCacheUsed; SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); doTextures = tb.needCoordinates(); SbBool sendNormals = !mb.isColorOnly() || tb.isFunction(); @@ -734,7 +734,7 @@ void SoBrepFaceSet::renderHighlight(SoGLRenderAction *action) // materials mbind = OVERALL; - doTextures = FALSE; + doTextures = false; renderShape(static_cast(coords), &(cindices[start]), length, &(pindices[id]), 1, normals, nindices, &mb, mindices, &tb, tindices, nbind, mbind, doTextures?1:0); @@ -752,10 +752,10 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action) state->push(); SoLazyElement::setEmissive(state, &this->selectionColor); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); #if 0 // disables shading effect SoLazyElement::setDiffuse(state, this,1, &this->selectionColor,&this->colorpacker); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); #endif @@ -774,7 +774,7 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action) SbBool normalCacheUsed; SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); doTextures = tb.needCoordinates(); SbBool sendNormals = !mb.isColorOnly() || tb.isFunction(); @@ -791,7 +791,7 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action) // materials mbind = OVERALL; - doTextures = FALSE; + doTextures = false; for (int i=0; isend(matnr++, TRUE); + materials->send(matnr++, true); } else if (mbind == PER_PART_INDEXED) { if (trinr == 0) - materials->send(*matindices++, TRUE); + materials->send(*matindices++, true); } else if (mbind == PER_VERTEX || mbind == PER_FACE) { - materials->send(matnr++, TRUE); + materials->send(matnr++, true); } else if (mbind == PER_VERTEX_INDEXED || mbind == PER_FACE_INDEXED) { - materials->send(*matindices++, TRUE); + materials->send(*matindices++, true); } if (normals) { @@ -917,9 +917,9 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist, /* vertex 2 *********************************************************/ if (mbind == PER_VERTEX) - materials->send(matnr++, TRUE); + materials->send(matnr++, true); else if (mbind == PER_VERTEX_INDEXED) - materials->send(*matindices++, TRUE); + materials->send(*matindices++, true); if (normals) { if (nbind == PER_VERTEX) { @@ -942,9 +942,9 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist, /* vertex 3 *********************************************************/ if (mbind == PER_VERTEX) - materials->send(matnr++, TRUE); + materials->send(matnr++, true); else if (mbind == PER_VERTEX_INDEXED) - materials->send(*matindices++, TRUE); + materials->send(*matindices++, true); if (normals) { if (nbind == PER_VERTEX) { diff --git a/src/Mod/Part/Gui/SoBrepPointSet.cpp b/src/Mod/Part/Gui/SoBrepPointSet.cpp index 2f0d0eda7..921f6aa86 100644 --- a/src/Mod/Part/Gui/SoBrepPointSet.cpp +++ b/src/Mod/Part/Gui/SoBrepPointSet.cpp @@ -131,14 +131,14 @@ void SoBrepPointSet::renderHighlight(SoGLRenderAction *action) if (ps < 4.0f) SoPointSizeElement::set(state, this, 4.0f); SoLazyElement::setEmissive(state, &this->highlightColor); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); SoLazyElement::setDiffuse(state, this,1, &this->highlightColor,&this->colorpacker); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); const SoCoordinateElement * coords; const SbVec3f * normals; - this->getVertexData(state, coords, normals, FALSE); + this->getVertexData(state, coords, normals, false); SoMaterialBundle mb(action); mb.sendFirst(); // make sure we have the correct material @@ -161,16 +161,16 @@ void SoBrepPointSet::renderSelection(SoGLRenderAction *action) if (ps < 4.0f) SoPointSizeElement::set(state, this, 4.0f); SoLazyElement::setEmissive(state, &this->selectionColor); - SoOverrideElement::setEmissiveColorOverride(state, this, TRUE); + SoOverrideElement::setEmissiveColorOverride(state, this, true); SoLazyElement::setDiffuse(state, this,1, &this->selectionColor,&this->colorpacker); - SoOverrideElement::setDiffuseColorOverride(state, this, TRUE); + SoOverrideElement::setDiffuseColorOverride(state, this, true); const SoCoordinateElement * coords; const SbVec3f * normals; const int32_t * cindices; int numcindices; - this->getVertexData(state, coords, normals, FALSE); + this->getVertexData(state, coords, normals, false); SoMaterialBundle mb(action); mb.sendFirst(); // make sure we have the correct material diff --git a/src/Mod/Part/Gui/SoFCShapeObject.cpp b/src/Mod/Part/Gui/SoFCShapeObject.cpp index c157ebfd1..e4da17d5b 100644 --- a/src/Mod/Part/Gui/SoFCShapeObject.cpp +++ b/src/Mod/Part/Gui/SoFCShapeObject.cpp @@ -86,7 +86,7 @@ void SoFCControlPoints::GLRender(SoGLRenderAction *action) if (!points) return; SoMaterialBundle mb(action); - SoTextureCoordinateBundle tb(action, TRUE, FALSE); + SoTextureCoordinateBundle tb(action, true, false); SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR); mb.sendFirst(); // make sure we have the correct material diff --git a/src/Mod/Part/Gui/TaskDimension.cpp b/src/Mod/Part/Gui/TaskDimension.cpp index 67a740818..b7f2d9886 100644 --- a/src/Mod/Part/Gui/TaskDimension.cpp +++ b/src/Mod/Part/Gui/TaskDimension.cpp @@ -322,12 +322,12 @@ PartGui::DimensionLinear::DimensionLinear() { SO_KIT_CONSTRUCTOR(PartGui::DimensionLinear); - SO_KIT_ADD_CATALOG_ENTRY(transformation, SoTransform, TRUE, topSeparator,"" , TRUE); - SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, TRUE, topSeparator,"" , TRUE); - SO_KIT_ADD_CATALOG_ENTRY(leftArrow, SoShapeKit, TRUE, topSeparator,"" ,TRUE); - SO_KIT_ADD_CATALOG_ENTRY(rightArrow, SoShapeKit, TRUE, topSeparator,"" ,TRUE); - SO_KIT_ADD_CATALOG_ENTRY(line, SoShapeKit, TRUE, annotate,"" ,TRUE); - SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, TRUE, annotate,"" ,TRUE); + SO_KIT_ADD_CATALOG_ENTRY(transformation, SoTransform, true, topSeparator,"" , true); + SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, true, topSeparator,"" , true); + SO_KIT_ADD_CATALOG_ENTRY(leftArrow, SoShapeKit, true, topSeparator,"" ,true); + SO_KIT_ADD_CATALOG_ENTRY(rightArrow, SoShapeKit, true, topSeparator,"" ,true); + SO_KIT_ADD_CATALOG_ENTRY(line, SoShapeKit, true, annotate,"" ,true); + SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, true, annotate,"" ,true); SO_KIT_INIT_INSTANCE(); @@ -350,13 +350,13 @@ PartGui::DimensionLinear::~DimensionLinear() SbBool PartGui::DimensionLinear::affectsState() const { - return FALSE; + return false; } void PartGui::DimensionLinear::setupDimension() { //transformation - SoTransform *trans = static_cast(getPart("transformation", TRUE)); + SoTransform *trans = static_cast(getPart("transformation", true)); trans->translation.connectFrom(&point1); //build engine for vector subtraction and length. SoCalculator *hyp = new SoCalculator(); @@ -389,7 +389,7 @@ void PartGui::DimensionLinear::setupDimension() //have use local here to do the offset because the main is wired up to length of dimension. set("rightArrow.localTransform", "translation 0.0 -0.25 0.0"); //half cone height. - SoTransform *transform = static_cast(getPart("rightArrow.transform", FALSE)); + SoTransform *transform = static_cast(getPart("rightArrow.transform", false)); if (!transform) return;//what to do here? SoComposeVec3f *vec = new SoComposeVec3f; @@ -420,7 +420,7 @@ void PartGui::DimensionLinear::setupDimension() setPart("line.material", material); //text - SoSeparator *textSep = static_cast(getPart("textSep", TRUE)); + SoSeparator *textSep = static_cast(getPart("textSep", true)); if (!textSep) return; @@ -1014,12 +1014,12 @@ PartGui::DimensionAngular::DimensionAngular() { SO_KIT_CONSTRUCTOR(PartGui::DimensionAngular); - SO_KIT_ADD_CATALOG_ENTRY(transformation, SoMatrixTransform, TRUE, topSeparator,"" , TRUE); - SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, TRUE, topSeparator,"" , TRUE); - SO_KIT_ADD_CATALOG_ENTRY(arrow1, SoShapeKit, TRUE, topSeparator,"" ,TRUE); - SO_KIT_ADD_CATALOG_ENTRY(arrow2, SoShapeKit, TRUE, topSeparator,"" ,TRUE); - SO_KIT_ADD_CATALOG_ENTRY(arcSep, SoSeparator, TRUE, annotate,"" ,TRUE); - SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, TRUE, annotate,"" ,TRUE); + SO_KIT_ADD_CATALOG_ENTRY(transformation, SoMatrixTransform, true, topSeparator,"" , true); + SO_KIT_ADD_CATALOG_ENTRY(annotate, SoAnnotation, true, topSeparator,"" , true); + SO_KIT_ADD_CATALOG_ENTRY(arrow1, SoShapeKit, true, topSeparator,"" ,true); + SO_KIT_ADD_CATALOG_ENTRY(arrow2, SoShapeKit, true, topSeparator,"" ,true); + SO_KIT_ADD_CATALOG_ENTRY(arcSep, SoSeparator, true, annotate,"" ,true); + SO_KIT_ADD_CATALOG_ENTRY(textSep, SoSeparator, true, annotate,"" ,true); SO_KIT_INIT_INSTANCE(); @@ -1042,14 +1042,14 @@ PartGui::DimensionAngular::~DimensionAngular() SbBool PartGui::DimensionAngular::affectsState() const { - return FALSE; + return false; } void PartGui::DimensionAngular::setupDimension() { //transformation - SoMatrixTransform *trans = static_cast(getPart("transformation", TRUE)); + SoMatrixTransform *trans = static_cast(getPart("transformation", true)); trans->matrix.connectFrom(&matrix); //color @@ -1110,14 +1110,14 @@ void PartGui::DimensionAngular::setupDimension() lineSet->numVertices.connectFrom(&arcEngine->pointCount); lineSet->startIndex.setValue(0); - SoSeparator *arcSep = static_cast(getPart("arcSep", TRUE)); + SoSeparator *arcSep = static_cast(getPart("arcSep", true)); if (!arcSep) return; arcSep->addChild(material); arcSep->addChild(lineSet); //text - SoSeparator *textSep = static_cast(getPart("textSep", TRUE)); + SoSeparator *textSep = static_cast(getPart("textSep", true)); if (!textSep) return; diff --git a/src/Mod/Part/Gui/TaskFaceColors.cpp b/src/Mod/Part/Gui/TaskFaceColors.cpp index 9a3f8ecad..04b28824d 100644 --- a/src/Mod/Part/Gui/TaskFaceColors.cpp +++ b/src/Mod/Part/Gui/TaskFaceColors.cpp @@ -221,7 +221,7 @@ public: Gui::View3DInventorViewer* view = reinterpret_cast(cb->getUserData()); view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), selectionCallback, ud); SoNode* root = view->getSceneGraph(); - static_cast(root)->selectionRole.setValue(TRUE); + static_cast(root)->selectionRole.setValue(true); std::vector picked = view->getGLPolygon(); SoCamera* cam = view->getSoRenderManager()->getCamera(); @@ -277,7 +277,7 @@ FaceColors::~FaceColors() d->view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), Private::selectionCallback, this); SoNode* root = d->view->getSceneGraph(); - static_cast(root)->selectionRole.setValue(TRUE); + static_cast(root)->selectionRole.setValue(true); } Gui::Selection().rmvSelectionGate(); d->connectDelDoc.disconnect(); @@ -308,7 +308,7 @@ void FaceColors::on_boxSelection_clicked() // avoid that the selection node handles the event otherwise the callback function won't be // called immediately SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(FALSE); + static_cast(root)->selectionRole.setValue(false); d->view = viewer; } } diff --git a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp index bae304063..40e64aac1 100644 --- a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp +++ b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp @@ -190,7 +190,7 @@ bool ViewProviderCurveNet::handleEvent(const SoEvent * const ev, Gui::View3DInve if (ev->getTypeId().isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false; // which button pressed? switch (button) { diff --git a/src/Mod/Part/Gui/ViewProviderMirror.cpp b/src/Mod/Part/Gui/ViewProviderMirror.cpp index 944afc9fb..6b47774cb 100644 --- a/src/Mod/Part/Gui/ViewProviderMirror.cpp +++ b/src/Mod/Part/Gui/ViewProviderMirror.cpp @@ -119,7 +119,7 @@ bool ViewProviderMirror::setEdit(int ModNum) // translation and center fields are overridden. SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); - sa.setSearchingAll(FALSE); + sa.setSearchingAll(false); sa.setNode(trans); sa.apply(pcEditNode); SoPath * path = sa.getPath(); diff --git a/src/Mod/Path/libarea/kurve/Finite.cpp b/src/Mod/Path/libarea/kurve/Finite.cpp index 0dee646e2..ad2755a52 100644 --- a/src/Mod/Path/libarea/kurve/Finite.cpp +++ b/src/Mod/Path/libarea/kurve/Finite.cpp @@ -273,7 +273,7 @@ namespace geoff_geometry { two lines P1P2 and P3P4. Calculate also the values of mua and mub where Pa = P1 + t1 (P2 - P1) Pb = P3 + t2 (P4 - P3) - Return FALSE if no solution exists. P Bourke method. + Return false if no solution exists. P Bourke method. Input this 1st line Input l2 2nd line Output lshort shortest line between lines (if lshort.ok == false, the line intersect at a point lshort.p0) diff --git a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp index 78d4653d4..573680e5f 100644 --- a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp +++ b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp @@ -201,7 +201,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) // Axis 1 searchAction.setName("FREECAD_AXIS1"); searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(FALSE); + searchAction.setSearchingAll(false); searchAction.apply(pcRobotRoot); path = searchAction.getPath(); if(path){ @@ -214,7 +214,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) // Axis 2 searchAction.setName("FREECAD_AXIS2"); searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(FALSE); + searchAction.setSearchingAll(false); searchAction.apply(pcRobotRoot); path = searchAction.getPath(); if(path){ @@ -227,7 +227,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) // Axis 3 searchAction.setName("FREECAD_AXIS3"); searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(FALSE); + searchAction.setSearchingAll(false); searchAction.apply(pcRobotRoot); path = searchAction.getPath(); if(path){ @@ -240,7 +240,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) // Axis 4 searchAction.setName("FREECAD_AXIS4"); searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(FALSE); + searchAction.setSearchingAll(false); searchAction.apply(pcRobotRoot); path = searchAction.getPath(); if(path){ @@ -253,7 +253,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) // Axis 5 searchAction.setName("FREECAD_AXIS5"); searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(FALSE); + searchAction.setSearchingAll(false); searchAction.apply(pcRobotRoot); path = searchAction.getPath(); if(path){ @@ -266,7 +266,7 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) // Axis 6 searchAction.setName("FREECAD_AXIS6"); searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(FALSE); + searchAction.setSearchingAll(false); searchAction.apply(pcRobotRoot); path = searchAction.getPath(); if(path){ diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp index 64203ee8c..298cf2af5 100644 --- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp +++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp @@ -4545,7 +4545,7 @@ public: viewer = static_cast(mdi)->getViewer(); SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(TRUE); + static_cast(root)->selectionRole.setValue(true); Gui::Selection().clearSelection(); Gui::Selection().rmvSelectionGate(); diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 91f20a625..184983b0b 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -351,7 +351,7 @@ void ViewProviderSketch::purgeHandler(void) viewer = static_cast(mdi)->getViewer(); SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(FALSE); + static_cast(root)->selectionRole.setValue(false); } void ViewProviderSketch::setAxisPickStyle(bool on) @@ -4612,9 +4612,9 @@ void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int Mo viewer->setCameraOrientation(rot); - viewer->setEditing(TRUE); + viewer->setEditing(true); SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(FALSE); + static_cast(root)->selectionRole.setValue(false); viewer->addGraphicsItem(rubberband); rubberband->setViewer(viewer); @@ -4623,9 +4623,9 @@ void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int Mo void ViewProviderSketch::unsetEditViewer(Gui::View3DInventorViewer* viewer) { viewer->removeGraphicsItem(rubberband); - viewer->setEditing(FALSE); + viewer->setEditing(false); SoNode* root = viewer->getSceneGraph(); - static_cast(root)->selectionRole.setValue(TRUE); + static_cast(root)->selectionRole.setValue(true); } void ViewProviderSketch::setPositionText(const Base::Vector2D &Pos, const SbString &text) diff --git a/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp b/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp index 0dbd17b7c..ea222095c 100644 --- a/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp +++ b/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp @@ -480,7 +480,7 @@ void QtColorPicker::insertColor(const QColor &color, const QString &text, int in /*! \property QtColorPicker::colorDialog \brief Whether the ellipsis "..." (more) button is available. - If this property is set to TRUE, the color grid popup will include + If this property is set to true, the color grid popup will include a "More" button (signified by an ellipsis, "...") which pops up a QColorDialog when clicked. The user will then be able to select any custom color they like. diff --git a/src/Mod/Test/Gui/UnitTestImp.cpp b/src/Mod/Test/Gui/UnitTestImp.cpp index dac76cd90..6b45c35d3 100644 --- a/src/Mod/Test/Gui/UnitTestImp.cpp +++ b/src/Mod/Test/Gui/UnitTestImp.cpp @@ -77,7 +77,7 @@ bool UnitTestDialog::hasInstance() * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ UnitTestDialog::UnitTestDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f)