~ubuntu-branches/ubuntu/karmic/psi/karmic

« back to all changes in this revision

Viewing changes to src/widgets/urllabel.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * psitextview.h - PsiIcon-aware QTextView subclass widget
 
3
 * Copyright (C) 2003  Michail Pishchagin
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2.1 of the License, or (at your option) any later version.
 
9
 *
 
10
 * This library 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 GNU
 
13
 * Lesser General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public
 
16
 * License along with this library; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef URLLABEL_H
 
22
#define URLLABEL_H
 
23
 
 
24
#include <QLabel>
 
25
 
 
26
class QWidget;
 
27
class QObject;
 
28
 
 
29
class URLLabel : public QLabel
 
30
{
 
31
        Q_OBJECT
 
32
 
 
33
        Q_PROPERTY( QString url READ url WRITE setUrl )
 
34
        Q_PROPERTY( QString title READ title WRITE setTitle )
 
35
 
 
36
        Q_OVERRIDE( QString text DESIGNABLE false SCRIPTABLE false )
 
37
        //Q_OVERRIDE( TextFormat DESIGNABLE false SCRIPTABLE false )
 
38
 
 
39
public:
 
40
        URLLabel(QWidget *parent = 0);
 
41
        ~URLLabel();
 
42
 
 
43
        const QString &url() const;
 
44
        void setUrl(const QString &);
 
45
 
 
46
        const QString &title() const;
 
47
        void setTitle(const QString &);
 
48
 
 
49
protected:
 
50
        virtual void contextMenuEvent(QContextMenuEvent *);
 
51
        virtual void mouseReleaseEvent(QMouseEvent *);
 
52
        
 
53
        void updateText();
 
54
 
 
55
public:
 
56
        class Private;
 
57
private:
 
58
        Private *d;
 
59
};
 
60
 
 
61
#endif