Attached is a patch that PARTIALLY addresses this issue. I say
"partially" because the work is not complete. In particular, I HAVE NOT
CHECKED to make sure that the dialog actually works: That is, that if
you say "Scale 50%" you get the right LaTeX output. The changes made to
QGraphics::apply() are sufficiently minor that I've no reason to believe
it doesn't work, but I have not yet had time to test that. I've been
focused, rather, on getting this dialog to work more intuitively. I'm
releasing this to the list, then, to ask for comment on how I'm doing.

There are notes in the code both about further improvements that I think
are still worth making---using the "Maintain aspect ratio" button as a
way of giving a bit more visual feedback to the user---and also about
ways the code still needs to be cleaned up. The dialog box itself also
needs a little tweaking. It's too narrow right now and so is generating
some run-time warnings about negative sizes.

All comments and advice welcome.

Richard


-- 
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Index: checkedwidgets.C
===================================================================
--- checkedwidgets.C	(revision 17651)
+++ checkedwidgets.C	(working copy)
@@ -13,6 +13,7 @@
 #include "checkedwidgets.h"
 
 #include <QLabel>
+#include <QWidget>
 #include <QLineEdit>
 #include <QValidator>
 
@@ -20,7 +21,7 @@
 namespace frontend {
 
 void addCheckedLineEdit(BCView & bcview,
-			QLineEdit * input, QLabel * label)
+			QLineEdit * input, QWidget * label)
 {
 	bcview.addCheckedWidget(new CheckedLineEdit(input, label));
 }
@@ -41,7 +42,7 @@
 }
 
 
-void setWidget(bool valid, QLineEdit * input, QLabel * label)
+void setWidget(bool valid, QLineEdit * input, QWidget * label)
 {
 	if (valid)
 		input->setPalette(QPalette());
@@ -60,7 +61,7 @@
 } // namespace anon
 
 
-CheckedLineEdit::CheckedLineEdit(QLineEdit * input, QLabel * label)
+CheckedLineEdit::CheckedLineEdit(QLineEdit * input, QWidget * label)
 	: input_(input), label_(label)
 {}
 
Index: QGraphics.C
===================================================================
--- QGraphics.C	(revision 17651)
+++ QGraphics.C	(working copy)
@@ -6,6 +6,7 @@
  * \author John Levon
  * \author Edwin Leuven
  * \author Herbert Voß
+ * \author Richard Heck
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -91,8 +92,8 @@
 	bcview().addReadOnly(dialog_->getPB);
 
 	// initialize the length validator
-	addCheckedLineEdit(bcview(), dialog_->Width, dialog_->widthL);
-	addCheckedLineEdit(bcview(), dialog_->Height, dialog_->heightL);
+	addCheckedLineEdit(bcview(), dialog_->Width, dialog_->WidthCB);
+	addCheckedLineEdit(bcview(), dialog_->Height, dialog_->HeightCB);
 	addCheckedLineEdit(bcview(), dialog_->displayscale, dialog_->scaleLA);
 	addCheckedLineEdit(bcview(), dialog_->angle, dialog_->angleL);
 	addCheckedLineEdit(bcview(), dialog_->lbX, dialog_->xL);
@@ -227,19 +228,50 @@
 
 	// the output section (width/height)
 	dialog_->Scale->setText(toqstr(igp.scale));
