1 //=========================================================
2 // MusE
3 // Linux Music Editor
4 // $Id: vscale.cpp,v 1.1.1.1 2003/10/27 18:54:41 wschweer Exp $
5 // (C) Copyright 1999 Werner Schweer (ws@seh.de)
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; version 2 of
10 // the License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 //
21 //=========================================================
22
23 #include "vscale.h"
24
25 #include <QPainter>
26 #include <QPaintEvent>
27
28 namespace MusEGui {
29
30 //---------------------------------------------------------
31 // paintEvent
32 //---------------------------------------------------------
33
paintEvent(QPaintEvent *)34 void VScale::paintEvent(QPaintEvent*)
35 {
36 int h = height();
37 int w = width();
38 QPainter p;
39 p.begin(this);
40 p.drawLine(w/2, h/4, w, h/4);
41 p.drawLine(0, h/2, w, h/2);
42 p.drawLine(w/2, (3*h)/4, w, (3*h)/4);
43 p.end();
44 }
45
46 } // namespace MusEGui
47