BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
BALL::VIEW::GeometricFitDialog Class Reference

#include <BALL/VIEW/DIALOGS/geometricFitDialog.h>

Inheritance diagram for BALL::VIEW::GeometricFitDialog:
QDialog BALL::VIEW::PreferencesEntry

Public Slots

void show ()
 
void reset ()
 
virtual void reject ()
 
virtual void accept ()
 

Public Member Functions

Constructors and Destructors
 GeometricFitDialog (QWidget *parent=0, const char *name="GeometricFitDialog")
 
virtual ~GeometricFitDialog ()
 
Assignment
const GeometricFitDialogoperator= (const GeometricFitDialog &geo_fit_dialog)
 
Accessors: inspectors and mutators
void getOptions (Options &options)
 
void isRedock (bool is_redock)
 
void fetchPreferences (INIFile &file)
 
void writePreferences (INIFile &file)
 
- Public Member Functions inherited from BALL::VIEW::PreferencesEntry
 PreferencesEntry ()
 
virtual ~PreferencesEntry ()
 
virtual void writePreferenceEntries (INIFile &inifile)
 Store the settings of all registered objects. More...
 
virtual void readPreferenceEntries (const INIFile &inifile)
 Restore the settings of all registered objects. More...
 
void setINIFileSectionName (const String &name)
 Set the name for the section in the INIFile. More...
 
const StringgetINIFileSectionName () const
 Get the name for the section in the INIFile. More...
 
void setWidgetStackName (const String &name)
 
StackPagesgetStackPages ()
 Return all pages, that are to be shown in a parent QStackedWidget. More...
 
void setWidgetStack (QStackedWidget *stack)
 
virtual void showStackPage (Position nr)
 Show the specified page in the QStackedWidget. More...
 
virtual void showStackPage (QWidget *widget)
 Show the specified page in the QStackedWidget. More...
 
virtual Position currentStackPage () const
 Get the currently shown page in the QStackedWidget. More...
 
virtual void restoreDefaultValues (bool all=false)
 Set all registered objects to their default values. More...
 
virtual void storeValues ()
 
virtual void restoreValues (bool all=false)
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 

Protected Member Functions

void fetchPreferences_ (INIFile &file, const String &entry, const QString &default_value)
 
void swapValues_ ()
 
- Protected Member Functions inherited from BALL::VIEW::PreferencesEntry
void registerWidgets_ ()
 
void registerObject_ (QObject *widget)
 
void unregisterObject_ (QObject *widget)
 
void registerWidgetForHelpSystem_ (const QWidget *widget, const String &url)
 
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)
 

Private Member Functions

 GeometricFitDialog (const GeometricFitDialog &geo_fit_dialog)
 

Private Attributes

bool has_changed_
 
bool is_redock_
 
vector< QString > backup_
 

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 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 options of the docking algorithm GeometricFit.

See Also
GeometricFit

Definition at line 31 of file geometricFitDialog.h.

Constructor & Destructor Documentation

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

Default Constructor. Calls PreferencesEntry::registerObject_

Parameters
parentthe parent widget of the GeometricFitDialog
namethe name of the GeometricFitDialog
modalthe modal flag
flthe widget flags
See Also
QDialog
PreferncesEntry
virtual BALL::VIEW::GeometricFitDialog::~GeometricFitDialog ( )
virtual

Destructor.

BALL::VIEW::GeometricFitDialog::GeometricFitDialog ( const GeometricFitDialog geo_fit_dialog)
private

Copy constructor. Remark: Copy contructor is private because it is not completed. The copy constuctor of the QT widgets is private and cannot be called.

Member Function Documentation

virtual void BALL::VIEW::GeometricFitDialog::accept ( )
virtualslot
void BALL::VIEW::GeometricFitDialog::fetchPreferences ( INIFile file)

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

See Also
writePreferences
void BALL::VIEW::GeometricFitDialog::fetchPreferences_ ( INIFile file,
const String entry,
const QString &  default_value 
)
protected

Function to read the redocking options from INIFile into vector backup_. If INIFile has not yet section GEOMETRIC_FIT_OPTIONS_REDOCK , fill vector backup_ with default values.

Parameters
filethe INIFile that is read
entrykey of entry that is read
default_valuedefault value
See Also
fetchPreferences
void BALL::VIEW::GeometricFitDialog::getOptions ( Options options)

Fills options with values of the dialog.

Parameters
optionsthe options that are filled
void BALL::VIEW::GeometricFitDialog::isRedock ( bool  is_redock)

Sets the flags is_redock_ and has_changed_ .

const GeometricFitDialog& BALL::VIEW::GeometricFitDialog::operator= ( const GeometricFitDialog geo_fit_dialog)

Assignment operator

virtual void BALL::VIEW::GeometricFitDialog::reject ( )
virtualslot

Is called when cancel button is pressed. Hides dialog.

void BALL::VIEW::GeometricFitDialog::reset ( )
slot

Is called when reset button is pressed. Calls reset .

void BALL::VIEW::GeometricFitDialog::show ( )
slot

Shows dialog to user.

void BALL::VIEW::GeometricFitDialog::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.

void BALL::VIEW::GeometricFitDialog::writePreferences ( INIFile file)

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

See Also
fetchPreferences

Member Data Documentation

vector<QString> BALL::VIEW::GeometricFitDialog::backup_
private

Needed to guarantee that both, docking and redocking preferences can be written to INIFile When we do docking, redocking options are in the vector and when we do redocking, the docking options are in there. In fetchPreferences , we read the last redocking options from INIFile in this vector and in writePreferences , we write the redocking options in INIFile from this vector

Definition at line 162 of file geometricFitDialog.h.

bool BALL::VIEW::GeometricFitDialog::has_changed_
private

Flag: True if we do docking and did redocking before or otherwise. False if we do (re)docking and also did (re)docking before.

Definition at line 151 of file geometricFitDialog.h.

bool BALL::VIEW::GeometricFitDialog::is_redock_
private

Flag which indicates if we do docking or redocking.

Definition at line 155 of file geometricFitDialog.h.