~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to src/tools/qdoc/doc/examples/cpp.qdoc

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
Import upstream version 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
 
4
** Contact: http://www.qt-project.org/legal
 
5
**
 
6
** This file is part of the documentation of the Qt Toolkit.
 
7
**
 
8
** $QT_BEGIN_LICENSE:FDL$
 
9
** Commercial License Usage
 
10
** Licensees holding valid commercial Qt licenses may use this file in
 
11
** accordance with the commercial license agreement provided with the
 
12
** Software or, alternatively, in accordance with the terms contained in
 
13
** a written agreement between you and Digia.  For licensing terms and
 
14
** conditions see http://qt.digia.com/licensing.  For further information
 
15
** use the contact form at http://qt.digia.com/contact-us.
 
16
**
 
17
** GNU Free Documentation License Usage
 
18
** Alternatively, this file may be used under the terms of the GNU Free
 
19
** Documentation License version 1.3 as published by the Free Software
 
20
** Foundation and appearing in the file included in the packaging of
 
21
** this file.  Please review the following information to ensure
 
22
** the GNU Free Documentation License version 1.3 requirements
 
23
** will be met: http://www.gnu.org/copyleft/fdl.html.
 
24
** $QT_END_LICENSE$
 
25
**
 
26
****************************************************************************/
 
27
 
 
28
//![class]
 
29
/*!
 
30
    \class QCache
 
31
    \brief The QCache class is a template class that provides a cache.
 
32
 
 
33
    \ingroup tools
 
34
    \ingroup shared
 
35
 
 
36
    \reentrant
 
37
 
 
38
    QCache\<Key, T\> defines a cache that stores objects of type T
 
39
    associated with keys of type Key. For example, here's the
 
40
    definition of a cache that stores objects of type Employee
 
41
    associated with an integer key:
 
42
 
 
43
    \snippet code/doc_src_qcache.cpp 0
 
44
 
 
45
    Here's how to insert an object in the cache:
 
46
 
 
47
    \snippet code/doc_src_qcache.cpp 1
 
48
 
 
49
    ... detailed description ommitted
 
50
 
 
51
    \sa QPixmapCache, QHash, QMap
 
52
*/
 
53
//![class]
 
54
 
 
55
//![function]
 
56
/*!
 
57
  \fn QString &QString::remove(int position, int n)
 
58
 
 
59
  Removes \a n characters from the string, starting at the given \a
 
60
  position index, and returns a reference to the string.
 
61
 
 
62
  If the specified \a position index is within the string, but \a
 
63
  position + \a n is beyond the end of the string, the string is
 
64
  truncated at the specified \a position.
 
65
 
 
66
  \snippet qstring/main.cpp 37
 
67
 
 
68
  \sa insert(), replace()
 
69
*/
 
70
QString &QString::remove(int pos, int len)
 
71
//! [function]
 
72
 
 
73
//! [return]
 
74
/*!
 
75
    Returns \c true if a QScroller object was already created for \a target; \c false otherwise.
 
76
 
 
77
    \sa scroller()
 
78
*/
 
79
bool QScroller::hasScroller(QObject *target)
 
80
//! [return]
 
81
 
 
82
//! [property]
 
83
/*!
 
84
    \property QVariantAnimation::duration
 
85
    \brief the duration of the animation
 
86
 
 
87
    This property describes the duration in milliseconds of the
 
88
    animation. The default duration is 250 milliseconds.
 
89
 
 
90
    \sa QAbstractAnimation::duration()
 
91
 */
 
92
int QVariantAnimation::duration() const
 
93
//! [property]
 
94
 
 
95
//! [signals]
 
96
/*!
 
97
  \fn QAbstractTransition::triggered()
 
98
 
 
99
  This signal is emitted when the transition has been triggered (after
 
100
  onTransition() has been called).
 
101
*/
 
102
//! [signals]
 
103
 
 
104
//! [enums]
 
105
/*!
 
106
    \enum QSql::TableType
 
107
 
 
108
    This enum type describes types of SQL tables.
 
109
 
 
110
    \value Tables  All the tables visible to the user.
 
111
    \value SystemTables  Internal tables used by the database.
 
112
    \value Views  All the views visible to the user.
 
113
    \value AllTables  All of the above.
 
114
*/
 
115
//! [enums]
 
116
 
 
117
//! [overloaded notifier]
 
118
/*!
 
119
\property QSpinBox::value
 
120
\brief the value of the spin box
 
121
 
 
122
setValue() will emit valueChanged() if the new value is different
 
123
from the old one. The \l{QSpinBox::}{value} property has a second notifier
 
124
signal which includes the spin box's prefix and suffix.
 
125
*/
 
126
//! [overloaded notifier]