You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
latte-dock/app/data/activitydata.h

56 lines
1.0 KiB
C

/*
SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef ACTIVITYDATA_H
#define ACTIVITYDATA_H
//! local
#include "genericdata.h"
#include "generictable.h"
//! Qt
#include <QMetaType>
#include <QIcon>
#include <QString>
//! KActivities
#include <KActivities/Info>
namespace Latte {
namespace Data {
class Activity : public Generic
{
public:
Activity();
Activity(Activity &&o);
Activity(const Activity &o);
//! Layout data
bool isCurrent{false};
QString icon;
KActivities::Info::State state;
bool isValid() const;
bool isRunning() const;
//! Operators
Activity &operator=(const Activity &rhs);
Activity &operator=(Activity &&rhs);
};
//! This is an Activities map in the following structure:
//! #activityId -> activite_information
typedef GenericTable<Data::Activity> ActivitiesTable;
}
}
Q_DECLARE_METATYPE(Latte::Data::Activity)
Q_DECLARE_METATYPE(Latte::Data::ActivitiesTable)
#endif