[Kstars-devel] "Altitude vs. Time" tool implemented with QCustomPlot library, a

Raphael Cojocaru raphael.cojocaru at yahoo.com
Tue Jan 12 20:33:39 UTC 2016


Hi. 
I am currently working on "Improve Altitude vs. Time tool" task and here is a brief overview on my work. Iimplemented the Altitude vs. Time tool with QCustomPlot library and until now Ihave solved the following:
- Set up the graph window
- Set up the axis labels, Date time format and tick step ( the time's unitsneed to be discrete like: 01:00, 02:00 )
- Set up the Top X Axis ( "Local Sidereal Time" )
- Set up the interaction set: Zoom/Pan are now ready for use
- Set up the margins, for a nice view ( e.g. in the right side, the graph windowwas not closed before)
- Set up the Zoom/Pan activated for the Top X Axis 
- Because I need a kind of limitation regarding the Zoom/Pan for the currentcurve, I have used:
1. 2 variables for minimum and maximum altitude from the current graph ( forevery curve that we insert into our graph, the minAlt and maxAlt variables areupdated )
2. these variables are extremely useful to limit the Y axis to our graph most insignificantcurve regarding the minimum and maximum value
3. 2 new slots: onXRangeChanged and onYRangeChanged, to update and limit theaxis
- With all of these, I have connected the slots to the axis, with one remark:the xAxis and xAxis2 are connected through the same slot, to behave as same
- Rewrite the code for making existing curves with thin and red pencil
- A short algorithm for setting up the tick step for xAxis and xAxis2 dependingon the Zoom level ( like: a half an hour after some zoom level: 1:30, 2:00; aquarter hour after another zoom level and so on. this is necessary becausethere wouldn't be anything to see if the initial tick step would be maintainedwhile continuously zooming )
- Rewrite the method for removing all curves from the plot ( cleaning the graph)

For now I have a small bug to fix: after some scrolls ( Zoom In ), the Top Xaxis and Bottom X axis values become the same. ( the delay for the Top X Axis disappears). So I'm trying to solve it. I will post a new patch with all these achievementsimmediately after I solve this bug.
Next, I will search and implement a method to show curves' name in the chart,and I also have to compute and indicate the Rise/Transit/Set points on thecurve. Regarding the gradient, I will leave it at the end. 

Raphael
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20160112/83f27bba/attachment.html>


More information about the Kstars-devel mailing list