app.h Example File
scratchpad/src/app.h
#ifndef APP_HPP
#define APP_HPP
#include <QtCore/QObject>
#include <bb/cascades/Image>
class App : public QObject
{
Q_OBJECT
Q_PROPERTY(QString object READ object WRITE setObject NOTIFY objectChanged)
Q_PROPERTY(QString rows READ rows WRITE setRows NOTIFY rowsChanged)
Q_PROPERTY(QString columns READ columns WRITE setColumns NOTIFY columnsChanged)
Q_PROPERTY(bb::cascades::Image image READ image NOTIFY imageChanged)
public:
App();
Q_SIGNALS:
void objectChanged();
void rowsChanged();
void columnsChanged();
void imageChanged();
private:
void setObject(const QString &object);
QString object() const;
void setRows(const QString &rows);
QString rows() const;
void setColumns(const QString &columns);
QString columns() const;
bb::cascades::Image image() const;
void updateImage();
QSize desiredReplicantSize() const;
private:
QString m_object;
int m_rows;
int m_columns;
bb::cascades::Image m_image;
};
#endif