KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVTestListView.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Wed Apr 3 15:57:14 2013
2 //Author: John Frankland,,,
3 
4 #include "KVTestListView.h"
5 #include <KVDatime.h>
6 #include <TEnv.h>
7 
9 
10 
11 
14 KVTestListView::KVTestListView(TClass* obclass, Int_t ncols, TString* columns)
15 {
16  // Default constructor
17 
18  MainFrame = new TGMainFrame(gClient->GetRoot(), 10, 10, kMainFrame | kVerticalFrame);
19  MainFrame->SetName("Test GUI");
20  fLV = new KVListView(obclass, MainFrame, 900, 400);
21  fLV->SetDataColumns(ncols);
22  for (int i = 0; i < ncols; i++) fLV->SetDataColumn(i, columns[i]);
23  fLV->ActivateSortButtons();
24 
25  MainFrame->AddFrame(fLV, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 10, 10));
26  MainFrame->SetMWMHints(kMWMDecorAll,
29  MainFrame->MapSubwindows();
30 
31  MainFrame->Resize(MainFrame->GetDefaultSize());
32  MainFrame->MapWindow();
33 
34  MainFrame->Connect("CloseWindow()", "KVTestListView", this, "DoClose()");
35  MainFrame->DontCallClose(); // to avoid double deletions.
36 }
37 
38 
39 
42 
44 {
45  // Destructor
46  delete MainFrame;
47 }
48 
49 
50 
52 
54 {
55  TTimer::SingleShot(150, "KVTestListView", this, "CloseWindow()");
56 }
57 
58 
59 
61 
63 {
64  delete this;
65 }
66 
67 
68 
int Int_t
kVerticalFrame
kMainFrame
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
#define gClient
kMWMFuncAll
kMWMDecorAll
kMWMInputModeless
kLHintsExpandY
kLHintsTop
kLHintsExpandX
Enhanced version of ROOT TGListView widget.
Definition: KVListView.h:145
TGMainFrame * MainFrame
virtual ~KVTestListView()
Destructor.
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)