-
+	if (igp.scale.empty()) {
+		dialog_->scaleCB->setChecked(false);
+		dialog_->Scale->setText("auto");
+		dialog_->Scale->setEnabled(false);
+	} 
+	//FIXME It's worth a discussion whether we want to do this test.
+	//It's effect is to disable the "Scale graphic" button when
+	//the value is "100", which is just the default, rather than
+	//always to show that as enabled if nothing else is.
+	else if (igp.scale == "100") {
+		dialog_->scaleCB->setChecked(false);
+		dialog_->Scale->setText("auto");
+		dialog_->Scale->setEnabled(false);
+	} else {
+		dialog_->scaleCB->setChecked(true);
+		dialog_->Scale->setEnabled(true);
+	}
+	
+	//FIXME this should be made a new function LengthAutoToWidgets
+	//which will go in qt_helpers.C
 	lengthToWidgets(dialog_->Width, dialog_->widthUnit,
-		igp.width.asString(), unitDefault);
-
+									igp.width.value() == 0 ? "auto" : igp.width.asString(), 
+									unitDefault);
+	if (dialog_->Width->text().isEmpty()|| dialog_->Width->text() == "auto") 
+		dialog_->WidthCB->setCheckState(Qt::Unchecked);
+	else dialog_->WidthCB->setCheckState(Qt::Checked);
+	bool widthChecked = (dialog_->WidthCB->checkState() == Qt::Checked);
+	dialog_->Width->setEnabled(widthChecked);
+	dialog_->widthUnit->setEnabled(widthChecked);
+	
+	//FIXME use the new function here, too
 	lengthToWidgets(dialog_->Height, dialog_->heightUnit,
-		igp.height.asString(), unitDefault);
+									igp.height.value() == 0 ? "auto" : igp.height.asString(), unitDefault);
+	if (dialog_->Height->text().isEmpty() || dialog_->Height->text() == "auto") 
+		dialog_->HeightCB->setCheckState(Qt::Unchecked);
+	else
+		dialog_->HeightCB->setCheckState(Qt::Checked);
+	bool heightChecked = (dialog_->HeightCB->checkState() == Qt::Checked);
+	dialog_->Height->setEnabled(heightChecked);
+	dialog_->heightUnit->setEnabled(heightChecked);
+	
+	//FIXME See the note on this in QGraphicsDialog.C
+	dialog_->aspectratio->setEnabled(widthChecked && heightChecked);
 
-	dialog_->aspectratio->setChecked(igp.keepAspectRatio);
-
-	dialog_->scaleCB->setChecked(!igp.scale.empty() || igp.width.empty());
-
-	dialog_->Scale->setEnabled(!igp.scale.empty() || igp.width.empty());
-
 	dialog_->angle->setText(toqstr(igp.rotateAngle));
 
 	dialog_->origin->clear();
@@ -320,20 +352,31 @@
 
 	if (!dialog_->displayGB->isChecked())
 		igp.display = graphics::NoDisplay;
-
-	if (dialog_->scaleCB->isChecked()
-		&& !dialog_->Scale->text().isEmpty()) {
-		igp.scale = fromqstr(dialog_->Scale->text());
+	
+	//the graphics section
+	if (dialog_->scaleCB->isChecked()	&& !dialog_->Scale->text().isEmpty()) {
+		if (dialog_->Scale->text().toDouble() != 0)
+			igp.scale = fromqstr(dialog_->Scale->text());
+		else igp.scale = string();
+		igp.width = LyXLength("0pt");
+		igp.height = LyXLength("0pt");
+		igp.keepAspectRatio = false;
 	} else {
 		igp.scale = string();
+		igp.width = dialog_->WidthCB->isChecked() ? 
+			//Note that this works even if dialog_->Width is "auto", since in
+			//that case we get "0pt".
+			LyXLength(widgetsToLength(dialog_->Width, dialog_->widthUnit)): 
+			LyXLength("0pt");
+		igp.height = dialog_->HeightCB->isChecked() ? 
+			LyXLength(widgetsToLength(dialog_->Height, dialog_->heightUnit)) :
+			LyXLength("0pt");
+		igp.keepAspectRatio = dialog_->aspectratio->isEnabled() &&
+			dialog_->aspectratio->isChecked() &&
+			//...only if a positive value has been given for both dimensions
+			(igp.width.value() != 0 || igp.height.value() != 0);
 	}
 
-	igp.width = LyXLength(widgetsToLength(dialog_->Width, dialog_->widthUnit));
-
-	igp.height = LyXLength(widgetsToLength(dialog_->Height, dialog_->heightUnit));
-
-	igp.keepAspectRatio = dialog_->aspectratio->isChecked();
-
 	igp.noUnzip = dialog_->unzipCB->isChecked();
 
 	igp.lyxscale = convert<int>(fromqstr(dialog_->displayscale->text()));
Index: QGraphicsDialog.C
===================================================================
--- QGraphicsDialog.C	(revision 17651)
+++ QGraphicsDialog.C	(working copy)
@@ -6,6 +6,7 @@
  * \author John Levon
  * \author Herbert Voß
  * \author Abdelrazak Younes
+ * \author Richard Heck
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -69,24 +70,28 @@
 		this, SLOT( change_adaptor() ) );
 	connect(displayscale, SIGNAL( textChanged(const QString&) ),
 		this, SLOT( change_adaptor() ) );
