Fix wrong const
s in editcallbacks.h
(#5239)
This commit is contained in:
@@ -449,7 +449,7 @@ void CurveEditor::switchOffEditMode ()
|
||||
EditSubscriber::switchOffEditMode(); // disconnect
|
||||
}
|
||||
|
||||
const bool CurveEditor::mouseOver(const int modifierKey)
|
||||
bool CurveEditor::mouseOver(int modifierKey)
|
||||
{
|
||||
EditDataProvider* provider = getEditProvider();
|
||||
subGroup->pipetteMouseOver(provider, modifierKey);
|
||||
@@ -457,7 +457,7 @@ const bool CurveEditor::mouseOver(const int modifierKey)
|
||||
return true; // return true will ask the preview to be redrawn, for the cursor
|
||||
}
|
||||
|
||||
bool CurveEditor::button1Pressed(const int modifierKey)
|
||||
bool CurveEditor::button1Pressed(int modifierKey)
|
||||
{
|
||||
EditDataProvider* provider = getEditProvider();
|
||||
|
||||
@@ -482,7 +482,7 @@ bool CurveEditor::button1Released()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CurveEditor::drag1(const int modifierKey)
|
||||
bool CurveEditor::drag1(int modifierKey)
|
||||
{
|
||||
EditDataProvider* provider = getEditProvider();
|
||||
subGroup->pipetteDrag(provider, modifierKey);
|
||||
@@ -490,7 +490,7 @@ bool CurveEditor::drag1(const int modifierKey)
|
||||
return false;
|
||||
}
|
||||
|
||||
const CursorShape CurveEditor::getCursor(const int objectID) const
|
||||
CursorShape CurveEditor::getCursor(int objectID) const
|
||||
{
|
||||
if (remoteDrag) {
|
||||
return CSResizeHeight;
|
||||
|
@@ -128,11 +128,11 @@ public:
|
||||
sigc::signal<void> signal_curvepoint_release();
|
||||
|
||||
void switchOffEditMode () override;
|
||||
const bool mouseOver(const int modifierKey) override;
|
||||
bool button1Pressed(const int modifierKey) override;
|
||||
bool mouseOver(int modifierKey) override;
|
||||
bool button1Pressed(int modifierKey) override;
|
||||
bool button1Released() override;
|
||||
bool drag1(const int modifierKey) override;
|
||||
const CursorShape getCursor(const int objectID) const override;
|
||||
bool drag1(int modifierKey) override;
|
||||
CursorShape getCursor(int objectID) const override;
|
||||
|
||||
|
||||
};
|
||||
|
@@ -38,7 +38,7 @@ void EditSubscriber::setEditID(EditUniqueID ID, BufferType buffType)
|
||||
bufferType = buffType;
|
||||
}
|
||||
|
||||
const bool EditSubscriber::isCurrentSubscriber() const
|
||||
bool EditSubscriber::isCurrentSubscriber() const
|
||||
{
|
||||
//if (provider && provider->getCurrSubscriber())
|
||||
// return provider->getCurrSubscriber()->getEditID() == ID;
|
||||
@@ -69,27 +69,27 @@ void EditSubscriber::switchOffEditMode()
|
||||
unsubscribe();
|
||||
}
|
||||
|
||||
const EditUniqueID EditSubscriber::getEditID() const
|
||||
EditUniqueID EditSubscriber::getEditID() const
|
||||
{
|
||||
return ID;
|
||||
}
|
||||
|
||||
const EditType EditSubscriber::getEditingType() const
|
||||
EditType EditSubscriber::getEditingType() const
|
||||
{
|
||||
return editingType;
|
||||
}
|
||||
|
||||
const BufferType EditSubscriber::getPipetteBufferType() const
|
||||
BufferType EditSubscriber::getPipetteBufferType() const
|
||||
{
|
||||
return bufferType;
|
||||
}
|
||||
|
||||
const bool EditSubscriber::isDragging() const
|
||||
bool EditSubscriber::isDragging() const
|
||||
{
|
||||
return action == EditSubscriber::Action::DRAGGING;
|
||||
}
|
||||
|
||||
const bool EditSubscriber::isPicking() const
|
||||
bool EditSubscriber::isPicking() const
|
||||
{
|
||||
return action == EditSubscriber::Action::PICKING;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void EditDataProvider::switchOffEditMode()
|
||||
}
|
||||
}
|
||||
|
||||
int EditDataProvider::getObject()
|
||||
int EditDataProvider::getObject() const
|
||||
{
|
||||
return object;
|
||||
}
|
||||
@@ -142,17 +142,17 @@ void EditDataProvider::setObject(int newObject)
|
||||
object = newObject;
|
||||
}
|
||||
|
||||
float EditDataProvider::getPipetteVal1()
|
||||
float EditDataProvider::getPipetteVal1() const
|
||||
{
|
||||
return pipetteVal1;
|
||||
}
|
||||
|
||||
float EditDataProvider::getPipetteVal2()
|
||||
float EditDataProvider::getPipetteVal2() const
|
||||
{
|
||||
return pipetteVal2;
|
||||
}
|
||||
|
||||
float EditDataProvider::getPipetteVal3()
|
||||
float EditDataProvider::getPipetteVal3() const
|
||||
{
|
||||
return pipetteVal3;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ void EditDataProvider::setPipetteVal3(float newVal)
|
||||
pipetteVal3 = newVal;
|
||||
}
|
||||
|
||||
const CursorShape EditDataProvider::getCursor(int objectID) const
|
||||
CursorShape EditDataProvider::getCursor(int objectID) const
|
||||
{
|
||||
if (currSubscriber) {
|
||||
currSubscriber->getCursor(objectID);
|
||||
@@ -186,74 +186,92 @@ EditSubscriber* EditDataProvider::getCurrSubscriber() const
|
||||
return currSubscriber;
|
||||
}
|
||||
|
||||
EditDataProvider* EditSubscriber::getEditProvider () {
|
||||
EditDataProvider* EditSubscriber::getEditProvider()
|
||||
{
|
||||
return provider;
|
||||
}
|
||||
|
||||
const CursorShape EditSubscriber::getCursor (int objectID) const {
|
||||
CursorShape EditSubscriber::getCursor(int objectID) const
|
||||
{
|
||||
return CSHandOpen;
|
||||
}
|
||||
|
||||
const bool EditSubscriber::mouseOver (const int modifierKey) {
|
||||
bool EditSubscriber::mouseOver(int modifierKey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::button1Pressed (const int modifierKey) {
|
||||
bool EditSubscriber::button1Pressed(int modifierKey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::button1Released () {
|
||||
bool EditSubscriber::button1Released()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::button2Pressed (const int modifierKey) {
|
||||
bool EditSubscriber::button2Pressed(int modifierKey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::button2Released () {
|
||||
bool EditSubscriber::button2Released()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::button3Pressed (const int modifierKey) {
|
||||
bool EditSubscriber::button3Pressed(int modifierKey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::button3Released () {
|
||||
bool EditSubscriber::button3Released()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::drag1 (const int modifierKey) {
|
||||
bool EditSubscriber::drag1(int modifierKey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::drag2 (const int modifierKey) {
|
||||
bool EditSubscriber::drag2(int modifierKey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::drag3 (const int modifierKey) {
|
||||
bool EditSubscriber::drag3(int modifierKey)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::pick1 (const bool picked) {
|
||||
bool EditSubscriber::pick1(bool picked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::pick2 (const bool picked) {
|
||||
bool EditSubscriber::pick2(bool picked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditSubscriber::pick3 (const bool picked) {
|
||||
bool EditSubscriber::pick3(bool picked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::vector<Geometry*>& EditSubscriber::getVisibleGeometry () {
|
||||
const std::vector<Geometry*>& EditSubscriber::getVisibleGeometry()
|
||||
{
|
||||
return visibleGeometry;
|
||||
}
|
||||
|
||||
const std::vector<Geometry*>& EditSubscriber::getMouseOverGeometry () {
|
||||
const std::vector<Geometry*>& EditSubscriber::getMouseOverGeometry()
|
||||
{
|
||||
return mouseOverGeometry;
|
||||
}
|
||||
|
||||
const int EditDataProvider::getPipetteRectSize () const {
|
||||
int EditDataProvider::getPipetteRectSize() const
|
||||
{
|
||||
return 8; // TODO: make a GUI
|
||||
}
|
||||
|
@@ -59,31 +59,31 @@ public:
|
||||
void setEditProvider(EditDataProvider *provider);
|
||||
EditDataProvider* getEditProvider ();
|
||||
void setEditID(EditUniqueID ID, BufferType buffType);
|
||||
const bool isCurrentSubscriber() const;
|
||||
bool isCurrentSubscriber() const;
|
||||
virtual void subscribe();
|
||||
virtual void unsubscribe();
|
||||
virtual void switchOffEditMode(); /// Occurs when the user want to stop the editing mode
|
||||
const EditUniqueID getEditID() const;
|
||||
const EditType getEditingType() const;
|
||||
const BufferType getPipetteBufferType() const;
|
||||
const bool isDragging() const; /// Returns true if something is being dragged and drag events has to be sent (object mode only)
|
||||
const bool isPicking() const; /// Returns true if something is being picked
|
||||
EditUniqueID getEditID() const;
|
||||
EditType getEditingType() const;
|
||||
BufferType getPipetteBufferType() const;
|
||||
bool isDragging() const; /// Returns true if something is being dragged and drag events has to be sent (object mode only)
|
||||
bool isPicking() const; /// Returns true if something is being picked
|
||||
|
||||
/** @brief Get the cursor to be displayed when above handles
|
||||
@param objectID object currently "hovered" */
|
||||
virtual const CursorShape getCursor (int objectID) const;
|
||||
virtual CursorShape getCursor (int objectID) const;
|
||||
|
||||
/** @brief Triggered when the mouse is moving over an object
|
||||
This method is also triggered when the cursor is moving over the image in ET_PIPETTE mode
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual const bool mouseOver (const int modifierKey);
|
||||
virtual bool mouseOver (int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 1 is pressed, together with the CTRL modifier key if the subscriber is of type ET_PIPETTE
|
||||
Once the key is pressed, RT will enter in drag1 mode on subsequent mouse movements
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool button1Pressed (const int modifierKey);
|
||||
virtual bool button1Pressed (int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 1 is released
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
Once the key is pressed, RT will enter in drag2 mode on subsequent mouse movements
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool button2Pressed (const int modifierKey);
|
||||
virtual bool button2Pressed (int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 2 is released (middle button)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
Once the key is pressed, RT will enter in drag3 mode on subsequent mouse movements
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool button3Pressed (const int modifierKey);
|
||||
virtual bool button3Pressed (int modifierKey);
|
||||
|
||||
/** @brief Triggered when mouse button 3 is released (right button)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
@@ -112,36 +112,36 @@ public:
|
||||
/** @brief Triggered when the user is moving while holding down mouse button 1
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool drag1 (const int modifierKey);
|
||||
virtual bool drag1 (int modifierKey);
|
||||
|
||||
/** @brief Triggered when the user is moving while holding down mouse button 2
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool drag2 (const int modifierKey);
|
||||
virtual bool drag2 (int modifierKey);
|
||||
|
||||
/** @brief Triggered when the user is moving while holding down mouse button 3
|
||||
@param modifierKey Gtk's event modifier key (GDK_CONTROL_MASK | GDK_SHIFT_MASK | ...)
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool drag3 (const int modifierKey);
|
||||
virtual bool drag3 (int modifierKey);
|
||||
|
||||
/** @brief Triggered when the user is releasing mouse button 1 while in action==ES_ACTION_PICKING mode
|
||||
No modifier key is provided, since having a different modifier key than on button press will set picked to false.
|
||||
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
|
||||
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool pick1 (const bool picked);
|
||||
virtual bool pick1 (bool picked);
|
||||
|
||||
/** @brief Triggered when the user is releasing mouse button 2 while in action==ES_ACTION_PICKING mode
|
||||
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
|
||||
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool pick2 (const bool picked);
|
||||
virtual bool pick2 (bool picked);
|
||||
|
||||
/** @brief Triggered when the user is releasing mouse button 3 while in action==ES_ACTION_PICKING mode
|
||||
@param picked True if the cursor is still above the the same object than on button pressed and with the same modifier keys.
|
||||
If false, the user moved the cursor away or the modifier key is different, so the element is considered as NOT selected.
|
||||
@return true if the preview has to be redrawn, false otherwise */
|
||||
virtual bool pick3 (const bool picked);
|
||||
virtual bool pick3 (bool picked);
|
||||
|
||||
/** @brief Get the geometry to be shown to the user */
|
||||
const std::vector<Geometry*>& getVisibleGeometry ();
|
||||
@@ -180,16 +180,16 @@ public:
|
||||
virtual void subscribe(EditSubscriber *subscriber);
|
||||
virtual void unsubscribe(); /// Occurs when the subscriber has been switched off first
|
||||
virtual void switchOffEditMode (); /// Occurs when the user want to stop the editing mode
|
||||
int getObject();
|
||||
int getObject() const;
|
||||
void setObject(int newObject);
|
||||
float getPipetteVal1();
|
||||
float getPipetteVal2();
|
||||
float getPipetteVal3();
|
||||
float getPipetteVal1() const;
|
||||
float getPipetteVal2() const;
|
||||
float getPipetteVal3() const;
|
||||
void setPipetteVal1(float newVal);
|
||||
void setPipetteVal2(float newVal);
|
||||
void setPipetteVal3(float newVal);
|
||||
virtual const CursorShape getCursor(int objectID) const;
|
||||
const int getPipetteRectSize () const;
|
||||
virtual CursorShape getCursor(int objectID) const;
|
||||
int getPipetteRectSize () const;
|
||||
EditSubscriber* getCurrSubscriber() const;
|
||||
virtual void getImageSize (int &w, int&h) = 0;
|
||||
};
|
||||
|
@@ -331,7 +331,7 @@ void Gradient::editToggled ()
|
||||
}
|
||||
}
|
||||
|
||||
const CursorShape Gradient::getCursor(const int objectID) const
|
||||
CursorShape Gradient::getCursor(int objectID) const
|
||||
{
|
||||
switch (objectID) {
|
||||
case (0):
|
||||
@@ -357,7 +357,7 @@ const CursorShape Gradient::getCursor(const int objectID) const
|
||||
}
|
||||
}
|
||||
|
||||
const bool Gradient::mouseOver(const int modifierKey)
|
||||
bool Gradient::mouseOver(int modifierKey)
|
||||
{
|
||||
EditDataProvider* editProvider = getEditProvider();
|
||||
|
||||
@@ -387,7 +387,7 @@ const bool Gradient::mouseOver(const int modifierKey)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Gradient::button1Pressed(const int modifierKey)
|
||||
bool Gradient::button1Pressed(int modifierKey)
|
||||
{
|
||||
if (lastObject < 0) {
|
||||
return false;
|
||||
@@ -466,7 +466,7 @@ bool Gradient::button1Released()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Gradient::drag1(const int modifierKey)
|
||||
bool Gradient::drag1(int modifierKey)
|
||||
{
|
||||
// compute the polar coordinate of the mouse position
|
||||
EditDataProvider *provider = getEditProvider();
|
||||
|
@@ -52,11 +52,11 @@ public:
|
||||
void setEditProvider (EditDataProvider* provider) override;
|
||||
|
||||
// EditSubscriber interface
|
||||
const CursorShape getCursor(const int objectID) const override;
|
||||
const bool mouseOver(const int modifierKey) override;
|
||||
bool button1Pressed(const int modifierKey) override;
|
||||
CursorShape getCursor(int objectID) const override;
|
||||
bool mouseOver(int modifierKey) override;
|
||||
bool button1Pressed(int modifierKey) override;
|
||||
bool button1Released() override;
|
||||
bool drag1(const int modifierKey) override;
|
||||
bool drag1(int modifierKey) override;
|
||||
void switchOffEditMode () override;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user