From 71b3e647f55f19fcdae72045cd8c4a9c39a1c91d Mon Sep 17 00:00:00 2001 From: Tristan Youngs Date: Sat, 1 Aug 2015 22:49:32 +0100 Subject: [PATCH] Finalised transition from SaveImage to ExportImage. Tweaked icons.qrc to remove duplicate icons. --- TODO2 | 5 ----- src/gui/CMakeLists.txt | 6 +++--- src/gui/Makefile.am | 8 ++++---- src/gui/exportimage.h | 6 +++--- src/gui/exportimage_funcs.cpp | 6 +++--- src/gui/icons.qrc | 5 ----- src/gui/mainwindow.h | 2 +- src/gui/mainwindow_panel_home.cpp | 2 +- 8 files changed, 15 insertions(+), 25 deletions(-) diff --git a/TODO2 b/TODO2 index f2931845f..42b157174 100644 --- a/TODO2 +++ b/TODO2 @@ -8,12 +8,7 @@ Implement optional startup 'guide' or 'wizard' that will disable all controls on Remove dialog pointers (use instances instead). Fix callbacks for atom picking etc. Octahedral Growing doesn't work. - -In AtenWindow::on_actionFileSaveImage_triggered convert options to proper QDialog. -o Change SaveImageDialog to check for empty image filename, and disable OK button accordingly. -Fix image saving - in particular scaling & offset when saving large image (what role will/did ViewLayout play?) Snapshot option, copying current view or image save details directly to clipboard - Clear selected measurements on panel popup clears all measurements. Recent files list - enable load on double-click, settings not loaded/saved properly? TMenuButton - after (long-) click to show popup, allow popup to be hidden with no actions if the button is clicked on again. Tricky - might have to store pointer to previous popup and check this in the pressed() function of the button. diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 695be6154..db4a4a1f3 100755 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -15,6 +15,7 @@ SET(gui_MOC_HDRS command.h disorderoptions.h disorderwizard.h + exportimage.h ffeditor.h glyphs.h layoutlist.h @@ -66,7 +67,6 @@ SET(gui_MOC_HDRS pores.h prefs.h progress.h - saveimage.h scriptmovie.h selectfilter.h selectpattern.h @@ -101,6 +101,7 @@ SET(gui_UIS command.ui disorderoptions.ui disorderwizard.ui + exportimage.ui ffeditor.ui glyphs.ui loadmodel.ui @@ -151,7 +152,6 @@ SET(gui_UIS pores.ui prefs.ui progress.ui - saveimage.ui scriptmovie.ui selectfilter.ui selectpattern.ui @@ -175,6 +175,7 @@ set(gui_SRCS command_funcs.cpp disorderoptions_funcs.cpp disorderwizard_funcs.cpp + exportimage_funcs.cpp ffeditor_funcs.cpp glyphs_funcs.cpp layoutlist.cpp @@ -245,7 +246,6 @@ set(gui_SRCS pores_funcs.cpp prefs_funcs.cpp progress_funcs.cpp - saveimage_funcs.cpp scriptmovie_funcs.cpp selectfilter_funcs.cpp selectpattern_funcs.cpp diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index ee4d4abd0..928fac254 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -23,7 +23,7 @@ clean-local: libtreegui_a_SOURCES = treegui.ui treegui_funcs.cpp -libgui_a_SOURCES = icons.qrc saveimage.ui ffeditor.ui loadmodel.ui prefs.ui progress.ui selectfilter.ui selectpattern.ui selectvariable.ui mainwindow.ui +libgui_a_SOURCES = icons.qrc exportimage.ui ffeditor.ui loadmodel.ui prefs.ui progress.ui selectfilter.ui selectpattern.ui selectvariable.ui mainwindow.ui libgui_a_SOURCES += popupbuildaddh.ui popupbuildfragments.ui popupbuildgrow.ui popupbuildrebond.ui popupbuildtransmute.ui popupcellangles.ui popupcelllengths.ui popupcellmatrix.ui popupcellmiller.ui popupcellreplicate.ui popupcellscale.ui popupcellspacegroup.ui popupcolour.ui popupelementcommon.ui popupelementtable.ui popupfileaten.ui popupfileopen.ui popupfilesave.ui popupforcefieldsassign.ui popupforcefieldsminimise.ui popupforcefieldstest.ui popupgridmatrix.ui popupgridorigin.ui popupgridshift.ui popupgridstyle.ui popupmeasureangle.ui popupmeasureclear.ui popupmeasuredistance.ui popupmeasuretorsion.ui popuptransformangle.ui popuptransformcentre.ui popuptransformconvert.ui popuptransformdistance.ui popuptransformflip.ui popuptransformrotate.ui popuptransformmultiply.ui popuptransformreposition.ui popuptransformshift.ui popuptransformtorsion.ui popuptransformtranslate.ui popupviewcolourscheme.ui popupviewreset.ui popupviewstyle.ui @@ -31,9 +31,9 @@ libgui_a_SOURCES += popupbuildaddh_funcs.cpp popupbuildfragments_funcs.cpp popup libgui_a_SOURCES += command.ui disorderoptions.ui disorderwizard.ui glyphs.ui pores.ui scriptmovie.ui vibrations.ui viewbasis.ui vieweigenvector.ui zmatrix.ui -libgui_a_SOURCES += command_funcs.cpp disorderoptions_funcs.cpp disorderwizard_funcs.cpp glyphs_funcs.cpp pores_funcs.cpp saveimage_funcs.cpp scriptmovie_funcs.cpp vibrations_funcs.cpp viewbasis_funcs.cpp vieweigenvector_funcs.cpp zmatrix_funcs.cpp +libgui_a_SOURCES += command_funcs.cpp disorderoptions_funcs.cpp disorderwizard_funcs.cpp glyphs_funcs.cpp pores_funcs.cpp scriptmovie_funcs.cpp vibrations_funcs.cpp viewbasis_funcs.cpp vieweigenvector_funcs.cpp zmatrix_funcs.cpp -libgui_a_SOURCES += ffeditor_funcs.cpp layoutlist.cpp loadmodel_funcs.cpp mainwindow_atoms.cpp mainwindow_context.cpp mainwindow_funcs.cpp mainwindow_image.cpp mainwindow_messages.cpp mainwindow_models.cpp mainwindow_panel_build.cpp mainwindow_panel_calculate.cpp mainwindow_panel_cell.cpp mainwindow_panel_forcefields.cpp mainwindow_panel_grids.cpp mainwindow_panel_home.cpp mainwindow_panel_select.cpp mainwindow_panel_selection.cpp mainwindow_panel_trajectory.cpp mainwindow_panel_transform.cpp mainwindow_quickcommand.cpp mainwindow_update.cpp prefs_funcs.cpp progress_funcs.cpp selectfilter_funcs.cpp selectpattern_funcs.cpp selectvariable_funcs.cpp settings.cpp +libgui_a_SOURCES += exportimage_funcs.cpp ffeditor_funcs.cpp layoutlist.cpp loadmodel_funcs.cpp mainwindow_atoms.cpp mainwindow_context.cpp mainwindow_funcs.cpp mainwindow_image.cpp mainwindow_messages.cpp mainwindow_models.cpp mainwindow_panel_build.cpp mainwindow_panel_calculate.cpp mainwindow_panel_cell.cpp mainwindow_panel_forcefields.cpp mainwindow_panel_grids.cpp mainwindow_panel_home.cpp mainwindow_panel_select.cpp mainwindow_panel_selection.cpp mainwindow_panel_trajectory.cpp mainwindow_panel_transform.cpp mainwindow_quickcommand.cpp mainwindow_update.cpp prefs_funcs.cpp progress_funcs.cpp selectfilter_funcs.cpp selectpattern_funcs.cpp selectvariable_funcs.cpp settings.cpp libgui_a_SOURCES += mainmenuactions.cpp libgui_a_SOURCES += tcolourframe.hui tcolourwheel.hui tdoublespindelegate.hui texponentialspin.hui tintegerspindelegate.hui tmenubutton.hui tprocess.hui tprompt.hui ttablewidget.hui ttabwidget.hui ttreewidget.hui viewer.hui @@ -41,6 +41,6 @@ libgui_a_SOURCES += viewer_funcs.cpp viewer_key.cpp viewer_model.cpp viewer_mous libgui_a_SOURCES += useractions.cpp -noinst_HEADERS = command.h disorderoptions.h disorderwizard.h ffeditor.h glyphs.h layoutlist.h loadmodel.h mainwindow.h popupbuildaddh.h popupbuildfragments.h popupbuildgrow.h popupbuildrebond.h popupbuildtransmute.h popupcellangles.h popupcelllengths.h popupcellmatrix.h popupcellmiller.h popupcellreplicate.h popupcellscale.h popupcellspacegroup.h popupcolour.h popupelementcommon.h popupelementtable.h popupfileaten.h popupfileopen.h popupfilesave.h popupforcefieldsassign.h popupforcefieldsminimise.h popupforcefieldstest.h popupgridmatrix.h popupgridorigin.h popupgridshift.h popupgridstyle.h popupmeasureangle.h popupmeasureclear.h popupmeasuredistance.h popupmeasuretorsion.h popuptransformangle.h popuptransformcentre.h popuptransformconvert.h popuptransformdistance.h popuptransformflip.h popuptransformmultiply.h popuptransformreposition.h popuptransformrotate.h popuptransformshift.h popuptransformtorsion.h popuptransformtranslate.h popupviewcolourscheme.h popupviewreset.h popupviewstyle.h pores.h prefs.h progress.h saveimage.h scriptmovie.h selectfilter.h selectpattern.h selectvariable.h textratreewidgetitem.h treegui.h useractions.h vibrations.h viewbasis.h vieweigenvector.h zmatrix.h +noinst_HEADERS = command.h disorderoptions.h disorderwizard.h exportimage.h ffeditor.h glyphs.h layoutlist.h loadmodel.h mainwindow.h popupbuildaddh.h popupbuildfragments.h popupbuildgrow.h popupbuildrebond.h popupbuildtransmute.h popupcellangles.h popupcelllengths.h popupcellmatrix.h popupcellmiller.h popupcellreplicate.h popupcellscale.h popupcellspacegroup.h popupcolour.h popupelementcommon.h popupelementtable.h popupfileaten.h popupfileopen.h popupfilesave.h popupforcefieldsassign.h popupforcefieldsminimise.h popupforcefieldstest.h popupgridmatrix.h popupgridorigin.h popupgridshift.h popupgridstyle.h popupmeasureangle.h popupmeasureclear.h popupmeasuredistance.h popupmeasuretorsion.h popuptransformangle.h popuptransformcentre.h popuptransformconvert.h popuptransformdistance.h popuptransformflip.h popuptransformmultiply.h popuptransformreposition.h popuptransformrotate.h popuptransformshift.h popuptransformtorsion.h popuptransformtranslate.h popupviewcolourscheme.h popupviewreset.h popupviewstyle.h pores.h prefs.h progress.h scriptmovie.h selectfilter.h selectpattern.h selectvariable.h textratreewidgetitem.h treegui.h useractions.h vibrations.h viewbasis.h vieweigenvector.h zmatrix.h INCLUDES = -I$(top_srcdir)/src -I../ -I./ @ATEN_CFLAGS@ diff --git a/src/gui/exportimage.h b/src/gui/exportimage.h index 1d0ae2262..e7d13068c 100644 --- a/src/gui/exportimage.h +++ b/src/gui/exportimage.h @@ -1,6 +1,6 @@ /* - *** Save Image Dialog - *** src/gui/saveimage.h + *** Export Image Dialog + *** src/gui/exportimage.h Copyright T. Youngs 2013-2015 This file is part of Aten. @@ -22,7 +22,7 @@ #ifndef ATEN_ATENEXPORTIMAGE_H #define ATEN_ATENEXPORTIMAGE_H -#include "gui/ui_saveimage.h" +#include "gui/ui_exportimage.h" #include #include diff --git a/src/gui/exportimage_funcs.cpp b/src/gui/exportimage_funcs.cpp index a8615088b..5374cb27c 100644 --- a/src/gui/exportimage_funcs.cpp +++ b/src/gui/exportimage_funcs.cpp @@ -1,6 +1,6 @@ /* - *** Save Image Dialog - *** src/gui/saveimage_funcs.cpp + *** Export Image Dialog + *** src/gui/exportimage_funcs.cpp Copyright T. Youngs 2013-2015 This file is part of Aten. @@ -19,7 +19,7 @@ along with Aten. If not, see . */ -#include "gui/saveimage.h" +#include "gui/exportimage.h" #include "gui/mainwindow.h" #include
#include diff --git a/src/gui/icons.qrc b/src/gui/icons.qrc index 13c486256..c6396fd21 100644 --- a/src/gui/icons.qrc +++ b/src/gui/icons.qrc @@ -109,11 +109,6 @@ icons/file_saveas.svg icons/file_saveimage.svg - - icons/forcefield_energy.svg - icons/forcefield_forces.svg - icons/forcefield_minimise.svg - icons/model_next.svg icons/model_prev.svg diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 1b62db01b..dc6eddb09 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -30,7 +30,7 @@ #include "gui/ui_mainwindow.h" #include "gui/ui_prefs.h" #include "gui/useractions.h" -#include "gui/saveimage.h" +#include "gui/exportimage.h" #include "templates/reflist.h" #include "base/glyph.h" #include "base/namespace.h" diff --git a/src/gui/mainwindow_panel_home.cpp b/src/gui/mainwindow_panel_home.cpp index 24be00e29..dd981a220 100644 --- a/src/gui/mainwindow_panel_home.cpp +++ b/src/gui/mainwindow_panel_home.cpp @@ -23,7 +23,7 @@ #include "main/aten.h" #include "gui/selectfilter.h" #include "gui/loadmodel.h" -#include "gui/saveimage.h" +#include "gui/exportimage.h" #include "model/undostate.h" #include