+	connect(WidthCB, SIGNAL(  clicked() ),
+		this, SLOT( change_adaptor() ) );
+	connect(HeightCB, SIGNAL(  clicked() ),
+					this, SLOT( change_adaptor() ) );
 	connect(Width, SIGNAL( textChanged(const QString&) ),
 		this, SLOT( change_adaptor() ) );
-	connect(aspectratio, SIGNAL( stateChanged(int) ),
-		this, SLOT( change_adaptor() ) );
-	connect(draftCB, SIGNAL( stateChanged(int) ),
-		this, SLOT( change_adaptor() ) );
-	connect(unzipCB, SIGNAL( stateChanged(int) ),
-		this, SLOT( change_adaptor() ) );
 	connect(Height, SIGNAL( textChanged(const QString&) ),
-		this, SLOT( change_adaptor() ) );
+					this, SLOT( change_adaptor() ) );
 	connect(heightUnit, SIGNAL( selectionChanged(lyx::LyXLength::UNIT) ),
-		this, SLOT( change_adaptor() ) );
+					this, SLOT( change_adaptor() ) );
 	connect(widthUnit, SIGNAL( selectionChanged(lyx::LyXLength::UNIT) ),
-		this, SLOT( change_adaptor() ) );
+					this, SLOT( change_adaptor() ) );
+	connect(aspectratio, SIGNAL( stateChanged(int) ),
+					this, SLOT( change_adaptor() ) );
 	connect(angle, SIGNAL( textChanged(const QString&) ),
-		this, SLOT( change_adaptor() ) );
+					this, SLOT( change_adaptor() ) );
 	connect(origin, SIGNAL( activated(int) ),
+					this, SLOT( change_adaptor() ) );
+	connect(draftCB, SIGNAL( stateChanged(int) ),
 		this, SLOT( change_adaptor() ) );
+	connect(unzipCB, SIGNAL( stateChanged(int) ),
+		this, SLOT( change_adaptor() ) );
 	connect(getPB, SIGNAL( clicked() ),
 		this, SLOT( change_adaptor() ) );
 	connect(scaleCB, SIGNAL( clicked() ),
@@ -111,7 +116,7 @@
 		this, SLOT( change_bb() ) );
 	connect(rtXunit, SIGNAL( activated(int) ),
 		this, SLOT( change_bb() ) );
-
+	
 	angle->setValidator(new QDoubleValidator(-360, 360, 2, angle));
 
 	lbX->setValidator(new QDoubleValidator(lbX));
@@ -120,9 +125,11 @@
 	rtY->setValidator(new QDoubleValidator(rtY));
 
 	displayscale->setValidator(new QIntValidator(displayscale));
-	Height->setValidator(unsignedLengthValidator(Height));
-	Width->setValidator(unsignedLengthValidator(Width));
-
+	//FIXME We should have a validator for Scale, too.
+	//It would have to inherit from QDoubleValidator
+	Height->setValidator(unsignedLengthAutoValidator(Height));
+	Width->setValidator(unsignedLengthAutoValidator(Width));
+	
 	filename->setValidator(new PathValidator(true, filename));
 	setFocusProxy(filename);
 }
@@ -183,19 +190,82 @@
 }
 
 
