Kstars
skylabeler.cpp
178 double newPointSize = qBound(12.0, factor * m_stdFont.pointSizeF(), 18.0) * (1.0 + 0.7 * Options::labelFontScaling()/100.0);
227void SkyLabeler::getMargins(const QString &text, float *left, float *right, float *top, float *bot)
QPointF toScreen(const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=nullptr) const
This is exactly the same as toScreenVec but it returns a QPointF.
Definition projector.cpp:93
bool onScreen(const QPointF &p) const
Check whether the projected point is on-screen.
Definition projector.cpp:98
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
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
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
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
static constexpr double PI
PI is a const static member; it's public so that it can be used anywhere, as long as dms....
Definition dms.h:385
int alpha() const const
void setAlpha(int alpha)
int pointSize() const const
qreal pointSizeF() const const
void setPointSize(int pointSize)
void setPointSizeF(qreal pointSize)
QRect boundingRect(QChar ch) const const
qreal averageCharWidth() const const
qreal height() const const
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
void clear()
iterator insert(const_iterator before, parameter_type value)
void removeAt(qsizetype i)
qsizetype size() const const
bool begin(QPaintDevice *device)
void drawPoint(const QPoint &position)
void drawText(const QPoint &position, const QString &text)
bool end()
void fillRect(const QRect &rectangle, QGradient::Preset preset)
const QFont & font() const const
QFontMetrics fontMetrics() const const
bool isActive() const const
const QPen & pen() const const
void restore()
void rotate(qreal angle)
void save()
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
void translate(const QPoint &offset)
QRect window() const const
QColor color() const const
bool play(QPainter *painter)
qreal x() const const
qreal y() const const
height
width
int height() const const
int width() const const
qreal height() const const
void moveTo(const QPointF &position)
void moveTop(qreal y)
void setHeight(qreal height)
qreal top() const const
QPointF topLeft() const const
bool isEmpty() const const
qsizetype size() const const
height
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:53:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:53:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.