Loading...
Searching...
No Matches
dockDialog.h
Go to the documentation of this file.
//
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_DIALOGS_DOCKDIALOG_H
#define BALL_VIEW_DIALOGS_DOCKDIALOG_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY_H
# include <BALL/VIEW/KERNEL/preferencesEntry.h>
#endif
#ifndef BALL_MOLMEC_COMMON_RADIUSRULEPROCESSOR_H
# include <BALL/MOLMEC/COMMON/radiusRuleProcessor.h>
#endif
#ifndef BALL_MOLMEC_COMMON_CHARGERULEPROCESSOR_H
# include <BALL/MOLMEC/COMMON/chargeRuleProcessor.h>
#endif
#ifndef BALL_STRUCTURE_DEFAULTPROCESSORS_H
# include <BALL/STRUCTURE/defaultProcessors.h>
#endif
#ifndef BALL_DATATYPE_OPTIONS_H
# include <BALL/DATATYPE/options.h>
#endif
#include <BALL/VIEW/UIC/ui_dockDialog.h>
namespace BALL
{
class INIFile;
class System;
class Options;
namespace VIEW
{
class DockingController;
class BALL_VIEW_EXPORT DockDialog :
public QDialog,
public Ui_DockDialogData,
public PreferencesEntry
{
Q_OBJECT
public:
DockDialog(QWidget* parent = 0, const char* name = "DockDialog");
virtual ~DockDialog();
const DockDialog& operator =(const DockDialog& dock_dialog);
void setSystems(System* system1, System* system2);
System* getSystem1();
System* getSystem2();
Options& getAlgorithmOptions();
Options& getScoringOptions();
void isRedock(bool is_redock);
// remark: score_func isn't enum type because we then have cyclic includes of DockDialog and DockingController
void addAlgorithm(const QString& name, const int algorithm, QDialog* dialog);
// remark: score_func isn't enum type because we then have cyclic includes of DockDialog and DockingController
void addScoringFunction(const QString& name, const int score_func, QDialog* dialog=0);
virtual void initializeWidget();
virtual void fetchPreferences(INIFile& file);
virtual void writePreferences(INIFile& file);
void reset();
public Q_SLOTS:
int exec();
void resetPressed();
void okPressed();
void cancelPressed();
void algAdvancedPressed();
void scoringAdvancedPressed();
void partner1Chosen();
void partner2Chosen();
void scoringFuncChosen();
void algorithmChosen();
void browseChargesData();
void browseChargesRules();
void browseRadiiData();
void browseRadiiRules();
protected:
void applyValues_();
bool applyProcessors_();
void selectFile_(QLineEdit& lineedit);
void fillSystemComboboxes_();
void fetchPreferences_(INIFile& file, const String& entry, const QString& default_value);
void swapValues_();
private:
DockDialog(const DockDialog& dock_dialog);
bool is_redock_;
bool has_changed_;
HashMap<int, QDialog*> algorithm_dialogs_;
HashMap<int, QDialog*> scoring_dialogs_;
HashMap<int, vector<int> > allowed_sf_;
vector<System*> loaded_systems_;
System* docking_partner1_;
System* docking_partner2_;
Options algorithm_opt_, scoring_opt_;
vector<QString> backup_;
RadiusRuleProcessor radius_rule_processor_;
ChargeRuleProcessor charge_rule_processor_;
AssignRadiusProcessor radius_processor_;
AssignChargeProcessor charge_processor_;
};
} // end of namespace View
} // end of namespace BALL
#endif
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
chargeRuleProcessor.h
BALL::AssignChargeProcessor
Definition defaultProcessors.h:146
BALL::AssignRadiusProcessor
Definition defaultProcessors.h:64
BALL::ChargeRuleProcessor
Definition chargeRuleProcessor.h:24
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::INIFile
Definition INIFile.h:29
BALL::Options
Definition options.h:48
BALL::RadiusRuleProcessor
Definition radiusRuleProcessor.h:24
BALL::String
Definition string.h:57
BALL::System
Definition KERNEL/system.h:40
BALL::VIEW::DockDialog::addScoringFunction
void addScoringFunction(const QString &name, const int score_func, QDialog *dialog=0)
BALL::VIEW::DockDialog::DockDialog
DockDialog(QWidget *parent=0, const char *name="DockDialog")
BALL::VIEW::DockDialog::okPressed
void okPressed()
BALL::VIEW::DockDialog::swapValues_
void swapValues_()
BALL::VIEW::DockDialog::addAlgorithm
void addAlgorithm(const QString &name, const int algorithm, QDialog *dialog)
BALL::VIEW::DockDialog::browseRadiiData
void browseRadiiData()
BALL::VIEW::DockDialog::resetPressed
void resetPressed()
BALL::VIEW::DockDialog::scoringFuncChosen
void scoringFuncChosen()
BALL::VIEW::DockDialog::applyValues_
void applyValues_()
BALL::VIEW::DockDialog::getScoringOptions
Options & getScoringOptions()
BALL::VIEW::DockDialog::getSystem1
System * getSystem1()
BALL::VIEW::DockDialog::partner2Chosen
void partner2Chosen()
BALL::VIEW::DockDialog::algorithmChosen
void algorithmChosen()
BALL::VIEW::DockDialog::fillSystemComboboxes_
void fillSystemComboboxes_()
BALL::VIEW::DockDialog::getAlgorithmOptions
Options & getAlgorithmOptions()
BALL::VIEW::DockDialog::~DockDialog
virtual ~DockDialog()
BALL::VIEW::DockDialog::applyProcessors_
bool applyProcessors_()
BALL::VIEW::DockDialog::setSystems
void setSystems(System *system1, System *system2)
BALL::VIEW::DockDialog::browseRadiiRules
void browseRadiiRules()
BALL::VIEW::DockDialog::exec
int exec()
BALL::VIEW::DockDialog::initializeWidget
virtual void initializeWidget()
BALL::VIEW::DockDialog::fetchPreferences
virtual void fetchPreferences(INIFile &file)
BALL::VIEW::DockDialog::getSystem2
System * getSystem2()
BALL::VIEW::DockDialog::fetchPreferences_
void fetchPreferences_(INIFile &file, const String &entry, const QString &default_value)
BALL::VIEW::DockDialog::scoringAdvancedPressed
void scoringAdvancedPressed()
BALL::VIEW::DockDialog::browseChargesData
void browseChargesData()
BALL::VIEW::DockDialog::cancelPressed
void cancelPressed()
BALL::VIEW::DockDialog::partner1Chosen
void partner1Chosen()
BALL::VIEW::DockDialog::selectFile_
void selectFile_(QLineEdit &lineedit)
BALL::VIEW::DockDialog::isRedock
void isRedock(bool is_redock)
BALL::VIEW::DockDialog::reset
void reset()
BALL::VIEW::DockDialog::browseChargesRules
void browseChargesRules()
BALL::VIEW::DockDialog::algAdvancedPressed
void algAdvancedPressed()
BALL::VIEW::DockDialog::writePreferences
virtual void writePreferences(INIFile &file)
BALL::VIEW::DockingController
Definition dockingController.h:40
BALL::VIEW::PreferencesEntry::PreferencesEntry
PreferencesEntry()
QDialog
QLineEdit
QWidget
defaultProcessors.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
options.h
preferencesEntry.h
radiusRuleProcessor.h