Move from SLabel to ActiveLabel
[shopper.git] / src / ui / ActiveLabel.h
blob01f20180b4fc4a0a40cc748807a51f242ed156e5
1 /* Shopper
2 * Copyright (C) 2008 David Greaves <david@dgreaves.com>
4 * This software is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public License
6 * as published by the Free Software Foundation; either version 2.1 of
7 * the License, or (at your option) any later version.
9 * This software is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this software; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17 * 02110-1301 USA
20 #ifndef ACTIVELABEL_H
21 #define ACTIVELABEL_H
23 #include "shopper.h" // automake, i8n, gettext
24 #include <QLabel>
25 #include <QMouseEvent>
27 namespace Shopper
29 // ActiveLabel a label that emits pressed() when clicked
30 class ActiveLabel: public QLabel
32 Q_OBJECT;
33 public:
34 explicit ActiveLabel(QWidget * parent = 0, Qt::WindowFlags f = 0 );
35 explicit ActiveLabel(const QString & text, QWidget * parent = 0, Qt::WindowFlags f = 0);
36 void mouseReleaseEvent ( QMouseEvent * event );
37 signals:
38 void pressed();
42 #endif // ACTIVELABEL_H