[qet] [3344] Nomenclature |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3344
Author: scorpio810
Date: 2014-10-04 17:49:27 +0200 (Sat, 04 Oct 2014)
Log Message:
-----------
Nomenclature
Add dialog for informing the user
Modified Paths:
--------------
trunk/sources/nomenclature.cpp
trunk/sources/nomenclature.h
Modified: trunk/sources/nomenclature.cpp
===================================================================
--- trunk/sources/nomenclature.cpp 2014-10-04 14:16:35 UTC (rev 3343)
+++ trunk/sources/nomenclature.cpp 2014-10-04 15:49:27 UTC (rev 3344)
@@ -46,8 +46,12 @@
@param true if success
*/
bool nomenclature::saveToCSVFile() {
- if(m_list_diagram.isEmpty()) return false;
-
+ if(m_list_diagram.isEmpty())
+ QMessageBox msgBox;
+ msgBox.setText("Le titre du projet est vide, veuillez le remplir.");
+ msgBox.exec();
+ return false;
+
//Process...
QString data = tr("NOMENCLATURE : ") + m_project -> title() + "\n\n";
data += tr("Folio") +";"+ tr("Sch\351ma") +";"+ tr("D\351signation")+";"+ tr("Label") +";"+ tr("Commententaire") +";"+ tr("Fabriquant") +";"+ tr("Reference") +";"+ tr("Machine-reference\n");
@@ -58,7 +62,7 @@
data += rows.at(j);
}
}
-
+
// SAVE IN FILE
QString name = tr("nomenclature_") + QString(m_project -> title());
QString filename = QFileDialog::getSaveFileName(this->m_parent, tr("Enregister sous... "), name, tr("Fichiers csv (*.csv)"));
Modified: trunk/sources/nomenclature.h
===================================================================
--- trunk/sources/nomenclature.h 2014-10-04 14:16:35 UTC (rev 3343)
+++ trunk/sources/nomenclature.h 2014-10-04 15:49:27 UTC (rev 3344)
@@ -42,6 +42,7 @@
QETProject *m_project;
QList<Diagram *> m_list_diagram;
QWidget *m_parent;
+ QMessageBox msgBox;
// constructors, destructor
public: