4-08-2011 Short Description: Qt4 Port: Plot "Save As" Dialog Bug Number: n/a Release notes (y/n): Yes, maybe (6.1). For Release Nums: 6.1 See Images: http://cadswes2.colorado.edu/~philw/2011/Qt4Port/April/PlotSaveAsDlg/ Enhancement: An additional list item "(new plot)" now appears as the last item. It is initially selected when saving an un-saved Plot Page. Clicking on it clears the Plot Page Name entry field, and gives keyboard input focus to that widget. (An exception is, if the client provides an "initial name" which doesn't exist in the list, clicking on "(new plot)" sets the Plot Page Name entry field to that initial name. This enhancement was motivated by the fact that it was very easy to arbitrarily overwrite the first saved Plot Page by just clicking on the "Save" button without modifying the Plot Page Name text. Also: Fix to leak of this dialog. Instances were not being deleted. -------------------------- Q3GUI/PlotSaveAsDlg.hpp Q3GUI/PlotSaveAsDlg.cpp Q3GUI/PlotSaveAsWidgets.ui -------------------------- Qt4 Port: Q3ListBox --> QTreeWidget : _plotPageList New Qt4 QTreeWidget-related methods: void plotPageList_currentItemChanged (QTreeWidgetItem* cur); void plotPageList_itemClicked (QTreeWidgetItem*, int col); void plotPageList_itemDoubleClicked (QTreeWidgetItem*, int col); Cleanup of the distinction between initialization and list rebuilding methods: void initWidgets(); void rebuildPlotPageList(); More deliberate handling of an initial (default) name optionally provided by the client: New field and methods: QString _clientInitialName; QString plotNameForNewItem() const; // may be blank -------------------- Q3GUI/PlotDialog.cpp -------------------- When creating a new PlotSaveAsDlg, connect that dialog's "destroyed" signal to PlotDialog::childDialogDestroyed (QObject*), which now clears the _saveAsDlg pointer field when the notification matches that pointer. ---