LibrePCB Developers Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NotificationsModel Class Referencefinal

The NotificationsModel class. More...

#include <notificationsmodel.h>

Inherits QObject, and Model< ui::NotificationData >.

+ Collaboration diagram for NotificationsModel:

Signals

void autoPopUpRequested ()
 
void unreadNotificationsCountChanged (int count)
 
void currentProgressIndexChanged (int index)
 

Public Member Functions

 NotificationsModel ()=delete
 
 NotificationsModel (const NotificationsModel &other)=delete
 
 NotificationsModel (Workspace &ws, QObject *parent=nullptr) noexcept
 
 ~NotificationsModel () noexcept
 
void push (std::shared_ptr< Notification > notification) noexcept
 
int getUnreadNotificationsCount () const noexcept
 
int getCurrentProgressIndex () const noexcept
 
std::size_t row_count () const override
 
std::optional< ui::NotificationData > row_data (std::size_t i) const override
 
void set_row_data (std::size_t i, const ui::NotificationData &obj) noexcept override
 
NotificationsModeloperator= (const NotificationsModel &rhs)=delete
 

Private Member Functions

int mapIndex (int i) const noexcept
 
void itemChanged (bool dismissed) noexcept
 
void removeItem (std::size_t i, int itemIndex) noexcept
 
void updateUnreadNotificationsCount () noexcept
 
void updateCurrentProgressIndex () noexcept
 

Private Attributes

WorkspacemWorkspace
 
std::vector< std::shared_ptr< Notification > > mItems
 
int mUnreadNotifications
 
int mCurrentProgressIndex
 

Detailed Description

The NotificationsModel class.

Constructor & Destructor Documentation

◆ NotificationsModel() [1/3]

NotificationsModel ( )
delete

◆ NotificationsModel() [2/3]

NotificationsModel ( const NotificationsModel other)
delete

◆ NotificationsModel() [3/3]

NotificationsModel ( Workspace ws,
QObject *  parent = nullptr 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~NotificationsModel()

~NotificationsModel ( )
noexcept

Member Function Documentation

◆ push()

void push ( std::shared_ptr< Notification notification)
noexcept
+ Here is the call graph for this function:

◆ getUnreadNotificationsCount()

int getUnreadNotificationsCount ( ) const
inlinenoexcept

◆ getCurrentProgressIndex()

int getCurrentProgressIndex ( ) const
inlinenoexcept

◆ row_count()

std::size_t row_count ( ) const
override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ row_data()

std::optional< ui::NotificationData > row_data ( std::size_t  i) const
override
+ Here is the call graph for this function:

◆ set_row_data()

void set_row_data ( std::size_t  i,
const ui::NotificationData &  obj 
)
overridenoexcept
+ Here is the call graph for this function:

◆ operator=()

NotificationsModel & operator= ( const NotificationsModel rhs)
delete

◆ autoPopUpRequested

void autoPopUpRequested ( )
signal
+ Here is the caller graph for this function:

◆ unreadNotificationsCountChanged

void unreadNotificationsCountChanged ( int  count)
signal
+ Here is the caller graph for this function:

◆ currentProgressIndexChanged

void currentProgressIndexChanged ( int  index)
signal
+ Here is the caller graph for this function:

◆ mapIndex()

int mapIndex ( int  i) const
privatenoexcept
+ Here is the caller graph for this function:

◆ itemChanged()

void itemChanged ( bool  dismissed)
privatenoexcept
+ Here is the caller graph for this function:

◆ removeItem()

void removeItem ( std::size_t  i,
int  itemIndex 
)
privatenoexcept
+ Here is the call graph for this function:

◆ updateUnreadNotificationsCount()

void updateUnreadNotificationsCount ( )
privatenoexcept
+ Here is the call graph for this function:

◆ updateCurrentProgressIndex()

void updateCurrentProgressIndex ( )
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mWorkspace

Workspace& mWorkspace
private

◆ mItems

std::vector<std::shared_ptr<Notification> > mItems
private

◆ mUnreadNotifications

int mUnreadNotifications
private

◆ mCurrentProgressIndex

int mCurrentProgressIndex
private

The documentation for this class was generated from the following files: