dlabel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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"
This file is part of the documentation for kspread Library Version 1.4.2.