ControlSpotPanel code cleanup
Bugfixes: - Removes some memory link with edit widgets management
This commit is contained in:
@@ -97,11 +97,26 @@ public:
|
||||
bool avoid;
|
||||
};
|
||||
|
||||
/**
|
||||
* An event type enumeration allows exchanges of spot panel event type from and to ControlSpotClass
|
||||
*/
|
||||
enum eventType {
|
||||
None = 0,
|
||||
SpotCreation = 1,
|
||||
SpotDeletion = 2,
|
||||
SpotSelection = 3,
|
||||
SpotDuplication = 4
|
||||
};
|
||||
|
||||
// Constructor and management functions
|
||||
/**
|
||||
* Default constructor of ControlSpotPanel class
|
||||
*/
|
||||
ControlSpotPanel();
|
||||
/**
|
||||
* Destructor of ControlSpotPanel class
|
||||
*/
|
||||
~ControlSpotPanel();
|
||||
/**
|
||||
* Implementation of setEditProvider function of toolpanel.h
|
||||
*
|
||||
@@ -111,7 +126,7 @@ public:
|
||||
/**
|
||||
* Getter of the event type raised by this panel
|
||||
*
|
||||
* @return The raised event type (0 = No event, 1 = Spot creation event, 2 = Spot deletion event, 3 = Spot selection event)
|
||||
* @return The raised event type (refer to eventType enumeration)
|
||||
*/
|
||||
int getEventType();
|
||||
/**
|
||||
@@ -120,7 +135,7 @@ public:
|
||||
* @param id The spot id to get params
|
||||
* @return A SpotRow structure containing params of associated spot
|
||||
*/
|
||||
SpotRow* getSpot(int id);
|
||||
SpotRow* getSpot(const int id);
|
||||
/**
|
||||
* Get of spot id list
|
||||
*
|
||||
@@ -138,7 +153,7 @@ public:
|
||||
*
|
||||
* @param id The id of spot to be selected
|
||||
*/
|
||||
void setSelectedSpot(int id);
|
||||
void setSelectedSpot(const int id);
|
||||
|
||||
// Control spot creation functions
|
||||
/**
|
||||
@@ -168,7 +183,7 @@ public:
|
||||
*
|
||||
* @param id The id of the spot to be deleted
|
||||
*/
|
||||
void deleteControlSpot(int id);
|
||||
void deleteControlSpot(const int id);
|
||||
|
||||
// Panel widgets management functions
|
||||
/**
|
||||
@@ -247,10 +262,10 @@ private:
|
||||
|
||||
void disableParamlistener(bool cond);
|
||||
|
||||
void addControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
void updateControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
void deleteControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
void updateCurveOpacity(Gtk::TreeModel::Row selectedRow);
|
||||
void addControlSpotCurve(Gtk::TreeModel::Row& row);
|
||||
void updateControlSpotCurve(const Gtk::TreeModel::Row& row);
|
||||
void deleteControlSpotCurve(Gtk::TreeModel::Row& row);
|
||||
void updateCurveOpacity(const Gtk::TreeModel::Row& selectedRow);
|
||||
CursorShape getCursor(int objectID) const;
|
||||
bool mouseOver(int modifierKey);
|
||||
bool button1Pressed(int modifierKey);
|
||||
@@ -358,7 +373,7 @@ private:
|
||||
|
||||
// Internal variables
|
||||
int lastObject_;
|
||||
rtengine::Coord* lastCoord_;
|
||||
rtengine::Coord lastCoord_;
|
||||
bool nbSpotChanged_;
|
||||
bool selSpotChanged_;
|
||||
bool nameChanged_;
|
||||
@@ -366,6 +381,9 @@ private:
|
||||
int eventType; // 0 = No event, 1 = Spot creation event, 2 = Spot deletion event, 3 = Spot selection event, 4 = Spot duplication event
|
||||
Gtk::Frame* const excluFrame;
|
||||
|
||||
// Row background color
|
||||
Gdk::RGBA colorMouseover, colorNominal;
|
||||
|
||||
// Treeview mutex
|
||||
MyMutex mTreeview;
|
||||
};
|
||||
|
Reference in New Issue
Block a user