Commit 5a622323 authored by Aurélien Gâteau's avatar Aurélien Gâteau
Browse files

Implemented "zoom to actual size".

svn path=/trunk/playground/graphics/svgpart/; revision=737286
parent 8ad4c28e
......@@ -45,6 +45,7 @@ SvgPart::SvgPart(QWidget* parentWidget, QObject* parent, const QStringList&)
mItem = 0;
setWidget(mView);
KStandardAction::actualSize(this, SLOT(zoomActualSize()), actionCollection());
KStandardAction::zoomIn(this, SLOT(zoomIn()), actionCollection());
KStandardAction::zoomOut(this, SLOT(zoomOut()), actionCollection());
setXMLFile("svgpart/svgpart.rc");
......@@ -78,6 +79,11 @@ void SvgPart::zoomOut() {
}
void SvgPart::zoomActualSize() {
setZoom(1.0);
}
qreal SvgPart::zoom() const {
return mView->matrix().m11();
}
......
......@@ -39,6 +39,7 @@ protected:
virtual bool openFile();
private Q_SLOTS:
void zoomActualSize();
void zoomIn();
void zoomOut();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment