Loading...
Searching...
No Matches
BALL::VIEW::DockDialog Class Reference
Visualisation » QT Dialogs

`#include <BALL/VIEW/DIALOGS/dockDialog.h>`

Inheritance diagram for BALL::VIEW::DockDialog:

## Public Member Functions

Constructors and Destructors
| DockDialog (QWidget *parent=0, const char *name="DockDialog")
virtual | ~DockDialog ()
Assignment
const DockDialog & | operator= (const DockDialog &dock_dialog)
Public Member Functions inherited from BALL::VIEW::PreferencesEntry
| PreferencesEntry ()
virtual | ~PreferencesEntry ()
virtual void | writePreferenceEntries (INIFile &inifile)
| Store the settings of all registered objects.
virtual void | readPreferenceEntries (const INIFile &inifile)
| Restore the settings of all registered objects.
void | setINIFileSectionName (const String &name)
| Set the name for the section in the INIFile.
const String & | getINIFileSectionName () const
| Get the name for the section in the INIFile.
void | setWidgetStackName (const String &name)
StackPages & | getStackPages ()
| Return all pages, that are to be shown in a parent QStackedWidget.
void | setWidgetStack (QStackedWidget *stack)
virtual void | showStackPage (Position nr)
| Show the specified page in the QStackedWidget.
virtual void | showStackPage (QWidget *widget)
| Show the specified page in the QStackedWidget.
virtual Position | currentStackPage () const
| Get the currently shown page in the QStackedWidget.
virtual void | restoreDefaultValues (bool all=false)
| Set all registered objects to their default values.
virtual void | storeValues ()
virtual void | restoreValues (bool all=false)
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
virtual bool | setValueAllowed (QObject *)
| Allows to prevent restoring of widgets.

## Accessors: inspectors and mutators

void | setSystems (System *system1, System *system2)
System * | getSystem1 ()
System * | getSystem2 ()
Options & | getAlgorithmOptions ()
Options & | getScoringOptions ()
void | isRedock (bool is_redock)
void | addAlgorithm (const QString &name, const int algorithm, QDialog *dialog)
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 ()
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 ()
void | applyValues_ ()
bool | applyProcessors_ ()
void | selectFile_ (QLineEdit &lineedit)
void | fillSystemComboboxes_ ()
void | fetchPreferences_ (INIFile &file, const String &entry, const QString &default_value)
void | swapValues_ ()

## Additional Inherited Members

Public Types inherited from BALL::VIEW::PreferencesEntry
typedef std::list< std::pair< QWidget *, String > > | StackPages
Protected Types inherited from BALL::VIEW::PreferencesEntry
typedef HashMap< const QObject *, String > | ValueMap
Protected Member Functions inherited from BALL::VIEW::PreferencesEntry
void | registerWidgets_ ()
void | registerObject_ (QObject *widget)
void | unregisterObject_ (QObject *widget)
BALL_DEPRECATED void | registerWidgetForHelpSystem_ (const QWidget *, const String &)
void | restoreValues_ (bool all, const ValueMap &map)
void | insertStackEntry_ (QWidget *, const String &name)
bool | isSupported_ (QObject &widget)
bool | getValue_ (const QObject *widget, String &value)
bool | setValue_ (QObject *widget, const String &value)
Protected Attributes inherited from BALL::VIEW::PreferencesEntry
String | inifile_section_name_
HashSet< QObject * > | registered_objects_
ValueMap | default_values_
ValueMap | last_values_
QStackedWidget * | widget_stack_
StackPages | stack_pages_

## Detailed Description

Dialog for docking / redocking two systems. In this dialog the user choose the two docking partners, the docking algorithm and the scoring function. Furthermore he can set the options for the algorithm and scroing function and can apply processors to the docking parnters. For redocking he can specify the euler angles.

Definition at line 52 of file dockDialog.h.

## Constructor & Destructor Documentation

## DockDialog()

