1
/***************************************************************************
2
* KMidimon - ALSA sequencer based MIDI monitor *
3
* Copyright (C) 2005-2009 Pedro Lopez-Cabanillas *
4
* plcl@users.sourceforge.net *
6
* This program is free software; you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation; either version 2 of the License, or *
9
* (at your option) any later version. *
11
* This program is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
16
* You should have received a copy of the GNU General Public License *
17
* along with this program; if not, write to the Free Software *
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
19
* MA 02110-1301, USA *
20
***************************************************************************/
21
/***************************************************************************
22
* Other copyright notices for this file include: * *
23
* copyright (C) 2003 kiriuja <kplayer-dev@en-directo.net> *
24
* copyright (C) 2003-2009 *
25
* Umbrello UML Modeller Authors <uml-devel@uml.sf.net> *
26
***************************************************************************/
28
#ifndef SLIDERACTION_H
29
#define SLIDERACTION_H
33
#include <QtGui/QSlider>
34
#include <QtGui/QFrame>
39
* KPlayer's slider widget.
40
* Taken from umbrello (kdesdk SVN 992814, 2009-07-08) by Pedro Lopez-Cabanillas
41
* (with small changes)
43
* Taken from kplayer CVS 2003-09-21 (kplayer > 0.3.1) by Jonathan Riddell
46
class KPlayerSlider : public QSlider
51
explicit KPlayerSlider (Qt::Orientation, QWidget* parent = 0);
52
virtual ~KPlayerSlider() {}
54
virtual QSize sizeHint() const;
55
virtual QSize minimumSizeHint() const;
56
void setPageStep (int);
57
void setup (int minimum, int maximum, int value, int pageStep, int lineStep = 1);
60
friend class KPlayerSliderAction;
61
friend class KPlayerPopupSliderAction;
65
* KPlayer popup frame.
68
class KPlayerPopupFrame : public QFrame
73
KPlayerPopupFrame (QWidget* parent = 0);
74
virtual ~KPlayerPopupFrame();
77
virtual void keyPressEvent (QKeyEvent*);
81
* Action representing a popup slider activated by a toolbar button.
84
class KPlayerPopupSliderAction : public KAction
89
KPlayerPopupSliderAction (const QObject* receiver, const char* slot, QObject *parent);
90
virtual ~KPlayerPopupSliderAction();
92
/** Returns a pointer to the KPlayerSlider object. */
93
KPlayerSlider* slider() { return m_slider; }
96
virtual void slotTriggered();
99
KPlayerSlider* m_slider; ///< The slider.
100
KPlayerPopupFrame* m_frame; ///< The popup frame.