~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to kicker/extensions/kasbar/kasstartupitem.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* kasstartupitem.h
 
2
**
 
3
** Copyright (C) 2001-2004 Richard Moore <rich@kde.org>
 
4
** Contributor: Mosfet
 
5
**     All rights reserved.
 
6
**
 
7
** KasBar is dual-licensed: you can choose the GPL or the BSD license.
 
8
** Short forms of both licenses are included below.
 
9
*/
 
10
 
 
11
/*
 
12
** This program is free software; you can redistribute it and/or modify
 
13
** it under the terms of the GNU General Public License as published by
 
14
** the Free Software Foundation; either version 2 of the License, or
 
15
** (at your option) any later version.
 
16
**
 
17
** This program is distributed in the hope that it will be useful,
 
18
** but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
20
** GNU General Public License for more details.
 
21
**
 
22
** You should have received a copy of the GNU General Public License
 
23
** along with this program in a file called COPYING; if not, write to
 
24
** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
25
** MA 02110-1301, USA.
 
26
*/
 
27
 
 
28
/*
 
29
** Redistribution and use in source and binary forms, with or without
 
30
** modification, are permitted provided that the following conditions
 
31
** are met:
 
32
** 1. Redistributions of source code must retain the above copyright
 
33
**    notice, this list of conditions and the following disclaimer.
 
34
** 2. Redistributions in binary form must reproduce the above copyright
 
35
**    notice, this list of conditions and the following disclaimer in the
 
36
**    documentation and/or other materials provided with the distribution.
 
37
**
 
38
** THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
 
39
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
40
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
41
** ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 
42
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
43
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
44
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
45
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
46
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
47
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
48
** SUCH DAMAGE.
 
49
*/
 
50
 
 
51
/*
 
52
** Bug reports and questions can be sent to kde-devel@kde.org
 
53
*/
 
54
// -*- c++ -*-
 
55
 
 
56
 
 
57
#ifndef KASSTARTUPITEM_H
 
58
#define KASSTARTUPITEM_H
 
59
 
 
60
#include <QPixmap>
 
61
 
 
62
#include "kasitem.h"
 
63
 
 
64
class Startup;
 
65
class QTimer;
 
66
 
 
67
/**
 
68
 * A KasItem that represents a single Startup.
 
69
 */
 
70
class KasStartupItem : public KasItem
 
71
{
 
72
    Q_OBJECT
 
73
 
 
74
public:
 
75
    KasStartupItem( KasBar *parent, Startup::StartupPtr startup );
 
76
    virtual ~KasStartupItem();
 
77
 
 
78
    QPixmap icon() const;
 
79
    Startup::StartupPtr startup() const { return startup_; }
 
80
 
 
81
    /**
 
82
     * Reimplemented to paint the item.
 
83
     */
 
84
    virtual void paint( QPainter *p );
 
85
 
 
86
protected Q_SLOTS:
 
87
    void aniTimerFired();
 
88
 
 
89
private:
 
90
    Startup::StartupPtr startup_;
 
91
    QTimer *aniTimer;
 
92
    int frame;
 
93
};
 
94
 
 
95
#endif // KASSTARTUPITEM_H
 
96