contextpanewidgetimage.h 976 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#ifndef CONTEXTPANEWIDGETIMAGE_H
#define CONTEXTPANEWIDGETIMAGE_H

#include <QWidget>

namespace Ui {
    class ContextPaneWidgetImage;
}


namespace QmlJS {
    class PropertyReader;
}

namespace QmlDesigner {

class ContextPaneWidgetImage : public QWidget
{
    Q_OBJECT

public:
    explicit ContextPaneWidgetImage(QWidget *parent = 0);
    ~ContextPaneWidgetImage();
    void setProperties(QmlJS::PropertyReader *propertyReader);
    void setPath(const QString& path);

signals:
    void propertyChanged(const QString &, const QVariant &);
    void removeProperty(const QString &);
    void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool removeFirst);

public slots:
    void onStretchChanged();
    void onFileNameChanged();
    void setPixmap(const QString &fileName);

protected:
    void changeEvent(QEvent *e);

private:
    Ui::ContextPaneWidgetImage *ui;
    QString m_path;
};

} //QmlDesigner

#endif // CONTEXTPANEWIDGETIMAGE_H