slideraction.h 1.75 KB
Newer Older
1 2 3 4 5
/***************************************************************************
                          slideraction.h  -  description
                             -------------------
    begin                : Wed Feb 6 2002
    copyright            : (C) 2002 by Scott Wheeler
6
    email                : wheeler@kde.org
7
***************************************************************************/
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef SLIDERACTION_H
#define SLIDERACTION_H

#include <kaction.h>
#include <ktoolbar.h>

#include <qstring.h>
#include <qslider.h>
#include <qobject.h>
#include <qlayout.h>

#include "customaction.h"
30

31 32
class SliderAction : public CustomAction
{
33 34 35
    Q_OBJECT
public:
    SliderAction(const QString &text, QObject *parent, const char *name);
36
    virtual ~SliderAction();
37

38 39
    QSlider *getVolumeSlider() const;
    QSlider *getTrackPositionSlider() const;
40 41

public slots:
42
    void updateOrientation(QDockWindow *dockWindow = 0);
43 44

private:
45
    QWidget *createWidget(QWidget *parent);
46

47 48 49 50 51 52 53 54 55
    QBoxLayout *layout;
    QSlider *trackPositionSlider;
    QSlider *volumeSlider;

    static const int volumeMax = 50;

private slots:
    void updateLabels();
    void updateSize();
56 57 58
};

#endif