ATLAS Offline Software
graphics
VP1
VP1Systems
VP1GeometrySystems
src
VP1GeoTreeView.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Implementation of class VP1GeoTreeView //
9
// //
10
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11
// Initial version: January 2008 //
12
// //
14
15
#include "
VP1GeometrySystems/VP1GeoTreeView.h
"
16
#include <QTimer>
17
18
//____________________________________________________________________
19
class
VP1GeoTreeView::Imp
{
20
public
:
21
bool
updatescheduled
;
22
};
23
24
25
//____________________________________________________________________
26
VP1GeoTreeView::VP1GeoTreeView
(QWidget *
parent
)
27
: QTreeView(
parent
), m_d(
new
Imp
)
28
{
29
m_d
->
updatescheduled
=
false
;
30
}
31
32
//____________________________________________________________________
33
VP1GeoTreeView::~VP1GeoTreeView
()
34
{
35
delete
m_d
;
36
}
37
38
//____________________________________________________________________
39
void
VP1GeoTreeView::updateAllNonHiddenIndices
()
40
{
41
if
(
m_d
->
updatescheduled
)
42
m_d
->
updatescheduled
=
false
;
43
bool
save
= updatesEnabled();
44
setUpdatesEnabled(
false
);
45
46
//The following is a bit of a hack. Could probably be done better?
47
QModelIndexList oldselection = selectionModel()->selectedIndexes();
48
selectAll();
49
QModelIndexList allindexes = selectionModel()->selectedIndexes();
50
for
( QModelIndex
idx
: allindexes) {
51
update
(
idx
);
52
}
53
selectionModel()->clearSelection();
54
for
( QModelIndex
idx
: oldselection )
55
selectionModel()->select(
idx
,
QItemSelectionModel::Select
);
56
57
58
if
(
save
) {
59
setUpdatesEnabled(
true
);
60
update
();
61
}
62
}
63
64
//____________________________________________________________________
65
void
VP1GeoTreeView::scheduleUpdateOfAllNonHiddenIndices
()
66
{
67
if
(
m_d
->
updatescheduled
)
68
return
;
69
QTimer::singleShot(0,
this
, SLOT(
updateAllNonHiddenIndices
()));
70
}
CSV_InDetExporter.new
new
Definition:
CSV_InDetExporter.py:145
VP1GeoTreeView.h
VP1GeoTreeView::updateAllNonHiddenIndices
void updateAllNonHiddenIndices()
Definition:
VP1GeoTreeView.cxx:39
VP1GeoTreeView::~VP1GeoTreeView
virtual ~VP1GeoTreeView()
Definition:
VP1GeoTreeView.cxx:33
VP1GeoTreeView::VP1GeoTreeView
VP1GeoTreeView(QWidget *parent=0)
Definition:
VP1GeoTreeView.cxx:26
checkTP.save
def save(self, fileName="./columbo.out")
Definition:
checkTP.py:178
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
VP1GeoTreeView::Imp
Definition:
VP1GeoTreeView.cxx:19
Select
float Select(float *Efit, float *Tfit, int m)
Definition:
GetEnergy.cxx:30
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition:
LArNewCalib_DelayDump_OFC_Cali.py:69
VP1GeoTreeView::Imp::updatescheduled
bool updatescheduled
Definition:
VP1GeoTreeView.cxx:21
VP1GeoTreeView::m_d
Imp * m_d
Definition:
VP1GeoTreeView.h:43
WriteBchToCool.update
update
Definition:
WriteBchToCool.py:67
VP1GeoTreeView::scheduleUpdateOfAllNonHiddenIndices
void scheduleUpdateOfAllNonHiddenIndices()
Definition:
VP1GeoTreeView.cxx:65
Generated on Thu Nov 7 2024 21:31:40 for ATLAS Offline Software by
1.8.18