2017-01-02 17:05:30 -05:00
/*
* Copyright 2016 Smith AR < audoban @ openmailbox . org >
* Michail Vourlakos < mvourlakos @ gmail . com >
*
* This file is part of Latte - Dock
*
* Latte - Dock is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation ; either version 2 of
* the License , or ( at your option ) any later version .
*
* Latte - Dock is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2016-12-28 02:55:54 -05:00
# include "windowinfowrap.h"
2016-12-30 02:24:04 -05:00
namespace Latte {
2016-12-28 02:55:54 -05:00
WindowInfoWrap : : WindowInfoWrap ( )
: m_isValid ( false )
, m_isActive ( false )
, m_isMinimized ( false )
, m_isMaximized ( false )
, m_isFullscreen ( false )
2017-01-02 01:04:10 -05:00
, m_isPlasmaDesktop ( false )
2016-12-28 02:55:54 -05:00
, m_wid ( 0 )
{
}
WindowInfoWrap : : WindowInfoWrap ( const WindowInfoWrap & other )
{
* this = other ;
}
WindowInfoWrap & WindowInfoWrap : : operator = ( const WindowInfoWrap & rhs )
{
m_isValid = rhs . m_isValid ;
m_isActive = rhs . m_isActive ;
m_isMinimized = rhs . m_isMinimized ;
m_isMaximized = rhs . m_isMaximized ;
m_isFullscreen = rhs . m_isFullscreen ;
2017-01-02 01:04:10 -05:00
m_isPlasmaDesktop = rhs . m_isPlasmaDesktop ;
2016-12-28 02:55:54 -05:00
m_geometry = rhs . m_geometry ;
m_wid = rhs . m_wid ;
return * this ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : operator = = ( const WindowInfoWrap & rhs ) const
2016-12-28 02:55:54 -05:00
{
return m_wid = = rhs . m_wid ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : operator < ( const WindowInfoWrap & rhs ) const
2016-12-28 02:55:54 -05:00
{
return m_wid < rhs . m_wid ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : operator > ( const WindowInfoWrap & rhs ) const
2016-12-28 02:55:54 -05:00
{
return m_wid > rhs . m_wid ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : isValid ( ) const
2016-12-28 02:55:54 -05:00
{
return m_isValid ;
}
2016-12-30 02:24:04 -05:00
void WindowInfoWrap : : setIsValid ( bool isValid )
2016-12-28 02:55:54 -05:00
{
m_isValid = isValid ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : isActive ( ) const
2016-12-28 02:55:54 -05:00
{
return m_isActive ;
}
2016-12-30 02:24:04 -05:00
void WindowInfoWrap : : setIsActive ( bool isActive )
2016-12-28 02:55:54 -05:00
{
m_isActive = isActive ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : isMinimized ( ) const
2016-12-28 02:55:54 -05:00
{
return m_isMinimized ;
}
2016-12-30 02:24:04 -05:00
void WindowInfoWrap : : setIsMinimized ( bool isMinimized )
2016-12-28 02:55:54 -05:00
{
m_isMinimized = isMinimized ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : isMaximized ( ) const
2016-12-28 02:55:54 -05:00
{
return m_isMaximized ;
}
2016-12-30 02:24:04 -05:00
void WindowInfoWrap : : setIsMaximized ( bool isMaximized )
2016-12-28 02:55:54 -05:00
{
m_isMaximized = isMaximized ;
}
2016-12-30 02:24:04 -05:00
bool WindowInfoWrap : : isFullscreen ( ) const
2016-12-28 02:55:54 -05:00
{
return m_isFullscreen ;
}
2016-12-30 02:24:04 -05:00
void WindowInfoWrap : : setIsFullscreen ( bool isFullscreen )
2016-12-28 02:55:54 -05:00
{
m_isFullscreen = isFullscreen ;
}
2017-01-02 01:04:10 -05:00
bool WindowInfoWrap : : isPlasmaDesktop ( ) const
2016-12-28 02:55:54 -05:00
{
2017-01-02 01:04:10 -05:00
return m_isPlasmaDesktop ;
2016-12-28 02:55:54 -05:00
}
2017-01-02 01:04:10 -05:00
void WindowInfoWrap : : setIsPlasmaDesktop ( bool isPlasmaDesktop )
2016-12-28 02:55:54 -05:00
{
2017-01-02 01:04:10 -05:00
m_isPlasmaDesktop = isPlasmaDesktop ;
2016-12-28 02:55:54 -05:00
}
2016-12-30 02:24:04 -05:00
QRect WindowInfoWrap : : geometry ( ) const
2016-12-28 02:55:54 -05:00
{
return m_geometry ;
}
2016-12-30 02:24:04 -05:00
void WindowInfoWrap : : setGeometry ( const QRect & geometry )
2016-12-28 02:55:54 -05:00
{
m_geometry = geometry ;
}
2017-01-02 01:04:10 -05:00
void WindowInfoWrap : : setWid ( WId wid )
2016-12-28 02:55:54 -05:00
{
2017-01-02 01:04:10 -05:00
m_wid = wid ;
2016-12-28 02:55:54 -05:00
}
2017-01-02 01:04:10 -05:00
WId WindowInfoWrap : : wid ( ) const
2016-12-28 02:55:54 -05:00
{
2017-01-02 01:04:10 -05:00
return m_wid ;
2016-12-28 02:55:54 -05:00
}
2016-12-30 02:16:27 -05:00
}