File indexing completed on 2025-02-02 08:57:45
0001 /* 0002 SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #include "activitydata.h" 0007 0008 namespace Latte { 0009 namespace Data { 0010 0011 Activity::Activity() 0012 : Generic() 0013 { 0014 } 0015 0016 Activity::Activity(Activity &&o) 0017 : Generic(o), 0018 icon(o.icon), 0019 isCurrent(o.isCurrent), 0020 state(o.state) 0021 { 0022 } 0023 0024 Activity::Activity(const Activity &o) 0025 : Generic(o), 0026 icon(o.icon), 0027 isCurrent(o.isCurrent), 0028 state(o.state) 0029 { 0030 } 0031 0032 Activity &Activity::operator=(const Activity &rhs) 0033 { 0034 id = rhs.id; 0035 name = rhs.name; 0036 icon = rhs.icon; 0037 isCurrent = rhs.isCurrent; 0038 state = rhs.state; 0039 0040 return (*this); 0041 } 0042 0043 Activity &Activity::operator=(Activity &&rhs) 0044 { 0045 id = rhs.id; 0046 name = rhs.name; 0047 icon = rhs.icon; 0048 isCurrent = rhs.isCurrent; 0049 state = rhs.state; 0050 0051 return (*this); 0052 } 0053 0054 bool Activity::isValid() const 0055 { 0056 return (state != KActivities::Info::Invalid); 0057 } 0058 0059 bool Activity::isRunning() const 0060 { 0061 return ((state == KActivities::Info::Running) || (state == KActivities::Info::Starting)); 0062 } 0063 0064 } 0065 }