~ubuntu-branches/ubuntu/intrepid/kdesdk/intrepid-updates

« back to all changes in this revision

Viewing changes to umbrello/umbrello/kplayerslideraction.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-05-28 10:11:43 UTC
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: james.westby@ubuntu.com-20080528101143-gzc3styjz1b70zxu
Tags: upstream-4.0.80
ImportĀ upstreamĀ versionĀ 4.0.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include <kaction.h>
20
20
#include <qslider.h>
 
21
//Added by qt3to4:
 
22
#include <QFrame>
 
23
#include <QKeyEvent>
21
24
 
22
25
/**KPlayer's slider widget. Works around the Qt upside-down slider bug.
23
26
 * Taken from kplayer CVS 2003-09-21 (kplayer > 0.3.1) by Jonathan Riddell
44
47
 
45
48
    /** The minimum value.
46
49
      */
47
 
    int minValue (void) const;
 
50
    int minimum (void) const;
48
51
    /** Sets the minimum value.
49
52
      */
50
 
    void setMinValue (int);
 
53
    void setMinimum (int);
51
54
    /** The maximum value.
52
55
      */
53
 
    int maxValue (void) const;
 
56
    int maximum (void) const;
54
57
    /** Sets the maximum value.
55
58
      */
56
 
    void setMaxValue (int);
57
 
    /** The line step.
58
 
      */
59
 
    int lineStep (void) const;
60
 
    /** Sets the line step.
61
 
      */
62
 
    void setLineStep (int);
 
59
    void setMaximum (int);
 
60
    /** The single step.
 
61
      */
 
62
    int singleStep (void) const;
 
63
    /** Sets the single step.
 
64
      */
 
65
    void setSingleStep (int);
63
66
    /** The page step.
64
67
      */
65
68
    int pageStep (void) const;
75
78
 
76
79
    /** Sets up the slider by setting five options in one go.
77
80
      */
78
 
    void setup (int minValue, int maxValue, int value, int pageStep, int lineStep = 1);
 
81
    void setup (int minimum, int maximum, int value, int pageStep, int lineStep = 1);
79
82
    /** Sets the slider orientation.
80
83
      */
81
84
    virtual void setOrientation (Qt::Orientation);
108
111
public:
109
112
    /** The KPlayerPopupFrame constructor. Parameters are passed on to QFrame.
110
113
      */
111
 
    KPlayerPopupFrame (QWidget* parent = 0, const char* name = 0)
112
 
            : QFrame (parent, name, Qt::WType_Popup) { }
 
114
    KPlayerPopupFrame (QWidget* parent = 0/*, const char* name = 0*/)
 
115
            : QFrame (parent, Qt::WType_Popup) { }
113
116
    /** The KPlayerPopupFrame destructor. Does nothing.
114
117
      */
115
118
    virtual ~KPlayerPopupFrame() { }
130
133
public:
131
134
    /** The KPlayerPopupSliderAction constructor. Parameters are passed on to KAction.
132
135
      */
133
 
    KPlayerPopupSliderAction (const QString& text, const QString& pix, const KShortcut& shortcut,
134
 
                              const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0);
 
136
    KPlayerPopupSliderAction (const QObject* receiver, const char* slot, QObject *parent);
135
137
    /** The KPlayerPopupSliderAction destructor. Deletes the KPlayerPopupFrame.
136
138
      */
137
139
    virtual ~KPlayerPopupSliderAction();
149
151
protected slots:
150
152
    /** Pops up the slider.
151
153
      */
152
 
    virtual void slotActivated (void);
 
154
    virtual void slotTriggered();
153
155
 
154
156
protected:
155
157
    /** The slider.
163
165
/**Slider action suitable for insertion into a toolbar.
164
166
  *@author kiriuja
165
167
  */
166
 
class KPlayerSliderAction : public KWidgetAction
167
 
{
168
 
    Q_OBJECT
169
 
 
170
 
public:
171
 
    /** The KPlayerSliderAction constructor. Parameters are passed on to KAction.
172
 
      */
173
 
    KPlayerSliderAction (const QString& text, const KShortcut&, const QObject* receiver,
174
 
                         const char* slot, KActionCollection* parent = 0, const char* name = 0);
175
 
    /** The KPlayerSliderAction destructor. Does nothing.
176
 
      */
177
 
    virtual ~KPlayerSliderAction();
178
 
 
179
 
    /** Returns a pointer to the KPlayerSlider object.
180
 
      */
181
 
    KPlayerSlider* slider (void)
182
 
    { return (KPlayerSlider*) widget(); }
183
 
 
184
 
    /** Plugs the slider into the toolbar.
185
 
      */
186
 
    virtual int plug (QWidget* widget, int index = -1);
187
 
    /** Unplugs the slider from the toolbar.
188
 
      */
189
 
    virtual void unplug (QWidget* widget);
190
 
 
191
 
protected slots:
192
 
    /** Changes the slider orientation when the toolbar orientation changes.
193
 
      */
194
 
    void orientationChanged (Qt::Orientation);
195
 
 
196
 
protected:
197
 
    /** The slider.
198
 
      */
199
 
    //KPlayerSlider* m_slider;
200
 
};
 
168
// class KPlayerSliderAction : public KAction
 
169
// {
 
170
//     Q_OBJECT
 
171
//
 
172
// public:
 
173
//     /** The KPlayerSliderAction constructor. Parameters are passed on to KAction.
 
174
//       */
 
175
//     KPlayerSliderAction (const QString& text, const KShortcut&, const QObject* receiver,
 
176
//                          const char* slot, KActionCollection* parent = 0, const char* name = 0);
 
177
//     /** The KPlayerSliderAction destructor. Does nothing.
 
178
//       */
 
179
//     virtual ~KPlayerSliderAction();
 
180
//
 
181
//     /** Returns a pointer to the KPlayerSlider object.
 
182
//       */
 
183
//     KPlayerSlider* slider (QWidget* parent)
 
184
//     { return m_slider; }
 
185
//
 
186
//     /** Plugs the slider into the toolbar.
 
187
//       */
 
188
// //     virtual int plug (QWidget* widget, int index = -1);
 
189
//     /** Unplugs the slider from the toolbar.
 
190
//       */
 
191
// //     virtual void unplug (QWidget* widget);
 
192
//
 
193
// protected slots:
 
194
//     /** Changes the slider orientation when the toolbar orientation changes.
 
195
//       */
 
196
//     void orientationChanged (Qt::Orientation);
 
197
//
 
198
// protected:
 
199
//     /** The slider.
 
200
//       */
 
201
//     KPlayerSlider* m_slider;
 
202
// };
201
203
 
202
204
#endif