Introduce EntryType. Retire userEntry boolean

Introduce EntryType, allowing to distnguish between:

- inherietd entries: Those inherit their values from
other entries, typcally system entries. They do not
allow overwriting the value, except row/col.
- system entries: those not created by the user in any way,
usually .desktop files in /usr/share/applications/...
- user entries: those that have been created by the user.
they can however also inherit, and overwrite inherited values.

inherited are used for the "favourites" feature.
This commit is contained in:
2020-10-04 19:30:41 +02:00
parent 95e855f325
commit 79d15fb628
4 changed files with 103 additions and 66 deletions

View File

@ -94,7 +94,7 @@ void EntryPushButton::mousePressEvent(QMouseEvent *event)
}
if(event->button() == Qt::RightButton)
{
if(this->config.userEntry)
if(this->config.type == EntryType::USER || this->config.type == EntryType::INHERIT)
{
this->userEntryMenu.exec(QCursor::pos());
}
@ -108,7 +108,7 @@ void EntryPushButton::mousePressEvent(QMouseEvent *event)
void EntryPushButton::mouseMoveEvent(QMouseEvent *event)
{
if(!this->config.userEntry)
if(this->config.type == EntryType::SYSTEM)
{
return;
}