22 #include <qmessagebox.h>
23 #include <qpushbutton.h>
25 #include <QGridLayout>
27 #include <QHBoxLayout>
37 #define TR(id) OLocalizator::getString("TYGetLibraryDialog", (id))
43 setWindowTitle(
TR(
"id_caption"));
46 QGridLayout* pLayout =
new QGridLayout();
54 QBoxLayout* pBtnLayout =
new QHBoxLayout();
55 pLayout->addLayout(pBtnLayout, 1, 0);
56 pBtnLayout->addStretch(1);
63 QPushButton* pCloseBtn =
new QPushButton(
TR(
"id_cancel_btn"),
this);
64 pCloseBtn->setShortcut(Qt::Key_Escape);
65 QObject::connect(pCloseBtn, &QPushButton::clicked,
this, &TYGetLibraryDialog::reject);
66 pBtnLayout->addWidget(pCloseBtn);
86 if (selectedElts.size() == 0)
91 if (QMessageBox::question(
this,
TR(
"id_box_caption"),
TR(
"id_box_text"),
TR(
"id_box_yes"),
92 TR(
"id_box_no"), QString(), 0, 1))
101 TYApplication::setOverrideCursor(Qt::WaitCursor);
105 for (
unsigned int i = 0; i < selectedElts.size(); ++i)
145 TYApplication::restoreOverrideCursor();
TYMainWindow * getTYMainWnd()
Retourne le pointeur sur la fenetre principale.
pour l'application Tympan (fichier header)
std::vector< LPTYElement > LPTYElementArray
Boite de dialogue pour la lecture d'un element dans la bibliotheque (fichier header)
Fenetre principale de l'application Tympan (fichier header)
static OMessageManager * get()
virtual void info(const char *message,...)
static void setRegenerateID(const bool &bRegenerate)
LPTYElementArray getElements()
LPTYElementArray _elements
La collection d'element.
void setEnableButton(const QString &)
Active ou non le bouton _pOpenBtn.
virtual ~TYGetLibraryDialog()
QPushButton * _pOpenBtn
Le bouton open.
TYGetLibraryDialog(int filter, QWidget *parent=0, const char *name=0, Qt::WindowFlags f=QFlag(0))
void openSelected()
Lit la selection.
TYLibraryWidget * _pLibrary
La librarie.
bool backupFile(const QString &fileName)
int load(const QString &fileName, LPTYElementArray &eltCollection)