30 Q_DECLARE_PUBLIC(QQuickSideBar)
32 static QQuickSideBarPrivate *get(QQuickSideBar *sidebar)
34 return sidebar->d_func();
37 QQuickItem *createDelegateItem(QQmlComponent *component,
const QVariantMap &initialProperties);
41 QUrl dialogFolder()
const;
42 void setDialogFolder(
const QUrl &folder);
43 QString displayNameFromFolderPath(
const QString &filePath);
44 QUrl folderIconSource()
const;
45 QUrl folderIconSource(QStandardPaths::StandardLocation stdLocation)
const;
46 QSize dialogIconSize()
const;
50 void writeSettings()
const;
52 void addFavorite(
const QUrl &favorite);
53 void removeFavorite(
const QUrl &favorite);
54 bool showAddFavoriteDelegate()
const;
55 void setShowAddFavoriteDelegate(
bool show);
56 bool addFavoriteDelegateHovered()
const;
57 void setAddFavoriteDelegateHovered(
bool hovered);
58 QUrl addFavoriteIconUrl()
const;
60 void initContextMenu();
61 void handleContextMenuRequested(QPointF pos);
62 void handleRemoveAction();
65 qreal getContentWidth()
const override;
66 qreal getContentHeight()
const override;
67 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change,
const QRectF &diff) override;
68 void itemImplicitWidthChanged(QQuickItem *item) override;
69 void itemImplicitHeightChanged(QQuickItem *item) override;
73 QQuickDialog *dialog =
nullptr;
74 QQmlComponent *buttonDelegate =
nullptr;
75 QQmlComponent *separatorDelegate =
nullptr;
76 QQmlComponent *addFavoriteDelegate =
nullptr;
77 QQuickContextMenu *contextMenu =
nullptr;
78 QQuickMenu *menu =
nullptr;
79 QQuickAction *removeAction =
nullptr;
81 QList<QStandardPaths::StandardLocation> folderPaths;
82 QList<QUrl> favoritePaths;
83 QUrl currentButtonClickedUrl;
84 qreal addFavoriteButtonImplicitSize = 0;
85 qreal separatorImplicitSize = 0;
86 bool folderPathsValid =
false;
87 bool favoritePathsValid =
false;
88 bool repopulating =
false;
89 bool addFavoriteDelegateVisible =
false;
90 bool addFavoriteHovered =
false;
91 bool showSeparator =
false;