summaryrefslogtreecommitdiffstats
path: root/tdemid/tdemid_part.h
blob: 7217a7b7431c6995a2e9c3f7f157b47d9d9fcfdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef __TDEMIDPART_H__
#define __TDEMIDPART_H__

#include <tdeparts/browserextension.h>
#include <tdeparts/factory.h>
#include <tdelibs_export.h>
class TDEAboutData;
class TDEInstance;
class KMidBrowserExtension;
class tdemidClient;

class KDE_EXPORT KMidFactory : public KParts::Factory
{
  TQ_OBJECT
  
  public:
    KMidFactory();
    virtual ~KMidFactory();

    virtual KParts::Part* createPartObject(TQWidget *parentWidget, const char *widgetName,
                TQObject* parent = 0, const char* name = 0,
                const char* classname = "TQObject",
                const TQStringList &args = TQStringList());

    static TDEInstance *instance();

    static TDEAboutData *aboutData();
  private:
    static TDEInstance *s_instance;
};

class KMidPart: public KParts::ReadOnlyPart
{
  TQ_OBJECT
  
  public:
    KMidPart(TQWidget *parentWidget, const char *widgetName, 
             TQObject *parent, const char *name);
    virtual ~KMidPart();


    virtual bool closeURL();

  protected:
    virtual bool openFile();

  protected slots:
    void slotPlay();
    void slotStop();

  private:
    tdemidClient *widget;
    KMidBrowserExtension *m_extension;
};

class KMidBrowserExtension : public KParts::BrowserExtension
{
  TQ_OBJECT
  
    friend class KMidPart;
  public:
  KMidBrowserExtension(KMidPart *parent);
  virtual ~KMidBrowserExtension();
};

#endif