~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to kmix/kledbutton.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * KMix -- KDE's full featured mini mixer
 
3
 *
 
4
 *
 
5
 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Library General Public
 
9
 * License as published by the Free Software Foundation; either
 
10
 * version 2 of the License, or (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * Library General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Library General Public
 
18
 * License along with this program; if not, write to the Free
 
19
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
20
 */
 
21
 
 
22
#include <iostream.h>
 
23
 
 
24
#include "kledbutton.h"
 
25
 
 
26
 
 
27
KLedButton::KLedButton(const QColor &col, QWidget *parent, const char *name)
 
28
   : KLed( col, parent, name )
 
29
{       
 
30
}
 
31
 
 
32
KLedButton::KLedButton(const QColor& col, KLed::State st, KLed::Look look,
 
33
                       KLed::Shape shape, QWidget *parent, const char *name)
 
34
   : KLed( col, st, look, shape, parent, name )
 
35
{
 
36
}
 
37
 
 
38
KLedButton::~KLedButton()
 
39
{
 
40
}
 
41
 
 
42
void KLedButton::mousePressEvent( QMouseEvent *e )
 
43
{
 
44
   if (e->button() == LeftButton)
 
45
   {
 
46
      toggle();
 
47
      emit stateChanged( state() );
 
48
   }
 
49
}
 
50
 
 
51
#include "kledbutton.moc"