[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: widget for pixel graphic apps (pixie, kis,...) for free ;-) (was:
From: Michael van der Westhuizen <michael () mudpuppies ! co ! za>
Date: 2000-03-07 9:47:20
[Download RAW message or body]
aleXXX wrote:
> Hi,
>
> some time ago I made the suggestion for a small display which shows the area
> around the mouse pointer heavily zoomed.
> Yesterday in the evening I hacked it together, you can do with it whatever you
> want, no restriction in any way.
>
> It is still qt 1.44, but the changes should be minimal.
>
> Bye
> Alex
Yes, they are minimal! Here's a patch for Qt2. Cool bit of code! Useful to tack
onto your app during widget development.
Michael
--
Michael van der Westhuizen
michael@mudpuppies.co.za
http://qmc.sourceforge.net
+27 (21) 683 9692
+27 (83) 326 4976
--
In order to make an apple pie from scratch,
you must first create the universe.
-- Carl Sagan, Cosmos
["mag-qt2.patch" (text/plain)]
--- mag.cpp-orig Tue Mar 7 11:40:11 2000
+++ mag.cpp Tue Mar 7 11:42:57 2000
@@ -26,7 +26,7 @@
setFixedSize(size());
};
-void WidgetMagnifier::paintEvent(QPaintEvent *e)
+void WidgetMagnifier::paintEvent(QPaintEvent */*e*/)
{
QPainter paint( this );
paint.setRasterOp(CopyROP);
@@ -65,7 +65,7 @@
bool WidgetMagnifier::eventFilter(QObject *o, QEvent *e)
{
- if ((o==magnifiedOne) && ((e->type()==Event_MouseMove) || (e->type()==Event_Enter)))
+ if ((o==magnifiedOne) && ((e->type()==QEvent::MouseMove) || (e->type()==QEvent::Enter)))
{
mouseInside=TRUE;
QMouseEvent *m=(QMouseEvent *) e;
@@ -80,7 +80,7 @@
pm = pm.xForm( wm );
repaint(FALSE);
}
- else if ((o==magnifiedOne) && (e->type()==Event_Leave))
+ else if ((o==magnifiedOne) && (e->type()==QEvent::Leave))
{
mouseInside=FALSE;
repaint(FALSE);
["michael.vcf" (text/x-vcard)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic