Skip to content

Commit

Permalink
Add undo/redo and app-URL support to export dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcjohns committed Aug 21, 2023
1 parent cd8b2a3 commit 3461bb9
Show file tree
Hide file tree
Showing 3 changed files with 500 additions and 87 deletions.
11 changes: 9 additions & 2 deletions InterSpec/ExportSpecFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class ExportSpecFileTool : public Wt::WContainerWidget
- "interspec://specexport?V=1&..."
@param query_str The query portion of the URI. So for example, if the URI has a value of
"interspec://specexport?V=1&FORMAT=N42-2012&Samples=1,2&...", then this string would be "V=1&FORMAT=N42-2012&Samples=1,2&...".
"interspec://specexport?V=1&FORMAT=N42-2012&Samples=1-2&...", then this string would be "V=1&FORMAT=N42-2012&Samples=1-2&...".
Assumes the string passed in has alaready been url-decoded.
If not a valid query_str, throws exception.
*/
Expand Down Expand Up @@ -175,6 +175,9 @@ class ExportSpecFileTool : public Wt::WContainerWidget
void handleGenerateQrCode();
#endif

void updateUndoRedo();
void scheduleAddingUndoRedo();
virtual void render( Wt::WFlags<Wt::RenderFlag> flags ) override;

InterSpec *m_interspec;

Expand Down Expand Up @@ -222,11 +225,15 @@ class ExportSpecFileTool : public Wt::WContainerWidget

Wt::WText *m_msg;

ExportSpecFileTool_imp::DownloadSpectrumResource *m_resource;
Wt::WPushButton *m_export_btn;
#if( USE_QR_CODES )
Wt::WPushButton *m_show_qr_btn;
#endif

ExportSpecFileTool_imp::DownloadSpectrumResource *m_resource;

/** For undo/redo purposes, we will keep track of last state as a URL. */
std::shared_ptr<const std::string> m_last_state_uri;
};//class ExportSpecFileTool


Expand Down
Loading

0 comments on commit 3461bb9

Please sign in to comment.