umbrello API Documentation

kplayerslideraction.h

00001 /***************************************************************************
00002                           kplayerslideraction.h
00003                           ---------------------
00004     begin                : Sat Jan 11 2003
00005     copyright            : (C) 2003 by kiriuja
00006     email                : kplayer-dev@en-directo.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  ***************************************************************************/
00015 
00016 #ifndef KPLAYERSLIDERACTION_H
00017 #define KPLAYERSLIDERACTION_H
00018 
00019 #include <kaction.h>
00020 #include <qslider.h>
00021 
00026 class KPlayerSlider : public QSlider
00027 {
00028     Q_OBJECT
00029 
00030 public:
00033     explicit KPlayerSlider (Qt::Orientation, QWidget* parent = 0, const char* name = 0);
00036     virtual ~KPlayerSlider();
00037 
00040     virtual QSize sizeHint() const;
00043     virtual QSize minimumSizeHint() const;
00044 
00047     int minValue (void) const;
00050     void setMinValue (int);
00053     int maxValue (void) const;
00056     void setMaxValue (int);
00059     int lineStep (void) const;
00062     void setLineStep (int);
00065     int pageStep (void) const;
00068     void setPageStep (int);
00071     int value (void) const;
00074     void setValue (int, int = 0); // do not override the virtual setValue
00075 
00078     void setup (int minValue, int maxValue, int value, int pageStep, int lineStep = 1);
00081     virtual void setOrientation (Qt::Orientation);
00082 
00083 signals:
00086     void changed (int);
00087 
00088 protected slots:
00091     void sliderValueChanged (int);
00092 
00093 protected:
00094     // Recursion prevention. Should be private.
00095     bool m_changing_orientation;
00096 
00097     friend class KPlayerSliderAction;
00098     friend class KPlayerPopupSliderAction;
00099 };
00100 
00104 class KPlayerPopupFrame : public QFrame
00105 {
00106     Q_OBJECT
00107 
00108 public:
00111     KPlayerPopupFrame (QWidget* parent = 0, const char* name = 0)
00112             : QFrame (parent, name, Qt::WType_Popup) { }
00115     virtual ~KPlayerPopupFrame() { }
00116 
00117 protected:
00120     virtual void keyPressEvent (QKeyEvent*);
00121 };
00122 
00126 class KPlayerPopupSliderAction : public KAction
00127 {
00128     Q_OBJECT
00129 
00130 public:
00133     KPlayerPopupSliderAction (const QString& text, const QString& pix, const KShortcut& shortcut,
00134                               const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0);
00137     virtual ~KPlayerPopupSliderAction();
00138 
00141     KPlayerSlider* slider (void)
00142     { return m_slider; }
00143 
00145     //virtual int plug (QWidget*, int = -1);
00147     //virtual void unplug (QWidget*);
00148 
00149 protected slots:
00152     virtual void slotActivated (void);
00153 
00154 protected:
00157     KPlayerSlider* m_slider;
00160     KPlayerPopupFrame* m_frame;
00161 };
00162 
00166 class KPlayerSliderAction : public KWidgetAction
00167 {
00168     Q_OBJECT
00169 
00170 public:
00173     KPlayerSliderAction (const QString& text, const KShortcut&, const QObject* receiver,
00174                          const char* slot, KActionCollection* parent = 0, const char* name = 0);
00177     virtual ~KPlayerSliderAction();
00178 
00181     KPlayerSlider* slider (void)
00182     { return (KPlayerSlider*) widget(); }
00183 
00186     virtual int plug (QWidget* widget, int index = -1);
00189     virtual void unplug (QWidget* widget);
00190 
00191 protected slots:
00194     void orientationChanged (Qt::Orientation);
00195 
00196 protected:
00199     //KPlayerSlider* m_slider;
00200 };
00201 
00202 #endif
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:58 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003