On Sun, Apr 01, 2007 at 09:50:34AM +0200, Abdelrazak Younes wrote:
> Uwe Stöhr wrote:
> >Attached is my patch to fix bug 3215 and bug 3390. After testing out the 
> >different possible solutions my patch uses a simple solution: When 
> >keepaspectratio is checken, the width and height have the same value and 
> >unit because of LaTeX's method that the smallest value is the boarder 
> >wheile the acpect ratio of the image is left when scaling. I added some 
> >comments to the code and describe it with an example in the manual to 
> >make this clear.
> >
> >My patch fixes also a small problem that there was no scale factor when 
> >turning off the aspectratio option in the graphics dialog.
> >
> >I tested this roughly and hope I did it right. Please test.
> 
> At least the code looks right. Congrats Uwe!
> 
> 
> > } // namespace frontend
> >Index: src/frontends/qt4/QGraphicsDialog.h
> >===================================================================
> >--- src/frontends/qt4/QGraphicsDialog.h      (revision 17667)
> >+++ src/frontends/qt4/QGraphicsDialog.h      (working copy)
> >@@ -37,6 +37,9 @@
> >     virtual void on_getPB_clicked();
> >     virtual void on_editPB_clicked();
> >     virtual void on_filename_textChanged(const QString &);
> >+    virtual void on_Height_textChanged(const QString &);
> >+    virtual void on_Width_textChanged(const QString &);
> > +   virtual void on_aspectratio_toggled();
> 
> While you are at it, could you also change the control names:
> Height -> heightLE
> widht -> widthLE
> aspectratio -> aspectratioCB

Maybe we should device a general naming scheme.

As Designer automatically created names look like 'pushButton',
'pushButton_2' etc. it is usually the least hassle to keep that
as prefix.

So this would be

        virtual void on_pushButtonGet_clicked();
        virtual void on_pushButtonEdit_clicked();
        virtual void on_lineEditFileName_textChanged(const QString &);
        virtual void on_lineEditHeight_textChanged(const QString &);
        virtual void on_lineEditWidth_textChanged(const QString &);
        virtual void on_checkBoxAspectRatio_toggled();

It's a bit verbose (more verbose than I usually find necessary) but it
works rather well.

Andre'

Reply via email to