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

« back to all changes in this revision

Viewing changes to noatun/noatun/modules/winskin/guiPlugin.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
/*
 
2
  here we define the signals a playerplugin can define
 
3
  Copyright (C) 1999  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
 
 
16
 
 
17
#ifndef __GUIPLUGIN_H
 
18
#define __GUIPLUGIN_H
 
19
 
 
20
#include <qwidget.h>
 
21
 
 
22
/**
 
23
   This is the plugin standard for new GUIs of kmpg(anyone
 
24
   do a "panel-docked-gui?"). We have a few standard signals 
 
25
   which the Plugin can emit.
 
26
   But the gui as well needs input which it should show
 
27
   on the screen as well!
 
28
   The guiPlugin gets these necessary runtime informations like
 
29
   currentTime,status of playing (paused,stopped,...) from
 
30
   the standardgraph.
 
31
   <p>
 
32
   How things work:
 
33
   <p>
 
34
   You build your own gui in the constructor, like playbuttons,
 
35
   jumpsliders, etc..
 
36
   Then in the construction process sometimes the method
 
37
   attachTo(..) is called. This is the time for the plugin
 
38
   to grap all these nice signals which are important for your gui.
 
39
   <p>
 
40
   The detach call removes the connection to the stream.
 
41
   <p>
 
42
   It is very usefull to use the underlying widgets for time,state etc,
 
43
   and only overwrite the "look and feel" of it, because these devices
 
44
   already know how to attach/detach. The KDE skin, and
 
45
   the winamp skin uses them and I think there is no
 
46
   reason not use this "basicWidgetSet", but you can write, nevertheless,
 
47
   your own.
 
48
*/
 
49
class GuiPlugin : public QWidget {
 
50
 Q_OBJECT
 
51
 
 
52
  public:
 
53
   GuiPlugin(QWidget *parent=0, const char *name=0);
 
54
   ~GuiPlugin();
 
55
 
 
56
   virtual int  getSkinId()=0;
 
57
 
 
58
   // here you get the current song
 
59
   virtual void setSong(QString song)=0;
 
60
   virtual void setRepeat(int val)=0;
 
61
   virtual void setShuffle(int val)=0;
 
62
   virtual void setPlaylist(int val)=0;
 
63
   virtual void setBPS(int val)=0;
 
64
   virtual void setFreq(int val)=0;
 
65
 
 
66
   virtual void setJumpValue(int val)=0;
 
67
   virtual void setVolumeValue(int val)=0;
 
68
   virtual void setBalanceValue(int val)=0;
 
69
   
 
70
   virtual void setStatus(int val)=0;
 
71
   virtual void setStereo(int val)=0;
 
72
   virtual void setTime(QString timeString)=0;
 
73
   virtual void setSpectrum(float floatArray[75])=0;
 
74
 
 
75
  
 
76
 signals:
 
77
   void repeatClickedEvent(int val);
 
78
   void shuffleClickedEvent(int val);
 
79
   void playlistClickedEvent(int val);
 
80
 
 
81
   void playCurrentEvent();
 
82
   void playNextEvent();
 
83
   void playPrevEvent();
 
84
   void playStopEvent();
 
85
   void playPauseEvent();
 
86
   void ejectEvent();
 
87
 
 
88
   // seek bar
 
89
   void jump(int second);
 
90
   void jumpSliderPressed(); 
 
91
   void jumpSliderReleased();
 
92
 
 
93
   // balance
 
94
   void balanceSetValue(int val);
 
95
   // volume
 
96
   void volumeSetValue(int val);
 
97
 
 
98
};
 
99
#endif
 
100
 
 
101
 
 
102
 
 
103