Loading...
Searching...
No Matches
SDWidget.h
Go to the documentation of this file.
#ifndef BALL_VIEW_WIDGETS_SDWIDGET_H
#define BALL_VIEW_WIDGETS_SDWIDGET_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_DATATYPE_OPTIONS_H
# include <BALL/DATATYPE/options.h>
#endif
#include <BALL/KERNEL/system.h>
#include <QtWidgets/QWidget>
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT SDWidget
: public QWidget
{
Q_OBJECT
public:
struct BALL_VIEW_EXPORT Option
{
static const char* SHOW_HYDROGENS;
};
struct BALL_VIEW_EXPORT Default
{
static const bool SHOW_HYDROGENS;
};
SDWidget(QWidget *parent = 0, bool show_hydrogens = false);
SDWidget(const System& system, QWidget *parent = 0);
virtual ~SDWidget();
Options options;
void setDefaultOptions();
void plot(const System& system, bool create_sd = true);
System& getSystem() {return system_;};
const System& getSystem() const {return system_;};
void setSystem(const System& system) {system_ = system;};
void clear();
QSize sizeHint() const;
protected Q_SLOTS:
void exportImage_();
protected:
void setup_();
void paintEvent(QPaintEvent *event);
void renderSD_(QPaintDevice* paint_device);
void drawFrame_();
QPointF getEndpoint_(QRectF& character_boundary, QPointF from, QPointF to, bool character_is_from);
System system_;
bool resize_to_parent_;
Vector3 upper_;
Vector3 lower_;
};
}
}
#endif
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
system.h
BALL::Options
Definition options.h:48
BALL::System
Definition KERNEL/system.h:40
BALL::VIEW::SDWidget::exportImage_
void exportImage_()
BALL::VIEW::SDWidget::drawFrame_
void drawFrame_()
BALL::VIEW::SDWidget::SDWidget
SDWidget(const System &system, QWidget *parent=0)
BALL::VIEW::SDWidget::system_
System system_
Definition SDWidget.h:96
BALL::VIEW::SDWidget::SDWidget
SDWidget(QWidget *parent=0, bool show_hydrogens=false)
BALL::VIEW::SDWidget::getSystem
const System & getSystem() const
Definition SDWidget.h:75
BALL::VIEW::SDWidget::setDefaultOptions
void setDefaultOptions()
BALL::VIEW::SDWidget::renderSD_
void renderSD_(QPaintDevice *paint_device)
BALL::VIEW::SDWidget::plot
void plot(const System &system, bool create_sd=true)
BALL::VIEW::SDWidget::resize_to_parent_
bool resize_to_parent_
Definition SDWidget.h:98
BALL::VIEW::SDWidget::~SDWidget
virtual ~SDWidget()
BALL::VIEW::SDWidget::options
Options options
options
Definition SDWidget.h:61
BALL::VIEW::SDWidget::getEndpoint_
QPointF getEndpoint_(QRectF &character_boundary, QPointF from, QPointF to, bool character_is_from)
BALL::VIEW::SDWidget::getSystem
System & getSystem()
Definition SDWidget.h:72
BALL::VIEW::SDWidget::setSystem
void setSystem(const System &system)
Definition SDWidget.h:78
BALL::VIEW::SDWidget::paintEvent
void paintEvent(QPaintEvent *event)
BALL::VIEW::SDWidget::lower_
Vector3 lower_
Definition SDWidget.h:101
BALL::VIEW::SDWidget::sizeHint
QSize sizeHint() const
BALL::VIEW::SDWidget::upper_
Vector3 upper_
Definition SDWidget.h:100
BALL::VIEW::SDWidget::clear
void clear()
BALL::VIEW::SDWidget::setup_
void setup_()
QPaintDevice
QWidget
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
options.h
BALL::VIEW::SDWidget::Default
Default values for options.
Definition SDWidget.h:42
BALL::VIEW::SDWidget::Default::SHOW_HYDROGENS
static const bool SHOW_HYDROGENS
Definition SDWidget.h:43
BALL::VIEW::SDWidget::Option
Option names.
Definition SDWidget.h:34
BALL::VIEW::SDWidget::Option::SHOW_HYDROGENS
static const char * SHOW_HYDROGENS
Definition SDWidget.h:37