BALL::VIEW::DockDialog::DockDialog | ( | QWidget * | parent = 0,
|  | const char * | name = "DockDialog" )

Default Constructor. Calls PreferencesEntry::registerObject_ . Sets flag is_redock_ to false.

Parameters

  parent | the parent widget of the DockDialog
  name | the name of the DockDialog
  modal | the modal flag
  fl | the widget flags

See also
  QDialog
  PreferncesEntry

## ~DockDialog()

virtual BALL::VIEW::DockDialog::~DockDialog | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## addAlgorithm()

void BALL::VIEW::DockDialog::addAlgorithm | ( | const QString & | name,
|  | const int | algorithm,
|  | QDialog * | dialog )

Adds docking algorithm to combobox and its advanced option dialog to hashmap.

Parameters

  name | the name of the algorithm
  algorithm | the value of enum DockingController::Algorithm
  dialog | pointer to an advanced option dialog

## addScoringFunction()

void BALL::VIEW::DockDialog::addScoringFunction | ( | const QString & | name,
|  | const int | score_func,
|  | QDialog * | dialog = 0 )

Adds scoring function to combobox and its advanced option dialog to hashmap, if it has such a dialog.

Parameters

  name | the name of the scoring function
  score_func | the value of enum DockingController::ScoringFunction
  dialog | pointer to an advanced option dialog

## algAdvancedPressed

void BALL::VIEW::DockDialog::algAdvancedPressed | ( |  | ) |

slot

Is called when advanced button for algorithm options is pressed. Shows corresponding options dialog.

## algorithmChosen

void BALL::VIEW::DockDialog::algorithmChosen | ( |  | ) |

slot

Is called when an algorithm in the combobox is chosen. If the chosen algorithm has advanced options, the advanced_button will be enabled.

## applyProcessors_()

bool BALL::VIEW::DockDialog::applyProcessors_ | ( |  | ) |

protected

Applies processors to the systems.

## applyValues_()

void BALL::VIEW::DockDialog::applyValues_ | ( |  | ) |

protected

Sets options algorithm_opt_ and scoring_opt_ with values the user has chosen.

## browseChargesData

void BALL::VIEW::DockDialog::browseChargesData | ( |  | ) |

slot

Is called when browse button to get a charges config file from table is pressed. Calls selectFile_ .

## browseChargesRules

void BALL::VIEW::DockDialog::browseChargesRules | ( |  | ) |

slot

Is called when browse button to get a charges config file by rules is pressed. Calls selectFile_ .

## browseRadiiData

void BALL::VIEW::DockDialog::browseRadiiData | ( |  | ) |

slot

Is called when browse button to get a radii config file from table is pressed. Calls selectFile_ .

## browseRadiiRules

void BALL::VIEW::DockDialog::browseRadiiRules | ( |  | ) |

slot

Is called when browse button to get a radii config file by rules s pressed. Calls selectFile_ .

## cancelPressed

void BALL::VIEW::DockDialog::cancelPressed | ( |  | ) |

slot

Is called when cancel button is pressed. Hides the dialog.

## exec

int BALL::VIEW::DockDialog::exec | ( |  | ) |

slot

Shows and raises the dialog. Dialog is adapted for docking / redocking. Calls fillSystemComboboxes_ in case of docking.

## fetchPreferences()

virtual void BALL::VIEW::DockDialog::fetchPreferences | ( | INIFile & | file | ) |

virtual

Fetchs the preferences from the INIFile. Calls PreferencesEntry::readPreferenceEntries . Calls fetchPreferences_ to read the redocking options. This method is called in DockingController::fetchPreferences .

See also
  writePreferences

## fetchPreferences_()

void BALL::VIEW::DockDialog::fetchPreferences_ | ( | INIFile & | file,
|  | const String & | entry,
|  | const QString & | default_value )

protected

Reads the redocking values from INIFile into vector backup_. If INIFile has not yet a section REDOCKING , fill vector backup_ with default values.

