add subdirectories recursively
This commit is contained in:
parent
717e131b75
commit
99a2d118c8
6 changed files with 70 additions and 40 deletions
|
|
@ -42,6 +42,19 @@ bool NavigationItemModel::setPath(const QString &path)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool NavigationItemModel::isCircleDelegate() const
|
||||
{
|
||||
return mIsCircleDelegate;
|
||||
}
|
||||
|
||||
void NavigationItemModel::setCircleDelegate(bool value)
|
||||
{
|
||||
if(value != mIsCircleDelegate){
|
||||
mIsCircleDelegate = value;
|
||||
emit isCircleDelegateChanged();
|
||||
}
|
||||
}
|
||||
|
||||
NavigationItemModel *NavigationItemModel::getParentItem()
|
||||
{
|
||||
return mParentItem;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ class NavigationItemModel : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString pImageSource READ getImageSource NOTIFY imageSourceChanged)
|
||||
Q_PROPERTY(bool pIsCircleDelegate READ isCircleDelegate NOTIFY isCircleDelegateChanged)
|
||||
|
||||
signals:
|
||||
void isCircleDelegateChanged();
|
||||
void imageSourceChanged();
|
||||
void clicked();
|
||||
|
||||
|
|
@ -21,6 +23,9 @@ public:
|
|||
QString getPath() const;
|
||||
bool setPath(const QString & path);
|
||||
|
||||
bool isCircleDelegate() const;
|
||||
void setCircleDelegate(bool value);
|
||||
|
||||
NavigationItemModel* getParentItem();
|
||||
QList<NavigationItemModel*> getChildren();
|
||||
|
||||
|
|
@ -32,6 +37,7 @@ public:
|
|||
private:
|
||||
QString mPath = QString("");
|
||||
QString mImageSource;
|
||||
bool mIsCircleDelegate = false;
|
||||
|
||||
QList<NavigationItemModel*> mChildren = QList<NavigationItemModel*>();
|
||||
NavigationItemModel* mParentItem = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue