BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
BALL::VIEW::Preferences Class Reference

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

Inheritance diagram for BALL::VIEW::Preferences:
QDialog

List of all members.

Public Member Functions

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

Accessors

bool hasPages ()
void insertEntry (PreferencesEntry *child)
void removeEntry (PreferencesEntry *child)
void fetchPreferences (INIFile &inifile)
void writePreferences (INIFile &inifile)
const QWidgetcurrentEntry () const
const QWidgetcurrentPage () const
void setApplyEnabled (bool enabled)
 Activate or deactivate the apply and ok buttons.
void applied ()

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.
void showHelp ()
void dialogButtonsClicked_ (QAbstractButton *button)
void removeItem_ (QTreeWidgetItem *item, bool update)

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

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:
    parentthe parent QWidget (See QTabDialog in the QT documentation)
    name(See QDialog in the QT documentation)

Copy constructur.

Destructor.


Member Function Documentation

Store the last applied values for undo.

void BALL::VIEW::Preferences::dialogButtonsClicked_ ( QAbstractButton *  button) [protected, slot]

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

Parameters:
inifilethe INIFile that contains the needed information
See also:
writePreferences

Check if pages are available.

Returns:
bool true if pages are available

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

Parameters:
childa pointer to the new dialog
namethe name of the new dialog
See also:
removePage

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

Parameters:
childa pointer to the dialog to be removed
See also:
insertPage
void BALL::VIEW::Preferences::removeItem_ ( QTreeWidgetItem item,
bool  update 
) [protected]

Activate or deactivate the apply and ok buttons.

Open the preferences dialog.

Show the given page.

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

Parameters:
inifilethe INIFile to be written into
See also:
fetchPreferences

Member Data Documentation

Definition at line 157 of file preferences.h.

Definition at line 159 of file preferences.h.

Definition at line 158 of file preferences.h.

Definition at line 160 of file preferences.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines