Skip to content
Snippets Groups Projects
Commit eeb88839 authored by Xiaowei Li's avatar Xiaowei Li
Browse files

chore: update for code review results

parent 4fd29be3
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,6 @@ const double QVTKInteractorAdapter::DevicePixelRatioTolerance = 1e-5;
QVTKInteractorAdapter::QVTKInteractorAdapter(QObject* parentObject)
: QObject(parentObject)
, AccumulatedDelta(0)
, EnableTouchProcessing(true)
, DevicePixelRatio(1.0)
{
}
......@@ -47,7 +46,7 @@ QVTKInteractorAdapter::~QVTKInteractorAdapter() = default;
void QVTKInteractorAdapter::SetEnableTouchEventProcessing(bool val)
{
this->EnableTouchProcessing = val;
this->EnableTouchEventProcessing = val;
}
void QVTKInteractorAdapter::SetDevicePixelRatio(float ratio, vtkRenderWindowInteractor* iren)
......@@ -201,7 +200,7 @@ bool QVTKInteractorAdapter::ProcessEvent(QEvent* e, vtkRenderWindowInteractor* i
if (t == QEvent::TouchBegin || t == QEvent::TouchUpdate || t == QEvent::TouchEnd)
{
if (!this->EnableTouchProcessing)
if (!this->EnableTouchEventProcessing)
{
return false;
}
......
......@@ -42,7 +42,7 @@ public:
// Description:
// Enable/disable the touch event processing
void SetEnableTouchEventProcessing(bool val);
bool GetEnableTouchEventProcessing() const { return this->EnableTouchProcessing; }
bool GetEnableTouchEventProcessing() const { return this->EnableTouchEventProcessing; }
// Description:
// Set the device pixel ratio, this defaults to 1.0, but in Qt 5 can be != 1.0.
......@@ -56,7 +56,7 @@ public:
protected:
int AccumulatedDelta;
bool EnableTouchProcessing;
bool EnableTouchEventProcessing = true;
float DevicePixelRatio;
static const double DevicePixelRatioTolerance;
};
......
......@@ -148,7 +148,7 @@ public:
* will process Qt::TouchBegin/TouchUpdate/TouchEnd event, otherwise, these events
* will be ignored. For some vtk widgets like vtkDistanceWidget, if this option is
* enabled, it will received leftButtonPressed/leftButtonRelease twice for one touch,
* this breaks its designed logics.
* this breaks its designed logics. Default is true.
*/
void setEnableTouchEventProcessing(bool enable);
bool enableTouchEventProcesing() const { return this->EnableTouchEventProcessing; }
......
......@@ -99,7 +99,7 @@ public:
* will process Qt::TouchBegin/TouchUpdate/TouchEnd event, otherwise, these events
* will be ignored. For some vtk widgets like vtkDistanceWidget, if this option is
* enabled, it will received leftButtonPressed/leftButtonRelease twice for one touch,
* this breaks its designed logics.
* this breaks its designed logics. Default is true.
*/
void setEnableTouchEventProcessing(bool enable);
bool enableTouchEventProcessing() const { return this->EnableTouchEventProcessing; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment