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

« back to all changes in this revision

Viewing changes to kmid/qslidertime.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
 
 
3
    kslidertime.h  - A widget that displays time tags under a KSlider
 
4
    Copyright (C) 1997,98  Antonio Larrosa Jimenez
 
5
 
 
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.
 
10
 
 
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.
 
15
 
 
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., 675 Mass Ave, Cambridge, MA 02139, USA.
 
19
 
 
20
    Send comments and bug fixes to larrosa@kde.org
 
21
    or to Antonio Larrosa, Rio Arnoya, 10 5B, 29006 Malaga, Spain
 
22
 
 
23
***************************************************************************/
 
24
#ifndef _kslidertime_h_
 
25
#define _kslidertime_h_
 
26
 
 
27
#include <qslider.h>
 
28
 
 
29
class QWidget;
 
30
 
 
31
class QSliderTime : public QWidget
 
32
{
 
33
  Q_OBJECT
 
34
private:
 
35
 
 
36
  QSlider *kslider;
 
37
 
 
38
int fontheight;
 
39
public:
 
40
 
 
41
  QSliderTime( QSlider *ksl, QWidget *parent = NULL, const char *name = NULL );
 
42
 
 
43
  int getFontHeight(void) {return fontheight;};
 
44
 
 
45
  QSize sizeHint();
 
46
  QSizePolicy sizePolicy();
 
47
 
 
48
private:
 
49
 
 
50
  virtual void paintEvent( QPaintEvent * );  
 
51
  void drawTimeMarks(QPainter *painter);
 
52
 
 
53
  char *formatMillisecs(int ms,char *tmp);
 
54
};
 
55
 
 
56
#endif