1 /***************************************************************************
2 klineal.h - description
4 begin : Fri Oct 13 2000
5 Copyright : (C) 2000 - 2008 by Till Krech <till@snafu.de>
6 (C) 2009 by Mathias Soeken <msoeken@tzi.de>
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
26 class KLineal
: public QWidget
{
30 enum { North
= 0, West
, South
, East
};
32 KLineal( QWidget
*parent
= 0 );
35 void move( int x
, int y
);
36 void move( const QPoint
&p
);
42 void keyPressEvent( QKeyEvent
*e
);
43 void mousePressEvent( QMouseEvent
*e
);
44 void mouseReleaseEvent( QMouseEvent
*e
);
45 void mouseMoveEvent( QMouseEvent
*e
);
46 void wheelEvent( QWheelEvent
*e
);
47 void paintEvent( QPaintEvent
*e
);
48 void enterEvent( QEvent
*e
);
49 void leaveEvent( QEvent
*e
);
52 void drawScale( QPainter
&painter
);
53 void drawBackground( QPainter
&painter
);
54 void reLength( int percentOfScreen
);
55 void updateScaleDirectionMenuItem();
60 QAutoSizeLabel
*mLabel
;
61 QAutoSizeLabel
*mColorLabel
;
67 QAction
*mFullScreenAction
;
68 QAction
*mScaleDirectionAction
;
69 QAction
*mCenterOriginAction
;
70 QAction
*mOffsetAction
;
72 QCursor mCurrentCursor
;
85 void setOrientation( int );
96 void setShortLength();
97 void setMediumLength();
100 void switchDirection();
103 void slotPreferences();
104 void switchRelativeScale( bool checked
);