Make it possible for show and hide multiple pictures at once
This commit is contained in:
parent
a86eab43ff
commit
cc5813b273
8 changed files with 87 additions and 43 deletions
|
|
@ -266,36 +266,38 @@ void SnapmaticWidget::adjustTextColor()
|
|||
}
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureHidden()
|
||||
{
|
||||
QString newPicPath = QString(picPath + ".hidden");
|
||||
picPath = newPicPath;
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureVisible()
|
||||
{
|
||||
QString newPicPath = QString(picPath).remove(picPath.length() - 7, 7);
|
||||
picPath = newPicPath;
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureHiddenSlot()
|
||||
bool SnapmaticWidget::makePictureHidden()
|
||||
{
|
||||
SnapmaticPicture *picture = (SnapmaticPicture*)smpic;
|
||||
if (picture->setPictureHidden())
|
||||
{
|
||||
makePictureHidden();
|
||||
picPath = picture->getPictureFileName();
|
||||
adjustTextColor();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureVisibleSlot()
|
||||
bool SnapmaticWidget::makePictureVisible()
|
||||
{
|
||||
SnapmaticPicture *picture = (SnapmaticPicture*)smpic;
|
||||
if (picture->setPictureVisible())
|
||||
{
|
||||
makePictureVisible();
|
||||
picPath = picture->getPictureFileName();
|
||||
adjustTextColor();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureHiddenSlot()
|
||||
{
|
||||
makePictureHidden();
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureVisibleSlot()
|
||||
{
|
||||
makePictureVisible();
|
||||
}
|
||||
|
||||
bool SnapmaticWidget::isSelected()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue