setStatus(Loading);
LYXERR(Debug::GRAPHICS, "Loading image.");
- image_ = Image::newImage();
+ image_.reset(Image::newImage());
cl_.disconnect();
cl_ = image_->finishedLoading.connect(
// This is to be connected to a function that will return a new
// instance of a viable derived class.
-boost::function<Image::ImagePtr()> Image::newImage;
+boost::function<Image *()> Image::newImage;
/// Return the list of loadable formats.
boost::function<Image::FormatList()> Image::loadableFormats;
#define GRAPHICSIMAGE_H
#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
#include <boost/signal.hpp>
#include <vector>
/** This is to be connected to a function that will return a new
* instance of a viable derived class.
*/
- typedef boost::shared_ptr<Image> ImagePtr;
- ///
- static boost::function<ImagePtr()> newImage;
+ static boost::function<Image *()> newImage;
///
typedef std::vector<std::string> FormatList;
namespace graphics {
+typedef boost::shared_ptr<Image> ImagePtr;
+
class Loader::Impl : public boost::signals::trackable {
public:
///
*/
Cache::ItemPtr cached_item_;
/// We modify a local copy of the image once it is loaded.
- Image::ImagePtr image_;
+ ImagePtr image_;
/// This signal is emitted when the image loading status changes.
boost::signal<void()> signal_;
/// The connection of the signal StatusChanged