Public Member Functions
|TargetListComponent (SkyComposite *parent)|
|TargetListComponent (SkyComposite *parent, QList< SkyObject * > *objectList, QPen _pen, bool(*optionDrawSymbols)(void)=nullptr, bool(*optionDrawLabels)(void)=nullptr)|
|void||draw (SkyPainter *skyp) override|
|Public Member Functions inherited from SkyComponent|
|SkyComponent (SkyComposite *parent=nullptr)|
|virtual void||drawTrails (SkyPainter *skyp)|
|virtual void||emitProgressText (const QString &message)|
|virtual SkyObject *||findByName (const QString &name, bool exact=true)|
|QHash< int, QVector< QPair< QString, const SkyObject * > > > &||objectLists ()|
|QVector< QPair< QString, const SkyObject * > > &||objectLists (int type)|
|QHash< int, QStringList > &||objectNames ()|
|QStringList &||objectNames (int type)|
|virtual SkyObject *||objectNearest (SkyPoint *p, double &maxrad)|
|virtual void||objectsInArea (QList< SkyObject * > &list, const SkyRegion ®ion)|
|SkyComposite *||parent ()|
|void||removeFromLists (const SkyObject *obj)|
|void||removeFromNames (const SkyObject *obj)|
|virtual bool||selected ()|
|virtual void||update (KSNumbers *)|
|virtual void||updateMoons (KSNumbers *)|
|virtual void||updateSolarSystemBodies (KSNumbers *)|
|std::unique_ptr< SkyObjectList >||list|
|QList< QSharedPointer< SkyObject > >||list2|
Highlights objects present in certain lists by drawing "target" symbols around them.
To represent lists of specific objects on the skymap (eg: A star hopping route, or a list of planned observation targets), one would typically like to draw over the skymap, a bunch of symbols highlighting the locations of these objects. This class manages drawing of such lists. Along with the list, we also associate a pen to use to represent objects from that list. Once this class is made aware of a list to plot (which is stored somewhere else), it does so when called from the SkyMapComposite. The class may be supplied with pointers to two methods that tell it whether to draw symbols / labels or not. Disabling symbol drawing is equivalent to disabling the list. If the pointers are nullptr, the symbols are always drawn, but the labels are not drawn.
- This does not inherit from ListComponent because it is not necessary. ListComponent has extra methods like objectNearest(), which we don't want. Also, ListComponent maintains its own list, whereas this class merely holds a pointer to a list that's manipulated from elsewhere.
Definition at line 37 of file targetlistcomponent.h.
Constructor & Destructor Documentation
◆ TargetListComponent() [1/2]
Definition at line 15 of file targetlistcomponent.cpp.
◆ TargetListComponent() [2/2]
|QList< SkyObject * > *||objectList,|
Constructor that sets up this target list.
Definition at line 21 of file targetlistcomponent.cpp.
Member Function Documentation
Draw this component by iterating over the list.
- This method does not bother refreshing the coordinates of the objects on the list. So this must be called only after the objects are drawn in a given draw cycle.
Definition at line 37 of file targetlistcomponent.cpp.
Member Data Documentation
|bool(* TargetListComponent::drawLabels) (void)|
Pointer to static method that tells us whether to draw labels for this list or not.
- If the pointer is nullptr, labels are not drawn
Definition at line 80 of file targetlistcomponent.h.
|bool(* TargetListComponent::drawSymbols) (void)|
Pointer to static method that tells us whether to draw this list or not.
- If the pointer is nullptr, the list is drawn nevertheless
Definition at line 74 of file targetlistcomponent.h.
Pointer to list of objects to draw.
Definition at line 64 of file targetlistcomponent.h.
|QList<QSharedPointer<SkyObject> > TargetListComponent::list2|
Pointer to list of objects to draw.
Definition at line 66 of file targetlistcomponent.h.
Pen to use to draw.
Definition at line 68 of file targetlistcomponent.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Jun 9 2023 04:02:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.