-void QGraphicsDialog::on_scaleCB_toggled(bool setscale)
+void QGraphicsDialog::setAutoText() {
+	if (scaleCB->isChecked()) return;
+	if (!Scale->isEnabled()) 
+		Scale->setText(QString("auto"));
+
+	//FIXME Make this a function, too, in qt_helpers.C
+	//lengthAutoToWidgets(QCheckBox &, QTextEdit &, LengthCombo &)
+	if (!WidthCB->isChecked()) 
+		lengthToWidgets(Width, widthUnit, "auto", widthUnit->currentLengthItem());
+	else if (Width->text() == "auto")
+		lengthToWidgets(Width, widthUnit, "", widthUnit->currentLengthItem());
+	if (!HeightCB->isChecked()) 
+		lengthToWidgets(Height, heightUnit, "auto", heightUnit->currentLengthItem());
+	else if (Height->text() == "auto")
+		lengthToWidgets(Height, heightUnit, "", heightUnit->currentLengthItem());
+}
+
+
+//FIXME What could make this even more intuitive would be to have
+//Maintain aspect ratio be checked when you have "scale" or when
+//you have only one of the two widths and heights checked, and for
+//it to become unchecked but enabled when you check both. It would
+//provide visual feedback.
+//Note that QGraphics::apply() already works with this.
+void QGraphicsDialog::on_scaleCB_toggled(bool setScale)
 {
-	Scale->setEnabled(setscale);
-	widthL->setDisabled(setscale);
-	Width->setDisabled(setscale);
-	widthUnit->setDisabled(setscale);
-	aspectratio->setDisabled(setscale);
-	bool noheight = setscale || aspectratio->checkState()==Qt::Checked;
-	heightL->setDisabled(noheight);
-	Height->setDisabled(noheight);
-	heightUnit->setDisabled(noheight);
+	Scale->setEnabled(setScale);
+	if (setScale) {
+		Scale->setText("");
+		//FIXME Find out if this works....
+		//If it does, add it to the other routines, too
+		//NOTE: We do NOT want to make Scale a "buddy". That would make
+		//it impossible to tab to scaleCB.
+		//Scale->setFocus(Qt::OtherFocusReason);
+	}
+	
+	WidthCB->setDisabled(setScale);
+	bool widthEnabled = !setScale /*=widthCB->isEnabled()*/ && WidthCB->isChecked();
+	Width->setEnabled(widthEnabled);
+	widthUnit->setEnabled(widthEnabled);
+	
+	HeightCB->setDisabled(setScale);
+	bool heightEnabled = !setScale /*=widthCB->isEnabled()*/ && HeightCB->isChecked();
+	Height->setEnabled(heightEnabled);
+	heightUnit->setEnabled(heightEnabled);
+	
+	aspectratio->setDisabled(setScale || !widthEnabled || !heightEnabled);
+	
+	setAutoText();
 }
 
+void QGraphicsDialog::on_WidthCB_toggled(bool setWidth)
+{
+	Width->setEnabled(setWidth);
+	widthUnit->setEnabled(setWidth);
+	bool setHeight = (HeightCB->checkState() == Qt::Checked);
+	aspectratio->setEnabled(setWidth && setHeight);
+	scaleCB->setEnabled(!setWidth && !setHeight);
+	Scale->setEnabled((!setWidth && !setHeight) //=scaleCB->isEnabled() 
+			&& scaleCB->checkState() == Qt::Checked); //should be false, but let's check
+	setAutoText();
+}
+
+void QGraphicsDialog::on_HeightCB_toggled(bool setHeight)
+{
+	Height->setEnabled(setHeight);
+	heightUnit->setEnabled(setHeight);
+	bool setWidth = (HeightCB->checkState() == Qt::Checked);
+	aspectratio->setEnabled(setWidth && setHeight);
+	scaleCB->setEnabled(!setWidth && !setHeight);
+	Scale->setEnabled((!setWidth && !setHeight) //=scaleCB->isEnabled() 
+			&& scaleCB->checkState() == Qt::Checked); //should be false, but let's check
+	setAutoText();
+}
+
+
 } // namespace frontend
 } // namespace lyx
 
Index: validators.C
===================================================================
--- validators.C	(revision 17651)
+++ validators.C	(working copy)
@@ -4,6 +4,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Angus Leeming
+ * \author Richard Heck
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -92,6 +93,33 @@
 }
 
 
+LengthAutoValidator::LengthAutoValidator(QWidget * parent)
+	: LengthValidator(parent)
+{}
+
+QValidator::State LengthAutoValidator::validate(QString & qtext, int & dummy) const
+{
+	string const text = fromqstr(qtext);
+	//FIXME Make lower case before test.
+	//for(std::string * iter = text.begin(); iter != text.end(); ++iter) {
+	//	*iter = std::tolower(*iter);
+	//} 
+	//Will need to introduce a new variable for this.
+	if (text == "auto")
+		return QValidator::Acceptable;
+	return LengthValidator::validate(qtext, dummy);
+}
+
+
+LengthAutoValidator * unsignedLengthAutoValidator(QLineEdit * ed)
+{
+	LengthAutoValidator * v = new LengthAutoValidator(ed);
+	v->setBottom(LyXLength());
+	return v;
+}
+
+
+
 PathValidator::PathValidator(bool acceptable_if_empty,
 			     QWidget * parent)
 	: QValidator(parent),
