Initial commit
[keepassx] / src / lib / UrlLabel.h
1 /***************************************************************************
2  *   Copyright (C) 2005 by Tarek Saidi                                     *
3  *   tarek@linux                                                           *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; version 2 of the License.               *
8
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #ifndef _LINKLABEL_H_
22 #define _LINKLABEL_H_
23
24 class LinkLabel : public QLabel{
25         Q_OBJECT
26         
27         public:
28                 LinkLabel(QWidget *parent,const QString& text=QString::null, int x=0, int y=0,Qt::WFlags f=0);
29                 ~LinkLabel();
30                 void setPos(int x,int y);
31                 QString url();
32
33         public slots:
34                 virtual void setText(const QString&);
35
36         signals:
37                 void clicked();
38
39         protected:
40                 virtual void mouseReleaseEvent(QMouseEvent* event);
41
42         private:
43                 QString URL;
44
45 };
46
47 #endif