X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FPreviewLoader.h;h=edad57b640b240a9d6d864a1a8dc5e37b52ca008;hb=f643df79a890ec4bc2eb05a3fd3d349ba3994f96;hp=3ba6e8f36b634f6cc27c8f820841008e5202ce9f;hpb=f68a2bfb915bf590b9dd11061750b7922e5c1deb;p=lyx.git diff --git a/src/graphics/PreviewLoader.h b/src/graphics/PreviewLoader.h index 3ba6e8f36b..edad57b640 100644 --- a/src/graphics/PreviewLoader.h +++ b/src/graphics/PreviewLoader.h @@ -4,7 +4,7 @@ * Copyright 2002 the LyX Team * Read the file COPYING * - * \author Angus Leeming + * \author Angus Leeming * * grfx::PreviewLoader collects latex snippets together. Then, on a * startLoading() call, these are dumped to file and processed, converting @@ -59,20 +59,30 @@ public: /// How far have we got in loading the image? Status status(string const & latex_snippet) const; - + /// Add a snippet of LaTeX to the queue for processing. - void add(string const & latex_snippet); + void add(string const & latex_snippet) const; /// Remove this snippet of LaTeX from the PreviewLoader. - void remove(string const & latex_snippet); - + void remove(string const & latex_snippet) const; + /** We have accumulated several latex snippets with status "InQueue". * Initiate their transformation into bitmap images. */ - void startLoading(); + void startLoading() const; + + /** Connect and you'll be informed when the bitmap image file + * has been created and is ready for loading through + * grfx::PreviewImage::image(). + */ + typedef boost::signal1::slot_type slot_type; + /// + boost::signals::connection connect(slot_type const &) const; - /// Emit this signal when an image is ready for display. - boost::signal1 imageReady; + /** When PreviewImage has finished loading the image file into memory, + * it tells the PreviewLoader to tell the outside world + */ + void emitSignal(PreviewImage const &) const; private: /// Use the Pimpl idiom to hide the internals.