Parameters

  file | the INIFile that is read
  entry | key of entry that is read
  default_value | default value

See also
  fetchPreferences

## fillSystemComboboxes_()

void BALL::VIEW::DockDialog::fillSystemComboboxes_ | ( |  | ) |

protected

Fills the system comboboxes. If the user has already selected one or two systems, they are the current items in the comboboxes.

## getAlgorithmOptions()

Options & BALL::VIEW::DockDialog::getAlgorithmOptions | ( |  | ) |

Get algorithm options.

## getScoringOptions()

Options & BALL::VIEW::DockDialog::getScoringOptions | ( |  | ) |

Get scoring options.

## getSystem1()

System * BALL::VIEW::DockDialog::getSystem1 | ( |  | ) |

Get first docking partner.

## getSystem2()

System * BALL::VIEW::DockDialog::getSystem2 | ( |  | ) |

Get second docking partner.

## initializeWidget()

virtual void BALL::VIEW::DockDialog::initializeWidget | ( |  | ) |

virtual

Builds hashmaps for algorithm advanced option dialogs and for scoring function advanced option dialogs. Also builds hashmap with the allowed scoring functions for the different algorithms. Is called by DockingController::initializeWidget .

See also
  addAlgorithm
  addScoringFunction

## isRedock()

void BALL::VIEW::DockDialog::isRedock | ( | bool | is_redock | ) |

Sets the flags is_redock_ and has_changed_ .

## okPressed

void BALL::VIEW::DockDialog::okPressed | ( |  | ) |

slot

Is called when OK button is pressed. For docking, it checks if two different systems are chosen. Hides the dialog and calls applyValues_ and applyProcessors_ .

## operator=()

const DockDialog & BALL::VIEW::DockDialog::operator= | ( | const DockDialog & | dock_dialog | ) |

Assignment operator

## partner1Chosen

void BALL::VIEW::DockDialog::partner1Chosen | ( |  | ) |

slot

Is called when a system in the combobox is chosen as docking partner 1. Calls partnerChosen_ .

## partner2Chosen

void BALL::VIEW::DockDialog::partner2Chosen | ( |  | ) |

slot

Is called when a system in the combobox is chosen as docking partner 2. Calls partnerChosen_ .

## reset()

void BALL::VIEW::DockDialog::reset | ( |  | ) |

Resets the dialog to the standard values.

## resetPressed

void BALL::VIEW::DockDialog::resetPressed | ( |  | ) |

slot

Is called when reset button is pressed. Calls reset .

## scoringAdvancedPressed

void BALL::VIEW::DockDialog::scoringAdvancedPressed | ( |  | ) |

slot

Is called when advanced button for scoring function options is pressed. Shows corresponding options dialog, if it exits.

## scoringFuncChosen

void BALL::VIEW::DockDialog::scoringFuncChosen | ( |  | ) |

slot

Is called when a scoring function in the combobox is chosen. If the chosen scoring function has advanced options, the advanced_button will be enabled.

## selectFile_()

void BALL::VIEW::DockDialog::selectFile_ | ( | QLineEdit & | lineedit | ) |

protected

Shows chosen file in the dialog.

## setSystems()

void BALL::VIEW::DockDialog::setSystems | ( | System * | system1,
|  | System * | system2 )

Sets two systems as docking partners.

Parameters

  system1 | first docking partner
  system2 | second docking partner

## swapValues_()

void BALL::VIEW::DockDialog::swapValues_ | ( |  | ) |

protected

Swaps the option values between vector backup_ and dialog. Is called in show if has_changed_ is true and in writePreferences if is_redock_ is true

## writePreferences()

virtual void BALL::VIEW::DockDialog::writePreferences | ( | INIFile & | file | ) |

virtual

Writes the preferences to the INIFile. Calls PreferencesEntry::writePreferenceEntries . This method is called in DockingController::writePreferences .

See also
  fetchPreferences