[Uml-devel] branches/work/soc-umbrello/umbrello

Ralf Habacker ralf.habacker at gmail.com
Tue Apr 3 14:17:45 UTC 2012


SVN commit 1288074 by habacker:

Reduced differences to trunk.

 M  +5 -5      umlviewimageexportermodel.cpp  
 M  +2 -2      umlviewimageexportermodel.h  


--- branches/work/soc-umbrello/umbrello/umlviewimageexportermodel.cpp #1288073:1288074
@@ -423,7 +423,7 @@
     // and the actual painting
     scene->forceUpdateWidgetFontMetrics(painter);
 
-    QRectF rect = scene->diagramRect();
+    UMLSceneRect rect = scene->diagramRect();
     painter->translate(-rect.x(), -rect.y());
     scene->getDiagram(rect, *painter);
 
@@ -436,7 +436,7 @@
         // modify bounding box from screen to eps resolution.
         rect.setWidth( int(ceil(rect.width() * 72.0/resolution)) );
         rect.setHeight( int(ceil(rect.height() * 72.0/resolution)) );
-        exportSuccessful = fixEPS(fileName, rect.toRect());
+        exportSuccessful = fixEPS(fileName, rect);
     }
     // next painting will most probably be to a different device (i.e. the screen)
     scene->forceUpdateWidgetFontMetrics(0);
@@ -460,7 +460,7 @@
     }
 
     bool exportSuccessful;
-    QRectF rect = scene->diagramRect();
+    UMLSceneRect rect = scene->diagramRect();
 
     QSvgGenerator generator;
     generator.setFileName(fileName);
@@ -504,7 +504,7 @@
     }
 
     bool exportSuccessful;
-    QRectF rect = scene->diagramRect();
+    UMLSceneRect rect = scene->diagramRect();
     QPixmap diagram(rect.width(), rect.height());
     scene->getDiagram(rect, diagram);
     exportSuccessful = diagram.save(fileName, qPrintable(imageType.toUpper()));
@@ -521,7 +521,7 @@
  * @return True if the operation was successful,
  *         false if a problem occurred while exporting.
  */
-bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRect& rect) const
+bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const UMLSceneRect& rect) const
 {
     // now open the file and make a correct eps out of it
     QFile epsfile(fileName);
--- branches/work/soc-umbrello/umbrello/umlviewimageexportermodel.h #1288073:1288074
@@ -11,11 +11,11 @@
 #ifndef UMLVIEWIMAGEEXPORTERMODEL_H
 #define UMLVIEWIMAGEEXPORTERMODEL_H
 
+#include "umlscene.h"
 #include <QtCore/QStringList>
 #include <QtCore/QRect>
 
 // forward declarations
-class UMLScene;
 class KUrl;
 
 /**
@@ -56,7 +56,7 @@
     bool exportViewToSvg(UMLScene* scene, const QString &fileName) const;
     bool exportViewToPixmap(UMLScene* scene, const QString &imageType, const QString &fileName) const;
 
-    bool fixEPS(const QString &fileName, const QRect& rect) const;
+    bool fixEPS(const QString &fileName, const UMLSceneRect& rect) const;
 
     static QStringList s_supportedImageTypesList;
     static QStringList s_supportedMimeTypesList;




More information about the umbrello-devel mailing list