Kstars
skylabeler.cpp
178 double newPointSize = qBound(12.0, factor * m_stdFont.pointSizeF(), 18.0) * (1.0 + 0.7 * Options::labelFontScaling()/100.0);
227 void SkyLabeler::getMargins(const QString &text, float *left, float *right, float *top, float *bot)
void append(const T &value)
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
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
Definition: skylabeler.h:98
void setPen(const QColor &color)
void rotate(qreal angle)
void moveTo(qreal x, qreal y)
void setPointSize(int pointSize)
int pointSize() const const
Definition: kstarsdata.h:70
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
int width() const const
QRect boundingRect(QChar ch) const const
qreal width(const QString &text) const const
void setZoomFont()
adjusts the font in psky to be smaller if we are zoomed out.
Definition: skylabeler.cpp:44
void setPen(const QPen &pen)
sets the pen used for drawing labels on the sky.
Definition: skylabeler.cpp:197
const QPen & pen() const const
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 drawText(const QPointF &position, const QString &text)
void fillRect(const QRectF &rectangle, const QBrush &brush)
void removeAt(int i)
bool begin(QPaintDevice *device)
bool onScreen(const QPointF &p) const
Check whether the projected point is on-screen.
Definition: projector.cpp:98
int size() const const
bool end()
void addLabel(SkyObject *obj, label_t type)
queues the label in the "type" buffer for later drawing.
Definition: skylabeler.cpp:577
QPointF topLeft() const const
bool drawGuideLabel(QPointF &o, const QString &text, double angle)
Tries to draw the text at the position and angle specified.
Definition: skylabeler.cpp:112
bool isEmpty() const const
bool play(QPainter *painter)
bool isActive() const const
const T & at(int i) const const
void setAlpha(int alpha)
int alpha() const const
QFontMetrics fontMetrics() const const
height
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 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 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 insert(int i, const T &value)
qreal top() const const
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
Item for displaying sky objects; also handles user interaction events.
Definition: skymaplite.h:58
void printInfo()
diagnostic, prints some brief statistics to the console.
Definition: skylabeler.cpp:683
height
int height() const const
QRect window() const const
void drawPoint(const QPointF &position)
qreal x() const const
qreal y() const const
bool drawNameLabel(SkyObject *obj, const QPointF &_p, const qreal padding_factor=1)
Tries to draw a label for an object.
Definition: skylabeler.cpp:161
Canvas widget for displaying the sky bitmap; also handles user interaction events.
Definition: skymap.h:53
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
const QFont & font() const const
QColor color() const const
void translate(const QPointF &offset)
void clear()
void restore()
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 save()
void moveTop(qreal y)
void useStdFont()
sets the font in SkyLabeler and in psky to the font psky had originally when reset() was called.
Definition: skylabeler.cpp:217
qreal height() const const
void setPointSizeF(qreal pointSize)
qreal pointSizeF() const const
void drawQueuedLabelsType(SkyLabeler::label_t type)
a convenience routine that draws all the labels from a single buffer.
Definition: skylabeler.cpp:633
width
void setFont(const QFont &font)
void setHeight(qreal height)
const QList< QKeySequence > & end()
width
void reset(SkyMap *skyMap)
clears the virtual screen (if needed) and resizes the virtual screen (if needed) to match skyMap.
Definition: skylabeler.cpp:250
qreal height() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jun 4 2023 03:57:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jun 4 2023 03:57:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.