KaliVeda
Toolkit for HIC analysis
|
GUI for setting KVNameValueList parameters.
Created by KVClassFactory on Fri Feb 17 09:32:40 2017 Author: John Frankland,,,
This is a lightweight transient dialog box which can be used to set an arbitrary list of parameters. The parameters are contained in a KVNameValueList. To use, do:
[Note that this example is for stand-alone use of the GUI. The first argument to the constructor is usually the TGMainFrame of your GUI application]
If the user presses 'Cancel', the original values of the parameters are restored.
Boolean parameters can be used to 'enable' other parameters in the GUI, i.e. with the previous example, if you do:
then the "Min" and "Max" input widgets in the GUI will only be enabled when the "FixLimits?" parameter is true
, and will be en/disabled when the check box for this parameter is checked/unchecked.
Definition at line 55 of file KVNameValueListGUI.h.
#include <KVNameValueListGUI.h>
Public Member Functions | |
KVNameValueListGUI (const TGWindow *main, KVNameValueList *params, Bool_t *cancel_pressed, Bool_t wait_for_main=kTRUE) | |
Constructor. | |
virtual | ~KVNameValueListGUI () |
Destructor. | |
ClassDef (KVNameValueListGUI, 1) void DisplayDialog() | |
void | CloseWindow () |
void | DoClose () |
bool | EnableDependingOnBool (const TString &value_to_enable, const TString &bool_parameter) |
void | ReadData () |
void | RestoreData () |
return all values to original state | |
Private Member Functions | |
virtual TObject * | AddABool (Int_t i, TGHorizontalFrame *hf) |
virtual TObject * | AddADouble (Int_t i, TGHorizontalFrame *hf) |
virtual TObject * | AddAInt (Int_t i, TGHorizontalFrame *hf) |
virtual TObject * | AddAString (Int_t i, TGHorizontalFrame *hf) |
TObject * | GetDataWidget (const TString &parname) const |
TObject * | GetDataWidget (int i) const |
KVNameValueList * | GetList () const |
TGTransientFrame * | GetMain () const |
Private Attributes | |
Bool_t * | fCancel |
TGTextButton * | fCancelBut |
Cancel button. | |
TObjArray | fData |
UInt_t | fHeight |
TGTransientFrame * | fMain |
Bool_t * | fOK |
set to kTRUE if OK button is pressed | |
TGTextButton * | fOKBut |
OK button. | |
KVNameValueList | fOriginal |
Bool_t | fWaitForMain |
UInt_t | fWidth |
UInt_t | max_width |
KVNameValueList * | theList |
KVNameValueListGUI::KVNameValueListGUI | ( | const TGWindow * | main, |
KVNameValueList * | params, | ||
Bool_t * | cancel_pressed, | ||
Bool_t | wait_for_main = kTRUE |
||
) |
Constructor.
Definition at line 138 of file KVNameValueListGUI.cpp.
|
virtual |
Destructor.
Definition at line 213 of file KVNameValueListGUI.cpp.
|
privatevirtual |
Definition at line 30 of file KVNameValueListGUI.cpp.
|
privatevirtual |
Definition at line 43 of file KVNameValueListGUI.cpp.
|
privatevirtual |
Definition at line 59 of file KVNameValueListGUI.cpp.
|
privatevirtual |
Definition at line 17 of file KVNameValueListGUI.cpp.
KVNameValueListGUI::ClassDef | ( | KVNameValueListGUI | , |
1 | |||
) |
void KVNameValueListGUI::CloseWindow | ( | ) |
Definition at line 237 of file KVNameValueListGUI.cpp.
void KVNameValueListGUI::DoClose | ( | ) |
Definition at line 227 of file KVNameValueListGUI.cpp.
bool KVNameValueListGUI::EnableDependingOnBool | ( | const TString & | value_to_enable, |
const TString & | bool_parameter | ||
) |
If the list of parameters contains a boolean variable with name bool_parameter, one or more of the widgets (number entry field, text entry field, etc.) can be disabled or enabled depending on the boolean state.
if bool_parameter is not the name of a boolean in the list, or value_to_enable cannot be found in the list, returns false. otherwise, returns true in case of success.
Definition at line 252 of file KVNameValueListGUI.cpp.
Return pointer to widget corresponding to named parameter in list
Definition at line 90 of file KVNameValueListGUI.h.
|
inlineprivate |
Definition at line 78 of file KVNameValueListGUI.h.
|
inlineprivate |
Definition at line 82 of file KVNameValueListGUI.h.
|
inlineprivate |
Definition at line 86 of file KVNameValueListGUI.h.
void KVNameValueListGUI::ReadData | ( | ) |
Definition at line 77 of file KVNameValueListGUI.cpp.
void KVNameValueListGUI::RestoreData | ( | ) |
return all values to original state
Definition at line 101 of file KVNameValueListGUI.cpp.
|
private |
Definition at line 69 of file KVNameValueListGUI.h.
|
private |
Cancel button.
Definition at line 63 of file KVNameValueListGUI.h.
|
private |
Definition at line 67 of file KVNameValueListGUI.h.
|
private |
Definition at line 66 of file KVNameValueListGUI.h.
|
private |
Definition at line 61 of file KVNameValueListGUI.h.
|
private |
set to kTRUE if OK button is pressed
Definition at line 64 of file KVNameValueListGUI.h.
|
private |
OK button.
Definition at line 62 of file KVNameValueListGUI.h.
|
private |
Definition at line 59 of file KVNameValueListGUI.h.
|
private |
Definition at line 70 of file KVNameValueListGUI.h.
|
private |
Definition at line 66 of file KVNameValueListGUI.h.
|
private |
Definition at line 65 of file KVNameValueListGUI.h.
|
private |
Definition at line 58 of file KVNameValueListGUI.h.