New element panel can display the thumbnail of elements used in a project

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4293 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-12-30 09:39:22 +00:00
parent 72c65f80ad
commit 313e4b9793
20 changed files with 462 additions and 126 deletions

View File

@@ -20,6 +20,7 @@
#include "fixedelement.h"
#include "nameslist.h"
#include "elementslocation.h"
#include "elementlocation.h"
#include <QPicture>
class ElementTextItem;
@@ -30,28 +31,32 @@ class Terminal;
element, the difference being that the CustomElement reads its description
(names, drawing, behavior) from an XML document.
*/
class CustomElement : public FixedElement {
class CustomElement : public FixedElement
{
Q_OBJECT
// constructors, destructor
// constructors, destructor
public:
CustomElement(const ElementsLocation &, QGraphicsItem * = 0, int * = 0);
CustomElement (const ElementsLocation &, QGraphicsItem * = 0, int * = 0);
CustomElement (ElementLocation &location, QGraphicsItem *parent = nullptr, int *state = nullptr);
virtual ~CustomElement();
private:
CustomElement(const CustomElement &);
CustomElement(const CustomElement &);
// attributes
// attributes
protected:
int elmt_state; // hold the error code in case the instanciation fails, or 0 if everything went well
NamesList names;
ElementsLocation location_;
QPicture drawing;
QPicture low_zoom_drawing;
QList<Terminal *> list_terminals;
QList<ElementTextItem *> list_texts_;
bool forbid_antialiasing;
int elmt_state; // hold the error code in case the instanciation fails, or 0 if everything went well
NamesList names;
ElementsLocation location_;
ElementLocation m_location;
QPicture drawing;
QPicture low_zoom_drawing;
QList<Terminal *> list_terminals;
QList<ElementTextItem *> list_texts_;
bool forbid_antialiasing;
QList<QLineF *> list_lines_;
QList<QRectF *> list_rectangles_;