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

kalzium

bsdyengine.h

Go to the documentation of this file.
00001 /**********************************************************************
00002   BSDYEngine - Dynamic detail engine for "balls and sticks" display
00003 
00004   Copyright (C) 2007 Donald Ephraim Curtis
00005 
00006   This file is part of the Avogadro molecular editor project.
00007   For more information, see <http://avogadro.sourceforge.net/>
00008 
00009   Avogadro is free software; you can redistribute it and/or modify
00010   it under the terms of the GNU General Public License as published by
00011   the Free Software Foundation; either version 2 of the License, or
00012   (at your option) any later version.
00013 
00014   Avogadro is distributed in the hope that it will be useful,
00015   but WITHOUT ANY WARRANTY; without even the implied warranty of
00016   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017   GNU General Public License for more details.
00018 
00019   You should have received a copy of the GNU General Public License
00020   along with this program; if not, write to the Free Software
00021   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00022   02110-1301, USA.
00023  **********************************************************************/
00024 
00025 #ifndef BSDYENGINE_H
00026 #define BSDYENGINE_H
00027 
00028 #include <avogadro/global.h>
00029 #include <avogadro/engine.h>
00030 
00031 #include "ui_bsdysettingswidget.h"
00032 
00033 namespace Avogadro {
00034 
00036   class BSDYSettingsWidget;
00037   class BSDYEngine : public Engine
00038   {
00039     Q_OBJECT
00040 
00041     AVOGADRO_ENGINE(tr("Ball and Stick"))
00042 
00043     public:
00045       BSDYEngine(QObject *parent=0);
00046 
00047       Engine *clone() const;
00048 
00050       ~BSDYEngine();
00051 
00052       double transparencyDepth() const;
00053       EngineFlags flags() const;
00054 
00055       bool renderOpaque(PainterDevice *pd);
00056       bool renderTransparent(PainterDevice *pd);
00057       bool renderQuick(PainterDevice *pd);
00058 
00059       double radius(const PainterDevice *pd, const Primitive *p = 0) const;
00060 
00064       QWidget *settingsWidget();
00068       void writeSettings(QSettings &settings) const;
00069 
00073       void readSettings(QSettings &settings);
00074 
00075 
00076     private:
00077       double radius(const Atom *atom) const;
00078 
00079       BSDYSettingsWidget *m_settingsWidget;
00080 
00081       double m_atomRadiusPercentage;
00082       double m_bondRadius;
00083       int m_showMulti;
00084 
00085     private Q_SLOTS:
00086       void settingsWidgetDestroyed();
00087 
00091       void setAtomRadiusPercentage(int percent);
00092 
00096       void setBondRadius(int value);
00097 
00101       void setShowMulti(int value);
00102 
00103   };
00104 
00105   class BSDYSettingsWidget : public QWidget, public Ui::BSDYSettingsWidget
00106   {
00107     public:
00108       BSDYSettingsWidget(QWidget *parent=0) : QWidget(parent) {
00109         setupUi(this);
00110       }
00111   };
00112 
00113   class BSDYEngineFactory : public QObject, public EngineFactory
00114   {
00115     Q_OBJECT
00116     Q_INTERFACES(Avogadro::EngineFactory)
00117 
00118     AVOGADRO_ENGINE_FACTORY(BSDYEngine)
00119   };
00120 
00121 
00122 } // end namespace Avogadro
00123 
00124 #endif

kalzium

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

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal