ATLAS Offline Software
Classes | Public Member Functions | Private Slots | Private Attributes | List of all members
VP1PluginDialog Class Reference

#include <VP1PluginDialog.h>

Inheritance diagram for VP1PluginDialog:
Collaboration diagram for VP1PluginDialog:

Classes

class  Imp
 

Public Member Functions

 VP1PluginDialog (QWidget *parent, VP1ChannelManager *, VP1ExecutionScheduler *)
 
virtual ~VP1PluginDialog ()
 
const QString & unloadfile ()
 

Private Slots

void pluginSelected (int i)
 
void unloadclicked ()
 
void updateRefreshInfo ()
 

Private Attributes

Impm_d
 

Detailed Description

Definition at line 23 of file VP1PluginDialog.h.

Constructor & Destructor Documentation

◆ VP1PluginDialog()

VP1PluginDialog::VP1PluginDialog ( QWidget *  parent,
VP1ChannelManager cm,
VP1ExecutionScheduler scheduler 
)

Definition at line 42 of file VP1PluginDialog.cxx.

43  : QDialog(parent), m_d(new Imp)
44 {
45  m_d->pd = this;
47  m_d->scheduler=scheduler;
48  Ui::VP1PluginDialog ui;
49  ui.setupUi(this);
50  ui.textBrowser_channels->viewport()->setBackgroundRole(QPalette::NoRole);
51  m_d->label_selectplugin = ui.label_selectplugin;
52  m_d->comboBox_plugins = ui.comboBox_plugins;
53  m_d->label_fullpathtitle = ui.label_fullpathtitle;
54  m_d->label_fullpath = ui.label_fullpath;
55  m_d->label_channels = ui.label_channels;
56  m_d->pushButton_unload = ui.pushButton_unload;
57  m_d->textBrowser_channels = ui.textBrowser_channels;
58  m_d->setInfo();
59  setModal(true);
60  connect(m_d->comboBox_plugins,SIGNAL(currentIndexChanged(int)),this,SLOT(pluginSelected(int)));
61  connect(m_d->pushButton_unload,SIGNAL(clicked()),this,SLOT(unloadclicked()));
62  connect(scheduler,SIGNAL(refreshingStatusChanged(bool)),this,SLOT(updateRefreshInfo()));
63 
64 }

◆ ~VP1PluginDialog()

VP1PluginDialog::~VP1PluginDialog ( )
virtual

Definition at line 84 of file VP1PluginDialog.cxx.

85 {
86  delete m_d; m_d=0;
87 }

Member Function Documentation

◆ pluginSelected

void VP1PluginDialog::pluginSelected ( int  i)
privateslot

Definition at line 127 of file VP1PluginDialog.cxx.

128 {
129  assert(i<m_d->comboBox_plugins->count());
130  assert(m_d->index_2_fullpath.contains(i));
131  m_d->label_fullpath->setText(m_d->index_2_fullpath.value(i));
132  QStringList availablechannels = m_d->channelmanager->channelsInPluginFile(m_d->index_2_fullpath.value(i));
133  if (availablechannels.empty()) {
134  m_d->textBrowser_channels->setHtml("none");
135  m_d->textBrowser_channels->setEnabled(false);
136  } else {
137  QString text;
138  for(const QString& bn : availablechannels) {
139  QStringList uns = m_d->channelmanager->basename2UniqueNames(bn);
140  bool refreshing=false;
141  for(const QString& un : uns) {
143  refreshing=true;
145  assert(cw);
146  connect(cw,SIGNAL(systemRefreshInfoChanged(QString,int,int)),this,SLOT(updateRefreshInfo()));
147  }
148  m_d->pushButton_unload->setEnabled(!m_d->scheduler->isRefreshing());
149  QString icontext = m_d->channelmanager->getIconLocation(bn);
150  text += (icontext.isEmpty()?"":"<img src=\""+icontext+"\">")+"<i>"
151  +bn+(uns.empty()?"":" ["+QString::number(uns.count())
152  +" active"+(refreshing?" (refreshing)":"")+"]")+"</i><br/>";
153  }
154  m_d->textBrowser_channels->setHtml(text);
155  m_d->textBrowser_channels->setEnabled(true);
156  }
157 }

◆ unloadclicked

void VP1PluginDialog::unloadclicked ( )
privateslot

Definition at line 67 of file VP1PluginDialog.cxx.

