mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-06 05:10:52 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user