akabeigroup_p.h 1.13 KB
Newer Older
1 2 3
/* This file is part of the Chakra project

   Copyright (C) 2010 Dario Freddi <drf@chakra-project.org>
4
   Copyright (C) 2012 Lukas Appelhans <boom1992@chakra-project.org>
5 6 7 8 9 10

   This program 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.
*/
Fabian Kosmale's avatar
Fabian Kosmale committed
11 12
#ifndef AKABEIGROUP_P_H
#define AKABEIGROUP_P_H
13
#include <akabeigroup.h>
14
#include <QReadWriteLock>
15

16 17
namespace Akabei
{
18 19 20 21

class GroupPrivate
{
    public:
22 23 24 25 26 27 28 29 30 31 32 33 34 35
        GroupPrivate(const QString &n) : name(n), mutex(new QReadWriteLock(QReadWriteLock::Recursive)) {}
        virtual ~GroupPrivate() {
            delete mutex;
        }
        void setDescription(const QString &d) {
            QWriteLocker locker(mutex);
            desc = d;
        }
        void setIcon(const QString &i) {
            QWriteLocker locker(mutex);
            icon = i;
        }
        
    private:
36 37 38
        QString name;
        QString desc;
        QString icon;
39 40 41
        QReadWriteLock *mutex;
        
        friend class Group;
42 43
};

Fabian Kosmale's avatar
Fabian Kosmale committed
44 45
}
#endif