00001 /*************************************************************************** 00002 orbitalviewerbase.h - description 00003 ------------------- 00004 begin : Thu Nov 4 2004 00005 copyright : (C) 2004-2006 by Ben Swerts 00006 email : bswerts@users.sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00020 00021 #ifndef ORBITALVIEWERBASE_H 00022 #define ORBITALVIEWERBASE_H 00023 00025 00027 class QHBoxLayout; 00028 class QTimer; 00029 00031 class ColorButton; 00032 class GLOrbitalView; 00033 class OrbitalOptionsWidget; 00034 class OrbitalThread; 00035 00037 #include <qdialog.h> 00038 00040 class OrbitalViewerBase : public QDialog 00041 { 00042 Q_OBJECT 00043 00044 public: 00045 // constructor/destructor 00046 OrbitalViewerBase(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);// constructor 00047 ~OrbitalViewerBase(); // destructor 00048 00049 protected: 00050 void customEvent(QCustomEvent* e); // reimplemented to receive events from calcThread 00051 00052 private slots: 00053 void update(); // updates the view with the values of the widgets 00054 void adjustL(int newN); // adjust the orbital quantum number to the region 1 - n-1 00055 void adjustM(int newL); // adjust the angular momentum quantum number to the region -l - +l 00056 void updateColors(); // updates the view with new colors 00057 void updateTypeOptions(int type); // updates the options to correspond to the chosen type 00058 void cancelCalculation(); // stops calculating a new orbital 00059 00060 private: 00061 // private member functions 00062 void finishCalculation(); // finished up a calculation 00063 00064 // private member variables 00065 QHBoxLayout* BigLayout; 00066 OrbitalOptionsWidget* options; 00067 GLOrbitalView* view; 00068 ColorButton* ColorButtonPositive; 00069 ColorButton* ColorButtonNegative; 00070 OrbitalThread* calcThread; 00071 QTimer* timer; 00072 }; 00073 00074 #endif 00075