Blame src/lib/animations/adwaitatransitiondata.cpp

Packit Bot 052d53
//////////////////////////////////////////////////////////////////////////////
Packit Bot 052d53
// adwaitatransitiondata.cpp
Packit Bot 052d53
// data container for generic transitions
Packit Bot 052d53
// -------------------
Packit Bot 052d53
//
Packit Bot 052d53
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
Packit Bot 052d53
//
Packit Bot 052d53
// Permission is hereby granted, free of charge, to any person obtaining a copy
Packit Bot 052d53
// of this software and associated documentation files (the "Software"), to
Packit Bot 052d53
// deal in the Software without restriction, including without limitation the
Packit Bot 052d53
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
Packit Bot 052d53
// sell copies of the Software, and to permit persons to whom the Software is
Packit Bot 052d53
// furnished to do so, subject to the following conditions:
Packit Bot 052d53
//
Packit Bot 052d53
// The above copyright notice and this permission notice shall be included in
Packit Bot 052d53
// all copies or substantial portions of the Software.
Packit Bot 052d53
//
Packit Bot 052d53
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit Bot 052d53
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit Bot 052d53
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Packit Bot 052d53
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit Bot 052d53
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
Packit Bot 052d53
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
Packit Bot 052d53
// IN THE SOFTWARE.
Packit Bot 052d53
//////////////////////////////////////////////////////////////////////////////
Packit Bot 052d53
Packit Bot 052d53
#include "adwaitatransitiondata.h"
Packit Bot 052d53
Packit Bot 052d53
namespace Adwaita
Packit Bot 052d53
{
Packit Bot 052d53
Packit Bot 052d53
//_________________________________________________________________
Packit Bot 052d53
TransitionData::TransitionData(QObject *parent, QWidget *target, int duration)
Packit Bot 052d53
    : QObject(parent)
Packit Bot 052d53
    , _transition(new TransitionWidget(target, duration))
Packit Bot 052d53
{
Packit Bot 052d53
    _transition.data()->hide();
Packit Bot 052d53
}
Packit Bot 052d53
Packit Bot 052d53
//_________________________________________________________________
Packit Bot 052d53
TransitionData::~TransitionData()
Packit Bot 052d53
{
Packit Bot 052d53
    if (_transition) {
Packit Bot 052d53
        _transition.data()->deleteLater();
Packit Bot 052d53
    }
Packit Bot 052d53
}
Packit Bot 052d53
Packit Bot 052d53
} // namespace Adwaita