]> git.lyx.org Git - features.git/commitdiff
cosmetics
authorAndré Pönitz <poenitz@gmx.net>
Wed, 21 Nov 2007 22:54:10 +0000 (22:54 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 21 Nov 2007 22:54:10 +0000 (22:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21703 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiImage.cpp
src/frontends/qt4/GuiImage.h
src/graphics/GraphicsImage.h

index 7deeebdf6dd9d0194d86de0c8ad98696f89e9074..e8971c4feaaa3f9a87078af428a4197d5ab44bde 100644 (file)
@@ -121,25 +121,25 @@ GuiImage::GuiImage(GuiImage const & other)
 {}
 
 
-Image * GuiImage::clone_impl() const
+Image * GuiImage::clone() const
 {
        return new GuiImage(*this);
 }
 
 
-unsigned int GuiImage::getWidth_impl() const
+unsigned int GuiImage::getWidth() const
 {
        return transformed_.width();
 }
 
 
-unsigned int GuiImage::getHeight_impl() const
+unsigned int GuiImage::getHeight() const
 {
        return transformed_.height();
 }
 
 
-void GuiImage::load_impl(support::FileName const & filename)
+void GuiImage::load(support::FileName const & filename)
 {
        if (!original_.isNull()) {
                LYXERR(Debug::GRAPHICS, "Image is loaded already!");
@@ -178,7 +178,7 @@ static QImage & toGray(QImage & img)
 }
 
 
-bool GuiImage::setPixmap_impl(Params const & params)
+bool GuiImage::setPixmap(Params const & params)
 {
        if (original_.isNull() || params.display == NoDisplay)
                return false;
@@ -203,7 +203,7 @@ bool GuiImage::setPixmap_impl(Params const & params)
 }
 
 
-void GuiImage::clip_impl(Params const & params)
+void GuiImage::clip(Params const & params)
 {
        if (transformed_.isNull())
                return;
@@ -234,7 +234,7 @@ void GuiImage::clip_impl(Params const & params)
 }
 
 
-void GuiImage::rotate_impl(Params const & params)
+void GuiImage::rotate(Params const & params)
 {
        if (transformed_.isNull())
                return;
@@ -249,7 +249,7 @@ void GuiImage::rotate_impl(Params const & params)
 }
 
 
-void GuiImage::scale_impl(Params const & params)
+void GuiImage::scale(Params const & params)
 {
        if (transformed_.isNull())
                return;
index 03c83f1574a41843bb7450a6780e594e1b4799d0..5fab560fedfa033e230c4271d08c0b30cad74c60 100644 (file)
@@ -38,31 +38,31 @@ public:
 
 private:
        /// Create a copy
-       virtual Image * clone_impl() const;
+       virtual Image * clone() const;
        /// Get the image width
-       virtual unsigned int getWidth_impl() const;
+       virtual unsigned int getWidth() const;
        /// Get the image height
-       virtual unsigned int getHeight_impl() const;
+       virtual unsigned int getHeight() const;
        // FIXME Is the image drawable ?
-       virtual bool isDrawable_impl() const { return true; }
+       virtual bool isDrawable() const { return true; }
        /**
         * Load the image file into memory.
         * The process is asynchronous, so this method starts the loading.
         * When finished, the Image::finishedLoading signal is emitted.
         */
-       virtual void load_impl(support::FileName const & filename);
+       virtual void load(support::FileName const & filename);
        /**
         * Finishes the process of modifying transformed_, using
         * \c params to decide on color, grayscale etc.
         * \returns true if successful.
         */
-       virtual bool setPixmap_impl(Params const & params);
+       virtual bool setPixmap(Params const & params);
        /// Clip the image using params.
-       virtual void clip_impl(Params const & params);
+       virtual void clip(Params const & params);
        /// Rotate the image using params.
-       virtual void rotate_impl(Params const & params);
+       virtual void rotate(Params const & params);
        /// Scale the image using params.
-       virtual void scale_impl(Params const & params);
+       virtual void scale(Params const & params);
 
        /// Access to the class is through newImage() and clone.
        GuiImage() {}
index dae4ecea64fd6e78ad8ce9004968d97d0ffef675..f85bc8925b248b9b294bd9e1a7536a82e4d41a86 100644 (file)
@@ -57,16 +57,16 @@ public:
        virtual ~Image() {}
 
        /// Create a copy
-       Image * clone() const;
+       virtual Image * clone() const = 0;
 
        /// Get the image width
-       unsigned int getWidth() const;
+       virtual unsigned int getWidth() const = 0;
 
        /// Get the image height
-       unsigned int getHeight() const;
+       virtual unsigned int getHeight() const = 0;
 
        /// Is the image drawable ?
-       bool isDrawable() const;
+       virtual bool isDrawable() const = 0;
 
        /** At the end of the loading process inform the outside world
         *  by emitting a signal
@@ -79,22 +79,22 @@ public:
         *  The caller should expect this process to be asynchronous and
         *  so should connect to the "finished" signal above.
         */
-       void load(support::FileName const & filename);
+       virtual void load(support::FileName const & filename) = 0;
 
        /** Generate the pixmap.
         *  Uses the params to decide on color, grayscale etc.
         *  Returns true if the pixmap is created.
         */
-       bool setPixmap(Params const & params);
+       virtual bool setPixmap(Params const & params) = 0;
 
        /// Clip the image using params.
-       void clip(Params const & params);
+       virtual void clip(Params const & params) = 0;
 
        /// Rotate the image using params.
-       void rotate(Params const & params);
+       virtual void rotate(Params const & params) = 0;
 
        /// Scale the image using params.
-       void scale(Params const & params);
+       virtual void scale(Params const & params) = 0;
 
 protected:
        /// Must define default c-tor explicitly as we define a copy c-tor.
@@ -108,104 +108,9 @@ protected:
         */
        std::pair<unsigned int, unsigned int>
        getScaledDimensions(Params const & params) const;
-
-private:
-       /// Create a copy
-       virtual Image * clone_impl() const = 0;
-       /// Get the image width
-       virtual unsigned int getWidth_impl() const = 0;
-
-       /// Get the image height
-       virtual unsigned int getHeight_impl() const = 0;
-
-       /// is the image drawable ?
-       virtual bool isDrawable_impl() const = 0;
-
-       /** Start loading the image file.
-        *  The caller should expect this process to be asynchronous and
-        *  so should connect to the "finished" signal above.
-        */
-       virtual void load_impl(support::FileName const & filename) = 0;
-
-       /** Generate the pixmap.
-        *  Uses the params to decide on color, grayscale etc.
-        *  Returns true if the pixmap is created.
-        */
-       virtual bool setPixmap_impl(Params const & params) = 0;
-
-       /// Clip the image using params.
-       virtual void clip_impl(Params const & params) = 0;
-
-       /// Rotate the image using params.
-       virtual void rotate_impl(Params const & params) = 0;
-
-       /// Scale the image using params.
-       virtual void scale_impl(Params const & params) = 0;
 };
 
 
-inline
-Image * Image::clone() const
-{
-       return clone_impl();
-}
-
-
-inline
-unsigned int Image::getWidth() const
-{
-       return getWidth_impl();
-}
-
-
-inline
-unsigned int Image::getHeight() const
-{
-       return getHeight_impl();
-}
-
-
-inline
-bool Image::isDrawable() const
-{
-       return isDrawable_impl();
-}
-
-
-inline
-void Image::load(support::FileName const & filename)
-{
-       return load_impl(filename);
-}
-
-
-inline
-bool Image::setPixmap(Params const & params)
-{
-       return setPixmap_impl(params);
-}
-
-
-inline
-void Image::clip(Params const & params)
-{
-       return clip_impl(params);
-}
-
-
-inline
-void Image::rotate(Params const & params)
-{
-       return rotate_impl(params);
-}
-
-
-inline
-void Image::scale(Params const & params)
-{
-       return scale_impl(params);
-}
-
 } // namespace graphics
 } // namespace lyx