mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
add pattern factory/singletton to create different type of element
add two news class for element type : simple and folio report add an empty tab for the element report in the element properties widget git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2665 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include "elementscollection.h"
|
||||
#include "elementscategory.h"
|
||||
#include "elementdefinition.h"
|
||||
#include "qetgraphicsitem/customelement.h"
|
||||
#include "factory/elementfactory.h"
|
||||
|
||||
/**
|
||||
Construct a cache for elements collections.
|
||||
@@ -171,7 +171,7 @@ QPixmap ElementsCollectionCache::pixmap() const {
|
||||
*/
|
||||
bool ElementsCollectionCache::fetchData(const ElementsLocation &location) {
|
||||
int state;
|
||||
CustomElement *custom_elmt = new CustomElement(location, 0, 0, &state);
|
||||
Element *custom_elmt = ElementFactory::Instance()->createElement(location, 0, 0, &state);
|
||||
if (state) {
|
||||
qDebug() << "ElementsCollectionCache::fetchData() : Le chargement du composant" << qPrintable(location.toString()) << "a echoue avec le code d'erreur" << state;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user