Make it possible for show and hide multiple pictures at once

This commit is contained in:
Rafael 2016-10-27 11:24:26 +02:00
parent a86eab43ff
commit cc5813b273
8 changed files with 87 additions and 43 deletions

View file

@ -833,6 +833,44 @@ void ProfileInterface::settingsApplied(int _contentMode, QString language)
}
}
void ProfileInterface::enableSelected()
{
int fails = 0;
foreach (ProfileWidget *widget, widgets.keys())
{
if (widget->isSelected())
{
if (widget->getWidgetType() == "SnapmaticWidget")
{
SnapmaticWidget *snapmaticWidget = (SnapmaticWidget*)widget;
if (!snapmaticWidget->makePictureVisible())
{
fails++;
}
}
}
}
}
void ProfileInterface::disableSelected()
{
int fails = 0;
foreach (ProfileWidget *widget, widgets.keys())
{
if (widget->isSelected())
{
if (widget->getWidgetType() == "SnapmaticWidget")
{
SnapmaticWidget *snapmaticWidget = (SnapmaticWidget*)widget;
if (!snapmaticWidget->makePictureHidden())
{
fails++;
}
}
}
}
}
int ProfileInterface::selectedWidgets()
{
return selectedWidgts;