X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsConverter.h;h=c038029bd8f99b61559fbfc7b0447e4aab4d9cb0;hb=38c2cde0d8695ac5287bae218c4a33a2acf18ef8;hp=15156203788793386033608fc3f84ad3442f5e83;hpb=0be0fcfd5907d448cd51addf83ed7032719a0692;p=lyx.git diff --git a/src/graphics/GraphicsConverter.h b/src/graphics/GraphicsConverter.h index 1515620378..c038029bd8 100644 --- a/src/graphics/GraphicsConverter.h +++ b/src/graphics/GraphicsConverter.h @@ -17,27 +17,29 @@ #ifndef GRAPHICSCONVERTER_H #define GRAPHICSCONVERTER_H -#include "LString.h" -#include -#include -#include +#include "support/signals.h" + namespace lyx { + +namespace support { class FileName; } + namespace graphics { -class Converter : boost::noncopyable { +class Converter { public: /// Can the conversion be performed? - static bool isReachable(string const & from_format_name, - string const & to_format_name); + static bool isReachable(std::string const & from_format_name, + std::string const & to_format_name); /** One Converter per conversion ensures that the (hidden) signal * is always connected to the expected slot. */ - Converter(string const & from_file, string const & to_file_base, - string const & from_format, string const & to_format); + Converter(support::FileName const & doc_fname, + support::FileName const & from_file, std::string const & to_file_base, + std::string const & from_format, std::string const & to_format); - /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy. + /// Needed for the pimpl ~Converter(); /// We are explicit about when we begin the conversion process. @@ -45,25 +47,30 @@ public: /** Connect and you'll be informed when the conversion process has * finished. - * If the conversion is succesful, then the listener is passed \c true. + * If the conversion is successful, then the listener is passed \c true. + * The connection is closed when this is destroyed. */ - typedef boost::signal1::slot_type slot_type; + typedef signals2::signal sig_type; + typedef sig_type::slot_type slot_type; /// - boost::signals::connection connect(slot_type const &) const; + signals2::connection connect(slot_type const &) const; - /** If the conversion is succesful, this returns the name of the + /** If the conversion is successful, this returns the name of the * resulting file. * If conversion fails or has not been completed, however, it * returns an empty string. */ - string const & convertedFile() const; + support::FileName const & convertedFile() const; private: + /// noncopyable + Converter(Converter const &); + void operator=(Converter const &); + /// Use the Pimpl idiom to hide the internals. class Impl; - /// The pointer never changes although *pimpl_'s contents may. - boost::scoped_ptr const pimpl_; + Impl * const pimpl_; }; } // namespace graphics