68 {
69  int i = m_d->comboBox_plugins->currentIndex();
70  if (i<0)
71  return;
72  assert(m_d->index_2_fullpath.contains(i));
74  accept();
75 }

◆ unloadfile()

const QString & VP1PluginDialog::unloadfile ( )

Definition at line 78 of file VP1PluginDialog.cxx.

79 {
80  return m_d->unloadfile;
81 }

◆ updateRefreshInfo

void VP1PluginDialog::updateRefreshInfo ( )
privateslot

Definition at line 160 of file VP1PluginDialog.cxx.

160  {
161  int i = m_d->comboBox_plugins->currentIndex();
162  if (i!=-1)
163  pluginSelected(i);
164 }

Member Data Documentation

◆ m_d

Imp* VP1PluginDialog::m_d
private

Definition at line 36 of file VP1PluginDialog.h.


The documentation for this class was generated from the following files:
VP1PluginDialog::Imp::channelmanager
VP1ChannelManager * channelmanager
Definition: VP1PluginDialog.cxx:27
python.changerun.bn
bn
Definition: changerun.py:79
VP1PluginDialog::Imp::pushButton_unload
QPushButton * pushButton_unload
Definition: VP1PluginDialog.cxx:35
VP1PluginDialog::Imp::index_2_fullpath
QMap< int, QString > index_2_fullpath
Definition: VP1PluginDialog.cxx:37
VP1ChannelManager::getIconLocation
QString getIconLocation(const QString &channelname, const bool &isbasename=true)
Definition: VP1ChannelManager.cxx:588
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
VP1PluginDialog::Imp::textBrowser_channels
QTextBrowser * textBrowser_channels
Definition: VP1PluginDialog.cxx:36
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
VP1PluginDialog::Imp::scheduler
VP1ExecutionScheduler * scheduler
Definition: VP1PluginDialog.cxx:28
VP1PluginDialog::Imp::setInfo
void setInfo()
Definition: VP1PluginDialog.cxx:90
VP1ChannelManager::channelsInPluginFile
QStringList channelsInPluginFile(QString filename) const
Definition: VP1ChannelManager.cxx:358
lumiFormat.i
int i
Definition: lumiFormat.py:85
VP1ChannelManager::basename2UniqueNames
QStringList basename2UniqueNames(QString basename) const
Definition: VP1ChannelManager.cxx:546
VP1PluginDialog::Imp::label_fullpath
QLabel * label_fullpath
Definition: VP1PluginDialog.cxx:33
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VP1PluginDialog::Imp::label_channels
QLabel * label_channels
Definition: VP1PluginDialog.cxx:34
VP1PluginDialog::Imp::label_selectplugin
QLabel * label_selectplugin
Definition: VP1PluginDialog.cxx:30
IVP1ChannelWidget
Definition: IVP1ChannelWidget.h:34
VP1ExecutionScheduler::isRefreshing
bool isRefreshing() const
Definition: VP1ExecutionScheduler.cxx:798
VP1PluginDialog::Imp::label_fullpathtitle
QLabel * label_fullpathtitle
Definition: VP1PluginDialog.cxx:32
VP1PluginDialog::Imp::unloadfile
QString unloadfile
Definition: VP1PluginDialog.cxx:38
python.selection.number
number
Definition: selection.py:20
VP1PluginDialog::m_d
Imp * m_d
Definition: VP1PluginDialog.h:35
VP1ChannelManager::uniqueName2Channel
IVP1ChannelWidget * uniqueName2Channel(QString uniquename) const
Definition: VP1ChannelManager.cxx:455
VP1PluginDialog::Imp::pd
VP1PluginDialog * pd
Definition: VP1PluginDialog.cxx:26
VP1PluginDialog::unloadclicked
void unloadclicked()
Definition: VP1PluginDialog.cxx:67
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
VP1PluginDialog::Imp::comboBox_plugins
QComboBox * comboBox_plugins
Definition: VP1PluginDialog.cxx:31
VP1PluginDialog::updateRefreshInfo
void updateRefreshInfo()
Definition: VP1PluginDialog.cxx:160
VP1ChannelManager::hasRefreshingSystem
bool hasRefreshingSystem(const QString &uniquename) const
Definition: VP1ChannelManager.cxx:581
VP1PluginDialog::pluginSelected
void pluginSelected(int i)
Definition: VP1PluginDialog.cxx:127