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 ***************************************************************************/
23 #include <KColorDialog>
28 class KLineal
: public QWidget
{
32 enum { North
= 0, West
, South
, East
};
34 KLineal( QWidget
*parent
= 0 );
37 void move( int x
, int y
);
38 void move( const QPoint
&p
);
44 void keyPressEvent( QKeyEvent
*e
);
45 void mousePressEvent( QMouseEvent
*e
);
46 void mouseReleaseEvent( QMouseEvent
*e
);
47 void mouseMoveEvent( QMouseEvent
*e
);
48 void paintEvent( QPaintEvent
*e
);
49 void enterEvent( QEvent
*e
);
50 void leaveEvent( QEvent
*e
);
54 void drawScale( QPainter
&painter
);
55 void drawBackground( QPainter
&painter
);
56 void reLength( int percentOfScreen
);
57 void updateScaleDirectionMenuItem();
62 QAutoSizeLabel
*mLabel
;
63 QAutoSizeLabel
*mColorLabel
;
69 QAction
*mFullScreenAction
;
70 QAction
*mScaleDirectionAction
;
73 QCursor mCurrentCursor
;
79 KColorDialog mColorSelector
;
85 void setOrientation( int );
96 void setShortLength();
97 void setMediumLength();
100 void switchDirection();
102 void setFont( const QFont
&font
);
103 void setColor( const QColor
&color
);