kspread Library API Documentation

dlabel.cpp

00001 /*
00002     $Id: dlabel.cpp 214601 2003-03-17 20:10:20Z mueller $
00003 
00004     KCalc, a scientific calculator for the X window system using the
00005     Qt widget libraries, available at no cost at http://www.troll.no
00006 
00007     Copyright (C) 1996 Bernd Johannes Wuebben
00008                        wuebben@math.cornell.edu
00009 
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU General Public License for more details.
00019 
00020     You should have received a copy of the GNU General Public License
00021     along with this program; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 
00024 */
00025 
00026 #include "dlabel.h"
00027 
00028 DLabel::DLabel(QWidget *parent, const char *name)
00029   :QLabel(parent,name){
00030 
00031     button = 0;
00032     lit = false;
00033 }
00034 
00035 void DLabel::mousePressEvent(QMouseEvent *e){
00036 
00037   if(e->button() == LeftButton){
00038     lit = !lit;
00039     button = LeftButton;
00040   }
00041   else{
00042     button = MidButton;
00043   }
00044 
00045 
00046   emit clicked();
00047 }
00048 
00049 
00050 int DLabel::Button(){
00051   return button;
00052 }
00053 
00054 bool DLabel::isLit(){
00055 
00056   return lit;
00057 
00058 }
00059 
00060 void DLabel::setLit(bool _lit){
00061   lit = _lit;
00062 }
00063 
00064 #include "dlabel.moc"
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:42:44 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003