Index: checkedwidgets.h
===================================================================
--- checkedwidgets.h	(revision 17651)
+++ checkedwidgets.h	(working copy)
@@ -14,18 +14,21 @@
 
 #include "BCView.h"
 
-class QLabel;
+class QWidget;
 class QLineEdit;
 
 namespace lyx {
 namespace frontend {
 
+//If making it a QWidget is uncool, then we can
+//just make this a template...
+//and the class, too...
 void addCheckedLineEdit(BCView & bcview,
-			QLineEdit * input, QLabel * label = 0);
+			QLineEdit * input, QWidget * label = 0);
 
 class CheckedLineEdit : public CheckedWidget {
 public:
-	CheckedLineEdit(QLineEdit * input, QLabel * label = 0);
+	CheckedLineEdit(QLineEdit * input, QWidget * label = 0);
 
 private:
 	///
@@ -33,7 +36,7 @@
 
 	///
 	QLineEdit * input_;
-	QLabel * label_;
+	QWidget * label_;
 };
 
 } // namespace frontend
Index: QGraphics.h
===================================================================
--- QGraphics.h	(revision 17651)
+++ QGraphics.h	(working copy)
@@ -6,6 +6,7 @@
  *
  * \author John Levon
  * \author Herbert Voß
+ * \author Richard Heck
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -15,6 +16,7 @@
 
 #include "QDialogView.h"
 #include "QGraphicsDialog.h"
+#include <QTimer>
 
 #include <vector>
 
@@ -46,6 +48,8 @@
 
 	/// Store the LaTeX names for the rotation origins.
 	std::vector<std::string> origin_ltx;
+	// Used to poll for when certain widgets lose focus
+	//QTimer focus_timer_;
 
 };
 
Index: QGraphicsDialog.h
===================================================================
--- QGraphicsDialog.h	(revision 17651)
+++ QGraphicsDialog.h	(working copy)
@@ -6,7 +6,7 @@
  *
  * \author John Levon
  * \author Herbert Voß
- *
+ * \author Richard Heck
  * Full author contact details are available in file CREDITS.
  */
 
@@ -38,9 +38,12 @@
 	virtual void on_editPB_clicked();
 	virtual void on_filename_textChanged(const QString &);
 	virtual void on_scaleCB_toggled(bool);
+	virtual void on_WidthCB_toggled(bool);
+	virtual void on_HeightCB_toggled(bool);
 protected:
 	virtual void closeEvent(QCloseEvent * e);
-private:
+	virtual void setAutoText();
+	private:
 	QGraphics * form_;
 };
 
Index: validators.h
===================================================================
--- validators.h	(revision 17651)
+++ validators.h	(working copy)
@@ -5,6 +5,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Angus Leeming
+ * \author Richard Heck
  *
  * Full author contact details are available in file CREDITS.
  *
@@ -59,23 +60,43 @@
 	LyXLength bottom() const { return b_; }
 	//@}
 
+protected:
+
 private:
 #if defined(Q_DISABLE_COPY)
 	LengthValidator( const LengthValidator & );
 	LengthValidator& operator=( const LengthValidator & );
 #endif
+	bool no_bottom_;
+	bool glue_length_;
 
 	LyXLength b_;
 	LyXGlueLength g_;
-	bool no_bottom_;
-	bool glue_length_;
 };
 
 
 /// @returns a new @c LengthValidator that does not accept negative lengths.
 LengthValidator * unsignedLengthValidator(QLineEdit *);
 
+/** A class to ascertain whether the data passed to the @c validate()
+ *  member function can be interpretted as a LyXGlueLength or is "auto".
+ */
+class LengthAutoValidator : public LengthValidator
+{
+	Q_OBJECT
+	public:
+	/// Define a validator for widget @c parent.
+		LengthAutoValidator(QWidget * parent);
 
+	/** @returns QValidator::Acceptable if @c data is a LyXGlueLength
+		* or is "auto". If not, returns QValidator::Intermediate.
+	 */
+		QValidator::State validate(QString & data, int &) const;
+};
+
+/// @returns a new @c LengthValidator that does not accept negative lengths.
+LengthAutoValidator * unsignedLengthAutoValidator(QLineEdit *);
+
 // Forward declarations
 class LyXRC;
 
