I've also added the file names in the CMakeLists file
The compilation goes well but when I can't see the shortcut in the Stellarium's shortcuts list and when I press the keys nothing appends. Why? What is wrong? Please, let me know what I have to change
So I made a MyFunctions.hpp file with these lines of code
#ifndef _MYFUNCTIONS_HPP_
#define _MYFUNCTIONS_HPP_
#include "StelModule.hpp" .hpp" le.hpp"
#include "StelProjector.hpp"
#include "StelObjectType
#include "StelObjectModu
class MyFunctions
{
public:
MyFunctions();
virtual ~MyFunctions();
virtual void init();
public slots:
void customShortcut();
};
#endif // _MYFUNCTIONS_HPP_
and another called MyFunctions.cpp with these lines
#include "MyFunctions.hpp" API.hpp" r.hpp" .hpp"
#include "StelActionMgr.hpp"
#include "StelMainScript
#include "StelMovementMg
#include "StelModuleMgr.hpp"
#include "StelTranslator
#include "StelApp.hpp"
#include "StelCore.hpp"
#include <QString>
#include <QTextStream>
#include <QSettings>
#include <QKeyEvent>
#include <QDebug>
MyFunctions: :MyFunctions( )
{
}
MyFunctions: :~MyFunctions( )
{
}
void MyFunctions::init() :getInstance( ).getStelAction Manager( ); >addAction( "actionCustom_ Shortcut" , N_("Miscellaneo us"), N_("Custom shortcut"), core, tcut()" , "Shift+X");
{
StelCore* core = new StelCore;
StelActionMgr* actionsMgr = StelApp:
actionsMgr-
"customShor
}
void MyFunctions: :customShortcut () iptAPI* core = GETSTELMODULE( StelMainScriptA PI); tMgr* stelMovementMgr = GETSTELMODULE( StelMovementMgr ); >selectObjectBy Name("Sun" , false); tMgr->setFlagTr acking( true);
{
StelMainScr
StelMovemen
core-
stelMovemen
}
I've also added the file names in the CMakeLists file
The compilation goes well but when I can't see the shortcut in the Stellarium's shortcuts list and when I press the keys nothing appends. Why? What is wrong? Please, let me know what I have to change