class MINDPrefsUI



MINDPrefsUI is used to configure program settings. These settings are stored in an instance of class MINDPrefs.



Screenshots

Elements Pane Server Pane


Constructors

MINDPrefsUI( MINDPrefs* )
Takes a pointer to an already instantiated MINDPrefs element. Note that it is important that one does not modify this class after creating an instance of MINDPrefsUI.

Functionality

public void show()
Calls FLTK functions to actually open the window.
public void quit( int save )
Tells MINDPrefsUI to close. Parameter passed to it is equivalent to pressing OK or Cancel in the dialog, 1 = OK, 0 = Cancel. Has no effect if the dialog has already been closed by the user or never opened in the first place.
protected void removeElement()
Remove an element from current->mainElements.
protected void addEditElements()
Scans the selected elements in elementBrowser. For all elements selected, it opens a class EditElement window. If no elements are selected, it opens an empty class EditElements window with which to create a new element and add it to mainElements.
protected void saveServerSettings( MINDPrefs* )
Copies the text from the Fl_Input elements that set server settings to the server settings stored in the MINDPrefs object passed as a parameter.
protected void initServerSettings()
Sets up the inputs (the Fl_Input boxes) with those settings stored in *current.
protected initElementBrowser()
Sets up the elementBrowser with those elements stored in current->mainElements.

Private Members

Fl_Multi_Browser elementBrowser
The FLTK browser pane that will be used for showing to the user all elements stored in the mainElements member of the MINDPrefs class.
Fl_Button removeElementButton
This button calls removeElements() when pressed.
Fl_Button editElementButton
This button calls addEditElements() when pressed.
Fl_Input serverInput
Used to allow the user to input the nodename of the DICOM server, which will be stored in the server field of the MINDPrefs class when saveServerSettings is called.
Fl_Input portInput
Data stored in this input field will be stored in the port member of the MINDPrefs class when saveServerSettings is called.
Fl_Input calledAPInput
Again, inputs data to be stored in calledAP.
Fl_Input callingAPInput
This will be stored in callingAP.
Fl_Input storageAPInput
This will be stored in storageAP.
Fl_Button acceptButton
Calls quit(1).
Fl_Button cancelButton
Calls quit(0).
MINDPrefs** prefs
Pointer reference to the MINDPrefs object contained within the calling class (usually MINDUI).
MINDPrefs* current
Pointer to the current settings the user is editing. These can be stored by quit(1).

Friends

class EditElement
Allows EditElement to modify the mainElements field of our MINDPrefs class.