22 #include <qpushbutton.h>
24 #include <QGridLayout>
26 #include <QHBoxLayout>
27 #include <QTreeWidget>
28 #include <QTreeWidgetItem>
29 #include <QHeaderView>
38 #define TR(id) OLocalizator::getString("TYPluginDialog", (id))
44 setWindowTitle(
TR(
"id_caption"));
47 QGridLayout* pLayout =
new QGridLayout();
53 QStringList stringList;
54 stringList.append(
TR(
"id_name"));
55 stringList.append(
TR(
"id_author"));
56 stringList.append(
TR(
"id_version"));
57 stringList.append(
TR(
"id_description"));
58 stringList.append(
TR(
"id_uuid"));
59 stringList.append(
TR(
"id_filename"));
67 getTYMainWnd()->getProjetFrame()->getProjet()->getCurrentCalcul())
73 TYPluginManager::TYPluginList::iterator it = plugins.begin();
74 for (; it != plugins.end(); ++it)
77 labels.append((*it)->getPlugin()->getName());
78 labels.append((*it)->getPlugin()->getAuthor());
79 labels.append((*it)->getPlugin()->getVersion());
80 labels.append((*it)->getPlugin()->getDescription());
81 labels.append((*it)->getPlugin()->getUUID().toString());
82 labels.append((*it)->filename);
87 item->setSelected(
true);
92 QBoxLayout* pBtnLayout =
new QHBoxLayout();
93 pLayout->addLayout(pBtnLayout, 1, 0);
94 pBtnLayout->addStretch(1);
96 _pOkBtn =
new QPushButton(
TR(
"id_ok_btn"),
this);
101 QPushButton* pCloseBtn =
new QPushButton(
TR(
"id_cancel_btn"),
this);
102 pCloseBtn->setShortcut(Qt::Key_Escape);
103 QObject::connect(pCloseBtn, &QPushButton::clicked,
this, &TYPluginDialog::reject);
104 pBtnLayout->addWidget(pCloseBtn);
106 QObject::connect(
_pPluginListView, &QTreeWidget::itemSelectionChanged,
this,
113 QObject::disconnect(
_pPluginListView, &QTreeWidget::itemSelectionChanged,
this,
TYMainWindow * getTYMainWnd()
Retourne le pointeur sur la fenetre principale.
pour l'application Tympan (fichier header)
Fenetre principale de l'application Tympan (fichier header)
Boite de dialogue pour la selection du plugin de calcul (fichier header)
#define DEFAULT_SOLVER_UUID
Frame pour la gestion de projet (fichier header)
const OGenID getSolverId() const
Get solver ID.
TYProjetFrame * getProjetFrame()
TYPluginDialog(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=QFlag(0))
void updateCurrentPlugin()
Mets a jour le SolverInterface courant.
void setEnableButton()
Active ou non le bouton _pOkBtn.
QTreeWidget * _pPluginListView
virtual ~TYPluginDialog()
std::list< TYPluginData * > TYPluginList
static LPTYPluginManager get()
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.