2017-01-03 01:05:30 +03: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-30 10:13:57 +03:00
# ifndef WINDOWINFOWRAP_H
# define WINDOWINFOWRAP_H
2016-12-28 10:55:54 +03:00
2018-12-02 03:05:52 +03:00
// Qt
2017-02-25 05:40:47 +03:00
# include <QWindow>
2019-05-27 18:56:24 +03:00
# include <QIcon>
2016-12-28 10:55:54 +03:00
# include <QRect>
2017-06-09 01:10:49 +03:00
# include <QVariant>
2016-12-28 10:55:54 +03:00
namespace Latte {
2019-05-11 15:43:10 +03:00
namespace WindowSystem {
2016-12-28 10:55:54 +03:00
2017-06-09 01:10:49 +03:00
using WindowId = QVariant ;
2018-07-03 22:15:45 +03:00
class WindowInfoWrap
{
2016-12-28 10:55:54 +03:00
public :
2017-06-09 01:10:49 +03:00
WindowInfoWrap ( ) noexcept
2017-02-25 05:40:47 +03:00
: m_isValid ( false )
, m_isActive ( false )
, m_isMinimized ( false )
2017-03-12 12:01:27 +03:00
, m_isMaxVert ( false )
2017-03-24 06:20:35 +03:00
, m_isMaxHoriz ( false )
2017-02-25 05:40:47 +03:00
, m_isFullscreen ( false )
2017-03-24 06:06:59 +03:00
, m_isShaded ( false )
2018-10-28 11:03:22 +03:00
, m_isKeepAbove ( false )
2019-12-26 17:53:37 +03:00
, m_isKeepBelow ( false )
2019-05-31 17:36:47 +03:00
, m_hasSkipTaskbar ( false )
2019-06-07 23:45:42 +03:00
, m_isOnAllDesktops ( false )
2020-01-22 14:02:00 +03:00
, m_isOnAllActivities ( false )
, m_isClosable ( false )
, m_isFullScreenable ( false )
, m_isGroupable ( false )
, m_isMaximizable ( false )
, m_isMinimizable ( false )
, m_isMovable ( false )
, m_isResizable ( false )
, m_isShadeable ( false )
, m_isVirtualDesktopsChangeable ( false )
{
2017-02-25 05:40:47 +03:00
}
2017-06-11 00:33:46 +03:00
WindowInfoWrap ( const WindowInfoWrap & o ) noexcept
2017-06-09 01:10:49 +03:00
: m_wid ( o . m_wid )
2019-07-23 00:05:01 +03:00
, m_parentId ( o . m_parentId )
2017-06-09 01:10:49 +03:00
, m_geometry ( o . m_geometry )
, m_isValid ( o . m_isValid )
, m_isActive ( o . m_isActive )
, m_isMinimized ( o . m_isMinimized )
, m_isMaxVert ( o . m_isMaxVert )
, m_isMaxHoriz ( o . m_isMaxHoriz )
, m_isFullscreen ( o . m_isFullscreen )
, m_isShaded ( o . m_isShaded )
2018-10-28 11:03:22 +03:00
, m_isKeepAbove ( o . m_isKeepAbove )
2019-12-26 17:53:37 +03:00
, m_isKeepBelow ( o . m_isKeepBelow )
2019-05-31 17:36:47 +03:00
, m_hasSkipTaskbar ( o . m_hasSkipTaskbar )
2019-06-04 23:04:27 +03:00
, m_isOnAllDesktops ( o . m_isOnAllDesktops )
2019-06-07 23:45:42 +03:00
, m_isOnAllActivities ( o . m_isOnAllActivities )
2020-01-22 14:02:00 +03:00
, m_isClosable ( o . m_isClosable )
, m_isFullScreenable ( o . m_isFullScreenable )
, m_isGroupable ( o . m_isGroupable )
, m_isMaximizable ( o . m_isMaximizable )
, m_isMinimizable ( o . m_isMinimizable )
, m_isMovable ( o . m_isMovable )
, m_isResizable ( o . m_isResizable )
, m_isShadeable ( o . m_isShadeable )
, m_isVirtualDesktopsChangeable ( o . m_isVirtualDesktopsChangeable )
2019-06-07 23:45:42 +03:00
, m_desktops ( o . m_desktops )
, m_activities ( o . m_activities )
2019-06-04 23:04:27 +03:00
, m_display ( o . m_display ) {
2017-06-09 01:10:49 +03:00
}
WindowInfoWrap ( WindowInfoWrap & & o ) noexcept
2019-06-04 23:04:27 +03:00
: m_wid ( o . m_wid )
2019-07-23 00:05:01 +03:00
, m_parentId ( o . m_parentId )
2019-06-04 23:04:27 +03:00
, m_geometry ( o . m_geometry )
2017-03-24 06:06:59 +03:00
, m_isValid ( o . m_isValid )
, m_isActive ( o . m_isActive )
, m_isMinimized ( o . m_isMinimized )
, m_isMaxVert ( o . m_isMaxVert )
2017-03-24 06:20:35 +03:00
, m_isMaxHoriz ( o . m_isMaxHoriz )
2017-03-24 06:06:59 +03:00
, m_isFullscreen ( o . m_isFullscreen )
, m_isShaded ( o . m_isShaded )
2018-10-28 11:03:22 +03:00
, m_isKeepAbove ( o . m_isKeepAbove )
2019-12-26 17:53:37 +03:00
, m_isKeepBelow ( o . m_isKeepBelow )
2019-05-31 17:36:47 +03:00
, m_hasSkipTaskbar ( o . m_hasSkipTaskbar )
2019-06-04 23:04:27 +03:00
, m_isOnAllDesktops ( o . m_isOnAllDesktops )
2019-06-07 23:45:42 +03:00
, m_isOnAllActivities ( o . m_isOnAllActivities )
2020-01-22 14:02:00 +03:00
, m_isClosable ( o . m_isClosable )
, m_isFullScreenable ( o . m_isFullScreenable )
, m_isGroupable ( o . m_isGroupable )
, m_isMaximizable ( o . m_isMaximizable )
, m_isMinimizable ( o . m_isMinimizable )
, m_isMovable ( o . m_isMovable )
, m_isResizable ( o . m_isResizable )
, m_isShadeable ( o . m_isShadeable )
, m_isVirtualDesktopsChangeable ( o . m_isVirtualDesktopsChangeable )
2019-06-07 23:45:42 +03:00
, m_desktops ( o . m_desktops )
, m_activities ( o . m_activities )
2019-06-04 23:04:27 +03:00
, m_display ( o . m_display ) {
2017-02-25 05:40:47 +03:00
}
2017-03-24 06:06:59 +03:00
inline WindowInfoWrap & operator = ( WindowInfoWrap & & rhs ) noexcept ;
2017-06-09 01:10:49 +03:00
inline WindowInfoWrap & operator = ( const WindowInfoWrap & rhs ) noexcept ;
inline bool operator = = ( const WindowInfoWrap & rhs ) const noexcept ;
inline bool operator < ( const WindowInfoWrap & rhs ) const noexcept ;
inline bool operator > ( const WindowInfoWrap & rhs ) const noexcept ;
2017-03-24 06:06:59 +03:00
2017-06-09 01:10:49 +03:00
inline bool isValid ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setIsValid ( bool isValid ) noexcept ;
2017-02-25 05:40:47 +03:00
2017-06-09 01:10:49 +03:00
inline bool isActive ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setIsActive ( bool isActive ) noexcept ;
2017-02-25 05:40:47 +03:00
2017-06-09 01:10:49 +03:00
inline bool isMinimized ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setIsMinimized ( bool isMinimized ) noexcept ;
2017-02-25 05:40:47 +03:00
2017-06-09 01:10:49 +03:00
inline bool isMaximized ( ) const noexcept ;
2017-02-25 05:40:47 +03:00
2017-06-09 01:10:49 +03:00
inline bool isMaxVert ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setIsMaxVert ( bool isMaxVert ) noexcept ;
2017-03-12 12:01:27 +03:00
2017-06-09 01:10:49 +03:00
inline bool isMaxHoriz ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setIsMaxHoriz ( bool isMaxHoriz ) noexcept ;
2017-03-12 12:01:27 +03:00
2017-06-09 01:10:49 +03:00
inline bool isFullscreen ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setIsFullscreen ( bool isFullscreen ) noexcept ;
2017-02-25 05:40:47 +03:00
2017-06-09 01:10:49 +03:00
inline bool isShaded ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setIsShaded ( bool isShaded ) noexcept ;
2017-02-25 05:40:47 +03:00
2017-12-24 21:54:45 +03:00
inline bool isKeepAbove ( ) const noexcept ;
inline void setIsKeepAbove ( bool isKeepAbove ) noexcept ;
2019-12-26 17:53:37 +03:00
inline bool isKeepBelow ( ) const noexcept ;
inline void setIsKeepBelow ( bool isKeepBelow ) noexcept ;
2018-10-28 11:03:22 +03:00
inline bool hasSkipTaskbar ( ) const noexcept ;
inline void setHasSkipTaskbar ( bool skipTaskbar ) noexcept ;
2019-05-31 17:36:47 +03:00
inline bool isOnAllDesktops ( ) const noexcept ;
inline void setIsOnAllDesktops ( bool alldesktops ) noexcept ;
2019-06-07 23:45:42 +03:00
inline bool isOnAllActivities ( ) const noexcept ;
inline void setIsOnAllActivities ( bool allactivities ) noexcept ;
2020-01-22 14:02:00 +03:00
//!BEGIN: Window Abilities
inline bool isCloseable ( ) const noexcept ;
inline void setIsClosable ( bool closable ) noexcept ;
inline bool isFullScreenable ( ) const noexcept ;
inline void setIsFullScreenable ( bool fullscreenable ) noexcept ;
inline bool isGroupable ( ) const noexcept ;
inline void setIsGroupable ( bool groupable ) noexcept ;
inline bool isMaximizable ( ) const noexcept ;
inline void setIsMaximizable ( bool maximizable ) noexcept ;
inline bool isMinimizable ( ) const noexcept ;
inline void setIsMinimizable ( bool minimizable ) noexcept ;
inline bool isMovable ( ) const noexcept ;
inline void setIsMovable ( bool movable ) noexcept ;
inline bool isResizable ( ) const noexcept ;
inline void setIsResizable ( bool resizable ) noexcept ;
inline bool isShadeable ( ) const noexcept ;
inline void setIsShadeable ( bool shadeble ) noexcept ;
inline bool isVirtualDesktopsChangeable ( ) const noexcept ;
inline void setIsVirtualDesktopsChangeable ( bool virtualdesktopchangeable ) noexcept ;
//!END: Window Abilities
2019-07-23 00:05:01 +03:00
inline bool isMainWindow ( ) const noexcept ;
inline bool isChildWindow ( ) const noexcept ;
2017-06-09 01:10:49 +03:00
inline QRect geometry ( ) const noexcept ;
2017-03-24 06:06:59 +03:00
inline void setGeometry ( const QRect & geometry ) noexcept ;
2017-02-25 05:40:47 +03:00
2019-05-31 20:50:08 +03:00
inline QString appName ( ) const noexcept ;
inline void setAppName ( const QString & appName ) noexcept ;
2019-05-27 18:56:24 +03:00
inline QString display ( ) const noexcept ;
inline void setDisplay ( const QString & display ) noexcept ;
inline QIcon icon ( ) const noexcept ;
inline void setIcon ( const QIcon & icon ) noexcept ;
2017-06-09 01:10:49 +03:00
inline WindowId wid ( ) const noexcept ;
2019-06-04 19:17:41 +03:00
inline void setWid ( const WindowId & wid ) noexcept ;
2017-01-16 22:07:49 +03:00
2019-07-23 00:05:01 +03:00
inline WindowId parentId ( ) const noexcept ;
inline void setParentId ( const WindowId & parentId ) noexcept ;
2019-06-08 00:31:30 +03:00
inline QStringList desktops ( ) const noexcept ;
inline void setDesktops ( const QStringList & desktops ) noexcept ;
2019-06-07 23:45:42 +03:00
inline QStringList activities ( ) const noexcept ;
inline void setActivities ( const QStringList & activities ) noexcept ;
2019-06-08 00:31:30 +03:00
inline bool isOnDesktop ( const QString & desktop ) const noexcept ;
2019-06-07 23:45:42 +03:00
inline bool isOnActivity ( const QString & activity ) const noexcept ;
2017-02-25 05:40:47 +03:00
private :
2017-06-09 01:10:49 +03:00
WindowId m_wid { 0 } ;
2019-07-23 00:05:01 +03:00
WindowId m_parentId { 0 } ;
2017-03-24 06:06:59 +03:00
QRect m_geometry ;
2017-02-25 05:40:47 +03:00
bool m_isValid : 1 ;
bool m_isActive : 1 ;
bool m_isMinimized : 1 ;
2017-03-12 12:01:27 +03:00
bool m_isMaxVert : 1 ;
2017-03-24 06:20:35 +03:00
bool m_isMaxHoriz : 1 ;
2017-02-25 05:40:47 +03:00
bool m_isFullscreen : 1 ;
2017-03-24 06:06:59 +03:00
bool m_isShaded : 1 ;
2017-12-24 21:54:45 +03:00
bool m_isKeepAbove : 1 ;
2019-12-26 17:53:37 +03:00
bool m_isKeepBelow : 1 ;
2018-10-28 11:03:22 +03:00
bool m_hasSkipTaskbar : 1 ;
2019-05-31 17:36:47 +03:00
bool m_isOnAllDesktops : 1 ;
2019-06-07 23:45:42 +03:00
bool m_isOnAllActivities : 1 ;
2019-05-27 18:56:24 +03:00
2020-01-22 14:02:00 +03:00
//!BEGIN: Window Abilities
bool m_isClosable : 1 ;
bool m_isFullScreenable : 1 ;
bool m_isGroupable : 1 ;
bool m_isMaximizable : 1 ;
bool m_isMinimizable : 1 ;
bool m_isMovable : 1 ;
bool m_isResizable : 1 ;
bool m_isShadeable : 1 ;
bool m_isVirtualDesktopsChangeable : 1 ;
//!END: Window Abilities
2019-05-31 20:50:08 +03:00
QString m_appName ;
2019-05-27 18:56:24 +03:00
QString m_display ;
QIcon m_icon ;
2019-06-07 23:45:42 +03:00
2019-06-08 00:31:30 +03:00
QStringList m_desktops ;
2019-06-07 23:45:42 +03:00
QStringList m_activities ;
2017-02-25 05:40:47 +03:00
} ;
2017-01-16 22:07:49 +03:00
2017-02-25 05:40:47 +03:00
// BEGIN: definitions
2017-03-24 06:06:59 +03:00
inline WindowInfoWrap & WindowInfoWrap : : operator = ( WindowInfoWrap & & rhs ) noexcept
2017-02-25 05:40:47 +03:00
{
2019-06-04 19:17:41 +03:00
m_wid = rhs . m_wid ;
2019-07-23 00:05:01 +03:00
m_parentId = rhs . m_parentId ;
2019-06-04 19:17:41 +03:00
m_geometry = rhs . m_geometry ;
2017-02-25 05:40:47 +03:00
m_isValid = rhs . m_isValid ;
m_isActive = rhs . m_isActive ;
m_isMinimized = rhs . m_isMinimized ;
2017-03-12 12:01:27 +03:00
m_isMaxVert = rhs . m_isMaxVert ;
2017-03-24 06:20:35 +03:00
m_isMaxHoriz = rhs . m_isMaxHoriz ;
2017-02-25 05:40:47 +03:00
m_isFullscreen = rhs . m_isFullscreen ;
2017-03-24 06:12:11 +03:00
m_isShaded = rhs . m_isShaded ;
2017-12-24 21:54:45 +03:00
m_isKeepAbove = rhs . m_isKeepAbove ;
2019-12-26 17:53:37 +03:00
m_isKeepBelow = rhs . m_isKeepBelow ;
2018-10-28 11:03:22 +03:00
m_hasSkipTaskbar = rhs . m_hasSkipTaskbar ;
2019-05-31 17:36:47 +03:00
m_isOnAllDesktops = rhs . m_isOnAllDesktops ;
2019-06-07 23:45:42 +03:00
m_isOnAllActivities = rhs . m_isOnAllActivities ;
2020-01-22 14:02:00 +03:00
m_isClosable = rhs . m_isClosable ;
m_isFullScreenable = rhs . m_isFullScreenable ;
m_isGroupable = rhs . m_isGroupable ;
m_isMaximizable = rhs . m_isMaximizable ;
m_isMinimizable = rhs . m_isMinimizable ;
m_isMovable = rhs . m_isMovable ;
m_isResizable = rhs . m_isResizable ;
m_isShadeable = rhs . m_isShadeable ;
m_isVirtualDesktopsChangeable = rhs . m_isVirtualDesktopsChangeable ;
2019-05-27 18:56:24 +03:00
m_display = rhs . m_display ;
2019-06-07 23:45:42 +03:00
m_desktops = rhs . m_desktops ;
m_activities = rhs . m_activities ;
2017-02-25 05:40:47 +03:00
return * this ;
}
2017-01-16 22:07:49 +03:00
2017-06-09 01:10:49 +03:00
inline WindowInfoWrap & WindowInfoWrap : : operator = ( const WindowInfoWrap & rhs ) noexcept
{
m_wid = rhs . m_wid ;
2019-07-23 00:05:01 +03:00
m_parentId = rhs . m_parentId ;
2017-06-09 01:10:49 +03:00
m_geometry = std : : move ( rhs . m_geometry ) ;
m_isValid = rhs . m_isValid ;
m_isActive = rhs . m_isActive ;
m_isMinimized = rhs . m_isMinimized ;
m_isMaxVert = rhs . m_isMaxVert ;
m_isMaxHoriz = rhs . m_isMaxHoriz ;
m_isFullscreen = rhs . m_isFullscreen ;
m_isShaded = rhs . m_isShaded ;
2017-12-24 21:54:45 +03:00
m_isKeepAbove = rhs . m_isKeepAbove ;
2019-12-26 17:53:37 +03:00
m_isKeepBelow = rhs . m_isKeepBelow ;
2018-10-28 11:03:22 +03:00
m_hasSkipTaskbar = rhs . m_hasSkipTaskbar ;
2019-05-31 17:36:47 +03:00
m_isOnAllDesktops = rhs . m_isOnAllDesktops ;
2019-06-07 23:45:42 +03:00
m_isOnAllActivities = rhs . m_isOnAllActivities ;
2020-01-22 14:02:00 +03:00
m_isClosable = rhs . m_isClosable ;
m_isFullScreenable = rhs . m_isFullScreenable ;
m_isGroupable = rhs . m_isGroupable ;
m_isMaximizable = rhs . m_isMaximizable ;
m_isMinimizable = rhs . m_isMinimizable ;
m_isMovable = rhs . m_isMovable ;
m_isResizable = rhs . m_isResizable ;
m_isShadeable = rhs . m_isShadeable ;
m_isVirtualDesktopsChangeable = rhs . m_isVirtualDesktopsChangeable ; ;
2019-05-27 18:56:24 +03:00
m_display = rhs . m_display ;
2019-06-07 23:45:42 +03:00
m_desktops = rhs . m_desktops ;
m_activities = rhs . m_activities ;
2017-06-09 01:10:49 +03:00
return * this ;
}
inline bool WindowInfoWrap : : operator = = ( const WindowInfoWrap & rhs ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_wid = = rhs . m_wid ;
}
2017-01-16 22:07:49 +03:00
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : operator < ( const WindowInfoWrap & rhs ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_wid < rhs . m_wid ;
}
2017-01-16 22:07:49 +03:00
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : operator > ( const WindowInfoWrap & rhs ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_wid > rhs . m_wid ;
}
2017-01-16 22:07:49 +03:00
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isValid ( ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_isValid ;
}
2017-01-16 22:07:49 +03:00
2017-03-24 06:06:59 +03:00
inline void WindowInfoWrap : : setIsValid ( bool isValid ) noexcept
2017-02-25 05:40:47 +03:00
{
m_isValid = isValid ;
}
2017-01-16 22:07:49 +03:00
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isActive ( ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_isActive ;
}
2017-01-16 22:07:49 +03:00
2017-03-24 06:06:59 +03:00
inline void WindowInfoWrap : : setIsActive ( bool isActive ) noexcept
2017-02-25 05:40:47 +03:00
{
m_isActive = isActive ;
}
2017-01-16 22:07:49 +03:00
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isMinimized ( ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_isMinimized ;
}
2017-01-16 22:07:49 +03:00
2017-03-24 06:06:59 +03:00
inline void WindowInfoWrap : : setIsMinimized ( bool isMinimized ) noexcept
2017-02-25 05:40:47 +03:00
{
m_isMinimized = isMinimized ;
}
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isMaximized ( ) const noexcept
2017-02-25 05:40:47 +03:00
{
2019-12-09 23:19:05 +03:00
return m_isMaxVert & & m_isMaxHoriz ;
2017-03-12 12:01:27 +03:00
}
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isMaxVert ( ) const noexcept
2017-03-12 12:01:27 +03:00
{
return m_isMaxVert ;
}
2017-03-24 06:06:59 +03:00
inline void WindowInfoWrap : : setIsMaxVert ( bool isMaxVert ) noexcept
2017-03-12 12:01:27 +03:00
{
m_isMaxVert = isMaxVert ;
}
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isMaxHoriz ( ) const noexcept
2017-03-12 12:01:27 +03:00
{
2017-03-24 06:20:35 +03:00
return m_isMaxHoriz ;
2017-02-25 05:40:47 +03:00
}
2017-03-24 06:06:59 +03:00
inline void WindowInfoWrap : : setIsMaxHoriz ( bool isMaxHoriz ) noexcept
2017-02-25 05:40:47 +03:00
{
2017-03-24 06:20:35 +03:00
m_isMaxHoriz = isMaxHoriz ;
2017-02-25 05:40:47 +03:00
}
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isFullscreen ( ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_isFullscreen ;
}
2017-03-24 06:06:59 +03:00
inline void WindowInfoWrap : : setIsFullscreen ( bool isFullscreen ) noexcept
2017-02-25 05:40:47 +03:00
{
m_isFullscreen = isFullscreen ;
}
2017-06-09 01:10:49 +03:00
inline bool WindowInfoWrap : : isShaded ( ) const noexcept
2017-03-24 06:06:59 +03:00
{
return m_isShaded ;
}
inline void WindowInfoWrap : : setIsShaded ( bool isShaded ) noexcept
{
m_isShaded = isShaded ;
}
2017-12-24 21:54:45 +03:00
inline bool WindowInfoWrap : : isKeepAbove ( ) const noexcept
{
return m_isKeepAbove ;
}
inline void WindowInfoWrap : : setIsKeepAbove ( bool isKeepAbove ) noexcept
{
m_isKeepAbove = isKeepAbove ;
}
2019-12-26 17:53:37 +03:00
inline bool WindowInfoWrap : : isKeepBelow ( ) const noexcept
{
return m_isKeepBelow ;
}
inline void WindowInfoWrap : : setIsKeepBelow ( bool isKeepBelow ) noexcept
{
m_isKeepBelow = isKeepBelow ;
}
2018-10-28 11:03:22 +03:00
inline bool WindowInfoWrap : : hasSkipTaskbar ( ) const noexcept
{
return m_hasSkipTaskbar ;
}
inline void WindowInfoWrap : : setHasSkipTaskbar ( bool skipTaskbar ) noexcept
{
m_hasSkipTaskbar = skipTaskbar ;
}
2019-05-31 17:36:47 +03:00
inline bool WindowInfoWrap : : isOnAllDesktops ( ) const noexcept
{
return m_isOnAllDesktops ;
}
inline void WindowInfoWrap : : setIsOnAllDesktops ( bool alldesktops ) noexcept
{
m_isOnAllDesktops = alldesktops ;
}
2019-06-07 23:45:42 +03:00
inline bool WindowInfoWrap : : isOnAllActivities ( ) const noexcept
{
return m_isOnAllActivities ;
}
inline void WindowInfoWrap : : setIsOnAllActivities ( bool allactivities ) noexcept
{
m_isOnAllActivities = allactivities ;
}
2020-01-22 14:02:00 +03:00
//!BEGIN: Window Abilities
inline bool WindowInfoWrap : : isCloseable ( ) const noexcept
{
return m_isClosable ;
}
inline void WindowInfoWrap : : setIsClosable ( bool closable ) noexcept
{
m_isClosable = closable ;
}
inline bool WindowInfoWrap : : isFullScreenable ( ) const noexcept
{
return m_isFullScreenable ;
}
inline void WindowInfoWrap : : setIsFullScreenable ( bool fullscreenable ) noexcept
{
m_isFullScreenable = fullscreenable ;
}
inline bool WindowInfoWrap : : isGroupable ( ) const noexcept
{
return m_isGroupable ;
}
inline void WindowInfoWrap : : setIsGroupable ( bool groupable ) noexcept
{
m_isGroupable = groupable ;
}
inline bool WindowInfoWrap : : isMaximizable ( ) const noexcept
{
return m_isMaximizable ;
}
inline void WindowInfoWrap : : setIsMaximizable ( bool maximizable ) noexcept
{
m_isMaximizable = maximizable ;
}
inline bool WindowInfoWrap : : isMinimizable ( ) const noexcept
{
return m_isMinimizable ;
}
inline void WindowInfoWrap : : setIsMinimizable ( bool minimizable ) noexcept
{
m_isMinimizable = minimizable ;
}
inline bool WindowInfoWrap : : isMovable ( ) const noexcept
{
return m_isMovable ;
}
inline void WindowInfoWrap : : setIsMovable ( bool movable ) noexcept
{
m_isMovable = movable ;
}
inline bool WindowInfoWrap : : isResizable ( ) const noexcept
{
return m_isResizable ;
}
inline void WindowInfoWrap : : setIsResizable ( bool resizable ) noexcept
{
m_isResizable = resizable ;
}
inline bool WindowInfoWrap : : isShadeable ( ) const noexcept
{
return m_isShadeable ;
}
inline void WindowInfoWrap : : setIsShadeable ( bool shadeble ) noexcept
{
m_isShadeable = shadeble ;
}
inline bool WindowInfoWrap : : isVirtualDesktopsChangeable ( ) const noexcept
{
return m_isVirtualDesktopsChangeable ;
}
inline void WindowInfoWrap : : setIsVirtualDesktopsChangeable ( bool virtualdesktopchangeable ) noexcept
{
m_isVirtualDesktopsChangeable = virtualdesktopchangeable ;
}
//!END: Window Abilities
2019-07-23 00:05:01 +03:00
inline bool WindowInfoWrap : : isMainWindow ( ) const noexcept
{
return ( m_parentId . toInt ( ) < = 0 ) ;
}
inline bool WindowInfoWrap : : isChildWindow ( ) const noexcept
{
return ( m_parentId . toInt ( ) > 0 ) ;
}
2019-05-31 20:50:08 +03:00
inline QString WindowInfoWrap : : appName ( ) const noexcept
{
return m_appName ;
}
inline void WindowInfoWrap : : setAppName ( const QString & appName ) noexcept
{
m_appName = appName ;
}
2019-05-27 18:56:24 +03:00
inline QString WindowInfoWrap : : display ( ) const noexcept
{
return m_display ;
}
inline void WindowInfoWrap : : setDisplay ( const QString & display ) noexcept
{
m_display = display ;
}
inline QIcon WindowInfoWrap : : icon ( ) const noexcept
{
return m_icon ;
}
inline void WindowInfoWrap : : setIcon ( const QIcon & icon ) noexcept
{
m_icon = icon ;
}
2017-06-09 01:10:49 +03:00
inline QRect WindowInfoWrap : : geometry ( ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_geometry ;
}
2017-03-24 06:06:59 +03:00
inline void WindowInfoWrap : : setGeometry ( const QRect & geometry ) noexcept
2017-02-25 05:40:47 +03:00
{
m_geometry = geometry ;
}
2017-06-09 01:10:49 +03:00
inline WindowId WindowInfoWrap : : wid ( ) const noexcept
2017-02-25 05:40:47 +03:00
{
return m_wid ;
}
2019-06-04 19:17:41 +03:00
inline void WindowInfoWrap : : setWid ( const WindowId & wid ) noexcept
2017-02-25 05:40:47 +03:00
{
m_wid = wid ;
}
2016-12-28 10:55:54 +03:00
2019-07-23 00:05:01 +03:00
inline WindowId WindowInfoWrap : : parentId ( ) const noexcept
{
return m_parentId ;
}
inline void WindowInfoWrap : : setParentId ( const WindowId & parentId ) noexcept
{
if ( m_wid = = parentId ) {
return ;
}
m_parentId = parentId ;
}
2019-06-08 00:31:30 +03:00
inline QStringList WindowInfoWrap : : desktops ( ) const noexcept
2019-06-07 23:45:42 +03:00
{
return m_desktops ;
}
2019-06-08 00:31:30 +03:00
inline void WindowInfoWrap : : setDesktops ( const QStringList & desktops ) noexcept
2019-06-07 23:45:42 +03:00
{
m_desktops = desktops ;
}
inline QStringList WindowInfoWrap : : activities ( ) const noexcept
{
return m_activities ;
}
inline void WindowInfoWrap : : setActivities ( const QStringList & activities ) noexcept
{
m_activities = activities ;
}
2017-02-25 05:40:47 +03:00
// END: definitions
2019-06-07 23:45:42 +03:00
2019-06-08 00:31:30 +03:00
inline bool WindowInfoWrap : : isOnDesktop ( const QString & desktop ) const noexcept
2019-06-07 23:45:42 +03:00
{
return m_isOnAllDesktops | | m_desktops . contains ( desktop ) ;
}
inline bool WindowInfoWrap : : isOnActivity ( const QString & activity ) const noexcept
{
return m_isOnAllActivities | | m_activities . contains ( activity ) ;
}
2016-12-28 10:55:54 +03:00
}
2019-05-11 15:43:10 +03:00
}
2016-12-28 10:55:54 +03:00
2016-12-30 10:13:57 +03:00
# endif // WINDOWINFOWRAP_H