• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • ekos
  • guide
scroll_graph.h
Go to the documentation of this file.
1 /* Ekos guide tool
2  Copyright (C) 2012 Andrew Stepanenko
3 
4  Modified by Jasem Mutlaq <mutlaqja@ikarustech.com> for KStars.
5 
6  This application is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10  */
11 
12 #ifndef CSCROLL_GRAPH_H_
13 #define CSCROLL_GRAPH_H_
14 
15 #include <QtGui>
16 #include <QWidget>
17 #include <QImage>
18 #include <QPainter>
19 
20 
21 #define RA_LINE 0
22 #define DEC_LINE 1
23 
24 typedef struct
25 {
26  double *line[2];
27 }delta_data_t;
28 
29 
30 
31 class cscroll_graph
32 {
33 public:
34  cscroll_graph( QWidget *own, int client_width, int client_height );
35  virtual ~cscroll_graph();
36 
37  QImage *get_buffer( void );
38  bool add_point( double ra, double dec );
39  void set_visible_ranges( int rx, int ry );
40  void get_visible_ranges( int *rx, int *ry );
41  int get_grid_N( void );
42  void reset_view( void );
43  void reset_data( void );
44  void on_paint( void );
45  void get_screen_size( int *sx, int *sy );
46 
47 
48 private:
49  // view
50  QWidget *owner;
51  QImage *buffer;
52  QPainter canvas;
53  QColor BKGD_COLOR, RA_COLOR, DEC_COLOR, GRID_COLOR, WHITE_COLOR, GRID_FONT_COLOR;
54  QPen pen;
55  QBrush brush;
56  int half_buffer_size_wd;
57  int half_buffer_size_ht;
58  int client_rect_wd;
59  int client_rect_ht;
60  bool need_refresh;
61 
62  // data
63  delta_data_t data;
64  int data_cnt;
65  int data_idx;
66  int grid_N;
67 
68  // grid vars...
69  double grid_step_x, grid_step_y, grid_view_step_x, grid_view_step_y;
70  int font_ht_k;
71 
72  // control
73  int vis_range_x, vis_range_y;
74  int half_vis_range_x, half_vis_range_y;
75 
76  void refresh( void );
77  void draw_grid( double kx, double ky );
78  void init_render_vars( void );
79 
80 };
81 
82 #endif /*CSCROLL_GRAPH_H_*/
cscroll_graph::get_grid_N
int get_grid_N(void)
Definition: scroll_graph.cpp:124
cscroll_graph::on_paint
void on_paint(void)
Definition: scroll_graph.cpp:163
cscroll_graph::~cscroll_graph
virtual ~cscroll_graph()
Definition: scroll_graph.cpp:61
QWidget
cscroll_graph::reset_view
void reset_view(void)
Definition: scroll_graph.cpp:130
cscroll_graph::reset_data
void reset_data(void)
Definition: scroll_graph.cpp:141
cscroll_graph::add_point
bool add_point(double ra, double dec)
Definition: scroll_graph.cpp:382
cscroll_graph::set_visible_ranges
void set_visible_ranges(int rx, int ry)
Definition: scroll_graph.cpp:87
cscroll_graph::get_visible_ranges
void get_visible_ranges(int *rx, int *ry)
Definition: scroll_graph.cpp:117
delta_data_t
Definition: scroll_graph.h:24
cscroll_graph::get_screen_size
void get_screen_size(int *sx, int *sy)
Definition: scroll_graph.cpp:156
cscroll_graph
Definition: scroll_graph.h:31
cscroll_graph::get_buffer
QImage * get_buffer(void)
Definition: scroll_graph.cpp:150
cscroll_graph::cscroll_graph
cscroll_graph(QWidget *own, int client_width, int client_height)
Definition: scroll_graph.cpp:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal