5
** Copyright (C) 2001-2004 Richard Moore <rich@kde.org>
7
** All rights reserved.
9
** KasBar is dual-licensed: you can choose the GPL or the BSD license.
10
** Short forms of both licenses are included below.
14
** This program is free software; you can redistribute it and/or modify
15
** it under the terms of the GNU General Public License as published by
16
** the Free Software Foundation; either version 2 of the License, or
17
** (at your option) any later version.
19
** This program is distributed in the hope that it will be useful,
20
** but WITHOUT ANY WARRANTY; without even the implied warranty of
21
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
** GNU General Public License for more details.
24
** You should have received a copy of the GNU General Public License
25
** along with this program in a file called COPYING; if not, write to
26
** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
27
** MA 02110-1301, USA.
31
** Redistribution and use in source and binary forms, with or without
32
** modification, are permitted provided that the following conditions
34
** 1. Redistributions of source code must retain the above copyright
35
** notice, this list of conditions and the following disclaimer.
36
** 2. Redistributions in binary form must reproduce the above copyright
37
** notice, this list of conditions and the following disclaimer in the
38
** documentation and/or other materials provided with the distribution.
40
** THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
41
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43
** ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
44
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54
** Bug reports and questions can be sent to kde-devel@kde.org
59
#ifndef KASGROUPITEM_H
60
#define KASGROUPITEM_H
63
#include <taskmanager.h>
72
* A KasItem that holds a list of Tasks.
74
class KasGroupItem : public KasItem
80
GroupRelated, GroupDesktop
83
KasGroupItem( KasTasker *parent/*, Group *group*/ );
84
virtual ~KasGroupItem();
86
uint groupType() const { return groupType_; }
87
void setGroupType( uint type ) { groupType_ = type; }
89
/** Reimplemented to paint the item. */
90
virtual void paint( QPainter *p );
92
KasTasker *kasbar() const;
94
Task::Ptr task( uint i ) { return items.at( i ); }
95
int taskCount() const { return items.count(); }
100
void addTask( Task::Ptr t );
101
void removeTask( Task::Ptr t );
105
void showGroupMenuAt( QMouseEvent *ev );
106
void showGroupMenuAt( const QPoint &p );
113
/** Reimplemented to create a KasGroupPopup. */
114
virtual KasPopup *createPopup();
123
#endif // KASGROUPITEM_H