CompassMarks.cpp   CompassMarks.cpp 
skipping to change at line 62 skipping to change at line 62
info.authors = "Matthew Gates"; info.authors = "Matthew Gates";
info.contact = "http://porpoisehead.net/"; info.contact = "http://porpoisehead.net/";
info.description = N_("Displays compass bearing marks along the hori zon"); info.description = N_("Displays compass bearing marks along the hori zon");
info.version = COMPASSMARKS_VERSION; info.version = COMPASSMARKS_VERSION;
return info; return info;
} }
CompassMarks::CompassMarks() CompassMarks::CompassMarks()
: displayedAtStartup(false) : displayedAtStartup(false)
, markColor(1,1,1) , markColor(1,1,1)
, toolbarButton(NULL) , toolbarButton(Q_NULLPTR)
, cardinalPointsState(false) , cardinalPointsState(false)
{ {
setObjectName("CompassMarks"); setObjectName("CompassMarks");
conf = StelApp::getInstance().getSettings(); conf = StelApp::getInstance().getSettings();
} }
CompassMarks::~CompassMarks() CompassMarks::~CompassMarks()
{ {
// //
} }
skipping to change at line 97 skipping to change at line 97
if (!conf->childGroups().contains("CompassMarks")) if (!conf->childGroups().contains("CompassMarks"))
restoreDefaultConfiguration(); restoreDefaultConfiguration();
loadConfiguration(); loadConfiguration();
try try
{ {
addAction("actionShow_Compass_Marks", N_("Compass Marks"), N _("Compass marks"), "marksVisible"); addAction("actionShow_Compass_Marks", N_("Compass Marks"), N _("Compass marks"), "marksVisible");
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui()); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui());
if (gui != NULL) if (gui != Q_NULLPTR)
{ {
toolbarButton = new StelButton(NULL, toolbarButton = new StelButton(Q_NULLPTR,
QPixmap(":/compassMar ks/bt_compass_on.png"), QPixmap(":/compassMar ks/bt_compass_on.png"),
QPixmap(":/compassMar ks/bt_compass_off.png"), QPixmap(":/compassMar ks/bt_compass_off.png"),
QPixmap(":/graphicGui /glow32x32.png"), QPixmap(":/graphicGui /glow32x32.png"),
"actionShow_Compass_M arks"); "actionShow_Compass_M arks");
gui->getButtonBar()->addButton(toolbarButton, "065-p luginsGroup"); gui->getButtonBar()->addButton(toolbarButton, "065-p luginsGroup");
} }
connect(GETSTELMODULE(LandscapeMgr), SIGNAL(cardinalsPointsD isplayedChanged(bool)), this, SLOT(cardinalPointsChanged(bool))); connect(GETSTELMODULE(LandscapeMgr), SIGNAL(cardinalsPointsD isplayedChanged(bool)), this, SLOT(cardinalPointsChanged(bool)));
cardinalPointsState = false; cardinalPointsState = false;
setCompassMarks(displayedAtStartup); setCompassMarks(displayedAtStartup);
skipping to change at line 155 skipping to change at line 155
painter.drawText(pos, s, 0, -shiftx, shifty); painter.drawText(pos, s, 0, -shiftx, shifty);
} }
else if (i % 5 == 0) else if (i % 5 == 0)
{ {
h = -0.01; // the size of the mark every 5 degrees h = -0.01; // the size of the mark every 5 degrees
} }
// Limit arcs to those that are visible for improved perform ance // Limit arcs to those that are visible for improved perform ance
if (prj->project(pos, screenPos) && if (prj->project(pos, screenPos) &&
screenPos[0]>prj->getViewportPosX() && screenPos[0] < p rj->getViewportPosX() + prj->getViewportWidth()) { screenPos[0]>prj->getViewportPosX() && screenPos[0] < p rj->getViewportPosX() + prj->getViewportWidth()) {
painter.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1] , h), NULL); painter.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1] , h), Q_NULLPTR);
} }
} }
painter.setBlending(false); painter.setBlending(false);
painter.setLineSmooth(false); painter.setLineSmooth(false);
} }
void CompassMarks::update(double deltaTime) void CompassMarks::update(double deltaTime)
{ {
markFader.update((int)(deltaTime*1000)); markFader.update((int)(deltaTime*1000));
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/