Public Member Functions | Private Attributes | List of all members
dbutils::gui::ConfigSelectionDialog Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-04-12/DatabaseUtils/cxx/include/GUI/ConfigSelectionDialog.h"

Inheritance diagram for dbutils::gui::ConfigSelectionDialog:

Public Member Functions

 ConfigSelectionDialog (dbutils::daqconfig::IDSpec::MAJOR_SYSTEM_TYPE systemType, const std::string &detectorName, QWidget *parent=0)
 
std::string getSelectedConfigName () const
 
std::string getSelectedDCMOpMode () const
 
std::string getSelectedTime () const
 
QSize sizeHint () const
 

Private Attributes

NamedConfigTree_configTree
 

Detailed Description

Dialog box for selecting a particular named configuration.

Author
Kurt Biery
Version
Revision
1.1.24.1
Date
2019/09/27 00:07:04

Definition at line 18 of file ConfigSelectionDialog.h.

Constructor & Destructor Documentation

dbutils::gui::ConfigSelectionDialog::ConfigSelectionDialog ( dbutils::daqconfig::IDSpec::MAJOR_SYSTEM_TYPE  systemType,
const std::string detectorName,
QWidget *  parent = 0 
)

Definition at line 15 of file ConfigSelectionDialog.cpp.

References _configTree, g4zmq::connect(), dbutils::daqconfig::IDSpec::DAQ, label, dbutils::gui::NamedConfigTree::loadData(), string, and make_root_from_grid_output::tr.

17  : QDialog(parent)
18 {
19  setWindowTitle(tr("Configuration Selector"));
20 
21  // *********************************************************
22  // first, fetch the set of available named configurations
23  // *********************************************************
26  getAvailableGlobalConfigs(systemType, detectorName, globalNameMap)) {
27 
28  std::string msgText = "Unable to fetch the available named ";
29  msgText.append("global configurations from the database for ");
30  msgText.append("the ");
31  msgText.append((systemType == DAQCFG::IDSpec::DAQ ?
32  "DAQ" : "SlowControls"));
33  msgText.append(" system at the ");
34  msgText.append(detectorName);
35  msgText.append(" detector");
36  QLabel* label = new QLabel(msgText.c_str());
37 
38  QDialogButtonBox* buttonBox =
39  new QDialogButtonBox(QDialogButtonBox::Cancel);
40  buttonBox->setCenterButtons(true);
41  connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
42 
43  QVBoxLayout *mainLayout = new QVBoxLayout;
44  mainLayout->addWidget(label);
45  mainLayout->addWidget(buttonBox);
46  setLayout(mainLayout);
47 
48  return;
49  }
50 
51  // ******************************************************
52  // next, create the tree to display the configurations
53  // ******************************************************
54  _configTree = new NamedConfigTree();
55  _configTree->loadData(globalNameMap);
56 
57  // ********************************
58  // create the intro text label
59  // ********************************
60  QLabel* label = new QLabel("Select one of the named configurations from the list below:\n");
61 
62  // ********************************
63  // create the accept/reject buttons
64  // ********************************
65  QDialogButtonBox* buttonBox =
66  new QDialogButtonBox(QDialogButtonBox::Ok |
67  QDialogButtonBox::Cancel);
68  buttonBox->setCenterButtons(true);
69 
70  connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
71  connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
72 
73  // ********************************
74  // put it all together
75  // ********************************
76  QVBoxLayout *mainLayout = new QVBoxLayout;
77  mainLayout->addWidget(label);
78  mainLayout->addWidget(_configTree);
79  mainLayout->addWidget(buttonBox);
80  setLayout(mainLayout);
81 }
void loadData(dbutils::daqconfig::NamedConfigUtils::GlobalNameSpecMap nameSpecMap)
std::map< GlobalNameSpec, std::vector< GlobalNameSpec > > GlobalNameSpecMap
const char * label
def connect(endpoint="tcp://127.0.0.1:5555")
Definition: g4zmq.py:15
enum BeamMode string

Member Function Documentation

std::string dbutils::gui::ConfigSelectionDialog::getSelectedConfigName ( ) const
std::string dbutils::gui::ConfigSelectionDialog::getSelectedDCMOpMode ( ) const
std::string dbutils::gui::ConfigSelectionDialog::getSelectedTime ( ) const

Definition at line 93 of file ConfigSelectionDialog.cpp.

References _configTree, and dbutils::gui::NamedConfigTree::getSelectedTime().

94 {
95  return _configTree->getSelectedTime();
96 }
std::string getSelectedTime() const
QSize dbutils::gui::ConfigSelectionDialog::sizeHint ( ) const
inline

Definition at line 33 of file ConfigSelectionDialog.h.

33 {return QSize(550,250);}

Member Data Documentation

NamedConfigTree* dbutils::gui::ConfigSelectionDialog::_configTree
private

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