mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 02:10:52 +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:
@@ -21,7 +21,7 @@
|
||||
#include "diagram.h"
|
||||
#include "elementscategory.h"
|
||||
#include "elementscollectioncache.h"
|
||||
#include "qetgraphicsitem/customelement.h"
|
||||
#include "factory/elementfactory.h"
|
||||
#include "fileelementscollection.h"
|
||||
#include "fileelementdefinition.h"
|
||||
#include "qeticons.h"
|
||||
@@ -309,7 +309,7 @@ void ElementsPanel::startElementDrag(const ElementsLocation &location) {
|
||||
|
||||
// element temporaire pour fournir un apercu
|
||||
int elmt_creation_state;
|
||||
Element *temp_elmt = new CustomElement(location, 0, 0, &elmt_creation_state);
|
||||
Element *temp_elmt = ElementFactory::Instance()->createElement(location, 0, 0, &elmt_creation_state);
|
||||
if (elmt_creation_state) {
|
||||
delete temp_elmt;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user