00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 #ifndef BALL_VIEW_DIALOGS_FDPBDIALOG_H 00005 #define BALL_VIEW_DIALOGS_FDPBDIALOG_H 00006 00007 #ifndef BALL_COMMON_GLOBAL_H 00008 # include <BALL/COMMON/global.h> 00009 #endif 00010 00011 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H 00012 # include <BALL/VIEW/KERNEL/modularWidget.h> 00013 #endif 00014 00015 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY 00016 # include <BALL/VIEW/KERNEL/preferencesEntry.h> 00017 #endif 00018 00019 #ifndef BALL_SOLVATION_POISSONBOLTZMANN_H 00020 # include <BALL/SOLVATION/poissonBoltzmann.h> 00021 #endif 00022 00023 #ifndef BALL_MOLMEC_COMMON_RADIUSRULEPROCESSOR_H 00024 # include <BALL/MOLMEC/COMMON/radiusRuleProcessor.h> 00025 #endif 00026 00027 #ifndef BALL_MOLMEC_COMMON_CHARGERULEPROCESSOR_H 00028 # include <BALL/MOLMEC/COMMON/chargeRuleProcessor.h> 00029 #endif 00030 00031 #ifndef BALL_STRUCTURE_DEFAULTPROCESSORS_H 00032 # include <BALL/STRUCTURE/defaultProcessors.h> 00033 #endif 00034 00035 #include <BALL/VIEW/UIC/ui_FDPBDialog.h> 00036 00037 class QLineEdit; 00038 00039 namespace BALL 00040 { 00041 namespace VIEW 00042 { 00043 00044 class CalculateFDPBThread; 00045 00049 class BALL_VIEW_EXPORT FDPBDialog 00050 : public QDialog, 00051 public Ui_FDPBDialogData, 00052 public ModularWidget, 00053 public PreferencesEntry 00054 { 00055 friend class CalculateFDPBThread; 00056 00057 Q_OBJECT 00058 00059 public: 00060 00061 BALL_EMBEDDABLE(FDPBDialog,ModularWidget) 00062 00063 00064 FDPBDialog(QWidget* parent = 0, const char* name = "FDPBDialog", 00065 bool modal = FALSE, Qt::WFlags fl = 0); 00066 00068 virtual ~FDPBDialog(); 00069 00071 bool calculate(); 00072 00074 FDPB& getFDPBSolver() 00075 {return fdpb_;} 00076 00078 void setSystem(System* system) 00079 {system_ = system;} 00080 00082 System* getSystem() 00083 { return system_;} 00084 00085 00086 public slots: 00087 00089 virtual void browseChargesData(); 00090 00092 virtual void browseChargesRules(); 00093 00095 virtual void browseRadiiData(); 00096 00098 virtual void browseRadiiRules(); 00099 00101 virtual void accept(); 00102 00104 virtual void resetPressed(); 00105 00106 protected slots: 00107 virtual void clicked(QAbstractButton* button); 00108 00109 protected: 00110 00111 void calculate_(); 00112 void selectFile_(QLineEdit& lineedit); 00113 void applyValues_(); 00114 bool applyProcessors_(); 00115 00116 FDPB fdpb_; 00117 Options options_; 00118 System* system_; 00119 00120 RadiusRuleProcessor radius_rule_processor_; 00121 ChargeRuleProcessor charge_rule_processor_; 00122 AssignRadiusProcessor radius_processor_; 00123 AssignChargeProcessor charge_processor_; 00124 CalculateFDPBThread* thread_; 00125 }; 00126 00127 } } // Namespaces 00128 #endif