mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-29 08:49:59 +02:00
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:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user