| 123456789101112131415161718192021222324252627282930313233 |
- #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;
- protected:
- void paintEvent(QPaintEvent *event) override;
- private:
- QColor m_backgroundColor;
- QList<QWidget *> m_widgetList;
- QList<QStringList> m_parameterList;
- };
- #endif // CANVAS_H
|