+ rename BrushSelection class to FreehandSelection
This commit is contained in:
parent
00eaab0522
commit
f83506c510
|
@ -464,22 +464,22 @@ int PolyClipSelection::popupMenu()
|
|||
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
BrushSelection::BrushSelection()
|
||||
FreehandSelection::FreehandSelection()
|
||||
{
|
||||
}
|
||||
|
||||
BrushSelection::~BrushSelection()
|
||||
FreehandSelection::~FreehandSelection()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BrushSelection::setClosed(bool on)
|
||||
void FreehandSelection::setClosed(bool on)
|
||||
{
|
||||
polyline.setClosed(on);
|
||||
polyline.setCloseStippled(true);
|
||||
}
|
||||
|
||||
int BrushSelection::popupMenu()
|
||||
int FreehandSelection::popupMenu()
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* fi = menu.addAction(QObject::tr("Finish"));
|
||||
|
@ -498,7 +498,7 @@ int BrushSelection::popupMenu()
|
|||
return Restart;
|
||||
}
|
||||
|
||||
int BrushSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos)
|
||||
int FreehandSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos)
|
||||
{
|
||||
const int button = e->getButton();
|
||||
const SbBool press = e->getState() == SoButtonEvent::DOWN ? true : false;
|
||||
|
@ -572,7 +572,7 @@ int BrushSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, const QP
|
|||
return Continue;
|
||||
}
|
||||
|
||||
int BrushSelection::locationEvent(const SoLocation2Event* const e, const QPoint& pos)
|
||||
int FreehandSelection::locationEvent(const SoLocation2Event* const e, const QPoint& pos)
|
||||
{
|
||||
// do all the drawing stuff for us
|
||||
QPoint clPoint = pos;
|
||||
|
|
|
@ -167,14 +167,14 @@ protected:
|
|||
// -----------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* The brush selection class
|
||||
* The freehand selection class
|
||||
* \author Werner Mayer
|
||||
*/
|
||||
class GuiExport BrushSelection : public PolyPickerSelection
|
||||
class GuiExport FreehandSelection : public PolyPickerSelection
|
||||
{
|
||||
public:
|
||||
BrushSelection();
|
||||
virtual ~BrushSelection();
|
||||
FreehandSelection();
|
||||
virtual ~FreehandSelection();
|
||||
|
||||
void setClosed(bool c);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ void MeshSelection::stopInteractiveCallback(Gui::View3DInventorViewer* viewer)
|
|||
this->activeCB = 0;
|
||||
}
|
||||
|
||||
void MeshSelection::prepareBrushSelection(bool add,SoEventCallbackCB *cb)
|
||||
void MeshSelection::prepareFreehandSelection(bool add,SoEventCallbackCB *cb)
|
||||
{
|
||||
// a rubberband to select a rectangle area of the meshes
|
||||
Gui::View3DInventorViewer* viewer = this->getViewer();
|
||||
|
@ -182,11 +182,11 @@ void MeshSelection::prepareBrushSelection(bool add,SoEventCallbackCB *cb)
|
|||
viewer->navigationStyle()->stopSelection();
|
||||
|
||||
// set cross cursor
|
||||
Gui::BrushSelection* brush = new Gui::BrushSelection();
|
||||
brush->setClosed(true);
|
||||
brush->setColor(1.0f,0.0f,0.0f);
|
||||
brush->setLineWidth(3.0f);
|
||||
viewer->navigationStyle()->startSelection(brush);
|
||||
Gui::FreehandSelection* freehand = new Gui::FreehandSelection();
|
||||
freehand->setClosed(true);
|
||||
freehand->setColor(1.0f, 0.0f, 0.0f);
|
||||
freehand->setLineWidth(3.0f);
|
||||
viewer->navigationStyle()->startSelection(freehand);
|
||||
|
||||
QBitmap cursor = QBitmap::fromData(QSize(CROSS_WIDTH, CROSS_HEIGHT), cross_bitmap);
|
||||
QBitmap mask = QBitmap::fromData(QSize(CROSS_WIDTH, CROSS_HEIGHT), cross_mask_bitmap);
|
||||
|
@ -198,12 +198,12 @@ void MeshSelection::prepareBrushSelection(bool add,SoEventCallbackCB *cb)
|
|||
|
||||
void MeshSelection::startSelection()
|
||||
{
|
||||
prepareBrushSelection(true, selectionCB);
|
||||
prepareFreehandSelection(true, selectionCB);
|
||||
}
|
||||
|
||||
void MeshSelection::startDeselection()
|
||||
{
|
||||
prepareBrushSelection(false, selectionCB);
|
||||
prepareFreehandSelection(false, selectionCB);
|
||||
}
|
||||
|
||||
void MeshSelection::stopSelection()
|
||||
|
|
|
@ -72,7 +72,7 @@ protected:
|
|||
void setCallback(SoEventCallbackCB *cb);
|
||||
std::list<ViewProviderMesh*> getViewProviders() const;
|
||||
Gui::View3DInventorViewer* getViewer() const;
|
||||
void prepareBrushSelection(bool,SoEventCallbackCB *cb);
|
||||
void prepareFreehandSelection(bool,SoEventCallbackCB *cb);
|
||||
void startInteractiveCallback(Gui::View3DInventorViewer* viewer,SoEventCallbackCB *cb);
|
||||
void stopInteractiveCallback(Gui::View3DInventorViewer* viewer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user