Kstars
altvstime.cpp
56 // Layers for setting up the plot's priority: the current curve should be above the other curves.
59 avtUI->View->addLayer("markersLayer", avtUI->View->layer("currentCurveLayer"), QCustomPlot::limAbove);
180 connect(avtUI->View->yAxis, SIGNAL(rangeChanged(QCPRange)), this, SLOT(onYRangeChanged(QCPRange)));
181 connect(avtUI->View->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(onXRangeChanged(QCPRange)));
284 if (!avtUI->nameBox->text().isEmpty() && !avtUI->raBox->text().isEmpty() && !avtUI->decBox->text().isEmpty())
440 background->topLeft->setCoords(avtUI->View->xAxis->range().lower, avtUI->View->yAxis->range().upper);
441 background->bottomRight->setCoords(avtUI->View->xAxis->range().upper, avtUI->View->yAxis->range().lower);
550 void AltVsTime::plotMousePress(QCPAbstractPlottable *abstractPlottable, int dataIndex, QMouseEvent *event)
674 qCWarning(KSTARS) << "slotComputeAltitudeByTime: Unable to find" << avtUI->PlotList->currentItem()->text();
683 KStarsDateTime lt = KStarsDateTime(avtUI->DateWidget->date(), avtUI->timeSpin->time(), Qt::LocalTime);
707 qCWarning(KSTARS) << "Mark Rise Time: Unable to find" << avtUI->PlotList->currentItem()->text();
798 qCWarning(KSTARS) << "Mark Transit Time: Unable to find" << avtUI->PlotList->currentItem()->text();
899 p.drawText( 5, 5, QLocale().toString( localTime, QLocale::ShortFormat ) ); // short format necessary to avoid false time-zone labeling
1031 background->topLeft->setCoords(avtUI->View->xAxis->range().lower, avtUI->View->yAxis->range().upper);
1032 background->bottomRight->setCoords(avtUI->View->xAxis->range().upper, avtUI->View->yAxis->range().lower);
1083 background->topLeft->setCoords(avtUI->View->xAxis->range().lower, avtUI->View->yAxis->range().upper);
1084 background->bottomRight->setCoords(avtUI->View->xAxis->range().upper, avtUI->View->yAxis->range().lower);
1200 0.01; // pW * fraction of day to fade the moon brightness over (0.01 corresponds to roughly 15 minutes, 0.007 to 10 minutes), both before and after actual set.
1219 p.fillRect(QRectF(moonrise + fadewidth, 0.0, moonset - moonrise - 2 * fadewidth, pH), MoonColor);
1301 Qt::transparent); // FIXME?: The sky appears black well before the actual end of twilight if the gradient is too slow (eg: latitudes above arctic circle)
1310 p.fillRect(0, int(0.5 * pH), pW, int(0.5 * pH), KStarsData::Instance()->colorScheme()->colorNamed("HorzColor"));
Antialiasing
void slotAddSource()
Add an object to the list of displayed objects, according to the data entered in the edit boxes.
Definition: altvstime.cpp:252
void setColorAt(qreal position, const QColor &color)
void showText(const QPoint &pos, const QString &text, QWidget *w)
void setFinalStop(const QPointF &stop)
void slotBrowseObject()
Launch the Find Object window to select a new object for the list of displayed objects.
Definition: altvstime.cpp:348
static KStarsDateTime currentDateTime()
Definition: kstarsdatetime.cpp:73
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
Definition: kstarsdatetime.h:35
AlignLeft
int width() const const
void onYRangeChanged(const QCPRange &range)
Update the Y axis on Zoom and Drag.
Definition: altvstime.cpp:544
void setPen(const QColor &color)
virtual int exec() override
KStarsDateTime addDays(int nd) const
Modify the Date/Time by adding a number of days.
Definition: kstarsdatetime.h:110
QString number(int n, int base)
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
virtual void setD(const double &x)
Sets floating-point value of angle, in degrees.
Definition: dms.h:179
virtual void reject()
void rotate(qreal angle)
UTC
void setScaled(bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation)
Definition: qcustomplot.cpp:30177
void drawEllipse(const QRectF &rectangle)
void slotComputeAltitudeByTime()
Compute the altitude for a certain time.
Definition: altvstime.cpp:668
void processObject(SkyObject *o, bool forceAdd=false)
Add a SkyObject to the display.
Definition: altvstime.cpp:360
QCPRange bounded(double lowerBound, double upperBound) const
Definition: qcustomplot.cpp:2012
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
a dms subclass that caches its sine and cosine values every time the angle is changed.
Definition: cachingdms.h:18
void setPointSize(int pointSize)
void setClipRect(const QRectF &rectangle, Qt::ClipOperation operation)
QTime time() const const
int pointSize() const const
void push_back(const T &value)
QIcon fromTheme(const QString &name)
Definition: kstarsdata.h:70
void fill(const QColor &color)
double getEpoch(const QString &eName)
Parse a string as an epoch number.
Definition: altvstime.cpp:1349
static KStarsDateTime currentDateTimeUtc()
Definition: kstarsdatetime.cpp:82
QTime addSecs(int s) const const
bool antialiasing() const
bool isValid() const const
RightButton
qreal opacity() const const
void setModal(bool modal)
void EquatorialToHorizontal(const CachingDms *LST, const CachingDms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates,...
Definition: skypoint.cpp:77
void drawText(const QPointF &position, const QString &text)
void fillRect(const QRectF &rectangle, const QBrush &brush)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int height() const const
void mouseOverLine(QMouseEvent *event)
Draw the white vertical line on click.
Definition: altvstime.cpp:913
void onXRangeChanged(const QCPRange &range)
Update the X axis on Zoom and Drag.
Definition: altvstime.cpp:526
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QColor backgroundColor() const
bool begin(QPaintDevice *device)
virtual void setH(const double &x)
Sets floating-point value of angle, in hours.
Definition: dms.h:210
Tool
bool setFromEpoch(double e, EpochType type)
Set the Date/Time from an epoch value, represented as a double.
Definition: kstarsdatetime.cpp:236
virtual void updateCoords(const KSNumbers *num, bool includePlanets=true, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, bool forceRecompute=false)
Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0),...
Definition: skypoint.cpp:582
void rejected()
bool end()
IgnoreAspectRatio
QString i18n(const char *text, const TYPE &arg...)
const QString toDMSString(const bool forceSign=false, const bool machineReadable=false, const bool highPrecision=false) const
Definition: dms.cpp:279
void setWindowFlags(Qt::WindowFlags type)
ActionRole
char * toString(const T &value)
QTime riseSetTime(const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true) const
Determine the time at which the point will rise or set.
Definition: skyobject.cpp:93
bool isEmpty() const const
WaitCursor
void setWindowTitle(const QString &)
void setAlpha(int alpha)
void addButton(QAbstractButton *button, QDialogButtonBox::ButtonRole role)
virtual void updateCoordsNow(const KSNumbers *num)
updateCoordsNow Shortcut for updateCoords( const KSNumbers *num, false, nullptr, nullptr,...
Definition: skypoint.h:382
Accepted
@ ptPlotCoords
Dynamic positioning at a plot coordinate defined by two axes (see setAxes).
Definition: qcustomplot.h:3605
Specialized axis ticker for time spans in units of milliseconds to days.
Definition: qcustomplot.h:1793
void setupUi(QWidget *widget)
void setLSTLimits()
Determine the limits for the sideral time axis, using the sidereal time at midnight for the current d...
Definition: altvstime.cpp:1120
void setBrush(const QBrush &brush)
int hour() const const
The abstract base class for all data representing objects in a plot.
Definition: qcustomplot.h:3440
double toDouble(bool *ok) const const
void setMouseTracking(bool enable)
void slotAdvanceFocus()
Move input keyboard focus to the next logical widget.
Definition: altvstime.cpp:607
void setDate(const QDate &d)
Assign the Date according to a QDate object.
Definition: kstarsdatetime.cpp:144
void setOpacity(qreal opacity)
void slotUpdateDateLoc()
Update the plot to reflec new Date and Location settings.
Definition: altvstime.cpp:967
ShortFormat
void setToolTip(const QString &)
void setOverrideCursor(const QCursor &cursor)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
void slotHighlight(int)
Update the plot to highlight the altitude curve of the objects which is highlighted in the listbox.
Definition: altvstime.cpp:478
int second() const const
double findAltitude(SkyPoint *p, double hour)
Determine the altitude coordinate of a SkyPoint, given an hour of the day.
Definition: altvstime.cpp:466
void computeSunRiseSetTimes()
Determine the time of sunset and sunrise for the current date and location settings.
Definition: altvstime.cpp:837
QDate date() const const
QString getObjectName(const SkyObject *o, bool translated=true)
get object name.
Definition: altvstime.cpp:1447
void drawLine(const QLineF &line)
const QFont & font() const const
void hideText()
void translate(const QPointF &offset)
void setContentsMargins(int left, int top, int right, int bottom)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void restore()
QString toString(Qt::DateFormat format) const const
QTime transitTime(const KStarsDateTime &dt, const GeoLocation *geo) const
The same iteration technique described in riseSetTime() is used here.
Definition: skyobject.cpp:239
@ tssReadability
A nicely readable tick step is prioritized over matching the requested number of ticks (see setTickCo...
Definition: qcustomplot.h:1690
void save()
void restoreOverrideCursor()
void setRenderHint(QPainter::RenderHint hint, bool on)
void setLayout(QLayout *layout)
void showCurrentDate()
Set the AltVsTime Date according to the current Date in the KStars main window.
Definition: altvstime.cpp:1135
DotLine
void setFont(const QFont &font)
void plotMousePress(QCPAbstractPlottable *abstractPlottable, int dataIndex, QMouseEvent *event)
Show information from the curve as a tooltip.
Definition: altvstime.cpp:550
@ iRangeZoom
0x002 Axis ranges are zoomable with the mouse wheel (see QCPAxisRect::setRangeZoom,...
Definition: qcustomplot.h:256
void slotChooseCity()
Launch the Location dialog to choose a new location.
Definition: altvstime.cpp:1103
int minute() const const
void setClipping(bool enable)
white
@ iRangeDrag
0x001 Axis ranges are draggable (see QCPAxisRect::setRangeDrag, QCPAxisRect::setRangeDragAxes)
Definition: qcustomplot.h:255
void setResolution(int dpi)
SkyPoint catalogueCoord(long double jdf)
Computes the J2000.0 catalogue coordinates for this SkyPoint using the epoch removing aberration,...
Definition: skypoint.cpp:710
void setStart(const QPointF &start)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Aug 14 2022 04:13:54 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Aug 14 2022 04:13:54 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.