ATLAS Offline Software
Loading...
Searching...
No Matches
AODSystemController::Imp Class Reference
Collaboration diagram for AODSystemController::Imp:

Public Member Functions

bool updateComboBoxContents (QComboBox *cb, QStringList l, QString &restoredSelection)

Public Attributes

AODSystemControllertheclass
Ui::VP1AODControllerForm ui
AODCollWidgetcollwidget
Ui::AODObjectBrowser ui_objBrowser
QTreeWidget * objBrowserWidget
AODSysCommonDatacommon

Static Public Attributes

static const QString noneAvailString = QString("None available")

Detailed Description

Definition at line 56 of file AODSystemController.cxx.

Member Function Documentation

◆ updateComboBoxContents()

bool AODSystemController::Imp::updateComboBoxContents ( QComboBox * cb,
QStringList l,
QString & restoredSelection )

Definition at line 205 of file AODSystemController.cxx.

206{
207 //current selection:
208 QString ct = cb->currentText();
209 if (ct==Imp::noneAvailString)
210 ct = "";
211
212 bool save = cb->blockSignals(true);
213
214 cb->clear();
215
216 bool enabled = false;
217 if (l.isEmpty()) {
218 cb->addItem(Imp::noneAvailString);
219 cb->setEnabled(false);
220 } else {
221 cb->addItems(l);
222
223 int i = restoredSelection.isEmpty() ? -1 : cb->findText(restoredSelection);
224 if (i<0)
225 i = ct.isEmpty() ? -1 : cb->findText(ct);
226 restoredSelection = "";
227
228 if (i>=0) {
229 cb->setCurrentIndex(i);
230 } else {
231 //Let's try to pick the default to be VP1Extrapolater over
232 //AtlasExtrapolater over... whatever (same for fitters):
233 int i_vp1(-1), i_atlas(-1);
234 for (int j = 0; j <cb->count();++j) {
235 if (i_vp1==-1&&cb->itemText(j).contains("vp1",Qt::CaseInsensitive))
236 i_vp1 = j;
237 if (i_atlas==-1&&cb->itemText(j).contains("atlas",Qt::CaseInsensitive))
238 i_atlas = j;
239 }
240 if (i_vp1>=0)
241 cb->setCurrentIndex(i_vp1);
242 else if (i_atlas>=0)
243 cb->setCurrentIndex(i_atlas);
244 }
246 enabled = true;
247 cb->setEnabled(true);
248 }
249
250 if (!save)
251 cb->blockSignals(false);
252 return enabled;
253}
static const QString noneAvailString
l
Printing final latex table to .tex output file.

Member Data Documentation

◆ collwidget

AODCollWidget* AODSystemController::Imp::collwidget

Definition at line 60 of file AODSystemController.cxx.

◆ common

AODSysCommonData* AODSystemController::Imp::common

Definition at line 71 of file AODSystemController.cxx.

◆ noneAvailString

const QString AODSystemController::Imp::noneAvailString = QString("None available")
static

Definition at line 62 of file AODSystemController.cxx.

◆ objBrowserWidget

QTreeWidget* AODSystemController::Imp::objBrowserWidget

Definition at line 70 of file AODSystemController.cxx.

◆ theclass

AODSystemController* AODSystemController::Imp::theclass

Definition at line 58 of file AODSystemController.cxx.

◆ ui

Ui::VP1AODControllerForm AODSystemController::Imp::ui

Definition at line 59 of file AODSystemController.cxx.

◆ ui_objBrowser

Ui::AODObjectBrowser AODSystemController::Imp::ui_objBrowser

Definition at line 68 of file AODSystemController.cxx.


The documentation for this class was generated from the following file: