~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to aktion/aktion_part.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  This file is part of the KDE project
 
2
    Copyright (C) 1999,2000 Kurt Granroth <granroth@kde.org>
 
3
 
 
4
    This program is free software; you can redistribute it and/or modify
 
5
    it under the terms of the GNU General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or
 
7
    (at your option) any later version.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
    GNU General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU General Public License
 
15
    along with this program; if not, write to the Free Software
 
16
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
*/
 
18
#ifndef __aktion_part_h__
 
19
#define __aktion_part_h__
 
20
 
 
21
#include <kparts/browserextension.h>
 
22
#include <klibloader.h>
 
23
 
 
24
class KInstance;
 
25
class KXAnim;
 
26
class KAction;
 
27
class AktionBrowserExtension;
 
28
class QLabel;
 
29
class KAboutData;
 
30
 
 
31
class AktionFactory : public KLibFactory
 
32
{
 
33
    Q_OBJECT
 
34
public:
 
35
    AktionFactory();
 
36
    virtual ~AktionFactory();
 
37
 
 
38
    virtual QObject* create(QObject* parent = 0, const char* name = 0,
 
39
                            const char* classname = "QObject",
 
40
                            const QStringList &args = QStringList());
 
41
 
 
42
    static KInstance *instance();
 
43
    static KAboutData *aboutData();
 
44
 
 
45
private:
 
46
    static KInstance *s_instance;
 
47
};
 
48
 
 
49
class AktionPart: public KParts::ReadOnlyPart
 
50
{
 
51
    Q_OBJECT
 
52
public:
 
53
    AktionPart(QWidget *parent = 0, const char *name = 0);
 
54
    virtual ~AktionPart();
 
55
 
 
56
    KXAnim *kxanim() const { return widget; }
 
57
 
 
58
    virtual bool closeURL();
 
59
 
 
60
protected:
 
61
    virtual bool openFile();
 
62
 
 
63
protected slots:
 
64
    void slotPlay();
 
65
    void slotPause();
 
66
    void slotStop();
 
67
    void slotForward();
 
68
    void slotBackward();
 
69
 
 
70
private:
 
71
    KXAnim *widget;
 
72
    QLabel *label;
 
73
    AktionBrowserExtension *m_extension;
 
74
 
 
75
    KAction *m_playAction;
 
76
    KAction *m_pauseAction;
 
77
    KAction *m_stopAction;
 
78
    KAction *m_forwardAction;
 
79
    KAction *m_backwardAction;
 
80
};
 
81
 
 
82
class AktionBrowserExtension : public KParts::BrowserExtension
 
83
{
 
84
    Q_OBJECT
 
85
    friend class AktionPart;
 
86
public:
 
87
    AktionBrowserExtension(AktionPart *parent);
 
88
    virtual ~AktionBrowserExtension();
 
89
};
 
90
#endif