mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 13:33:50 +03:00
add template options to layoutdata
This commit is contained in:
parent
aee04ef180
commit
da61a432cd
@ -39,6 +39,7 @@ Layout::Layout(Layout &&o)
|
||||
isActive(o.isActive),
|
||||
isLocked(o.isLocked),
|
||||
isShownInMenu(o.isShownInMenu),
|
||||
isTemplate(o.isTemplate),
|
||||
hasDisabledBorders(o.hasDisabledBorders),
|
||||
activities(o.activities),
|
||||
shares(o.shares),
|
||||
@ -56,6 +57,7 @@ Layout::Layout(const Layout &o)
|
||||
isActive(o.isActive),
|
||||
isLocked(o.isLocked),
|
||||
isShownInMenu(o.isShownInMenu),
|
||||
isTemplate(o.isTemplate),
|
||||
hasDisabledBorders(o.hasDisabledBorders),
|
||||
activities(o.activities),
|
||||
shares(o.shares),
|
||||
@ -74,6 +76,7 @@ Layout &Layout::operator=(Layout &&rhs)
|
||||
isActive = rhs.isActive;
|
||||
isLocked = rhs.isLocked;
|
||||
isShownInMenu = rhs.isShownInMenu;
|
||||
isTemplate = rhs.isTemplate;
|
||||
hasDisabledBorders = rhs.hasDisabledBorders;
|
||||
activities = rhs.activities;
|
||||
shares = rhs.shares;
|
||||
@ -93,6 +96,7 @@ Layout &Layout::operator=(const Layout &rhs)
|
||||
isActive = rhs.isActive;
|
||||
isLocked = rhs.isLocked;
|
||||
isShownInMenu = rhs.isShownInMenu;
|
||||
isTemplate = rhs.isTemplate;
|
||||
hasDisabledBorders = rhs.hasDisabledBorders;
|
||||
activities = rhs.activities;
|
||||
shares = rhs.shares;
|
||||
@ -112,6 +116,7 @@ bool Layout::operator==(const Layout &rhs) const
|
||||
//&& (isActive == rhs.isActive) /*Disabled but this is not a data but a layout state*/
|
||||
&& (isLocked == rhs.isLocked)
|
||||
&& (isShownInMenu == rhs.isShownInMenu)
|
||||
&& (isTemplate == rhs.isTemplate)
|
||||
&& (hasDisabledBorders == rhs.hasDisabledBorders)
|
||||
&& (activities == rhs.activities)
|
||||
&& (shares == rhs.shares)
|
||||
@ -148,6 +153,11 @@ bool Layout::isShared() const
|
||||
return !shares.isEmpty();
|
||||
}
|
||||
|
||||
bool Layout::isGlobalTemplate() const
|
||||
{
|
||||
return isTemplate && id.startsWith("/usr");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
bool isActive{false};
|
||||
bool isLocked{false};
|
||||
bool isShownInMenu{false};
|
||||
bool isTemplate{false};
|
||||
bool hasDisabledBorders{false};
|
||||
QStringList activities;
|
||||
QStringList shares;
|
||||
@ -64,6 +65,8 @@ public:
|
||||
bool isTemporary() const;
|
||||
bool isNull() const;
|
||||
bool isEmpty() const;
|
||||
bool isGlobalTemplate() const;
|
||||
|
||||
|
||||
//! Operators
|
||||
Layout &operator=(const Layout &rhs);
|
||||
|
Loading…
Reference in New Issue
Block a user