ATLAS Offline Software
Loading...
Searching...
No Matches
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;
46 m_d->channelmanager=cm;
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}
void pluginSelected(int i)

◆ ~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) {
142 if (m_d->channelmanager->hasRefreshingSystem(un))
143 refreshing=true;
144 IVP1ChannelWidget* cw = m_d->channelmanager->uniqueName2Channel(un);
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));
73 m_d->unloadfile=m_d->index_2_fullpath.value(i);
74 accept();
75}
StatusCode accept(const xAOD::Muon *mu)

◆ 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)
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: