X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fapplicationwindow.cpp;h=448b380e276d5cbe7c723b45c942b10a3574439b;hb=5446001bd9adfd9f4787f5de5a2a7afd8d7cdb5a;hp=92c0547f773281dcc7e516db5f4eba1a88f8f408;hpb=7b7c8ec7d7f5379e09a8b7392f465f41639b0c79;p=architektonas diff --git a/src/applicationwindow.cpp b/src/applicationwindow.cpp index 92c0547..448b380 100644 --- a/src/applicationwindow.cpp +++ b/src/applicationwindow.cpp @@ -53,7 +53,7 @@ ApplicationWindow::ApplicationWindow(): settings("Underground Software", "Archit CreateToolbars(); // Create status bar - zoomIndicator = new QLabel("Zoom: 12.5%"); + zoomIndicator = new QLabel("Grid: 12.0\" Zoom: 12.5%"); statusBar()->addPermanentWidget(zoomIndicator); statusBar()->showMessage(tr("Ready")); @@ -167,7 +167,8 @@ when zooming in, new origin will be (xCenter - origin.x) / 2, (yCenter - origin. //printf("Zoom in... level going from %02f to ", Painter::zoom); // This just zooms leaving origin intact... should zoom in at the current center! [DONE] Painter::zoom *= zoomFactor; - zoomIndicator->setText(QString("Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM)); + drawing->gridSpacing = 12.0 / Painter::zoom; + zoomIndicator->setText(QString("Grid: %2\" Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM).arg(drawing->gridSpacing)); drawing->UpdateGridBackground(); drawing->update(); } @@ -201,7 +202,8 @@ x 2 = (-426, -301) //printf("Zoom out...\n"); // This just zooms leaving origin intact... should zoom out at the current center! [DONE] Painter::zoom /= zoomFactor; - zoomIndicator->setText(QString("Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM)); + drawing->gridSpacing = 12.0 / Painter::zoom; + zoomIndicator->setText(QString("Grid: %2\" Zoom: %1%").arg(Painter::zoom * 100.0 * SCREEN_ZOOM).arg(drawing->gridSpacing)); drawing->UpdateGridBackground(); drawing->update(); } @@ -263,7 +265,7 @@ void ApplicationWindow::CreateActions(void) QIcon(":/res/quit.png"), QKeySequence(tr("Ctrl+q"))); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); - snapToGridAct = CreateAction(tr("&Snap To Grid"), tr("Snap To Grid"), tr("Snaps mouse cursor to the visible grid when moving/creating objects."), QIcon(":/res/generic-tool.png"), QKeySequence(tr("S,G")), true); + snapToGridAct = CreateAction(tr("Snap To &Grid"), tr("Snap To Grid"), tr("Snaps mouse cursor to the visible grid when moving/creating objects."), QIcon(":/res/generic-tool.png"), QKeySequence(tr("S")), true); connect(snapToGridAct, SIGNAL(triggered()), this, SLOT(SnapToGridTool())); fixAngleAct = CreateAction(tr("Fix &Angle"), tr("Fix Angle"), tr("Fixes the angle of an object."),