Implementing issue #190 (a new "Fit box" option in the resize tool), and correction of issue #28, #92, #149, #237 and #345, but i had to disable the resize preview for that.

This commit is contained in:
Hombre
2010-12-12 22:24:53 +01:00
parent e394b29d6d
commit 5027c8c00b
24 changed files with 934 additions and 727 deletions

View File

@@ -29,12 +29,14 @@ class Resize : public Gtk::VBox, public AdjusterListener, public ToolPanel, publ
Gtk::CheckButton* enabled;
Adjuster* scale;
Gtk::VBox* sizeBox;
Gtk::ComboBoxText* appliesTo;
Gtk::ComboBoxText* method;
Gtk::ComboBoxText* spec;
Gtk::SpinButton* w;
Gtk::SpinButton* h;
int maxw, maxh;
sigc::connection wconn, hconn, enaConn;
int cropw, croph;
sigc::connection sconn, aconn, wconn, hconn, enaConn;
bool wDirty, hDirty, lastEnabled;
public:
@@ -47,14 +49,24 @@ class Resize : public Gtk::VBox, public AdjusterListener, public ToolPanel, publ
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
void setBatchMode (bool batchMode);
void adjusterChanged (Adjuster* a, double newval);
void entryWChanged ();
void entryHChanged ();
void methodChanged ();
void specChanged ();
void sizeChanged (int w, int h, int ow, int oh);
void setDimensions (int w, int h, int ow, int oh);
void enabledToggled ();
void adjusterChanged (Adjuster* a, double newval);
void entryWChanged ();
void entryHChanged ();
void appliesToChanged ();
void methodChanged ();
void specChanged ();
void update (bool isCropped, int cw, int ch, int ow=0, int oh=0);
void setGUIFromCrop (bool isCropped, int cw, int ch);
void sizeChanged (int w, int h, int ow, int oh);
void setDimensions ();
void enabledToggled ();
private:
void fitBoxScale ();
int getComputedWidth ();
int getComputedHeight ();
void notifyBBox ();
void updateGUI ();
};
#endif