KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVNameValueListGUI.h
1
3
4#ifndef __KVNAMEVALUELISTGUI_H
5#define __KVNAMEVALUELISTGUI_H
6
7#include "TGFrame.h"
8#include "RQ_OBJECT.h"
9#include "KVNameValueList.h"
10
11#include <TGButton.h>
12#include <TObjArray.h>
13
33
56 RQ_OBJECT("KVNameValueListGUI")
57private:
60
68
71
72protected:
74 virtual TObject* AddABool(Int_t i, TGHorizontalFrame* hf);
76 virtual TObject* AddAInt(Int_t i, TGHorizontalFrame* hf);
77
78 TObject* GetDataWidget(int i) const
79 {
80 return fData[i];
81 }
83 {
84 return theList;
85 }
87 {
88 return fMain;
89 }
90 TObject* GetDataWidget(const TString& parname) const
91 {
93
94 auto index = theList->GetNameIndex(parname);
95 if (index < 0) return nullptr;
96 return GetDataWidget(index);
97 }
98
99public:
100 KVNameValueListGUI(const TGWindow* main, KVNameValueList* params, Bool_t* cancel_pressed, Bool_t wait_for_main = kTRUE);
101
102 virtual ~KVNameValueListGUI();
103
104 void ReadData();
105 void RestoreData();
106 void DoClose();
107 void CloseWindow();
108
109 bool EnableDependingOnBool(const TString& value_to_enable, const TString& bool_parameter);
110
111 ClassDef(KVNameValueListGUI, 1) //GUI for setting KVNameValueList parameters
112 void DisplayDialog();
113};
114
115#endif
int Int_t
unsigned int UInt_t
#define RQ_OBJECT(sender_class)
bool Bool_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
GUI for setting KVNameValueList parameters.
TObject * GetDataWidget(int i) const
TGTransientFrame * GetMain() const
ClassDef(KVNameValueListGUI, 1) void DisplayDialog()
virtual TObject * AddABool(Int_t i, TGHorizontalFrame *hf)
TGTransientFrame * fMain
TObject * GetDataWidget(const TString &parname) const
virtual TObject * AddAString(Int_t i, TGHorizontalFrame *hf)
virtual TObject * AddAInt(Int_t i, TGHorizontalFrame *hf)
KVNameValueList * GetList() const
bool EnableDependingOnBool(const TString &value_to_enable, const TString &bool_parameter)
virtual TObject * AddADouble(Int_t i, TGHorizontalFrame *hf)
virtual ~KVNameValueListGUI()
Destructor.
TGTextButton * fCancelBut
Cancel button.
void RestoreData()
return all values to original state
TGTextButton * fOKBut
OK button.
KVNameValueList * theList
KVNameValueList fOriginal
Bool_t * fOK
set to kTRUE if OK button is pressed
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Int_t GetNameIndex(const Char_t *name) const