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

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

Inheritance diagram for BALL::VIEW::Preferences:

## Public Member Functions

Constructors
| Preferences (QWidget *parent=NULL, const char *name="Preferences")
| Preferences (const Preferences &preferences)
| Copy constructur.
virtual | ~Preferences ()
| Destructor.

## Public slots

HashSet< PreferencesEntry * > | entries_
HashMap< QTreeWidgetItem *, QWidget * > | item_to_widget_
HashMap< QTreeWidgetItem *, PreferencesEntry * > | item_to_entry_
HashMap< QWidget *, QTreeWidgetItem * > | widget_to_item_
void | show ()
void | showEntry (QWidget *page)
| Show the given page.
void | entrySelected ()
void | setDefaultValues ()
void | reject ()
void | applyPreferences ()
| Store the last applied values for undo.
BALL_DEPRECATED void | showHelp ()
void | dialogButtonsClicked_ (QAbstractButton *button)
void | removeItem_ (QTreeWidgetItem *item, bool update)

## Accessors

bool | hasPages ()
void | insertEntry (PreferencesEntry *child)
void | removeEntry (PreferencesEntry *child)
void | insertChildEntry (PreferencesEntry *parent, PreferencesEntry *child)
void | insertChildEntry (const std::string &category, PreferencesEntry *child)
void | fetchPreferences (INIFile &inifile)
void | writePreferences (INIFile &inifile)
const QWidget * | currentEntry () const
const QWidget * | currentPage () const
void | setApplyEnabled (bool enabled)
| Activate or deactivate the apply and ok buttons.
void | applied ()

## Detailed Description

Preferences is a dialog for other preference pages to be inserted. An interface for adding and removing the pages is available. The Preferences dialog will be created by the MainControl. All ModularWidget classes can add their own preferences pages.

Definition at line 40 of file preferences.h.

## Constructor & Destructor Documentation

## Preferences() [1/2]

BALL::VIEW::Preferences::Preferences | ( | QWidget * | parent = NULL,
|  | const char * | name = "Preferences" )

Default Constructor. There are five buttons:

- ok - apply the preferences
- apply - apply the preferences, but do no close the window
- cancel - hide the preferences dialog
- defaults - reset the values of the currently selected page
- help - get help
  Parameters

    parent | the parent QWidget (See QTabDialog in the QT documentation)
    name | (See QDialog in the QT documentation)

## Preferences() [2/2]

BALL::VIEW::Preferences::Preferences | ( | const Preferences & | preferences | ) |

Copy constructur.

## ~Preferences()

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

virtual

Destructor.

## Member Function Documentation

## applied

void BALL::VIEW::Preferences::applied | ( |  | ) |

signal

## applyPreferences

void BALL::VIEW::Preferences::applyPreferences | ( |  | ) |

slot

Store the last applied values for undo.

## currentEntry()

const QWidget * BALL::VIEW::Preferences::currentEntry | ( |  | ) | const

## currentPage()

const QWidget * BALL::VIEW::Preferences::currentPage | ( |  | ) | const

## dialogButtonsClicked_

void BALL::VIEW::Preferences::dialogButtonsClicked_ | ( | QAbstractButton * | button | ) |

protected slot

## entrySelected

void BALL::VIEW::Preferences::entrySelected | ( |  | ) |

slot

## fetchPreferences()

void BALL::VIEW::Preferences::fetchPreferences | ( | INIFile & | inifile | ) |

Fetch the preferences (the position) from the INIFile inifile. This method will be called inside MainControl::show().

Parameters

  inifile | the INIFile that contains the needed information

See also
  writePreferences

## hasPages()

bool BALL::VIEW::Preferences::hasPages | ( |  | ) |

Check if pages are available.

Returns
  bool true if pages are available

## insertChildEntry() [1/2]

void BALL::VIEW::Preferences::insertChildEntry | ( | const std::string & | category,
|  | PreferencesEntry * | child )

## insertChildEntry() [2/2]

void BALL::VIEW::Preferences::insertChildEntry | ( | PreferencesEntry * | parent,
|  | PreferencesEntry * | child )

## insertEntry()

void BALL::VIEW::Preferences::insertEntry | ( | PreferencesEntry * | child | ) |

Insert a new page. This method can be called inside ModularWidget::initializePreferencesTab

Parameters

  child | a pointer to the new dialog
  name | the name of the new dialog

See also
  removePage

## reject

void BALL::VIEW::Preferences::reject | ( |  | ) |

slot

## removeEntry()

void BALL::VIEW::Preferences::removeEntry | ( | PreferencesEntry * | child | ) |

Remove a previously inserted page. This method can be called inside ModularWidget::finalizePreferencesTab

Parameters

  child | a pointer to the dialog to be removed

See also
  insertPage

## removeItem_()

void BALL::VIEW::Preferences::removeItem_ | ( | QTreeWidgetItem * | item,
|  | bool | update )

protected

## setApplyEnabled()

void BALL::VIEW::Preferences::setApplyEnabled | ( | bool | enabled | ) |

Activate or deactivate the apply and ok buttons.

## setDefaultValues

void BALL::VIEW::Preferences::setDefaultValues | ( |  | ) |

slot

## show

void BALL::VIEW::Preferences::show | ( |  | ) |

slot

Open the preferences dialog.

## showEntry

void BALL::VIEW::Preferences::showEntry | ( | QWidget * | page | ) |

slot

Show the given page.

## showHelp

BALL_DEPRECATED void BALL::VIEW::Preferences::showHelp | ( |  | ) |

slot

Deprecated
  Help system has been removed. This function will also be removed in the next release.

## writePreferences()

void BALL::VIEW::Preferences::writePreferences | ( | INIFile & | inifile | ) |

Write the preferences (the position) to the INIFile inifile. This method will be called in MainControl::aboutToExit.

Parameters

  inifile | the INIFile to be written into

See also
  fetchPreferences

## Member Data Documentation

## entries_

HashSet<PreferencesEntry*> BALL::VIEW::Preferences::entries_

protected

Definition at line 161 of file preferences.h.

## item_to_entry_

HashMap<QTreeWidgetItem*, PreferencesEntry*> BALL::VIEW::Preferences::item_to_entry_

protected

Definition at line 163 of file preferences.h.

## item_to_widget_

HashMap<QTreeWidgetItem*, QWidget*> BALL::VIEW::Preferences::item_to_widget_

protected

Definition at line 162 of file preferences.h.

## widget_to_item_

HashMap<QWidget*, QTreeWidgetItem*> BALL::VIEW::Preferences::widget_to_item_

protected

Definition at line 164 of file preferences.h.