Stellarium  HEAD
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Properties
SkyCultureMaker Class Reference

Public Slots

bool getIsScmEnabled () const
 
void setIsScmEnabled (bool b)
 

Signals

void eventIsScmEnabled (bool b)
 

Public Member Functions

void init () override
 Initialize itself. More...
 
void draw (StelCore *core) override
 Execute all the drawing functions for this module. More...
 
double getCallOrder (StelModuleActionName actionName) const override
 Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations. More...
 
void handleMouseClicks (QMouseEvent *) override
 Handle mouse clicks. More...
 
bool handleMouseMoves (int x, int y, Qt::MouseButtons b) override
 Handle mouse moves. More...
 
void handleKeys (QKeyEvent *e) override
 Handle key events. More...
 
void setToolbarButtonState (bool b)
 Sets the toolbar button state. More...
 
void setStartDialogVisibility (bool b)
 Shows the start dialog for the sky culture maker. More...
 
void setSkyCultureDialogVisibility (bool b)
 Shows the sky culture dialog. More...
 
void setConstellationDialogVisibility (bool b)
 Shows the constellation dialog. More...
 
void setConstellationDialogIsDarkConstellation (bool isDarkConstellation)
 Sets whether the constellation dialog is for a dark constellation. More...
 
void setSkyCultureExportDialogVisibility (bool b)
 Shows the sky culture export dialog. More...
 
void setHideOrAbortMakerDialogVisibility (bool b)
 Shows the hide or abort maker dialog. More...
 
void hideAllDialogs ()
 Set the visibility of all dialogs. More...
 
void setIsLineDrawEnabled (bool b)
 Toggles the usage of the line draw. More...
 
void triggerDrawUndo ()
 Triggers a single undo operation in the line draw.
 
void setDrawTool (scm::DrawTools tool)
 Sets the active used draw tool. More...
 
void setNewSkyCulture ()
 Sets a new sky culture object.
 
scm::ScmSkyCulturegetCurrentSkyCulture ()
 Gets the current set sky culture.
 
scm::ScmDrawgetScmDraw ()
 Gets the SCM drawing object.
 
void resetScmDraw ()
 Resets the SCM drawing object.
 
void updateSkyCultureDialog ()
 Triggers an update of the sky culture dialog.
 
void setSkyCultureDescription (const scm::Description &description)
 Sets the current sky culture description. More...
 
bool saveSkyCultureDescription (const QDir &directory)
 Saves the current sky culture description as markdown text. More...
 
void saveScmDialogVisibilityState ()
 Saves the visibility state of the SCM dialogs.
 
void restoreScmDialogVisibilityState ()
 Restores the visibility state of the SCM dialogs.
 
bool isAnyDialogHidden () const
 Checks if any SCM dialog is currently hidden.
 
void resetScmDialogs ()
 Resets all SCM dialogs content and visibility states.
 
void resetScmDialogsVisibilityState ()
 Resets the visibility state of the SCM dialogs.
 
bool isAnyDialogVisible () const
 Checks if any SCM dialog is currently visible. More...
 
void setTempArtwork (const scm::ScmConstellationArtwork *artwork)
 Sets the temporary artwork that should be drawn. More...
 
void openConstellationDialog (const QString &constellationId)
 Opens the constellation dialog with data for a given constellation. More...
 
void showUserInfoMessage (QWidget *parent, const QString &dialogName, const QString &message)
 Displays an information message to the user. More...
 
void showUserWarningMessage (QWidget *parent, const QString &dialogName, const QString &message)
 Displays a warning message to the user. More...
 
void showUserErrorMessage (QWidget *parent, const QString &dialogName, const QString &message)
 Displays an error message to the user. More...
 
- Public Member Functions inherited from StelModule
 StelModule ()
 Constructor. Every derived class MUST call setObjectName(className) in its constructor.
 
virtual void deinit ()
 Called before the module will be deleted, and before the OpenGL context is suppressed. More...
 
virtual QSettings * getSettings ()
 Return module-specific settings. More...
 
virtual void update (double deltaTime)
 Update the module with respect to the time. More...
 
virtual QString getModuleVersion () const
 Get the version of the module, default is stellarium main version.
 
virtual QString getAuthorName () const
 Get the name of the module author.
 
virtual QString getAuthorEmail () const
 Get the email address of the module author.
 
virtual void handleMouseWheel (class QWheelEvent *)
 Handle mouse wheel. More...
 
virtual bool handlePinch (qreal scale, bool started)
 Handle pinch gesture events. More...
 
virtual bool configureGui (bool show=true)
 Detect or show the configuration GUI elements for the module. More...
 

Static Public Member Functions

static void setActionToggle (const QString &id, bool toggle)
 Set the toggle value for a given action. More...
 

Properties

bool enabledScm
 

Additional Inherited Members

- Public Types inherited from StelModule
enum  StelModuleSelectAction { AddToSelection , ReplaceSelection , RemoveFromSelection }
 Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More...
 
enum  StelModuleActionName {
  ActionDraw , ActionUpdate , ActionHandleMouseClicks , ActionHandleMouseMoves ,
  ActionHandleKeys
}
 Define the possible action for which an order is defined. More...
 
- Protected Member Functions inherited from StelModule
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to slot) to the StelActionMgr object. More...
 
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to own slot) to the StelActionMgr object. More...
 
StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *contextObject, std::function< void()> lambda, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to Lambda functor) to the StelActionMgr object. More...
 

Member Function Documentation

◆ draw()

void SkyCultureMaker::draw ( StelCore core)
overridevirtual

Execute all the drawing functions for this module.

Parameters
corethe core to use for the drawing

Reimplemented from StelModule.

◆ getCallOrder()

