BALL 1.5.0
SDWidget.h
Go to the documentation of this file.
1#ifndef BALL_VIEW_WIDGETS_SDWIDGET_H
2#define BALL_VIEW_WIDGETS_SDWIDGET_H
3
4#ifndef BALL_COMMON_GLOBAL_H
5# include <BALL/COMMON/global.h>
6#endif
7
8#ifndef BALL_DATATYPE_OPTIONS_H
10#endif
11
12#include <BALL/KERNEL/system.h>
13
14#include <QtWidgets/QWidget>
15
16namespace BALL
17{
18 namespace VIEW
19 {
20
23 : public QWidget
24 {
25 Q_OBJECT
26
27 public:
28
34 {
37 static const char* SHOW_HYDROGENS;
38 };
39
42 {
43 static const bool SHOW_HYDROGENS;
44 };
45
47
49 SDWidget(QWidget *parent = 0, bool show_hydrogens = false);
50
52 SDWidget(const System& system, QWidget *parent = 0);
53
55 virtual ~SDWidget();
56
62
67
69 void plot(const System& system, bool create_sd = true);
70
72 System& getSystem() {return system_;};
73
75 const System& getSystem() const {return system_;};
76
78 void setSystem(const System& system) {system_ = system;};
79
81 void clear();
82
83 QSize sizeHint() const;
84
85 protected Q_SLOTS:
87
88 protected:
89 void setup_();
90 void paintEvent(QPaintEvent *event);
91
92 void renderSD_(QPaintDevice* paint_device);
93 void drawFrame_();
94
95 QPointF getEndpoint_(QRectF& character_boundary, QPointF from, QPointF to, bool character_is_from);
97
99
102 };
103
104 }
105}
106
107#endif
Definition: constants.h:13
SDWidget(const System &system, QWidget *parent=0)
SDWidget(QWidget *parent=0, bool show_hydrogens=false)
const System & getSystem() const
Definition: SDWidget.h:75
void renderSD_(QPaintDevice *paint_device)
void plot(const System &system, bool create_sd=true)
Options options
options
Definition: SDWidget.h:61
QPointF getEndpoint_(QRectF &character_boundary, QPointF from, QPointF to, bool character_is_from)
System & getSystem()
Definition: SDWidget.h:72
void setSystem(const System &system)
Definition: SDWidget.h:78
void paintEvent(QPaintEvent *event)
QSize sizeHint() const
static const char * SHOW_HYDROGENS
Definition: SDWidget.h:37
Default values for options.
Definition: SDWidget.h:42
static const bool SHOW_HYDROGENS
Definition: SDWidget.h:43
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52