]> git.lyx.org Git - features.git/blobdiff - src/graphics/GraphicsLoader.h
Merge branch 'master' into biblatex2
[features.git] / src / graphics / GraphicsLoader.h
index 43fd85e69590f48493f23c9664317df9f1333f8e..8b97114f60f2a32864a362aeae6c4fca590b0f0f 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "GraphicsTypes.h"
 
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
 
 namespace lyx {
 
@@ -40,13 +40,15 @@ class Params;
 class Loader {
 public:
        /// Must use the reset methods to make this instance usable.
-       Loader();
+       Loader(support::FileName const & doc_file);
        /// The image is not transformed, just displayed as-is.
-       Loader(support::FileName const & file_with_path, bool display = true);
+       Loader(support::FileName const & doc_file, support::FileName const & file_with_path, bool display = true);
        /// The image is transformed before display.
-       Loader(support::FileName const & file_with_path, Params const &);
+       Loader(support::FileName const & doc_file, support::FileName const & file_with_path, Params const &);
        ///
-       Loader(Loader const &);
+       Loader(support::FileName const & doc_file, Loader const &);
+       ///
+       Loader(Loader const & other);
        /// Needed for the pimpl
        ~Loader();
 
@@ -68,6 +70,10 @@ public:
         */
        void startLoading() const;
 
+       /** Tries to reload the image. 
+        */
+       void reload() const;
+
        /** Monitor any changes to the file.
         *  There is no point monitoring the file before startLoading() is
         *  invoked.
@@ -87,21 +93,24 @@ public:
        /** Connect and you'll be informed when the loading status of the image
         *  changes.
         */
-       typedef boost::signal<void()> sig_type;
+       typedef boost::signals2::signal<void()> sig_type;
        typedef sig_type::slot_type slot_type;
        ///
-       boost::signals::connection connect(slot_type const &) const;
+       boost::signals2::connection connect(slot_type const &) const;
 
        /** The loaded image with Pixmap set.
         *  If the Pixmap is not yet set (see status() for why...), returns 0.
         */
        Image const * image() const;
 
+       double displayPixelRatio() const;
+       void setDisplayPixelRatio(double scale);
+
 private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       Impl * const pimpl_;
+       Impl * pimpl_;
 };
 
 } // namespace graphics