VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/include/QIRichLabel.h@ 9382

Last change on this file since 9382 was 9382, checked in by vboxsync, 17 years ago

FE/Qt4: Initial version of the ported QIRichLabel class.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.6 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VirtualBox Qt extensions: QIRichLabel class declaration
5 */
6
7/*
8 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23/*
24 * This class is based on the original QLabel implementation.
25 */
26
27#ifndef __QIRichLabel_h__
28#define __QIRichLabel_h__
29
30/* Qt includes */
31#include <QWidget>
32
33class QILabelPrivate;
34
35class QIRichLabel: public QWidget
36{
37 Q_OBJECT;
38
39public:
40
41 QIRichLabel (QWidget *aParent = NULL, Qt::WindowFlags aFlags = 0);
42 QIRichLabel (const QString &aText, QWidget *aParent = NULL, Qt::WindowFlags aFlags = 0);
43
44 /* QLabel extensions */
45 bool fullSizeSelection () const;
46 void setFullSizeSelection (bool bOn);
47
48 /* Default QLabel methods */
49 Qt::Alignment alignment() const;
50 QWidget * buddy() const;
51 bool hasScaledContents() const;
52 int indent() const;
53 int margin() const;
54 QMovie *movie() const;
55 bool openExternalLinks() const;
56 const QPicture *picture() const;
57 const QPixmap *pixmap() const;
58 void setAlignment (Qt::Alignment aAlignment);
59 void setBuddy (QWidget *aBuddy);
60 void setIndent (int aIndent);
61 void setMargin (int aMargin);
62 void setOpenExternalLinks (bool aOpen);
63 void setScaledContents (bool aOn);
64 void setTextFormat (Qt::TextFormat aFormat);
65 void setTextInteractionFlags (Qt::TextInteractionFlags aFlags);
66 void setWordWrap (bool aOn);
67 QString text() const;
68 Qt::TextFormat textFormat() const;
69 Qt::TextInteractionFlags textInteractionFlags() const;
70 bool wordWrap() const;
71
72public slots:
73
74 void clear();
75 void setMovie (QMovie *aMovie);
76 void setNum (int aNum);
77 void setNum (double aNum);
78 void setPicture (const QPicture &aPicture);
79 void setPixmap (const QPixmap &aPixmap);
80 void setText (const QString &aText);
81
82signals:
83
84 void linkActivated (const QString &);
85 void linkHovered (const QString &);
86
87protected:
88
89 virtual void init();
90
91 /* Protected member vars */
92 QILabelPrivate *mLabel;
93};
94
95#endif // __QIRichLabel_h__
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette