Saving of Locallab tool parameters in .pp3 file
- Control spot panel parameters are now saved in .pp3 file - Control spot curved are now visible when Locallab tool panel is active, not visible otherwise Limitations: - Other Locallab tool parameters aren't saved in .pp3 file yet - Locallab tools are temporary deactivated (time to end procparam update)
This commit is contained in:
@@ -16,17 +16,82 @@
|
||||
class ControlSpotPanel:
|
||||
public ToolParamBlock,
|
||||
public AdjusterListener,
|
||||
public EditSubscriber
|
||||
public EditSubscriber,
|
||||
public FoldableToolPanel
|
||||
{
|
||||
public:
|
||||
/** A SpotRow structure allows exchanges from and to ControlSpotClass */
|
||||
struct SpotRow {
|
||||
int id; // Control spot id
|
||||
Glib::ustring name;
|
||||
bool isvisible;
|
||||
int shape; // 0 = Ellipse, 1 = Rectangle
|
||||
int spotMethod; // 0 = Normal, 1 = Excluding
|
||||
int shapeMethod; // 0 = Independent (mouse), 1 = Symmetrical (mouse), 2 = Independent (mouse + sliders), 3 = Symmetrical (mouse + sliders)
|
||||
int locX;
|
||||
int locXL;
|
||||
int locY;
|
||||
int locYT;
|
||||
int centerX;
|
||||
int centerY;
|
||||
int circrad;
|
||||
int qualityMethod; // 0 = Standard, 1 = Enhanced, 2 = Enhanced + chroma denoise
|
||||
int transit;
|
||||
int thresh;
|
||||
int iter;
|
||||
};
|
||||
|
||||
/** A SpotEdited structure allows exchanges of spot panel widgets edited states from and to ControlSpotClass */
|
||||
struct SpotEdited {
|
||||
bool addbutton;
|
||||
bool deletebutton;
|
||||
bool treeview;
|
||||
bool name;
|
||||
bool isvisible;
|
||||
bool shape;
|
||||
bool spotMethod;
|
||||
bool shapeMethod;
|
||||
bool locX;
|
||||
bool locXL;
|
||||
bool locY;
|
||||
bool locYT;
|
||||
bool centerX;
|
||||
bool centerY;
|
||||
bool circrad;
|
||||
bool qualityMethod;
|
||||
bool transit;
|
||||
bool thresh;
|
||||
bool iter;
|
||||
};
|
||||
|
||||
// Constructor and management functions
|
||||
ControlSpotPanel();
|
||||
void setEditProvider(EditDataProvider* provider);
|
||||
int getEventType();
|
||||
SpotRow* getSpot(int id);
|
||||
std::vector<int>* getSpotIdList();
|
||||
int getSelectedSpot();
|
||||
void setSelectedSpot(int id);
|
||||
|
||||
// Control spot creation functions
|
||||
int getNewId();
|
||||
void addControlSpot(SpotRow* newSpot);
|
||||
|
||||
// Control spot update function
|
||||
int updateControlSpot(SpotRow* spot);
|
||||
|
||||
// Control spot delete function
|
||||
void deleteControlSpot(int id);
|
||||
|
||||
// Panel widgets edited states management functions
|
||||
SpotEdited* getEditedStates();
|
||||
void setEditedStates(SpotEdited* se);
|
||||
|
||||
private:
|
||||
// cell renderer
|
||||
void render_id (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_name (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_isvisible (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_id(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_name(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_isvisible(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
|
||||
void on_button_add();
|
||||
void on_button_delete();
|
||||
@@ -40,7 +105,9 @@ private:
|
||||
void controlspotChanged();
|
||||
|
||||
void shapeChanged();
|
||||
void shapeMethodeChanged();
|
||||
void spotMethodChanged();
|
||||
void shapeMethodChanged();
|
||||
void qualityMethodChanged();
|
||||
void updateParamVisibility();
|
||||
void adjusterChanged(Adjuster* a, double newval);
|
||||
void disableParamlistener(bool cond);
|
||||
@@ -85,7 +152,7 @@ private:
|
||||
public Gtk::Dialog
|
||||
{
|
||||
public:
|
||||
RenameDialog (const Glib::ustring &actualname, Gtk::Window &parent);
|
||||
RenameDialog(const Glib::ustring &actualname, Gtk::Window &parent);
|
||||
Glib::ustring get_new_name();
|
||||
|
||||
private:
|
||||
@@ -97,12 +164,16 @@ private:
|
||||
// Child widgets
|
||||
Gtk::ScrolledWindow scrolledwindow_;
|
||||
Gtk::TreeView treeview_;
|
||||
sigc::connection treeviewconn_;
|
||||
Glib::RefPtr<Gtk::ListStore> treemodel_;
|
||||
|
||||
Gtk::ButtonBox buttonbox_;
|
||||
Gtk::Button button_add_;
|
||||
sigc::connection buttonaddconn_;
|
||||
Gtk::Button button_delete_;
|
||||
sigc::connection buttondeleteconn_;
|
||||
Gtk::Button button_rename_;
|
||||
sigc::connection buttonrenameconn_;
|
||||
|
||||
MyComboBoxText* const shape_;
|
||||
sigc::connection shapeconn_;
|
||||
@@ -126,6 +197,8 @@ private:
|
||||
|
||||
int lastObject_;
|
||||
rtengine::Coord* lastCoord_;
|
||||
|
||||
int eventType; // 0 = No event, 1 = Spot creation event, 2 = Spot deletion event, 3 = Spot selection event
|
||||
};
|
||||
|
||||
#endif // _CONTROLSPOTPANEL_H_
|
||||
|
Reference in New Issue
Block a user