| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef __CANVAS_H__
- #define __CANVAS_H__
- #include <QWidget>
- #include <libxml/parser.h>
- #include <libxml/tree.h>
- class Canvas : public QWidget
- {
- Q_OBJECT
- public:
- explicit Canvas(const xmlNodePtr canvasNodePtr, QWidget *parent = nullptr);
- ~Canvas();
- const QColor &backgroundColor() const;
- void setBackgroundColor(const QColor &newBackgroundColor);
- bool load(const xmlNodePtr canvasNodePtr);
- QList<QWidget *> widgetList() const;
- QList<QStringList> parameterList() const;
- bool isDefault() const;
- void clear();
- int parameterCount() const;
- protected:
- void paintEvent(QPaintEvent *event) override;
- private:
- QColor m_backgroundColor;
- QList<QWidget *> m_widgetList;
- QList<QStringList> m_parameterList;
- bool m_isDefault;
- };
- #endif // CANVAS_H
|