File: pushbutton.cpp

package info (click to toggle)
kdegraphics 2%3A980312-3
  • links: PTS
  • area: contrib
  • in suites: hamm
  • size: 6,168 kB
  • ctags: 5,778
  • sloc: ansic: 26,607; cpp: 21,205; sh: 5,224; makefile: 1,651; perl: 108
file content (36 lines) | stat: -rw-r--r-- 946 bytes parent folder | download
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
/****************************************************************************
**
** An enhanced pushbutton.
**
** Copyright (C) 1997 by Markku Hihnala. 
** This class is freely distributable under the GNU Public License.
**
*****************************************************************************/

#include "pushbutton.h"
#include <qtabdlg.h>
#include <qmlined.h>
#include <qbttngrp.h>
#include <qradiobt.h>
#include <qlabel.h>
#include <qcombo.h>
#include <qlayout.h>
#include <stdio.h>
#include <qstring.h>
#include <qpainter.h>
#include <qdrawutl.h>

PushButton::PushButton( QWidget * parent , const char * name )
    : QPushButton( parent, name )
{
}

void PushButton::mousePressEvent ( QMouseEvent *e )
{
	if ( e->button() == LeftButton )
		QPushButton::mousePressEvent( e );
	else if ( e->button() == RightButton )
		emit button3Pressed( mapToGlobal( e->pos() ) );
//	else if ( e->button() == MidButton )
//		emit button2Pressed();
}