1.1 --- a/mapeditor.cpp Thu Nov 23 13:53:08 2006 +0000
1.2 +++ b/mapeditor.cpp Thu Nov 23 16:18:26 2006 +0000
1.3 @@ -1,7 +1,5 @@
1.4 #include "mapeditor.h"
1.5
1.6 -//#include <q3urloperator.h>
1.7 -#include <q3paintdevicemetrics.h>
1.8 #include <q3filedialog.h>
1.9
1.10 #include <iostream>
1.11 @@ -498,8 +496,8 @@
1.12 if (saveSel) cout << " saveSel="<<saveSel->getSelectString().ascii()<<endl;
1.13 cout << " ---------------------------"<<endl;
1.14
1.15 + setChanged();
1.16 mainWindow->updateHistory (undoSet);
1.17 - setChanged();
1.18 updateActions();
1.19 }
1.20
1.21 @@ -1208,9 +1206,7 @@
1.22 // e.g. (0,50,700,700) is upper part on A4
1.23 // see also /usr/lib/qt3/doc/html/coordsys.html
1.24
1.25 - Q3PaintDeviceMetrics metrics (printer);
1.26 -
1.27 - double paperAspect = (double)metrics.width() / (double)metrics.height();
1.28 + double paperAspect = (double)printer->width() / (double)printer->height();
1.29 double mapAspect = (double)totalBBox.width() / (double)totalBBox.height();
1.30
1.31 QRect mapRect=totalBBox;
1.32 @@ -1266,11 +1262,11 @@
1.33 if (mapAspect>=paperAspect)
1.34 {
1.35 // Fit horizontally to paper width
1.36 - pp.setViewport(0,0, metrics.width(),(int)(metrics.width()/mapAspect) );
1.37 + pp.setViewport(0,0, printer->width(),(int)(printer->width()/mapAspect) );
1.38 } else
1.39 {
1.40 // Fit vertically to paper height
1.41 - pp.setViewport(0,0,(int)(metrics.height()*mapAspect),metrics.height());
1.42 + pp.setViewport(0,0,(int)(printer->height()*mapAspect),printer->height());
1.43 }
1.44
1.45 mapCanvas->drawArea(mapRect, &pp); // draw Canvas to printer
1.46 @@ -1509,8 +1505,8 @@
1.47 undoSet.setEntry ("/history/curStep",QString::number(curStep));
1.48 undoSet.writeSettings(histPath);
1.49
1.50 + updateActions();
1.51 mainWindow->updateHistory (undoSet);
1.52 - updateActions();
1.53
1.54 /* TODO remove testing
1.55 cout << "ME::redo() end\n";
1.56 @@ -4081,7 +4077,7 @@
1.57 // Contains url to the img src in unicode16
1.58 QByteArray d = event->encodedData("application/x-moz-file-promise-url");
1.59 QString url = QString((const QChar*)d.data(),d.size()/2);
1.60 - fetchImage(url);
1.61 + //FIXME fetchImage(url);
1.62 event->acceptProposedAction();
1.63 update=true;
1.64 } else if (event->mimeData()->hasUrls())
1.65 @@ -4195,7 +4191,8 @@
1.66 }
1.67
1.68
1.69 -void MapEditor::imageDataFetched(const QByteArray &a, Q3NetworkOperation */*nop*/)
1.70 +//void MapEditor::imageDataFetched(const QByteArray &a, Q3NetworkOperation */*nop*/)
1.71 +/* FIXME not needed in QT4
1.72 {
1.73 if (!imageBuffer) imageBuffer = new QBuffer();
1.74 if (!imageBuffer->isOpen()) {
1.75 @@ -4238,3 +4235,5 @@
1.76 this, SLOT(imageDataFetched(const QByteArray &, Q3NetworkOperation *)));
1.77 urlOperator->get();
1.78 }
1.79 +
1.80 +*/