summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets/verticalmeter.h
blob: 9613ec43e86ff23aaac19c518f886f9303e3d858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//=========================================================
//  MusE
//  Linux Music Editor
//  $Id: meter.h,v 1.1.1.1.2.2 2009/05/03 04:14:00 terminator356 Exp $
//
//  (C) Copyright 2000 Werner Schweer (ws@seh.de)
//=========================================================

#ifndef __VERTICALMETER_H__
#define __VERTICALMETER_H__

#include "meter.h"

class QPaintEvent;
class QResizeEvent;
class QMouseEvent;
class QPainter;

class VerticalMeter : public Meter {
      Q_OBJECT
    
   private:
      MeterType mtype;
      bool overflow;
      double val;
      double maxVal;
      double minScale, maxScale;
      int yellowScale, redScale;

      void drawVU(QPainter& p, int, int, int);

      
      void paintEvent(QPaintEvent*);
      void resizeEvent(QResizeEvent*);

   public slots:
      void resetPeaks();
      void setVal(double);

   public:
      VerticalMeter(QWidget* parent, MeterType type = DBMeter);
      void setRange(double min, double max);
      };
#endif