Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

VIEW::Preferences Class Reference
[QT Dialogs]

Preferences is a dialog for other preference pages to be inserted. More...

#include <preferences.h>

List of all members.

Public slots

void show ()
 Open the preferences dialog.
void showEntry (QWidget *page)
 Show the given page.
void entrySelected ()
void setDefaultValues ()
void cancelPreferences ()
void applyPreferences ()
 Store the last applied values for undo.
void showHelp ()
void removeItem_ (QTreeWidgetItem *item, bool update) throw ()
HashSet< PreferencesEntry * > entries_
HashMap< QTreeWidgetItem *,
QWidget * > 
item_to_widget_
HashMap< QTreeWidgetItem *,
PreferencesEntry * > 
item_to_entry_
HashMap< QWidget *, QTreeWidgetItem * > widget_to_item_

Public Member Functions

Constructors
 Preferences (QWidget *parent=NULL, const char *name="Preferences") throw ()
 Default Constructor.
 Preferences (const Preferences &preferences) throw ()
 Copy constructur.
virtual ~Preferences () throw ()
 Destructor.
Accessors
bool hasPages () throw ()
 Check if pages are available.
void insertEntry (PreferencesEntry *child) throw ()
 Insert a new page.
void removeEntry (PreferencesEntry *child) throw ()
 Remove a previously inserted page.
void fetchPreferences (INIFile &inifile) throw ()
 Fetch the preferences (the position) from the INIFile inifile.
void writePreferences (INIFile &inifile) throw ()
 Write the preferences (the position) to the INIFile inifile.
const QWidget * currentEntry () const throw ()
const QWidget * currentPage () const throw ()


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.


Constructor & Destructor Documentation

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

Default Constructor.

There are three buttons:

  • apply - apply the preferences
  • cancel - hide the preferences dialog
  • defaults - reset the values of the currently selected page
    Parameters:
    parent the parent QWidget (See QTabDialog in the QT documentation)
    name (See QDialog in the QT documentation)


Member Function Documentation

void VIEW::Preferences::fetchPreferences INIFile inifile  )  throw ()
 

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

bool VIEW::Preferences::hasPages  )  throw ()
 

Check if pages are available.

Returns:
bool true if pages are available

void VIEW::Preferences::insertEntry PreferencesEntry child  )  throw ()
 

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

void VIEW::Preferences::removeEntry PreferencesEntry child  )  throw ()
 

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

void VIEW::Preferences::show  )  [slot]
 

Open the preferences dialog.

void VIEW::Preferences::writePreferences INIFile inifile  )  throw ()
 

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