73 lines
2.1 KiB
C++
73 lines
2.1 KiB
C++
/* generated by rust_qt_binding_generator */
|
|
#ifndef TMP_H
|
|
#define TMP_H
|
|
|
|
#include <QObject>
|
|
#include <QVariant>
|
|
#include <QAbstractItemModel>
|
|
|
|
class PersonInterface;
|
|
class Person : public QObject
|
|
{
|
|
Q_OBJECT
|
|
PersonInterface * const d;
|
|
Q_PROPERTY(QString userName READ userName WRITE setUserName NOTIFY userNameChanged FINAL)
|
|
Q_PROPERTY(int age READ age NOTIFY ageChanged FINAL)
|
|
Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged FINAL)
|
|
Q_PROPERTY(QVariant misc READ misc WRITE setMisc NOTIFY miscChanged FINAL)
|
|
Q_PROPERTY(QByteArray icon READ icon WRITE setIcon NOTIFY iconChanged FINAL)
|
|
public:
|
|
explicit Person(QObject *parent = nullptr);
|
|
~Person();
|
|
QString userName() const;
|
|
void setUserName(const QString& v);
|
|
int age() const;
|
|
bool active() const;
|
|
void setActive(bool v);
|
|
QVariant misc() const;
|
|
void setMisc(const QVariant& v);
|
|
QByteArray icon() const;
|
|
void setIcon(const QByteArray& v);
|
|
signals:
|
|
void userNameChanged();
|
|
void ageChanged();
|
|
void activeChanged();
|
|
void miscChanged();
|
|
void iconChanged();
|
|
private:
|
|
QString m_userName;
|
|
int m_age;
|
|
bool m_active;
|
|
QVariant m_misc;
|
|
QByteArray m_icon;
|
|
};
|
|
|
|
class DirectoryInterface;
|
|
class Directory : public QAbstractItemModel
|
|
{
|
|
Q_OBJECT
|
|
DirectoryInterface * const d;
|
|
Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged FINAL)
|
|
public:
|
|
explicit Directory(QObject *parent = nullptr);
|
|
~Directory();
|
|
QString path() const;
|
|
void setPath(const QString& v);
|
|
|
|
int columnCount(const QModelIndex &parent) const;
|
|
QVariant data(const QModelIndex &index, int role) const;
|
|
QModelIndex index(int row, int column, const QModelIndex &parent) const;
|
|
QModelIndex parent(const QModelIndex &index) const;
|
|
int rowCount(const QModelIndex &parent) const;
|
|
bool canFetchMore(const QModelIndex &parent) const;
|
|
void fetchMore(const QModelIndex &parent);
|
|
QHash<int, QByteArray> roleNames() const;
|
|
signals:
|
|
void newDataReady();
|
|
signals:
|
|
void pathChanged();
|
|
private:
|
|
QString m_path;
|
|
};
|
|
#endif // TMP_H
|