Folio List: XML save/open added. When Application starts, folio list is not added

so that user gets the option to choose whether he wants to add folio list or not.
Bug remaining:
- When open project file with folio_list present, folio list sheets are at the end,
  not at the beginning.
- Possibly many others. Thorough testing required.



git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2847 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
abhishekm71
2014-02-10 13:58:30 +00:00
parent c96036b7fa
commit 0888f6e347
6 changed files with 63 additions and 32 deletions

View File

@@ -19,7 +19,6 @@
#include <QPainter>
#include "qetapp.h"
int DiagramFolioList::folioList_quantity = 0;
qreal DiagramFolioList::colWidths[4] = {0.1, 0.55, 0.2, 0.15};
/**
@@ -27,11 +26,13 @@ qreal DiagramFolioList::colWidths[4] = {0.1, 0.55, 0.2, 0.15};
* Constructor
* @param parent parent QObject
*/
DiagramFolioList::DiagramFolioList(QObject *parent) : Diagram(parent) {
id = folioList_quantity;
folioList_quantity++;
DiagramFolioList::DiagramFolioList( QETProject *project, QObject *parent) : Diagram(parent) {
if (project) {
setProject(project);
id = project -> getFolioSheetsQuantity();
}
else
id = 0;
}
/**
@@ -40,8 +41,9 @@ DiagramFolioList::DiagramFolioList(QObject *parent) : Diagram(parent) {
*/
DiagramFolioList::~DiagramFolioList()
{
if (folioList_quantity > 0)
folioList_quantity--;
int folioSheetQty = project() -> getFolioSheetsQuantity();
if (folioSheetQty > 0)
project() -> setFolioSheetsQuantity(folioSheetQty-1);
}
/**