Index: ui/QGraphicsUi.ui
===================================================================
--- ui/QGraphicsUi.ui	(revision 17651)
+++ ui/QGraphicsUi.ui	(working copy)
@@ -141,6 +141,54 @@
     <attribute name="title" >
      <string>&amp;Graphics</string>
     </attribute>
+    <widget class="QPushButton" name="browsePB" >
+     <property name="geometry" >
+      <rect>
+       <x>277</x>
+       <y>10</y>
+       <width>75</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="toolTip" >
+      <string>Select an image file</string>
+     </property>
+     <property name="text" >
+      <string>&amp;Browse...</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="editPB" >
+     <property name="geometry" >
+      <rect>
+       <x>358</x>
+       <y>10</y>
+       <width>75</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="text" >
+      <string>&amp;Edit</string>
+     </property>
+     <property name="autoDefault" >
+      <bool>false</bool>
+     </property>
+     <property name="default" >
+      <bool>false</bool>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="filename" >
+     <property name="geometry" >
+      <rect>
+       <x>35</x>
+       <y>12</y>
+       <width>235</width>
+       <height>18</height>
+      </rect>
+     </property>
+     <property name="toolTip" >
+      <string>File name of image</string>
+     </property>
+    </widget>
     <widget class="QLabel" name="filenameL" >
      <property name="geometry" >
       <rect>
@@ -232,19 +280,6 @@
       </item>
      </layout>
     </widget>
-    <widget class="QLineEdit" name="filename" >
-     <property name="geometry" >
-      <rect>
-       <x>35</x>
-       <y>12</y>
-       <width>235</width>
-       <height>18</height>
-      </rect>
-     </property>
-     <property name="toolTip" >
-      <string>File name of image</string>
-     </property>
-    </widget>
     <widget class="QGroupBox" name="sizeGB" >
      <property name="geometry" >
       <rect>
@@ -267,30 +302,54 @@
       <property name="spacing" >
        <number>6</number>
       </property>
-      <item row="1" column="2" >
-       <widget class="LengthCombo" name="widthUnit" />
+      <item row="0" column="1" >
+       <widget class="QLineEdit" name="Scale" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>0</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
       </item>
-      <item row="2" column="2" >
-       <widget class="LengthCombo" name="heightUnit" />
-      </item>
-      <item row="1" column="1" >
-       <widget class="QLineEdit" name="Width" >
+      <item row="2" column="1" >
+       <widget class="QLineEdit" name="Height" >
         <property name="enabled" >
          <bool>true</bool>
         </property>
         <property name="sizePolicy" >
          <sizepolicy>
-          <hsizetype>1</hsizetype>
+          <hsizetype>0</hsizetype>
           <vsizetype>0</vsizetype>
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
         <property name="toolTip" >
-         <string>Width of image in output</string>
+         <string>Height of image in output</string>
         </property>
        </widget>
       </item>
+      <item row="0" column="0" >
+       <widget class="QCheckBox" name="scaleCB" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>1</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string>&amp;Scale Graphic (%):</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" >
+       <widget class="LengthCombo" name="heightUnit" />
+      </item>
       <item row="0" column="2" >
        <spacer>
         <property name="orientation" >
@@ -304,58 +363,70 @@
         </property>
        </spacer>
       </item>
-      <item row="0" column="1" >
-       <widget class="QLineEdit" name="Scale" />
-      </item>
-      <item row="2" column="1" >
-       <widget class="QLineEdit" name="Height" >
+      <item row="1" column="1" >
+       <widget class="QLineEdit" name="Width" >
         <property name="enabled" >
          <bool>true</bool>
         </property>
         <property name="sizePolicy" >
          <sizepolicy>
-          <hsizetype>1</hsizetype>
+          <hsizetype>0</hsizetype>
           <vsizetype>0</vsizetype>
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
         <property name="toolTip" >
-         <string>Height of image in output</string>
+         <string>Width of image in output</string>
         </property>
        </widget>
       </item>
+      <item row="1" column="2" >
+       <widget class="LengthCombo" name="widthUnit" />
+      </item>
       <item row="2" column="0" >
-       <widget class="QLabel" name="heightL" >
-        <property name="enabled" >
-         <bool>true</bool>
+       <widget class="QCheckBox" name="HeightCB" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>3</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
         </property>
-        <property name="text" >
-         <string>&amp;Height:</string>
+        <property name="toolTip" >
+         <string>Leave unchecked to set height automatically</string>
         </property>
-        <property name="buddy" >
-         <cstring>Height</cstring>
+        <property name="layoutDirection" >
+         <enum>Qt::LeftToRight</enum>
         </property>
-       </widget>
-      </item>
-      <item row="0" column="0" >
-       <widget class="QCheckBox" name="scaleCB" >
         <property name="text" >
-         <string>&amp;Scale Graphics (%):</string>
+         <string>Set &amp;Height</string>
         </property>
        </widget>
       </item>
       <item row="1" column="0" >
-       <widget class="QLabel" name="widthL" >
-        <property name="enabled" >
-         <bool>true</bool>
+       <widget class="QCheckBox" name="WidthCB" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>3</hsizetype>
+          <vsizetype>0</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
         </property>
+        <property name="toolTip" >
+         <string>Leave unchecked to set width automatically</string>
+        </property>
+        <property name="layoutDirection" >
+         <enum>Qt::LeftToRight</enum>
+        </property>
+        <property name="styleSheet" >
+         <string/>
+        </property>
         <property name="text" >
-         <string>&amp;Width:</string>
+         <string>Set &amp;Width</string>
         </property>
-        <property name="buddy" >
-         <cstring>Width</cstring>
-        </property>
        </widget>
       </item>
       <item row="3" column="1" colspan="2" >
@@ -364,7 +435,7 @@
          <bool>true</bool>
         </property>
         <property name="toolTip" >
-         <string>Maintain aspect ratio with largest dimension</string>
+         <string>Scales graphic to fit in a box width X height while maintaining the aspect ratio.</string>
         </property>
         <property name="text" >
          <string>&amp;Maintain aspect ratio</string>
@@ -373,41 +444,6 @@
       </item>
      </layout>
     </widget>
-    <widget class="QPushButton" name="browsePB" >
-     <property name="geometry" >
-      <rect>
-       <x>277</x>
-       <y>10</y>
-       <width>75</width>
-       <height>23</height>
-      </rect>
-     </property>
-     <property name="toolTip" >
-      <string>Select an image file</string>
-     </property>
-     <property name="text" >
-      <string>&amp;Browse...</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="editPB" >
-     <property name="geometry" >
-      <rect>
-       <x>358</x>
-       <y>10</y>
-       <width>75</width>
-       <height>23</height>
-      </rect>
-     </property>
-     <property name="text" >
-      <string>&amp;Edit</string>
-     </property>
-     <property name="autoDefault" >
-      <bool>false</bool>
-     </property>
-     <property name="default" >
-      <bool>false</bool>
-     </property>
-    </widget>
    </widget>
    <widget class="QWidget" name="Clipping" >
     <attribute name="title" >
@@ -800,8 +836,10 @@
   <tabstop>editPB</tabstop>
   <tabstop>scaleCB</tabstop>
   <tabstop>Scale</tabstop>
+  <tabstop>WidthCB</tabstop>
   <tabstop>Width</tabstop>
   <tabstop>widthUnit</tabstop>
+  <tabstop>HeightCB</tabstop>
   <tabstop>Height</tabstop>
   <tabstop>heightUnit</tabstop>
   <tabstop>aspectratio</tabstop>
@@ -838,22 +876,6 @@
   <connection>
    <sender>aspectratio</sender>
    <signal>toggled(bool)</signal>
-   <receiver>heightL</receiver>
-   <slot>setDisabled(bool)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>201</x>
-     <y>193</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>81</x>
-     <y>158</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>aspectratio</sender>
-   <signal>toggled(bool)</signal>
    <receiver>Height</receiver>
    <slot>setDisabled(bool)</slot>
    <hints>

Reply via email to