CompassMarks.cpp   CompassMarks.cpp 
skipping to change at line 116 skipping to change at line 116
return StelApp::getInstance().getModuleMgr().getModule("Land scapeMgr")->getCallOrder(actionName)+10.; return StelApp::getInstance().getModuleMgr().getModule("Land scapeMgr")->getCallOrder(actionName)+10.;
return 0; return 0;
} }
void CompassMarks::init() void CompassMarks::init()
{ {
qDebug() << "CompassMarks plugin - press control-C to toggle compass marks"; qDebug() << "CompassMarks plugin - press control-C to toggle compass marks";
try try
{ {
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui()); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui());
pxmapGlow = new QPixmap(":/graphicGui/gui/glow32x32.png"); pxmapGlow = new QPixmap(":/graphicGui/glow32x32.png");
pxmapOnIcon = new QPixmap(":/compassMarks/bt_compass_on.png" ); pxmapOnIcon = new QPixmap(":/compassMarks/bt_compass_on.png" );
pxmapOffIcon = new QPixmap(":/compassMarks/bt_compass_off.pn g"); pxmapOffIcon = new QPixmap(":/compassMarks/bt_compass_off.pn g");
gui->addGuiActions("actionShow_Compass_Marks", N_("Compass m arks"), "Ctrl+C", "Plugin Key Bindings", true, false); gui->addGuiActions("actionShow_Compass_Marks", N_("Compass m arks"), "Ctrl+C", "Plugin Key Bindings", true, false);
gui->getGuiActions("actionShow_Compass_Marks")->setChecked(m arkFader); gui->getGuiActions("actionShow_Compass_Marks")->setChecked(m arkFader);
toolbarButton = new StelButton(NULL, *pxmapOnIcon, *pxmapOff Icon, *pxmapGlow, gui->getGuiActions("actionShow_Compass_Marks")); toolbarButton = new StelButton(NULL, *pxmapOnIcon, *pxmapOff Icon, *pxmapGlow, gui->getGuiActions("actionShow_Compass_Marks"));
gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGr oup"); gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGr oup");
connect(gui->getGuiActions("actionShow_Compass_Marks"), SIGN AL(toggled(bool)), this, SLOT(setCompassMarks(bool))); connect(gui->getGuiActions("actionShow_Compass_Marks"), SIGN AL(toggled(bool)), this, SLOT(setCompassMarks(bool)));
connect(gui->getGuiActions("actionShow_Cardinal_Points"), SI GNAL(toggled(bool)), this, SLOT(cardinalPointsChanged(bool))); connect(gui->getGuiActions("actionShow_Cardinal_Points"), SI GNAL(toggled(bool)), this, SLOT(cardinalPointsChanged(bool)));
cardinalPointsState = false; cardinalPointsState = false;
skipping to change at line 140 skipping to change at line 140
qWarning() << "WARNING: unable create toolbar button for Com passMarks plugin: " << e.what(); qWarning() << "WARNING: unable create toolbar button for Com passMarks plugin: " << e.what();
} }
} }
//! Draw any parts on the screen which are for our module //! Draw any parts on the screen which are for our module
void CompassMarks::draw(StelCore* core) void CompassMarks::draw(StelCore* core)
{ {
if (markFader.getInterstate() <= 0.0) { return; } if (markFader.getInterstate() <= 0.0) { return; }
Vec3f pos; Vec3f pos;
Vec3d xy; Vec3f xy;
Vec3d xy2; Vec3f xy2;
StelProjectorP prj = core->getProjection(StelCore::FrameAltAz); StelProjectorP prj = core->getProjection(StelCore::FrameAltAz);
StelPainter painter(prj); StelPainter painter(prj);
painter.setFont(font); painter.setFont(font);
glColor4f(markColor[0],markColor[1],markColor[2], markFader.getInter state()); glColor4f(markColor[0],markColor[1],markColor[2], markFader.getInter state());
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND); glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH); glEnable(GL_LINE_SMOOTH);
for(int i=0; i<360; i++) for(int i=0; i<360; i++)
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 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/