# HG changeset patch # User Dmitriy Morozov <dmitriy@mrzv.org> # Date 1314723051 25200 # Node ID 118b5e4e0f9b82bb7ad68c0855f09c29f2e10ee2 # Parent 6f17855970fc0785548f45d442399946eb0e9f96 Updated for Ipe 7.1.0 diff -r 6f17855970fc -r 118b5e4e0f9b Makefile --- a/Makefile Fri Jun 24 09:57:10 2011 -0700 +++ b/Makefile Tue Aug 30 09:50:51 2011 -0700 @@ -5,7 +5,7 @@ QT_CFLAGS = -I/usr/include/QtGui -I/usr/include/QtCore QT_LIBS = -lQtGui -lQtCore CPPFLAGS += $(QT_CFLAGS) -LIBS += -lipeqtcanvas -lipecairo -lipe $(QT_LIBS) $(CAIRO_LIBS) +LIBS += -lipecanvas -lipecairo -lipe $(QT_LIBS) $(CAIRO_LIBS) DESTDIR=/usr/bin OBJECTS = mainwindow.o moc_mainwindow.o canvasview.o moc_canvasview.o \ diff -r 6f17855970fc -r 118b5e4e0f9b canvasview.cpp --- a/canvasview.cpp Fri Jun 24 09:57:10 2011 -0700 +++ b/canvasview.cpp Tue Aug 30 09:50:51 2011 -0700 @@ -33,7 +33,7 @@ #include "ipetool.h" using namespace ipe; -using namespace ipeqt; +//using namespace ipeqt; // -------------------------------------------------------------------- @@ -88,7 +88,7 @@ iCanvas->setFontPool(iDoc->fontPool()); iCanvas->setPage(iDoc->page(iPageNo), iPageNo, iViewNo, iDoc->cascade()); iCanvas->setPan(Vector(300, 400)); - iCanvas->update(); + static_cast<CanvasBase*>(iCanvas)->update(); return true; } @@ -104,13 +104,13 @@ double zoom = (xfactor > yfactor) ? yfactor : xfactor; iCanvas->setPan(0.5 * (box.bottomLeft() + box.topRight())); iCanvas->setZoom(zoom); - iCanvas->update(); + static_cast<CanvasBase*>(iCanvas)->update(); } void CanvasView::setView(int pageNo, int viewNo) { iCanvas->setPage(iDoc->page(pageNo), pageNo, viewNo, iDoc->cascade()); - iCanvas->update(); + static_cast<CanvasBase*>(iCanvas)->update(); } void CanvasView::resizeEvent (QResizeEvent *event) diff -r 6f17855970fc -r 118b5e4e0f9b canvasview.h --- a/canvasview.h Fri Jun 24 09:57:10 2011 -0700 +++ b/canvasview.h Tue Aug 30 09:50:51 2011 -0700 @@ -33,13 +33,13 @@ #ifndef CANVASVIEW_H #define CANVASVIEW_H -#include "ipeqtcanvas.h" +#include "ipecanvas_qt.h" #include <QMainWindow> #include <QAction> using namespace ipe; -using namespace ipeqt; +//using namespace ipeqt; // -------------------------------------------------------------------- diff -r 6f17855970fc -r 118b5e4e0f9b mainwindow.cpp --- a/mainwindow.cpp Fri Jun 24 09:57:10 2011 -0700 +++ b/mainwindow.cpp Tue Aug 30 09:50:51 2011 -0700 @@ -34,7 +34,7 @@ #include "ipetool.h" using namespace ipe; -using namespace ipeqt; +//using namespace ipeqt; // -------------------------------------------------------------------- @@ -199,7 +199,7 @@ currentViewCanvas->setPage(iDoc->page(iPageNo), iPageNo, iViewNo, iDoc->cascade()); currentViewCanvas->setPan(Vector(300, 400)); - currentViewCanvas->update(); + static_cast<CanvasBase*>(currentViewCanvas)->update(); setNextViewCanvas(); canvas_view->load(doc, iPageNo, iViewNo); @@ -230,7 +230,7 @@ double zoom = (xfactor > yfactor) ? yfactor : xfactor; canvas->setPan(0.5 * (box.bottomLeft() + box.topRight())); canvas->setZoom(zoom); - canvas->update(); + static_cast<CanvasBase*>(canvas)->update(); } // void MainWindow::zoom(int delta) @@ -282,7 +282,7 @@ int iPageNo = page_view.first; int iViewNo = page_view.second; nextViewCanvas->setPage(iDoc->page(iPageNo), iPageNo, iViewNo, iDoc->cascade()); - nextViewCanvas->update(); + static_cast<CanvasBase*>(nextViewCanvas)->update(); } void MainWindow::nextView(int delta) @@ -339,7 +339,7 @@ void MainWindow::setView() { currentViewCanvas->setPage(iDoc->page(iPageNo), iPageNo, iViewNo, iDoc->cascade()); - currentViewCanvas->update(); + static_cast<CanvasBase*>(currentViewCanvas)->update(); updateLabel(); canvas_view->setView(iPageNo, iViewNo); diff -r 6f17855970fc -r 118b5e4e0f9b mainwindow.h --- a/mainwindow.h Fri Jun 24 09:57:10 2011 -0700 +++ b/mainwindow.h Tue Aug 30 09:50:51 2011 -0700 @@ -33,8 +33,8 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include "ipeqtcanvas.h" -#include "ipeselector.h" +#include "ipecanvas_qt.h" +#include "ipeselector_qt.h" #include "canvasview.h" #include "ui_mainwindow.h" @@ -44,7 +44,7 @@ #include <QTime> using namespace ipe; -using namespace ipeqt; +//using namespace ipeqt; // -------------------------------------------------------------------- diff -r 6f17855970fc -r 118b5e4e0f9b mainwindow.ui --- a/mainwindow.ui Fri Jun 24 09:57:10 2011 -0700 +++ b/mainwindow.ui Tue Aug 30 09:50:51 2011 -0700 @@ -146,7 +146,7 @@ <customwidget> <class>Canvas</class> <extends>QWidget</extends> - <header>ipeqtcanvas.h</header> + <header>ipecanvas_qt.h</header> <container>1</container> </customwidget> <customwidget>