Kstars
skylabeler.h
118 };
237 *@param obj reference to the QPainter on which to draw (either the sky pixmap or printer device)
238 *@param _p The screen position for the label (in pixels; typically as found by SkyMap::toScreen())
The Projector class is the primary class that serves as an interface to handle projections.
Definition projector.h:58
The purpose of this class is to prevent labels from overlapping.
Definition skylabeler.h:99
bool markText(const QPointF &p, const QString &text, qreal padding_factor=1)
tells the labeler the location and text of a label you want to draw.
Definition skylabeler.cpp:408
void resetFont()
sets the font in SkyLabeler and in psky back to the zoom dependent value that was set in reset().
Definition skylabeler.cpp:222
void shrinkFont(int delta)
decreases the size of the font in psky and in the SkyLabeler by the delta points.
Definition skylabeler.cpp:206
void setZoomFont()
adjusts the font in psky to be smaller if we are zoomed out.
Definition skylabeler.cpp:44
bool markRegion(qreal left, qreal right, qreal top, qreal bot)
Works just like markText() above but for an arbitrary rectangular region bounded by top,...
Definition skylabeler.cpp:425
static void AddLabel(SkyObject *obj, label_t type)
static version of addLabel() below.
Definition skylabeler.h:135
void setFont(const QFont &font)
tells the labeler the font you will be using so it can figure out the height and width of the labels.
Definition skylabeler.cpp:187
void reset(SkyMap *skyMap)
clears the virtual screen (if needed) and resizes the virtual screen (if needed) to match skyMap.
Definition skylabeler.cpp:250
void getMargins(const QString &text, float *left, float *right, float *top, float *bot)
sets four margins for help in keeping labels entirely on the screen.
Definition skylabeler.cpp:227
QFontMetricsF & fontMetrics()
returns the fontMetricsF we have already created.
Definition skylabeler.h:205
bool drawGuideLabel(QPointF &o, const QString &text, double angle)
Tries to draw the text at the position and angle specified.
Definition skylabeler.cpp:112
void addLabel(SkyObject *obj, label_t type)
queues the label in the "type" buffer for later drawing.
Definition skylabeler.cpp:577
void setPen(const QPen &pen)
sets the pen used for drawing labels on the sky.
Definition skylabeler.cpp:197
float hitRatio()
diagnostic, the number of times mark() returned true divided by the total number of times mark was ca...
Definition skylabeler.cpp:676
void useStdFont()
sets the font in SkyLabeler and in psky to the font psky had originally when reset() was called.
Definition skylabeler.cpp:217
void printInfo()
diagnostic, prints some brief statistics to the console.
Definition skylabeler.cpp:683
void drawQueuedLabelsType(SkyLabeler::label_t type)
a convenience routine that draws all the labels from a single buffer.
Definition skylabeler.cpp:633
@ NUM_LABEL_TYPES
Rude labels block other labels FIXME: find a better solution.
Definition skylabeler.h:117
void drawRudeNameLabel(SkyObject *obj, const QPointF &_p)
draw the object's name label on the map, without checking for overlap with other labels.
Definition skylabeler.cpp:647
bool drawNameLabel(SkyObject *obj, const QPointF &_p, const qreal padding_factor=1)
Tries to draw a label for an object.
Definition skylabeler.cpp:161
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.