]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsConverter.h
The free_spacing patch and fix to the mess that Rob discovered.
[lyx.git] / src / graphics / GraphicsConverter.h
index 96a3b1e355ac3895c6d0df423483524e7662887c..dd221287a1fc173f763aecf8f758b35af8e6c358 100644 (file)
@@ -1,26 +1,22 @@
 // -*- C++ -*-
 /**
  *  \file GraphicsConverter.h
- *  Copyright 2002 the LyX Team
- *  Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *  \author Angus Leeming <leeming@lyx.org>
+ *  \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
  *
  *  The controller of a conversion process from file AA of format A to
  *  file BB of format B.
- *  Once finished, the signal finishdConversion is emitted to inform the
- *  instigator where to find file BB.
- *  If the conversion is unsuccessful, then finishedConversion will pass
- *  an empty string.
+ *  Once finished, a signal is emitted to inform any listeners (connected
+ *  through the connect() method).
  */
 
 #ifndef GRAPHICSCONVERTER_H
 #define GRAPHICSCONVERTER_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
 #include "LString.h"
 #include <boost/signals/signal1.hpp>
 #include <boost/scoped_ptr.hpp>
@@ -34,7 +30,7 @@ public:
        static bool isReachable(string const & from_format_name,
                                string const & to_format_name);
 
-       /** One Converter per conversion ensures that finishedConversion
+       /** 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,
@@ -44,18 +40,20 @@ public:
        ~Converter();
 
        /// We are explicit about when we begin the conversion process.
-       void startConversion();
+       void startConversion() const;
 
-       /** At the end of the conversion process inform the outside world
-        *  by emitting a signal.
+       /** Connect and you'll be informed when the conversion process has
+        *  finished.
+        *  If the conversion is succesful, then the listener is passed \c true.
         */
-       typedef boost::signal1<void, bool> SignalType;
+       typedef boost::signal1<void, bool>::slot_type slot_type;
        ///
-       SignalType finishedConversion;
-       
-       /** If the convsion is succesful (finishedConversion returns \c true),
-        *  this returns the name of the resulting file.
-        *  If conversion fails, however, it returns an empty string.
+       boost::signals::connection connect(slot_type const &) const;
+
+       /** If the conversion is succesful, 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;
 
@@ -66,7 +64,7 @@ private:
        /// The pointer never changes although *pimpl_'s contents may.
        boost::scoped_ptr<Impl> const pimpl_;
 };
+
 } // namespace grfx
 
 #endif // GRAPHICSCONVERTER_H