double SkyCultureMaker::getCallOrder ( StelModuleActionName  actionName) const
overridevirtual

Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.

Parameters
actionNamethe name of the action for which we want the call order
Returns
the value defining the order. The closer to 0 the earlier the module's action will be called

Reimplemented from StelModule.

◆ handleKeys()

void SkyCultureMaker::handleKeys ( QKeyEvent *  e)
overridevirtual

Handle key events.

Please note that most of the interactions will be done through the GUI module.

Parameters
ethe Key event
Returns
set the event as accepted if it was intercepted

Reimplemented from StelModule.

◆ handleMouseClicks()

void SkyCultureMaker::handleMouseClicks ( QMouseEvent *  )
overridevirtual

Handle mouse clicks.

Please note that most of the interactions will be done through the GUI module.

Returns
set the event as accepted if it was intercepted

Reimplemented from StelModule.

◆ handleMouseMoves()

bool SkyCultureMaker::handleMouseMoves ( int  x,
int  y,
Qt::MouseButtons  b 
)
overridevirtual

Handle mouse moves.

Please note that most of the interactions will be done through the GUI module.

Returns
true if the event was intercepted

Reimplemented from StelModule.

◆ hideAllDialogs()

void SkyCultureMaker::hideAllDialogs ( )

Set the visibility of all dialogs.

Parameters
bThe boolean value to be set.

◆ init()

void SkyCultureMaker::init ( )
overridevirtual

Initialize itself.

If the initialization takes significant time, the progress should be displayed on the loading bar.

Implements StelModule.

◆ isAnyDialogVisible()

bool SkyCultureMaker::isAnyDialogVisible ( ) const

Checks if any SCM dialog is currently visible.

Returns
true if any dialog is visible, false otherwise.

◆ openConstellationDialog()

void SkyCultureMaker::openConstellationDialog ( const QString &  constellationId)

Opens the constellation dialog with data for a given constellation.

Parameters
constellationIdThe ID of the constellation to open the dialog for.

◆ saveSkyCultureDescription()

bool SkyCultureMaker::saveSkyCultureDescription ( const QDir &  directory)

Saves the current sky culture description as markdown text.

Parameters
directoryThe directory to save the description in.
Returns
true if the description was saved successfully, false otherwise.

◆ setActionToggle()

static void SkyCultureMaker::setActionToggle ( const QString &  id,
bool  toggle 
)
static

Set the toggle value for a given action.

Parameters
toggleThe toggled value to be set.

◆ setConstellationDialogIsDarkConstellation()

void SkyCultureMaker::setConstellationDialogIsDarkConstellation ( bool  isDarkConstellation)

Sets whether the constellation dialog is for a dark constellation.

Parameters
isDarkConstellationThe boolean value to be set.

◆ setConstellationDialogVisibility()

void SkyCultureMaker::setConstellationDialogVisibility ( bool  b)

Shows the constellation dialog.

Parameters
bThe boolean value to be set.

◆ setDrawTool()

void SkyCultureMaker::setDrawTool ( scm::DrawTools  tool)

Sets the active used draw tool.

Parameters
toolThe tool to be used.

◆ setHideOrAbortMakerDialogVisibility()

void SkyCultureMaker::setHideOrAbortMakerDialogVisibility ( bool  b)

Shows the hide or abort maker dialog.

Parameters
bThe boolean value to be set.

◆ setIsLineDrawEnabled()

void SkyCultureMaker::setIsLineDrawEnabled ( bool  b)

Toggles the usage of the line draw.

Parameters
bThe boolean value to be set.

◆ setSkyCultureDescription()

void SkyCultureMaker::setSkyCultureDescription ( const scm::Description description)

Sets the current sky culture description.

Parameters
descriptionThe description to set.

◆ setSkyCultureDialogVisibility()

void SkyCultureMaker::setSkyCultureDialogVisibility ( bool  b)

Shows the sky culture dialog.

Parameters
bThe boolean value to be set.

◆ setSkyCultureExportDialogVisibility()

void SkyCultureMaker::setSkyCultureExportDialogVisibility ( bool  b)

Shows the sky culture export dialog.

Parameters
bThe boolean value to be set.

◆ setStartDialogVisibility()

void SkyCultureMaker::setStartDialogVisibility ( bool  b)

Shows the start dialog for the sky culture maker.

Parameters
bThe boolean value to be set.

◆ setTempArtwork()

void SkyCultureMaker::setTempArtwork ( const scm::ScmConstellationArtwork artwork)

Sets the temporary artwork that should be drawn.

Parameters
artworkThe artwork to draw.

◆ setToolbarButtonState()

void SkyCultureMaker::setToolbarButtonState ( bool  b)

Sets the toolbar button state.

Parameters
bThe boolean value to be set.

◆ showUserErrorMessage()

void SkyCultureMaker::showUserErrorMessage ( QWidget *  parent,
const QString &  dialogName,
const QString &  message 
)

Displays an error message to the user.

Parameters
parentThe parent widget of the message box.
dialogNameThe name of the dialog to be shown in the title bar.
messageThe message to be displayed.

◆ showUserInfoMessage()

void SkyCultureMaker::showUserInfoMessage ( QWidget *  parent,
const QString &  dialogName,
const QString &  message 
)

Displays an information message to the user.

Parameters
parentThe parent widget of the message box.
dialogNameThe name of the dialog to be shown in the title bar.
messageThe message to be displayed.

◆ showUserWarningMessage()

void SkyCultureMaker::showUserWarningMessage ( QWidget *  parent,
const QString &  dialogName,
const QString &  message 
)

Displays a warning message to the user.

Parameters
parentThe parent widget of the message box.
dialogNameThe name of the dialog to be shown in the title bar.
messageThe message to be displayed.