]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewLoader.h
de.po: fix doubled accelerator keys
[lyx.git] / src / graphics / PreviewLoader.h
index 93ea8da64b3e0b9ccd66b35aa6c362697c3cefb4..0227466f7da4b3da4d6d00445ed1bbf0e2c07e2b 100644 (file)
@@ -1,35 +1,35 @@
 // -*- C++ -*-
 /**
- *  \file PreviewLoader.h
+ * \file PreviewLoader.h
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  *
- *  grfx::PreviewLoader collects latex snippets together. Then, on a
- *  startLoading() call, these are dumped to file and processed, converting
- *  each snippet to a separate bitmap image file. Once a bitmap file is ready
- *  to be loaded back into LyX, the PreviewLoader emits a signal to inform
- *  the initiating process.
+ * graphics::PreviewLoader collects latex snippets together. Then, on a
+ * startLoading() call, these are dumped to file and processed, converting
+ * each snippet to a separate bitmap image file. Once a bitmap file is ready
+ * to be loaded back into LyX, the PreviewLoader emits a signal to inform
+ * the initiating process.
  */
 
 #ifndef PREVIEWLOADER_H
 #define PREVIEWLOADER_H
 
-#include "LString.h"
-#include <boost/utility.hpp>
-#include <boost/scoped_ptr.hpp>
-#include <boost/signals/signal1.hpp>
+#include <boost/signal.hpp>
+
+
+namespace lyx {
 
 class Buffer;
 
-namespace grfx {
+namespace graphics {
 
 class PreviewImage;
 
-class PreviewLoader : boost::noncopyable {
+class PreviewLoader {
 public:
        /** We need buffer because we require the preamble to the
         *  LaTeX file.
@@ -41,7 +41,7 @@ public:
        /** Is there an image already associated with this snippet of LaTeX?
         *  If so, returns a pointer to it, else returns 0.
         */
-       PreviewImage const * preview(string const & latex_snippet) const;
+       PreviewImage const * preview(std::string const & latex_snippet) const;
 
        ///
        enum Status {
@@ -56,13 +56,13 @@ public:
        };
 
        /// How far have we got in loading the image?
-       Status status(string const & latex_snippet) const;
+       Status status(std::string const & latex_snippet) const;
 
        /// Add a snippet of LaTeX to the queue for processing.
-       void add(string const & latex_snippet) const;
+       void add(std::string const & latex_snippet) const;
 
        /// Remove this snippet of LaTeX from the PreviewLoader.
-       void remove(string const & latex_snippet) const;
+       void remove(std::string const & latex_snippet) const;
 
        /** We have accumulated several latex snippets with status "InQueue".
         *  Initiate their transformation into bitmap images.
@@ -71,9 +71,10 @@ public:
 
        /** Connect and you'll be informed when the bitmap image file
         *  has been created and is ready for loading through
-        *  grfx::PreviewImage::image().
+        *  lyx::graphics::PreviewImage::image().
         */
-       typedef boost::signal1<void, PreviewImage const &>::slot_type slot_type;
+       typedef boost::signal<void(PreviewImage const &)> sig_type;
+       typedef sig_type::slot_type slot_type;
        ///
        boost::signals::connection connect(slot_type const &) const;
 
@@ -86,12 +87,17 @@ public:
        Buffer const & buffer() const;
 
 private:
+       /// noncopyable
+       PreviewLoader(PreviewLoader const &);
+       void operator=(PreviewLoader const &);
+
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
-} // namespace grfx
+} // namespace graphics
+} // namespace lyx
 
 #endif // PREVIEWLOADER_H