~ubuntu-branches/ubuntu/lucid/qt4-x11/lucid

« back to all changes in this revision

Viewing changes to doc/html/graphicsview-flowlayout-window-cpp.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi, Jonathan Riddell, Alessandro Ghersi
  • Date: 2010-02-25 02:23:43 UTC
  • mfrom: (1.1.29 upstream)
  • Revision ID: james.westby@ubuntu.com-20100225022343-qy63knnsv86fi6tc
Tags: 4:4.6.2-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Update kubuntu_07_phonon_4.3.80.diff
* Update 05_append_qt4_target.diff

[ Alessandro Ghersi ]
* Update patches:
  - 0180-window-role.diff
  - 15_fix_qmake_makefile_generation.diff
  - 18_enable_qt3support_qtwebkit_debug_info.diff
  - 81_hurd_architecture.diff
  - 82_hurd_SA_SIGINFO.diff
  - 96_powerpc_no_gc_sections.diff
* Sync 92_armel_gcc43_valist_compat.diff with Debian
* Add kubuntu_11_fix_main_window_without_central_widget.diff (LP: #515132)
  (backport from Qt 4.6.3)
* In libqt4-dbg add conflicts with qt-x11-free-dbg (LP: #517263)
* qt4-dev-tools replaces libqt4-core (<= 4.5.3really4.5.2-0ubuntu1)
  (LP: #527534)
* Sync manpages/qdbus.1 with Debian
  - Update libqt4-dev.manpages
* qt4-dev-tools conflicts with qt3-dev-tools-embedded
* qt4-dev-tools suggests qt4-doc-html
* Update all symbol files
* Bump build dependency of debhelper and pkg-kde-tools to version 0.6.4 as it
  is needed to handle symbol files and build with pkgkde symbolshelper and
  parallel addon
* Call dh_auto_build instead of $(MAKE) for parallel build
* In override_dh_makeshlibs: do not FTBS if there are lost symbols
* Drop rules to generating libphonon4 symbols, no longer need

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<head>
 
6
  <title>Qt 4.6: window.cpp Example File (graphicsview/flowlayout/window.cpp)</title>
 
7
  <link href="classic.css" rel="stylesheet" type="text/css" />
 
8
</head>
 
9
<body>
 
10
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
11
<tr>
 
12
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
13
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">window.cpp Example File<br /><span class="small-subtitle">graphicsview/flowlayout/window.cpp</span>
 
14
</h1>
 
15
<pre><span class="comment"> /****************************************************************************
 
16
 **
 
17
 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 
18
 ** All rights reserved.
 
19
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 
20
 **
 
21
 ** This file is part of the examples of the Qt Toolkit.
 
22
 **
 
23
 ** $QT_BEGIN_LICENSE:LGPL$
 
24
 ** Commercial Usage
 
25
 ** Licensees holding valid Qt Commercial licenses may use this file in
 
26
 ** accordance with the Qt Commercial License Agreement provided with the
 
27
 ** Software or, alternatively, in accordance with the terms contained in
 
28
 ** a written agreement between you and Nokia.
 
29
 **
 
30
 ** GNU Lesser General Public License Usage
 
31
 ** Alternatively, this file may be used under the terms of the GNU Lesser
 
32
 ** General Public License version 2.1 as published by the Free Software
 
33
 ** Foundation and appearing in the file LICENSE.LGPL included in the
 
34
 ** packaging of this file.  Please review the following information to
 
35
 ** ensure the GNU Lesser General Public License version 2.1 requirements
 
36
 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 
37
 **
 
38
 ** In addition, as a special exception, Nokia gives you certain additional
 
39
 ** rights.  These rights are described in the Nokia Qt LGPL Exception
 
40
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 
41
 **
 
42
 ** GNU General Public License Usage
 
43
 ** Alternatively, this file may be used under the terms of the GNU
 
44
 ** General Public License version 3.0 as published by the Free Software
 
45
 ** Foundation and appearing in the file LICENSE.GPL included in the
 
46
 ** packaging of this file.  Please review the following information to
 
47
 ** ensure the GNU General Public License version 3.0 requirements will be
 
48
 ** met: http://www.gnu.org/copyleft/gpl.html.
 
49
 **
 
50
 ** If you have questions regarding the use of this file, please contact
 
51
 ** Nokia at qt-info@nokia.com.
 
52
 ** $QT_END_LICENSE$
 
53
 **
 
54
 ****************************************************************************/</span>
 
55
 
 
56
 #include &lt;QtGui/qgraphicsproxywidget.h&gt;
 
57
 #include &lt;QtGui/qlabel.h&gt;
 
58
 #include &quot;flowlayout.h&quot;
 
59
 #include &quot;window.h&quot;
 
60
 
 
61
 Window::Window()
 
62
 : QGraphicsWidget(0, Qt::Window)
 
63
 {
 
64
     FlowLayout *lay = new FlowLayout;
 
65
     QLatin1String wiseWords(&quot;I am not bothered by the fact that I am unknown.&quot;
 
66
     &quot; I am bothered when I do not know others. (Confucius)&quot;);
 
67
     QString sentence(wiseWords);
 
68
     QStringList words = sentence.split(QLatin1Char(' '), QString::SkipEmptyParts);
 
69
     for (int i = 0; i &lt; words.count(); ++i) {
 
70
         QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this);
 
71
         QLabel *label = new QLabel(words.at(i));
 
72
         label-&gt;setFrameStyle(QFrame::Box | QFrame::Plain);
 
73
         proxy-&gt;setWidget(label);
 
74
         lay-&gt;addItem(proxy);
 
75
     }
 
76
     setLayout(lay);
 
77
 }</pre>
 
78
<p /><address><hr /><div align="center">
 
79
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
80
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
 
81
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
82
<td width="40%" align="right"><div align="right">Qt 4.6.2</div></td>
 
83
</tr></table></div></address></body>
 
84
</html>