summaryrefslogtreecommitdiffstats
path: root/kalzium/src/detailedgraphicaloverview.h
blob: 2f095be74cbffb8d8cd08c011f3018c4bee447c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef DETAILEDGRAPHICALOVERVIEW_H
#define DETAILEDGRAPHICALOVERVIEW_H
/***************************************************************************
    copyright            : (C) 2004 by Carsten Niehaus
    email                : cniehaus@kde.org

 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <qwidget.h>

class Element;


/**
 * @short The widget which displays the most important information
 * in one widget like a lot people know it from school
 * @author Carsten Niehaus
 */
class DetailedGraphicalOverview : public QWidget
{
	Q_OBJECT

	public:
		DetailedGraphicalOverview( Element *el, QWidget *parent, const char *name=0 );
		DetailedGraphicalOverview( QWidget *parent, const char *name=0 );

		/**
		 * sets the elements whose data will be used to @p el
		 */
		void setElement( Element* el ){
			m_element = el;
			update();
		}

		/**
		 * draw the small symbol which symbolises the
		 * relevence for humans
		 */
		void drawBiologicalSymbol( QPainter *p );
	
		//calculation of the corners
		int x1,x2,y1,y2,h_t;

	private:
		/**
		 * the element whose data will be used
		 */
		Element *m_element;

	protected:
		virtual void paintEvent( QPaintEvent* );

		/**
		 * initialization method
		 */
		virtual void init( Element* );
};

#endif // DETAILEDGRAPHICALOVERVIEW_H