20#ifndef LIBREPCB_EDITOR_NOTIFICATIONSMODEL_H
21#define LIBREPCB_EDITOR_NOTIFICATIONSMODEL_H
52 public slint::Model<ui::NotificationData> {
60 QObject* parent =
nullptr) noexcept;
72 std::optional<ui::NotificationData>
row_data(std::size_t i)
const override;
74 const ui::NotificationData& obj)
noexcept override;
87 void removeItem(std::size_t i,
int itemIndex)
noexcept;
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
The Notification class.
Definition notification.h:43
The NotificationsModel class.
Definition notificationsmodel.h:52
int mUnreadNotifications
Definition notificationsmodel.h:94
void updateCurrentProgressIndex() noexcept
Definition notificationsmodel.cpp:209
void autoPopUpRequested()
int mapIndex(int i) const noexcept
Definition notificationsmodel.cpp:148
std::optional< ui::NotificationData > row_data(std::size_t i) const override
Definition notificationsmodel.cpp:106
int mCurrentProgressIndex
Definition notificationsmodel.h:95
void set_row_data(std::size_t i, const ui::NotificationData &obj) noexcept override
Definition notificationsmodel.cpp:116
int getCurrentProgressIndex() const noexcept
Definition notificationsmodel.h:68
void updateUnreadNotificationsCount() noexcept
Definition notificationsmodel.cpp:192
int getUnreadNotificationsCount() const noexcept
Definition notificationsmodel.h:65
void push(std::shared_ptr< Notification > notification) noexcept
Definition notificationsmodel.cpp:67
NotificationsModel()=delete
NotificationsModel(const NotificationsModel &other)=delete
std::size_t row_count() const override
Definition notificationsmodel.cpp:94
Workspace & mWorkspace
Definition notificationsmodel.h:92
NotificationsModel & operator=(const NotificationsModel &rhs)=delete
void removeItem(std::size_t i, int itemIndex) noexcept
Definition notificationsmodel.cpp:185
std::vector< std::shared_ptr< Notification > > mItems
Definition notificationsmodel.h:93
void currentProgressIndexChanged(int index)
void itemChanged(bool dismissed) noexcept
Definition notificationsmodel.cpp:165
void unreadNotificationsCountChanged(int count)
Definition occmodel.cpp:77