summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible.cpp2
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp5
-rw-r--r--src/gui/dialogs/qcolordialog.cpp4
-rw-r--r--src/gui/dialogs/qdialog.cpp4
-rw-r--r--src/gui/dialogs/qerrormessage.cpp3
-rw-r--r--src/gui/dialogs/qfiledialog.cpp4
-rw-r--r--src/gui/dialogs/qfontdialog.cpp5
-rw-r--r--src/gui/dialogs/qinputdialog.cpp4
-rw-r--r--src/gui/dialogs/qmessagebox.cpp4
-rw-r--r--src/gui/dialogs/qpagesetupdialog.cpp46
-rw-r--r--src/gui/dialogs/qprintdialog.qdoc72
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp3
-rw-r--r--src/gui/dialogs/qprogressdialog.cpp4
-rw-r--r--src/gui/embedded/qdirectpainter_qws.cpp2
-rw-r--r--src/gui/embedded/qlock.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp33
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h9
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h10
-rw-r--r--src/gui/graphicsview/qgraphicsitemanimation.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicslayout.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicslayout.h2
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.h2
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp10
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h1
-rw-r--r--src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp9
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp1
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp5
-rw-r--r--src/gui/graphicsview/qgraphicswidget.h1
-rw-r--r--src/gui/image/qbitmap.cpp2
-rw-r--r--src/gui/image/qicon.cpp4
-rw-r--r--src/gui/image/qiconengine.cpp4
-rw-r--r--src/gui/image/qimage.cpp11
-rw-r--r--src/gui/image/qimagereader.cpp2
-rw-r--r--src/gui/image/qimagewriter.cpp2
-rw-r--r--src/gui/image/qmovie.cpp2
-rw-r--r--src/gui/image/qpicture.cpp6
-rw-r--r--src/gui/image/qpixmap.cpp4
-rw-r--r--src/gui/image/qpixmap_mac.cpp11
-rw-r--r--src/gui/image/qpixmapcache.cpp3
-rw-r--r--src/gui/image/qpixmapfilter.cpp8
-rw-r--r--src/gui/inputmethod/qinputcontextfactory.cpp1
-rw-r--r--src/gui/itemviews/qabstractitemdelegate.cpp2
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp2
-rw-r--r--src/gui/itemviews/qcolumnview.cpp2
-rw-r--r--src/gui/itemviews/qheaderview.cpp5
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp2
-rw-r--r--src/gui/itemviews/qitemselectionmodel.cpp22
-rw-r--r--src/gui/itemviews/qlistview.cpp12
-rw-r--r--src/gui/itemviews/qlistwidget.cpp2
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp179
-rw-r--r--src/gui/itemviews/qstringlistmodel.cpp2
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.cpp2
-rw-r--r--src/gui/itemviews/qtableview.cpp2
-rw-r--r--src/gui/itemviews/qtablewidget.cpp2
-rw-r--r--src/gui/itemviews/qtreeview.cpp2
-rw-r--r--src/gui/itemviews/qtreewidget.cpp4
-rw-r--r--src/gui/kernel/qaction.cpp4
-rw-r--r--src/gui/kernel/qactiongroup.cpp2
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--src/gui/kernel/qapplication_x11.cpp18
-rw-r--r--src/gui/kernel/qboxlayout.cpp5
-rw-r--r--src/gui/kernel/qclipboard.cpp4
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm77
-rw-r--r--src/gui/kernel/qcursor.cpp2
-rw-r--r--src/gui/kernel/qdesktopwidget.qdoc264
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm2
-rw-r--r--src/gui/kernel/qformlayout.cpp2
-rw-r--r--src/gui/kernel/qgridlayout.cpp3
-rw-r--r--src/gui/kernel/qkeymapper.cpp1
-rw-r--r--src/gui/kernel/qkeysequence.cpp3
-rw-r--r--src/gui/kernel/qlayout.cpp1
-rw-r--r--src/gui/kernel/qlayoutitem.cpp3
-rw-r--r--src/gui/kernel/qmime_mac.cpp3
-rw-r--r--src/gui/kernel/qmime_win.cpp2
-rw-r--r--src/gui/kernel/qpalette.cpp4
-rw-r--r--src/gui/kernel/qshortcut.cpp2
-rw-r--r--src/gui/kernel/qsizepolicy.qdoc521
-rw-r--r--src/gui/kernel/qsound.cpp2
-rw-r--r--src/gui/kernel/qstackedlayout.cpp2
-rw-r--r--src/gui/kernel/qtooltip.cpp2
-rw-r--r--src/gui/kernel/qwhatsthis.cpp2
-rw-r--r--src/gui/kernel/qwidget.cpp44
-rw-r--r--src/gui/kernel/qwidget_mac.mm98
-rw-r--r--src/gui/kernel/qwidgetaction.cpp5
-rw-r--r--src/gui/math3d/qgenericmatrix.cpp2
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp22
-rw-r--r--src/gui/math3d/qquaternion.cpp1
-rw-r--r--src/gui/math3d/qvector2d.cpp2
-rw-r--r--src/gui/math3d/qvector3d.cpp1
-rw-r--r--src/gui/math3d/qvector4d.cpp1
-rw-r--r--src/gui/painting/painting.pri3
-rw-r--r--src/gui/painting/qblendfunctions.cpp633
-rw-r--r--src/gui/painting/qbrush.cpp10
-rw-r--r--src/gui/painting/qcolor.cpp4
-rw-r--r--src/gui/painting/qcolormap.qdoc152
-rw-r--r--src/gui/painting/qdrawhelper_p.h9
-rw-r--r--src/gui/painting/qmatrix.cpp2
-rw-r--r--src/gui/painting/qpaintdevice.cpp2
-rw-r--r--src/gui/painting/qpaintdevice.qdoc289
-rw-r--r--src/gui/painting/qpaintdevice_qws.cpp33
-rw-r--r--src/gui/painting/qpaintengine.cpp2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp85
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp16
-rw-r--r--src/gui/painting/qpainter.cpp4
-rw-r--r--src/gui/painting/qpainterpath.cpp4
-rw-r--r--src/gui/painting/qpen.cpp4
-rw-r--r--src/gui/painting/qpolygon.cpp4
-rw-r--r--src/gui/painting/qprinter.cpp6
-rw-r--r--src/gui/painting/qprinterinfo.qdoc139
-rw-r--r--src/gui/painting/qregion.cpp2
-rw-r--r--src/gui/painting/qstylepainter.cpp2
-rw-r--r--src/gui/painting/qtransform.cpp2
-rw-r--r--src/gui/styles/qmacstyle.qdoc261
-rw-r--r--src/gui/styles/qstyleoption.cpp2
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qfont.cpp9
-rw-r--r--src/gui/text/qfontdatabase.cpp6
-rw-r--r--src/gui/text/qfontmetrics.cpp6
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp2
-rw-r--r--src/gui/text/qtextcontrol.cpp2
-rw-r--r--src/gui/text/qtextcursor.cpp6
-rw-r--r--src/gui/text/qtextdocument.cpp4
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp2
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp2
-rw-r--r--src/gui/text/qtextformat.cpp20
-rw-r--r--src/gui/text/qtextlayout.cpp6
-rw-r--r--src/gui/text/qtextlist.cpp2
-rw-r--r--src/gui/text/qtextobject.cpp26
-rw-r--r--src/gui/text/qtextobject_p.h2
-rw-r--r--src/gui/text/qtextoption.cpp2
-rw-r--r--src/gui/text/qtexttable.cpp4
-rw-r--r--src/gui/text/qtexttable_p.h2
-rw-r--r--src/gui/util/qsystemtrayicon.cpp1
-rw-r--r--src/gui/util/qundogroup.cpp1
-rw-r--r--src/gui/util/qundostack.cpp2
-rw-r--r--src/gui/util/qundoview.cpp2
-rw-r--r--src/gui/widgets/qbuttongroup.cpp2
-rw-r--r--src/gui/widgets/qcalendarwidget.cpp2
-rw-r--r--src/gui/widgets/qcheckbox.cpp2
-rw-r--r--src/gui/widgets/qcombobox.cpp2
-rw-r--r--src/gui/widgets/qcommandlinkbutton.cpp2
-rw-r--r--src/gui/widgets/qdatetimeedit.cpp6
-rw-r--r--src/gui/widgets/qdial.cpp2
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp4
-rw-r--r--src/gui/widgets/qdockwidget.cpp2
-rw-r--r--src/gui/widgets/qfocusframe.cpp2
-rw-r--r--src/gui/widgets/qfontcombobox.cpp1
-rw-r--r--src/gui/widgets/qframe.cpp2
-rw-r--r--src/gui/widgets/qgroupbox.cpp2
-rw-r--r--src/gui/widgets/qlabel.cpp2
-rw-r--r--src/gui/widgets/qlcdnumber.cpp2
-rw-r--r--src/gui/widgets/qlineedit.cpp4
-rw-r--r--src/gui/widgets/qmainwindow.cpp4
-rw-r--r--src/gui/widgets/qmdiarea.cpp4
-rw-r--r--src/gui/widgets/qmdisubwindow.cpp4
-rw-r--r--src/gui/widgets/qmenu.cpp4
-rw-r--r--src/gui/widgets/qmenubar.cpp5
-rw-r--r--src/gui/widgets/qplaintextedit.cpp7
-rw-r--r--src/gui/widgets/qprintpreviewwidget.cpp2
-rw-r--r--src/gui/widgets/qprogressbar.cpp2
-rw-r--r--src/gui/widgets/qpushbutton.cpp2
-rw-r--r--src/gui/widgets/qradiobutton.cpp2
-rw-r--r--src/gui/widgets/qrubberband.cpp3
-rw-r--r--src/gui/widgets/qscrollarea.cpp2
-rw-r--r--src/gui/widgets/qsizegrip.cpp3
-rw-r--r--src/gui/widgets/qslider.cpp2
-rw-r--r--src/gui/widgets/qspinbox.cpp4
-rw-r--r--src/gui/widgets/qsplashscreen.cpp3
-rw-r--r--src/gui/widgets/qsplitter.cpp2
-rw-r--r--src/gui/widgets/qstackedwidget.cpp3
-rw-r--r--src/gui/widgets/qstatusbar.cpp4
-rw-r--r--src/gui/widgets/qtabbar.cpp2
-rw-r--r--src/gui/widgets/qtabwidget.cpp2
-rw-r--r--src/gui/widgets/qtextbrowser.cpp2
-rw-r--r--src/gui/widgets/qtextedit.cpp4
-rw-r--r--src/gui/widgets/qtoolbar.cpp4
-rw-r--r--src/gui/widgets/qtoolbox.cpp2
-rw-r--r--src/gui/widgets/qtoolbutton.cpp2
-rw-r--r--src/gui/widgets/qvalidator.cpp9
-rw-r--r--src/gui/widgets/qworkspace.cpp1
187 files changed, 2992 insertions, 595 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index abeca0d..9084817 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
relating to accessibility.
\ingroup accessibility
- \mainclass
+
Accessible applications can be used by people who are not able to
use applications by conventional means.
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index ac4c9e8..9e91382 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -59,6 +59,8 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
\brief The QAbstractPrintDialog class provides a base implementation for
print dialogs used to configure printers.
+ \ingroup printing
+
This class implements getter and setter functions that are used to
customize settings shown in print dialogs, but it is not used directly.
Use QPrintDialog to display a print dialog in your application.
@@ -357,7 +359,8 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
\brief The QPrintDialog class provides a dialog for specifying
the printer's configuration.
- \ingroup dialogs
+ \ingroup standard-dialogs
+ \ingroup printing
The dialog allows users to change document-related settings, such
as the paper size and orientation, type of print (color or
diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp
index 4a40b48..766dcb4 100644
--- a/src/gui/dialogs/qcolordialog.cpp
+++ b/src/gui/dialogs/qcolordialog.cpp
@@ -1510,9 +1510,7 @@ static const Qt::WindowFlags DefaultWindowFlags =
\class QColorDialog
\brief The QColorDialog class provides a dialog widget for specifying colors.
- \mainclass
- \ingroup dialogs
- \ingroup multimedia
+ \ingroup standard-dialogs
The color dialog's function is to allow users to choose colors.
For example, you might use this in a drawing program to allow the
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp
index cd808b3..5b53637 100644
--- a/src/gui/dialogs/qdialog.cpp
+++ b/src/gui/dialogs/qdialog.cpp
@@ -76,9 +76,9 @@ QT_BEGIN_NAMESPACE
\class QDialog
\brief The QDialog class is the base class of dialog windows.
- \ingroup dialogs
+ \ingroup dialog-classes
\ingroup abstractwidgets
- \mainclass
+
A dialog window is a top-level window mostly used for short-term
tasks and brief communications with the user. QDialogs may be
diff --git a/src/gui/dialogs/qerrormessage.cpp b/src/gui/dialogs/qerrormessage.cpp
index bc9972c..c83f33c 100644
--- a/src/gui/dialogs/qerrormessage.cpp
+++ b/src/gui/dialogs/qerrormessage.cpp
@@ -133,8 +133,7 @@ QSize QErrorMessageTextView::sizeHint() const
\brief The QErrorMessage class provides an error message display dialog.
- \ingroup dialogs
- \ingroup misc
+ \ingroup standard-dialog
An error message widget consists of a text label and a checkbox. The
checkbox lets the user control whether the same error message will be
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index f548912..015ee59 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -89,8 +89,8 @@ Q_GUI_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_hook
/*!
\class QFileDialog
\brief The QFileDialog class provides a dialog that allow users to select files or directories.
- \ingroup dialogs
- \mainclass
+ \ingroup standard-dialogs
+
The QFileDialog class enables a user to traverse the file system in
order to select one or many files or a directory.
diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp
index 3e57585..512dc65 100644
--- a/src/gui/dialogs/qfontdialog.cpp
+++ b/src/gui/dialogs/qfontdialog.cpp
@@ -112,9 +112,8 @@ static const Qt::WindowFlags DefaultWindowFlags =
/*!
\class QFontDialog
- \ingroup dialogs
- \ingroup text
- \mainclass
+ \ingroup standard-dialogs
+
\brief The QFontDialog class provides a dialog widget for selecting a font.
A font dialog is created through one of the static getFont()
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index a2b8304..39a6b07 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -425,8 +425,8 @@ void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
\class QInputDialog
\brief The QInputDialog class provides a simple convenience dialog to get a
single value from the user.
- \ingroup dialogs
- \mainclass
+ \ingroup standard-dialogs
+
The input value can be a string, a number or an item from a list. A label
must be set to tell the user what they should enter.
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 7a81ea5..e8a4f0d 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -434,8 +434,8 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
\brief The QMessageBox class provides a modal dialog for informing
the user or for asking the user a question and receiving an answer.
- \ingroup dialogs
- \mainclass
+ \ingroup standard-dialogs
+
A message box displays a primary \l{QMessageBox::text}{text} to
alert the user to a situation, an \l{QMessageBox::informativeText}
diff --git a/src/gui/dialogs/qpagesetupdialog.cpp b/src/gui/dialogs/qpagesetupdialog.cpp
index 5ca4935..a91eaea 100644
--- a/src/gui/dialogs/qpagesetupdialog.cpp
+++ b/src/gui/dialogs/qpagesetupdialog.cpp
@@ -45,6 +45,52 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QPageSetupDialog
+
+ \brief The QPageSetupDialog class provides a configuration dialog
+ for the page-related options on a printer.
+
+ \ingroup standard-dialogs
+ \ingroup printing
+
+ On Windows and Mac OS X the page setup dialog is implemented using
+ the native page setup dialogs.
+
+ Note that on Windows and Mac OS X custom paper sizes won't be
+ reflected in the native page setup dialogs. Additionally, custom
+ page margins set on a QPrinter won't show in the native Mac OS X
+ page setup dialog.
+
+ \sa QPrinter, QPrintDialog
+*/
+
+
+/*!
+ \fn QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent)
+
+ Constructs a page setup dialog that configures \a printer with \a
+ parent as the parent widget.
+*/
+
+/*!
+ \since 4.5
+
+ \fn QPageSetupDialog::QPageSetupDialog(QWidget *parent)
+
+ Constructs a page setup dialog that configures a default-constructed
+ QPrinter with \a parent as the parent widget.
+
+ \sa printer()
+*/
+
+/*!
+ \fn QPrinter *QPageSetupDialog::printer()
+
+ Returns the printer that was passed to the QPageSetupDialog
+ constructor.
+*/
+
// hack
class QPageSetupDialogPrivate : public QAbstractPageSetupDialogPrivate
{
diff --git a/src/gui/dialogs/qprintdialog.qdoc b/src/gui/dialogs/qprintdialog.qdoc
new file mode 100644
index 0000000..b52edff
--- /dev/null
+++ b/src/gui/dialogs/qprintdialog.qdoc
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef QT3_SUPPORT
+/*!
+ \fn QPrinter *QPrintDialog::printer() const
+
+ Returns a pointer to the printer this dialog configures, or 0 if
+ this dialog does not operate on any printer.
+
+ This function is available for Unix platforms only.
+*/
+
+/*!
+ \fn void QPrintDialog::setPrinter(QPrinter *printer, bool pickupSettings)
+
+ Sets this dialog to configure printer \a printer, or no printer if \a printer
+ is null. If \a pickupSettings is true, the dialog reads most of
+ its settings from \a printer. If \a pickupSettings is false (the
+ default) the dialog keeps its old settings.
+
+ This function is available for Unix platforms only.
+*/
+
+/*!
+ \fn void QPrintDialog::addButton(QPushButton *button)
+
+ Adds the \a button to the layout of the print dialog. The added
+ buttons are arranged from the left to the right below the
+ last groupbox of the printdialog.
+
+ This function is available for Unix platforms only.
+*/
+#endif
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp
index ee16fe5..c053b81 100644
--- a/src/gui/dialogs/qprintpreviewdialog.cpp
+++ b/src/gui/dialogs/qprintpreviewdialog.cpp
@@ -625,6 +625,9 @@ void QPrintPreviewDialogPrivate::_q_zoomFactorChanged()
\brief The QPrintPreviewDialog class provides a dialog for
previewing and configuring page layouts for printer output.
+ \ingroup standard-dialogs
+ \ingroup printing
+
Using QPrintPreviewDialog in your existing application is
straightforward:
diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp
index 1ca1515..d55eadb 100644
--- a/src/gui/dialogs/qprogressdialog.cpp
+++ b/src/gui/dialogs/qprogressdialog.cpp
@@ -196,8 +196,8 @@ void QProgressDialogPrivate::_q_disconnectOnClose()
/*!
\class QProgressDialog
\brief The QProgressDialog class provides feedback on the progress of a slow operation.
- \ingroup dialogs
- \mainclass
+ \ingroup standard-dialogs
+
A progress dialog is used to give the user an indication of how long
an operation is going to take, and to demonstrate that the
diff --git a/src/gui/embedded/qdirectpainter_qws.cpp b/src/gui/embedded/qdirectpainter_qws.cpp
index bae6ed9..bba862b 100644
--- a/src/gui/embedded/qdirectpainter_qws.cpp
+++ b/src/gui/embedded/qdirectpainter_qws.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QDirectPainter
- \ingroup multimedia
+ \ingroup painting
\ingroup qws
\brief The QDirectPainter class provides direct access to the
diff --git a/src/gui/embedded/qlock.cpp b/src/gui/embedded/qlock.cpp
index 0f88832..c32e9b5 100644
--- a/src/gui/embedded/qlock.cpp
+++ b/src/gui/embedded/qlock.cpp
@@ -128,7 +128,6 @@ public:
\brief The QLock class is a wrapper for a System V shared semaphore.
\ingroup qws
- \ingroup io
\internal
diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp
index ee7048f..0fb284f 100644
--- a/src/gui/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp
@@ -44,7 +44,7 @@
\brief The QGraphicsGridLayout class provides a grid layout for managing
widgets in Graphics View.
\since 4.4
- \ingroup multimedia
+
\ingroup graphicsview-api
The most common way to use QGraphicsGridLayout is to construct an object
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 66f5f22..50b5b9e 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -44,7 +44,7 @@
\brief The QGraphicsItem class is the base class for all graphical
items in a QGraphicsScene.
\since 4.2
- \ingroup multimedia
+
\ingroup graphicsview-api
It provides a light-weight foundation for writing your own custom items.
@@ -328,6 +328,10 @@
used for Asian languages.
This flag was introduced in Qt 4.6.
+ \value ItemNegativeZStacksBehindParent The item automatically stacks behind
+ it's parent if it's z-value is negative. This flag enables setZValue() to
+ toggle ItemStacksBehindParent.
+
\value ItemAutoDetectsFocusProxy The item will assign any child that
gains input focus as its focus proxy. See also focusProxy().
This flag was introduced in Qt 4.6.
@@ -1563,6 +1567,11 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags)
d_ptr->scene->d_func()->updateInputMethodSensitivityInViews();
}
+ if ((flags & ItemNegativeZStacksBehindParent) != (oldFlags & ItemNegativeZStacksBehindParent)) {
+ // Update stack-behind.
+ setFlag(ItemStacksBehindParent, d_ptr->z < qreal(0.0));
+ }
+
if (d_ptr->scene) {
d_ptr->scene->d_func()->markDirty(this, QRectF(),
/*invalidateChildren=*/true,
@@ -3829,6 +3838,9 @@ void QGraphicsItem::setZValue(qreal z)
itemChange(ItemZValueHasChanged, newZVariant);
+ if (d_ptr->flags & ItemNegativeZStacksBehindParent)
+ setFlag(QGraphicsItem::ItemStacksBehindParent, z < qreal(0.0));
+
if (d_ptr->isObject)
emit static_cast<QGraphicsObject *>(this)->zChanged();
}
@@ -6952,11 +6964,12 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent
By default, this property is true.
- \sa QGraphicsItem::isEnabled(), QGraphicsItem::setEnabled(), enabledChanged()
+ \sa QGraphicsItem::isEnabled(), QGraphicsItem::setEnabled()
+ \sa QGraphicsObject::enabledChanged()
*/
/*!
- \fn QGraphicsObject::enabledChanged()
+ \fn void QGraphicsObject::enabledChanged()
This signal gets emitted whenever the item get's enabled or disabled.
@@ -7008,7 +7021,7 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent
\brief The QAbstractGraphicsShapeItem class provides a common base for
all path items.
\since 4.2
- \ingroup multimedia
+ \ingroup graphicsview-api
This class does not fully implement an item by itself; in particular, it
does not implement boundingRect() and paint(), which are inherited by
@@ -7143,7 +7156,6 @@ QPainterPath QAbstractGraphicsShapeItem::opaqueArea() const
\brief The QGraphicsPathItem class provides a path item that you
can add to a QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
To set the item's path, pass a QPainterPath to QGraphicsPathItem's
@@ -7346,7 +7358,6 @@ QVariant QGraphicsPathItem::extension(const QVariant &variant) const
\brief The QGraphicsRectItem class provides a rectangle item that you
can add to a QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
To set the item's rectangle, pass a QRectF to QGraphicsRectItem's
@@ -7591,7 +7602,6 @@ QVariant QGraphicsRectItem::extension(const QVariant &variant) const
\brief The QGraphicsEllipseItem class provides an ellipse item that you
can add to a QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
QGraphicsEllipseItem respresents an ellipse with a fill and an outline,
@@ -7908,7 +7918,6 @@ QVariant QGraphicsEllipseItem::extension(const QVariant &variant) const
\brief The QGraphicsPolygonItem class provides a polygon item that you
can add to a QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
To set the item's polygon, pass a QPolygonF to
@@ -8142,7 +8151,6 @@ QVariant QGraphicsPolygonItem::extension(const QVariant &variant) const
\brief The QGraphicsLineItem class provides a line item that you can add to a
QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
To set the item's line, pass a QLineF to QGraphicsLineItem's
@@ -8404,7 +8412,6 @@ QVariant QGraphicsLineItem::extension(const QVariant &variant) const
\brief The QGraphicsPixmapItem class provides a pixmap item that you can add to
a QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
To set the item's pixmap, pass a QPixmap to QGraphicsPixmapItem's
@@ -8768,7 +8775,6 @@ QVariant QGraphicsPixmapItem::extension(const QVariant &variant) const
\brief The QGraphicsTextItem class provides a text item that you can add to
a QGraphicsScene to display formatted text.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
If you only need to show plain text in an item, consider using QGraphicsSimpleTextItem
@@ -9633,7 +9639,6 @@ void QGraphicsSimpleTextItemPrivate::updateBoundingRect()
\brief The QGraphicsSimpleTextItem class provides a simple text path item
that you can add to a QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
To set the item's text, you can either pass a QString to
@@ -9869,7 +9874,6 @@ QVariant QGraphicsSimpleTextItem::extension(const QVariant &variant) const
\brief The QGraphicsItemGroup class provides treating a group of items as
one.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
A QGraphicsItemGroup is a special type of compound item that
@@ -10342,6 +10346,9 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag)
case QGraphicsItem::ItemAcceptsInputMethod:
str = "ItemAcceptsInputMethod";
break;
+ case QGraphicsItem::ItemNegativeZStacksBehindParent:
+ str = "ItemNegativeZStacksBehindParent";
+ break;
case QGraphicsItem::ItemAutoDetectsFocusProxy:
str = "ItemAutoDetectsFocusProxy";
break;
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index fdf9463..b4c7ed8 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -102,7 +102,8 @@ public:
ItemHasNoContents = 0x400,
ItemSendsGeometryChanges = 0x800,
ItemAcceptsInputMethod = 0x1000,
- ItemAutoDetectsFocusProxy = 0x2000
+ ItemAutoDetectsFocusProxy = 0x2000,
+ ItemNegativeZStacksBehindParent = 0x4000
// NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag.
};
Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag)
@@ -460,6 +461,7 @@ private:
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
+Q_DECLARE_INTERFACE(QGraphicsItem, "com.trolltech.Qt.QGraphicsItem")
inline void QGraphicsItem::setPos(qreal ax, qreal ay)
{ setPos(QPointF(ax, ay)); }
@@ -512,9 +514,9 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
Q_OBJECT
Q_PROPERTY(QGraphicsObject * parent READ parentObject WRITE setParentItem NOTIFY parentChanged DESIGNABLE false)
Q_PROPERTY(QString id READ objectName WRITE setObjectName)
- Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
+ Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
- Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
+ Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(QPointF pos READ pos WRITE setPos)
Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
@@ -522,6 +524,7 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint WRITE setTransformOriginPoint)
+ Q_INTERFACES(QGraphicsItem)
public:
QGraphicsObject(QGraphicsItem *parent = 0);
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index a6f833c..a5854b1 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -96,7 +96,7 @@ public:
void purge();
};
-class Q_AUTOTEST_EXPORT QGraphicsItemPrivate
+class Q_GUI_EXPORT QGraphicsItemPrivate
{
Q_DECLARE_PUBLIC(QGraphicsItem)
public:
@@ -170,6 +170,7 @@ public:
sceneTransformTranslateOnly(0),
notifyBoundingRectChanged(0),
notifyInvalidated(0),
+ mouseSetsFocus(1),
globalStackingOrder(-1),
q_ptr(0)
{
@@ -206,7 +207,7 @@ public:
virtual QVariant inputMethodQueryHelper(Qt::InputMethodQuery query) const;
static bool movableAncestorIsSelected(const QGraphicsItem *item);
- void setPosHelper(const QPointF &pos);
+ virtual void setPosHelper(const QPointF &pos);
void setTransformHelper(const QTransform &transform);
void appendGraphicsTransform(QGraphicsTransform *t);
void setVisibleHelper(bool newVisible, bool explicitly, bool update = true);
@@ -458,7 +459,7 @@ public:
// New 32 bits
quint32 fullUpdatePending : 1;
- quint32 flags : 14;
+ quint32 flags : 15;
quint32 dirtyChildrenBoundingRect : 1;
quint32 paintedViewBoundingRectsNeedRepaint : 1;
quint32 dirtySceneTransform : 1;
@@ -473,7 +474,8 @@ public:
quint32 sceneTransformTranslateOnly : 1;
quint32 notifyBoundingRectChanged : 1;
quint32 notifyInvalidated : 1;
- quint32 unused : 3; // feel free to use
+ quint32 mouseSetsFocus : 1;
+ quint32 unused : 1; // feel free to use
// Optional stacking order
int globalStackingOrder;
diff --git a/src/gui/graphicsview/qgraphicsitemanimation.cpp b/src/gui/graphicsview/qgraphicsitemanimation.cpp
index 0d7a3c6..c9b95ad 100644
--- a/src/gui/graphicsview/qgraphicsitemanimation.cpp
+++ b/src/gui/graphicsview/qgraphicsitemanimation.cpp
@@ -44,7 +44,6 @@
\brief The QGraphicsItemAnimation class provides simple animation
support for QGraphicsItem.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
The QGraphicsItemAnimation class animates a QGraphicsItem. You can
diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp
index 3f039c6..58c174c 100644
--- a/src/gui/graphicsview/qgraphicslayout.cpp
+++ b/src/gui/graphicsview/qgraphicslayout.cpp
@@ -57,7 +57,6 @@ QT_BEGIN_NAMESPACE
\brief The QGraphicsLayout class provides the base class for all layouts
in Graphics View.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
QGraphicsLayout is an abstract class that defines a virtual API for
diff --git a/src/gui/graphicsview/qgraphicslayout.h b/src/gui/graphicsview/qgraphicslayout.h
index d7e087b..1a21e53 100644
--- a/src/gui/graphicsview/qgraphicslayout.h
+++ b/src/gui/graphicsview/qgraphicslayout.h
@@ -85,6 +85,8 @@ private:
friend class QGraphicsWidget;
};
+Q_DECLARE_INTERFACE(QGraphicsLayout, "com.trolltech.Qt.QGraphicsLayout")
+
#endif
QT_END_NAMESPACE
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index 83e4888..6a25ade 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -264,7 +264,6 @@ void QGraphicsLayoutItemPrivate::setSizeComponent(
\brief The QGraphicsLayoutItem class can be inherited to allow your custom
items to be managed by layouts.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
QGraphicsLayoutItem is an abstract class that defines a set of virtual
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.h b/src/gui/graphicsview/qgraphicslayoutitem.h
index 44c1c0f..f315404 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.h
+++ b/src/gui/graphicsview/qgraphicslayoutitem.h
@@ -121,6 +121,8 @@ private:
friend class QGraphicsLayout;
};
+Q_DECLARE_INTERFACE(QGraphicsLayoutItem, "com.trolltech.Qt.QGraphicsLayoutItem")
+
inline void QGraphicsLayoutItem::setMinimumSize(qreal aw, qreal ah)
{ setMinimumSize(QSizeF(aw, ah)); }
inline void QGraphicsLayoutItem::setPreferredSize(qreal aw, qreal ah)
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index c0ff00e..185780a 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -44,7 +44,6 @@
\brief The QGraphicsLinearLayout class provides a horizontal or vertical
layout for managing widgets in Graphics View.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
The default orientation for a linear layout is Qt::Horizontal. You can
diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp
index 784ee0e..4f626a2 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp
@@ -67,7 +67,6 @@ QT_BEGIN_NAMESPACE
\brief The QGraphicsProxyWidget class provides a proxy layer for embedding
a QWidget in a QGraphicsScene.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
QGraphicsProxyWidget embeds QWidget-based widgets, for example, a
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index e4a02e2..db783ad 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -44,9 +44,8 @@
\brief The QGraphicsScene class provides a surface for managing a large
number of 2D graphical items.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
- \mainclass
+
The class serves as a container for QGraphicsItems. It is used together
with QGraphicsView for visualizing graphical items, such as lines,
@@ -1080,7 +1079,7 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
// Set focus on the topmost enabled item that can take focus.
bool setFocus = false;
foreach (QGraphicsItem *item, cachedItemsUnderMouse) {
- if (item->isEnabled() && (item->flags() & QGraphicsItem::ItemIsFocusable)) {
+ if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) {
if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) {
setFocus = true;
if (item != q->focusItem())
@@ -3803,7 +3802,8 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
bool hasSetFocus = false;
foreach (QGraphicsItem *item, wheelCandidates) {
- if (!hasSetFocus && item->isEnabled() && (item->flags() & QGraphicsItem::ItemIsFocusable)) {
+ if (!hasSetFocus && item->isEnabled()
+ && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) {
if (item->isWidget() && static_cast<QGraphicsWidget *>(item)->focusPolicy() == Qt::WheelFocus) {
hasSetFocus = true;
if (item != focusItem())
@@ -5345,7 +5345,7 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QTouchEve
// Set focus on the topmost enabled item that can take focus.
bool setFocus = false;
foreach (QGraphicsItem *item, cachedItemsUnderMouse) {
- if (item->isEnabled() && (item->flags() & QGraphicsItem::ItemIsFocusable)) {
+ if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) {
if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) {
setFocus = true;
if (item != q->focusItem())
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 7beae20..a405f31 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -59,6 +59,7 @@
#include "qgraphicssceneevent.h"
#include "qgraphicsview.h"
+#include "qgraphicsview_p.h"
#include "qgraphicsitem_p.h"
#include <private/qobject_p.h>
diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp
index 4dccde9..2d2ce02 100644
--- a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp
+++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp
@@ -44,9 +44,8 @@
\brief The QGraphicsSceneBspTreeIndex class provides an implementation of
a BSP indexing algorithm for discovering items in QGraphicsScene.
\since 4.6
- \ingroup multimedia
\ingroup graphicsview-api
- \mainclass
+
\internal
QGraphicsSceneBspTreeIndex index use a BSP(Binary Space Partitioning)
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp
index b89d6ba..90f1531 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.cpp
+++ b/src/gui/graphicsview/qgraphicssceneevent.cpp
@@ -44,7 +44,6 @@
\brief The QGraphicsSceneEvent class provides a base class for all
graphics view related events.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
When a QGraphicsView receives Qt mouse, keyboard, and drag and
@@ -86,7 +85,6 @@
\brief The QGraphicsSceneMouseEvent class provides mouse events
in the graphics view framework.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
When a QGraphicsView receives a QMouseEvent, it translates it to
@@ -111,7 +109,6 @@
\brief The QGraphicsSceneWheelEvent class provides wheel events in the
graphics view framework.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
\l{QWheelEvent}{QWheelEvent}s received by a QGraphicsView are translated
@@ -128,7 +125,6 @@
\brief The QGraphicsSceneContextMenuEvent class provides context
menu events in the graphics view framework.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
A QContextMenuEvent received by a QGraphicsView is translated
@@ -160,7 +156,6 @@
\brief The QGraphicsSceneHoverEvent class provides hover events
in the graphics view framework.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
When a QGraphicsView receives a QHoverEvent event, it translates
@@ -176,7 +171,6 @@
\brief The QGraphicsSceneHelpEvent class provides events when a
tooltip is requested.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
When a QGraphicsView receives a QEvent of type
@@ -201,7 +195,6 @@
\brief The QGraphicsSceneDragDropEvent class provides events for
drag and drop in the graphics view framework.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
QGraphicsView inherits the drag and drop functionality provided
@@ -226,7 +219,6 @@
\brief The QGraphicsSceneResizeEvent class provides events for widget
resizing in the graphics view framework.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
A QGraphicsWidget sends itself a QGraphicsSceneResizeEvent immediately
@@ -243,7 +235,6 @@
\brief The QGraphicsSceneMoveEvent class provides events for widget
moving in the graphics view framework.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
A QGraphicsWidget sends itself a QGraphicsSceneMoveEvent immediately when
diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp
index 37a2fc3..feb44bb 100644
--- a/src/gui/graphicsview/qgraphicssceneindex.cpp
+++ b/src/gui/graphicsview/qgraphicssceneindex.cpp
@@ -43,9 +43,8 @@
\brief The QGraphicsSceneIndex class provides a base class to implement
a custom indexing algorithm for discovering items in QGraphicsScene.
\since 4.6
- \ingroup multimedia
\ingroup graphicsview-api
- \mainclass
+
\internal
The QGraphicsSceneIndex class provides a base class to implement
diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp
index 95f137d..86f5b08 100644
--- a/src/gui/graphicsview/qgraphicstransform.cpp
+++ b/src/gui/graphicsview/qgraphicstransform.cpp
@@ -44,6 +44,7 @@
\brief The QGraphicsTransform class is an abstract base class for building
advanced transformations on QGraphicsItems.
\since 4.6
+ \ingroup graphicsview-api
As an alternative to QGraphicsItem::transform, QGraphicsTransform lets you
create and control advanced transformations that can be configured
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 91e654c..e9029c3 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -48,9 +48,8 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
\brief The QGraphicsView class provides a widget for displaying the
contents of a QGraphicsScene.
\since 4.2
- \ingroup multimedia
\ingroup graphicsview-api
- \mainclass
+
QGraphicsView visualizes the contents of a QGraphicsScene in a scrollable
viewport. To create a scene with geometrical items, see QGraphicsScene's
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 64881b5..a833d4b 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -74,7 +74,6 @@ QT_BEGIN_NAMESPACE
\brief The QGraphicsWidget class is the base class for all widget
items in a QGraphicsScene.
\since 4.4
- \ingroup multimedia
\ingroup graphicsview-api
QGraphicsWidget is an extended base item that provides extra functionality
@@ -258,7 +257,7 @@ QGraphicsWidget::~QGraphicsWidget()
//we check if we have a layout previously
if (d->layout) {
- delete d->layout;
+ QGraphicsLayout *temp = d->layout;
foreach (QGraphicsItem * item, childItems()) {
// In case of a custom layout which doesn't remove and delete items, we ensure that
// the parent layout item does not point to the deleted layout. This code is here to
@@ -269,6 +268,8 @@ QGraphicsWidget::~QGraphicsWidget()
widget->setParentLayoutItem(0);
}
}
+ d->layout = 0;
+ delete temp;
}
// Remove this graphics widget from widgetStyles
diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h
index 62b353a..57015f9 100644
--- a/src/gui/graphicsview/qgraphicswidget.h
+++ b/src/gui/graphicsview/qgraphicswidget.h
@@ -69,6 +69,7 @@ class QGraphicsWidgetPrivate;
class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLayoutItem
{
Q_OBJECT
+ Q_INTERFACES(QGraphicsItem QGraphicsLayoutItem)
Q_PROPERTY(QPalette palette READ palette WRITE setPalette)
Q_PROPERTY(QFont font READ font WRITE setFont)
Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection RESET unsetLayoutDirection)
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index a1497bc..bef1738 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
\class QBitmap
\brief The QBitmap class provides monochrome (1-bit depth) pixmaps.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
The QBitmap class is a monochrome off-screen paint device used
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 677cc44..5a88e29 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -445,9 +445,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loaderV2,
\brief The QIcon class provides scalable icons in different modes
and states.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
A QIcon can generate smaller, larger, active, and disabled pixmaps
from the set of pixmaps it is given. Such pixmaps are used by Qt
diff --git a/src/gui/image/qiconengine.cpp b/src/gui/image/qiconengine.cpp
index 8e39607..930834d 100644
--- a/src/gui/image/qiconengine.cpp
+++ b/src/gui/image/qiconengine.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
\brief The QIconEngine class provides an abstract base class for QIcon renderers.
- \ingroup multimedia
+ \ingroup painting
\bold {Use QIconEngineV2 instead.}
@@ -144,7 +144,7 @@ void QIconEngine::addFile(const QString &/*fileName*/, const QSize &/*size*/, QI
\brief The QIconEngineV2 class provides an abstract base class for QIcon renderers.
- \ingroup multimedia
+ \ingroup painting
\since 4.3
An icon engine renders \l{QIcon}s. With icon engines, you can
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 0001e2b..3faca46 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -61,11 +61,7 @@
#include <qhash.h>
-#ifdef QT_RASTER_IMAGEENGINE
#include <private/qpaintengine_raster_p.h>
-#else
-#include <qpaintengine.h>
-#endif
#include <private/qimage_p.h>
@@ -337,9 +333,9 @@ bool QImageData::checkForAlphaPixels() const
/*!
\class QImage
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
\reentrant
\brief The QImage class provides a hardware-independent image
@@ -5255,11 +5251,10 @@ QPaintEngine *QImage::paintEngine() const
if (!d)
return 0;
-#ifdef QT_RASTER_IMAGEENGINE
if (!d->paintEngine) {
d->paintEngine = new QRasterPaintEngine(const_cast<QImage *>(this));
}
-#endif
+
return d->paintEngine;
}
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 06c8f21..b127de7 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -47,7 +47,7 @@
for reading images from files or other devices.
\reentrant
- \ingroup multimedia
+ \ingroup painting
\ingroup io
The most common way to read images is through QImage and QPixmap's
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index c734169..1f06493 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -45,7 +45,7 @@
for writing images to files or other devices.
\reentrant
- \ingroup multimedia
+ \ingroup painting
\ingroup io
QImageWriter supports setting format specific options, such as the
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index c341e5e..179e6bb 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -45,7 +45,7 @@
\brief The QMovie class is a convenience class for playing movies
with QImageReader.
- \ingroup multimedia
+ \ingroup painting
First, create a QMovie object by passing either the name of a file or a
pointer to a QIODevice containing an animated image format to QMovie's
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index fbc2a5d..7b02dca 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -69,9 +69,9 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
\brief The QPicture class is a paint device that records and
replays QPainter commands.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
A picture serializes painter commands to an IO device in a
platform-independent format. They are sometimes referred to as meta-files.
@@ -1298,7 +1298,7 @@ QList<QByteArray> QPicture::outputFormats()
\brief The QPictureIO class contains parameters for loading and
saving pictures.
- \ingroup multimedia
+ \ingroup painting
\ingroup io
QPictureIO contains a QIODevice object that is used for picture data
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 81440b3..0fad1c7 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1550,9 +1550,9 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
\brief The QPixmap class is an off-screen image representation
that can be used as a paint device.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
Qt provides four classes for handling image data: QImage, QPixmap,
QBitmap and QPicture. QImage is designed and optimized for I/O,
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index 8c911bb..5959da1 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -38,7 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//#define QT_RASTER_PAINTENGINE
#include "qpixmap.h"
#include "qimage.h"
@@ -52,9 +51,6 @@
#include <private/qdrawhelper_p.h>
#include <private/qpixmap_mac_p.h>
#include <private/qpixmap_raster_p.h>
-#ifdef QT_RASTER_PAINTENGINE
-# include <private/qpaintengine_raster_p.h>
-#endif
#include <private/qpaintengine_mac_p.h>
#include <private/qt_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
@@ -1098,14 +1094,7 @@ QPaintEngine* QMacPixmapData::paintEngine() const
{
if (!pengine) {
QMacPixmapData *that = const_cast<QMacPixmapData*>(this);
-#ifdef QT_RASTER_PAINTENGINE
- if (qgetenv("QT_MAC_USE_COREGRAPHICS").isNull())
- that->pengine = new QRasterPaintEngine();
- else
- that->pengine = new QCoreGraphicsPaintEngine();
-#else
that->pengine = new QCoreGraphicsPaintEngine();
-#endif
}
return pengine;
}
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 762c98f..cef5c49 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -51,8 +51,7 @@ QT_BEGIN_NAMESPACE
\brief The QPixmapCache class provides an application-wide cache for pixmaps.
- \ingroup environment
- \ingroup multimedia
+ \ingroup painting
This class is a tool for optimized drawing with QPixmap. You can
use it to store temporary pixmaps that are expensive to generate
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index aad2f16..e95cf89 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -65,7 +65,7 @@ public:
/*!
\class QPixmapFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapFilter class provides the basic functionality for
pixmap filter classes. Pixmap filter can be for example colorize or blur.
@@ -175,7 +175,7 @@ QRectF QPixmapFilter::boundingRectFor(const QRectF &rect) const
/*!
\class QPixmapConvolutionFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapConvolutionFilter class provides convolution
filtering for pixmaps.
@@ -741,7 +741,7 @@ static void grayscale(const QImage &image, QImage &dest, const QRect& rect = QRe
/*!
\class QPixmapColorizeFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapColorizeFilter class provides colorizing
filtering for pixmaps.
@@ -865,7 +865,7 @@ public:
/*!
\class QPixmapDropShadowFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapDropShadowFilter class is a convenience class
for drawing pixmaps with drop shadows.
diff --git a/src/gui/inputmethod/qinputcontextfactory.cpp b/src/gui/inputmethod/qinputcontextfactory.cpp
index 39b9b03..9010edf 100644
--- a/src/gui/inputmethod/qinputcontextfactory.cpp
+++ b/src/gui/inputmethod/qinputcontextfactory.cpp
@@ -86,7 +86,6 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
\class QInputContextFactory
\brief The QInputContextFactory class creates QInputContext objects.
- \ingroup appearance
The input context factory creates a QInputContext object for a
given key with QInputContextFactory::create().
diff --git a/src/gui/itemviews/qabstractitemdelegate.cpp b/src/gui/itemviews/qabstractitemdelegate.cpp
index 22b96fc..447538a 100644
--- a/src/gui/itemviews/qabstractitemdelegate.cpp
+++ b/src/gui/itemviews/qabstractitemdelegate.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
data items from a model.
\ingroup model-view
- \mainclass
+
A QAbstractItemDelegate provides the interface and common functionality
for delegates in the model/view architecture. Delegates display
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 7b51483..9eb71b7 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -166,7 +166,7 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index
item view classes.
\ingroup model-view
- \mainclass
+
QAbstractItemView class is the base class for every standard view
that uses a QAbstractItemModel. QAbstractItemView is an abstract
diff --git a/src/gui/itemviews/qcolumnview.cpp b/src/gui/itemviews/qcolumnview.cpp
index fd8106f..9597656 100644
--- a/src/gui/itemviews/qcolumnview.cpp
+++ b/src/gui/itemviews/qcolumnview.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
\brief The QColumnView class provides a model/view implementation of a column view.
\ingroup model-view
\ingroup advanced
- \mainclass
+
QColumnView displays a model in a number of QListViews, one for each
hierarchy in the tree. This is sometimes referred to as a cascading list.
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index 96df758..4ab81f5 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -88,7 +88,7 @@ QDataStream &operator>>(QDataStream &in, QHeaderViewPrivate::SectionSpan &span)
item views.
\ingroup model-view
- \mainclass
+
A QHeaderView displays the headers used in item views such as the
QTableView and QTreeView classes. It takes the place of Qt3's \c QHeader
@@ -1195,7 +1195,8 @@ QHeaderView::ResizeMode QHeaderView::resizeMode(int logicalIndex) const
{
Q_D(const QHeaderView);
int visual = visualIndex(logicalIndex);
- Q_ASSERT(visual != -1);
+ if (visual == -1)
+ return Fixed; //the default value
return d->headerSectionResizeMode(visual);
}
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp
index 1e36f72..56af0f4 100644
--- a/src/gui/itemviews/qitemdelegate.cpp
+++ b/src/gui/itemviews/qitemdelegate.cpp
@@ -185,7 +185,7 @@ QSizeF QItemDelegatePrivate::doTextLayout(int lineWidth) const
data items from a model.
\ingroup model-view
- \mainclass
+
QItemDelegate can be used to provide custom display features and editor
widgets for item views based on QAbstractItemView subclasses. Using a
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp
index 98810a0..8414460 100644
--- a/src/gui/itemviews/qitemselectionmodel.cpp
+++ b/src/gui/itemviews/qitemselectionmodel.cpp
@@ -573,6 +573,7 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
int start, int end)
{
Q_Q(QItemSelectionModel);
+ finalize();
// update current index
if (currentIndex.isValid() && parent == currentIndex.parent()
@@ -591,8 +592,8 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
}
QItemSelection deselected;
- QItemSelection::iterator it = currentSelection.begin();
- while (it != currentSelection.end()) {
+ QItemSelection::iterator it = ranges.begin();
+ while (it != ranges.end()) {
if (it->topLeft().parent() != parent) { // Check parents until reaching root or contained in range
QModelIndex itParent = it->topLeft().parent();
while (itParent.isValid() && itParent.parent() != parent)
@@ -600,24 +601,22 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
if (parent.isValid() && start <= itParent.row() && itParent.row() <= end) {
deselected.append(*it);
- it = currentSelection.erase(it);
+ it = ranges.erase(it);
} else {
++it;
}
} else if (start <= it->bottom() && it->bottom() <= end // Full inclusion
&& start <= it->top() && it->top() <= end) {
deselected.append(*it);
- it = currentSelection.erase(it);
+ it = ranges.erase(it);
} else if (start <= it->top() && it->top() <= end) { // Top intersection
deselected.append(QItemSelectionRange(it->topLeft(), model->index(end, it->left(), it->parent())));
- it = currentSelection.insert(it, QItemSelectionRange(model->index(end + 1, it->left(), it->parent()),
- it->bottomRight()));
- it = currentSelection.erase(++it);
+ *it = QItemSelectionRange(model->index(end + 1, it->left(), it->parent()), it->bottomRight());
+ ++it;
} else if (start <= it->bottom() && it->bottom() <= end) { // Bottom intersection
deselected.append(QItemSelectionRange(model->index(start, it->right(), it->parent()), it->bottomRight()));
- it = currentSelection.insert(it, QItemSelectionRange(it->topLeft(),
- model->index(start - 1, it->right(), it->parent())));
- it = currentSelection.erase(++it);
+ *it = QItemSelectionRange(it->topLeft(), model->index(start - 1, it->right(), it->parent()));
+ ++it;
} else {
if (it->top() < start && end < it->bottom()) // Middle intersection (do nothing)
deselected.append(QItemSelectionRange(model->index(start, it->right(), it->parent()),
@@ -626,7 +625,8 @@ void QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved(const QModelIndex &pare
}
}
- emit q->selectionChanged(QItemSelection(), deselected);
+ if (!deselected.isEmpty())
+ emit q->selectionChanged(QItemSelection(), deselected);
}
/*!
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 3ab3204..e9e365f 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
\ingroup model-view
\ingroup advanced
- \mainclass
+
A QListView presents items stored in a model, either as a simple
non-hierarchical list, or as a collection of icons. This class is used
@@ -458,6 +458,8 @@ QSize QListView::gridSize() const
void QListView::setViewMode(ViewMode mode)
{
Q_D(QListView);
+ if (d->viewMode == mode)
+ return;
d->viewMode = mode;
if (mode == ListMode) {
@@ -1963,7 +1965,7 @@ QListViewPrivate::QListViewPrivate()
movement(QListView::Static),
resizeMode(QListView::Fixed),
layoutMode(QListView::SinglePass),
- viewMode(QListView::ListMode),
+ viewMode(QListView::IconMode), //this will ensure the first initialization to ListView
modeProperties(0),
column(0),
uniformItemSizes(false),
@@ -1974,8 +1976,10 @@ QListViewPrivate::QListViewPrivate()
QListViewPrivate::~QListViewPrivate()
{
- delete staticListView;
- delete dynamicListView;
+ if (viewMode == QListView::ListMode)
+ delete staticListView;
+ else
+ delete dynamicListView;
}
void QListViewPrivate::clear()
diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp
index a1f8288..232b4d2 100644
--- a/src/gui/itemviews/qlistwidget.cpp
+++ b/src/gui/itemviews/qlistwidget.cpp
@@ -1125,7 +1125,7 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
\brief The QListWidget class provides an item-based list widget.
\ingroup model-view
- \mainclass
+
QListWidget is a convenience class that provides a list view similar to the
one supplied by QListView, but with a classic item-based interface for
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index 8444a5b..d173efe 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -1278,82 +1278,76 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved(
/*!
\since 4.1
\class QSortFilterProxyModel
- \brief The QSortFilterProxyModel class provides support for sorting and filtering data passed
- between another model and a view.
+ \brief The QSortFilterProxyModel class provides support for sorting and
+ filtering data passed between another model and a view.
\ingroup model-view
- QSortFilterProxyModel can be used for sorting items, filtering
- out items, or both. The model transforms the structure of a
- source model by mapping the model indexes it supplies to new
- indexes, corresponding to different locations, for views to use.
- This approach allows a given source model to be restructured as
- far as views are concerned without requiring any transformations
- on the underlying data, and without duplicating the data in
+ QSortFilterProxyModel can be used for sorting items, filtering out items,
+ or both. The model transforms the structure of a source model by mapping
+ the model indexes it supplies to new indexes, corresponding to different
+ locations, for views to use. This approach allows a given source model to
+ be restructured as far as views are concerned without requiring any
+ transformations on the underlying data, and without duplicating the data in
memory.
- Let's assume that we want to sort and filter the items provided
- by a custom model. The code to set up the model and the view, \e
- without sorting and filtering, would look like this:
+ Let's assume that we want to sort and filter the items provided by a custom
+ model. The code to set up the model and the view, \e without sorting and
+ filtering, would look like this:
\snippet doc/src/snippets/qsortfilterproxymodel-details/main.cpp 1
- To add sorting and filtering support to \c MyItemModel, we need
- to create a QSortFilterProxyModel, call setSourceModel() with the
- \c MyItemModel as argument, and install the QSortFilterProxyModel
- on the view:
+ To add sorting and filtering support to \c MyItemModel, we need to create
+ a QSortFilterProxyModel, call setSourceModel() with the \c MyItemModel as
+ argument, and install the QSortFilterProxyModel on the view:
\snippet doc/src/snippets/qsortfilterproxymodel-details/main.cpp 0
\snippet doc/src/snippets/qsortfilterproxymodel-details/main.cpp 2
- At this point, neither sorting nor filtering is enabled; the
- original data is displayed in the view. Any changes made through
- the QSortFilterProxyModel are applied to the original model.
+ At this point, neither sorting nor filtering is enabled; the original data
+ is displayed in the view. Any changes made through the
+ QSortFilterProxyModel are applied to the original model.
- The QSortFilterProxyModel acts as a wrapper for the original
- model. If you need to convert source \l{QModelIndex}es to
- sorted/filtered model indexes or vice versa, use mapToSource(),
- mapFromSource(), mapSelectionToSource(), and
- mapSelectionFromSource().
+ The QSortFilterProxyModel acts as a wrapper for the original model. If you
+ need to convert source \l{QModelIndex}es to sorted/filtered model indexes
+ or vice versa, use mapToSource(), mapFromSource(), mapSelectionToSource(),
+ and mapSelectionFromSource().
- \note By default, the model does not dynamically re-sort and re-filter
- data whenever the original model changes. This behavior can be
- changed by setting the \l{QSortFilterProxyModel::dynamicSortFilter}
- {dynamicSortFilter} property.
+ \note By default, the model does not dynamically re-sort and re-filter data
+ whenever the original model changes. This behavior can be changed by
+ setting the \l{QSortFilterProxyModel::dynamicSortFilter}{dynamicSortFilter}
+ property.
- The \l{itemviews/basicsortfiltermodel}{Basic Sort/Filter Model}
- and \l{itemviews/customsortfiltermodel}{Custom Sort/Filter Model}
- examples illustrate how to use QSortFilterProxyModel to perform
- basic sorting and filtering and how to subclass it to implement
- custom behavior.
+ The \l{itemviews/basicsortfiltermodel}{Basic Sort/Filter Model} and
+ \l{itemviews/customsortfiltermodel}{Custom Sort/Filter Model} examples
+ illustrate how to use QSortFilterProxyModel to perform basic sorting and
+ filtering and how to subclass it to implement custom behavior.
\section1 Sorting
QTableView and QTreeView have a
- \l{QTreeView::sortingEnabled}{sortingEnabled} property that
- controls whether the user can sort the view by clicking the
- view's horizontal header. For example:
+ \l{QTreeView::sortingEnabled}{sortingEnabled} property that controls
+ whether the user can sort the view by clicking the view's horizontal
+ header. For example:
\snippet doc/src/snippets/qsortfilterproxymodel-details/main.cpp 3
- When this feature is on (the default is off), clicking on a
- header section sorts the items according to that column. By
- clicking repeatedly, the user can alternate between ascending and
- descending order.
+ When this feature is on (the default is off), clicking on a header section
+ sorts the items according to that column. By clicking repeatedly, the user
+ can alternate between ascending and descending order.
\image qsortfilterproxymodel-sorting.png A sorted QTreeView
- Behind the scene, the view calls the sort() virtual function on
- the model to reorder the data in the model. To make your data
- sortable, you can either implement sort() in your model, or you
- use a QSortFilterProxyModel to wrap your model --
- QSortFilterProxyModel provides a generic sort() reimplementation
- that operates on the sortRole() (Qt::DisplayRole by default) of
- the items and that understands several data types, including \c
- int, QString, and QDateTime. For hierarchical models, sorting is
- applied recursively to all child items. String comparisons are
- case sensitive by default; this can be changed by setting the
- \l{QSortFilterProxyModel::}{sortCaseSensitivity} property.
+ Behind the scene, the view calls the sort() virtual function on the model
+ to reorder the data in the model. To make your data sortable, you can
+ either implement sort() in your model, or use a QSortFilterProxyModel to
+ wrap your model -- QSortFilterProxyModel provides a generic sort()
+ reimplementation that operates on the sortRole() (Qt::DisplayRole by
+ default) of the items and that understands several data types, including
+ \c int, QString, and QDateTime. For hierarchical models, sorting is applied
+ recursively to all child items. String comparisons are case sensitive by
+ default; this can be changed by setting the \l{QSortFilterProxyModel::}
+ {sortCaseSensitivity} property.
Custom sorting behavior is achieved by subclassing
QSortFilterProxyModel and reimplementing lessThan(), which is
@@ -1365,43 +1359,42 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved(
\l{itemviews/customsortfiltermodel}{Custom Sort/Filter Model}
example.)
- An alternative approach to sorting is to disable sorting on the
- view and to impose a certain order to the user. This is done by
- explicitly calling sort() with the desired column and order as
- arguments on the QSortFilterProxyModel (or on the original model
- if it implements sort()). For example:
+ An alternative approach to sorting is to disable sorting on the view and to
+ impose a certain order to the user. This is done by explicitly calling
+ sort() with the desired column and order as arguments on the
+ QSortFilterProxyModel (or on the original model if it implements sort()).
+ For example:
\snippet doc/src/snippets/qsortfilterproxymodel-details/main.cpp 4
- QSortFilterProxyModel can be sorted by column -1, in which case it
- returns to the sort order of the underlying source model.
+ QSortFilterProxyModel can be sorted by column -1, in which case it returns
+ to the sort order of the underlying source model.
\section1 Filtering
- In addition to sorting, QSortFilterProxyModel can be used to hide
- items that don't match a certain filter. The filter is specified
- using a QRegExp object and is applied to the filterRole()
- (Qt::DisplayRole by default) of each item, for a given column.
- The QRegExp object can be used to match a regular expression, a
- wildcard pattern, or a fixed string. For example:
+ In addition to sorting, QSortFilterProxyModel can be used to hide items
+ that do not match a certain filter. The filter is specified using a QRegExp
+ object and is applied to the filterRole() (Qt::DisplayRole by default) of
+ each item, for a given column. The QRegExp object can be used to match a
+ regular expression, a wildcard pattern, or a fixed string. For example:
\snippet doc/src/snippets/qsortfilterproxymodel-details/main.cpp 5
- For hierarchical models, the filter is applied recursively to all
- children. If a parent item doesn't match the filter, none of its
- children will be shown.
+ For hierarchical models, the filter is applied recursively to all children.
+ If a parent item doesn't match the filter, none of its children will be
+ shown.
- A common use case is to let the user specify the filter regexp,
- wildcard pattern, or fixed string in a QLineEdit and to connect
- the \l{QLineEdit::textChanged()}{textChanged()} signal to
- setFilterRegExp(), setFilterWildcard(), or setFilterFixedString()
- to reapply the filter.
+ A common use case is to let the user specify the filter regexp, wildcard
+ pattern, or fixed string in a QLineEdit and to connect the
+ \l{QLineEdit::textChanged()}{textChanged()} signal to setFilterRegExp(),
+ setFilterWildcard(), or setFilterFixedString() to reapply the filter.
Custom filtering behavior can be achieved by reimplementing the
filterAcceptsRow() and filterAcceptsColumn() functions. For
- example, the following implementation ignores the
- \l{QSortFilterProxyModel::filterKeyColumn}{filterKeyColumn}
- property and performs filtering on columns 0, 1, and 2:
+ example (from the \l{itemviews/customsortfiltermodel}
+ {Custom Sort/Filter Model} example), the following implementation ignores
+ the \l{QSortFilterProxyModel::filterKeyColumn}{filterKeyColumn} property
+ and performs filtering on columns 0, 1, and 2:
\snippet examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp 3
@@ -1411,24 +1404,24 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved(
If you are working with large amounts of filtering and have to invoke
invalidateFilter() repeatedly, using reset() may be more efficient,
- depending on the implementation of your model. However, note that reset()
- returns the proxy model to its original state, losing selection
- information, and will cause the proxy model to be repopulated.
+ depending on the implementation of your model. However, reset() returns the
+ proxy model to its original state, losing selection information, and will
+ cause the proxy model to be repopulated.
\section1 Subclassing
- \bold{Note:} Some general guidelines for subclassing models are
- available in the \l{Model Subclassing Reference}.
-
Since QAbstractProxyModel and its subclasses are derived from
- QAbstractItemModel, much of the same advice about subclassing normal
- models also applies to proxy models. In addition, it is worth noting
- that many of the default implementations of functions in this class
- are written so that they call the equivalent functions in the relevant
- source model. This simple proxying mechanism may need to be overridden
- for source models with more complex behavior; for example, if the
- source model provides a custom hasChildren() implementation, you
- should also provide one in the proxy model.
+ QAbstractItemModel, much of the same advice about subclassing normal models
+ also applies to proxy models. In addition, it is worth noting that many of
+ the default implementations of functions in this class are written so that
+ they call the equivalent functions in the relevant source model. This
+ simple proxying mechanism may need to be overridden for source models with
+ more complex behavior; for example, if the source model provides a custom
+ hasChildren() implementation, you should also provide one in the proxy
+ model.
+
+ \note Some general guidelines for subclassing models are available in the
+ \l{Model Subclassing Reference}.
\sa QAbstractProxyModel, QAbstractItemModel, {Model/View Programming},
{Basic Sort/Filter Model Example}, {Custom Sort/Filter Model Example}
@@ -1991,9 +1984,11 @@ Qt::SortOrder QSortFilterProxyModel::sortOrder() const
\brief the QRegExp used to filter the contents of the source model
Setting this property overwrites the current
- \l{QSortFilterProxyModel::filterCaseSensitivity}
- {filterCaseSensitivity}. By default, the QRegExp is an empty
- string matching all contents.
+ \l{QSortFilterProxyModel::filterCaseSensitivity}{filterCaseSensitivity}.
+ By default, the QRegExp is an empty string matching all contents.
+
+ If no QRegExp or an empty string is set, everything in the source model
+ will be accepted.
\sa filterCaseSensitivity, setFilterWildcard(), setFilterFixedString()
*/
diff --git a/src/gui/itemviews/qstringlistmodel.cpp b/src/gui/itemviews/qstringlistmodel.cpp
index d57de1a..9462dfe 100644
--- a/src/gui/itemviews/qstringlistmodel.cpp
+++ b/src/gui/itemviews/qstringlistmodel.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
\brief The QStringListModel class provides a model that supplies strings to views.
\ingroup model-view
- \mainclass
+
QStringListModel is an editable model that can be used for simple
cases where you need to display a number of strings in a view
diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp
index a8ea218..ae7c86d 100644
--- a/src/gui/itemviews/qstyleditemdelegate.cpp
+++ b/src/gui/itemviews/qstyleditemdelegate.cpp
@@ -112,7 +112,7 @@ public:
data items from a model.
\ingroup model-view
- \mainclass
+
\since 4.4
When displaying data from models in Qt item views, e.g., a
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 61c2b60..a9db9f5 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -508,7 +508,7 @@ void QTableViewPrivate::drawCell(QPainter *painter, const QStyleOptionViewItemV4
\ingroup model-view
\ingroup advanced
- \mainclass
+
A QTableView implements a table view that displays items from a
model. This class is used to provide standard tables that were
diff --git a/src/gui/itemviews/qtablewidget.cpp b/src/gui/itemviews/qtablewidget.cpp
index de8ebde..b04aea2 100644
--- a/src/gui/itemviews/qtablewidget.cpp
+++ b/src/gui/itemviews/qtablewidget.cpp
@@ -1486,7 +1486,7 @@ QTableWidgetItem &QTableWidgetItem::operator=(const QTableWidgetItem &other)
\brief The QTableWidget class provides an item-based table view with a default model.
\ingroup model-view
- \mainclass
+
Table widgets provide standard table display facilities for applications.
The items in a QTableWidget are provided by QTableWidgetItem.
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 539a642..7dad192 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
\ingroup model-view
\ingroup advanced
- \mainclass
+
A QTreeView implements a tree representation of items from a
model. This class is used to provide standard hierarchical lists that
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index f48e393..0bc2bee 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -75,7 +75,7 @@ public:
\brief The QTreeModel class manages the items stored in a tree view.
\ingroup model-view
- \mainclass
+
*/
/*!
@@ -2329,7 +2329,7 @@ void QTreeWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
tree model.
\ingroup model-view
- \mainclass
+
The QTreeWidget class is a convenience class that provides a standard
tree widget with a classic item-based interface similar to that used by
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp
index 7c343fc..4b44452 100644
--- a/src/gui/kernel/qaction.cpp
+++ b/src/gui/kernel/qaction.cpp
@@ -182,8 +182,8 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
\brief The QAction class provides an abstract user interface
action that can be inserted into widgets.
- \ingroup application
- \mainclass
+ \ingroup mainwindow-classes
+
\omit
* parent and widget are different
diff --git a/src/gui/kernel/qactiongroup.cpp b/src/gui/kernel/qactiongroup.cpp
index 5d429e4..9a12dea 100644
--- a/src/gui/kernel/qactiongroup.cpp
+++ b/src/gui/kernel/qactiongroup.cpp
@@ -100,7 +100,7 @@ void QActionGroupPrivate::_q_actionHovered()
\class QActionGroup
\brief The QActionGroup class groups actions together.
- \ingroup application
+ \ingroup mainwindow-classes
In some situations it is useful to group actions together. For
example, if you have a \gui{Left Align} action, a \gui{Right
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index df85809..574d845 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -174,9 +174,6 @@ QApplicationPrivate::~QApplicationPrivate()
\brief The QApplication class manages the GUI application's control
flow and main settings.
- \ingroup application
- \mainclass
-
QApplication contains the main event loop, where all events from the window
system and other sources are processed and dispatched. It also handles the
application's initialization, finalization, and provides session
@@ -4107,9 +4104,6 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e)
\class QSessionManager
\brief The QSessionManager class provides access to the session manager.
- \ingroup application
- \ingroup environment
-
A session manager in a desktop environment (in which Qt GUI applications
live) keeps track of a session, which is a group of running applications,
each of which has a particular state. The state of an application contains
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index db349f0..d942519 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -1851,10 +1851,20 @@ void qt_init(QApplicationPrivate *priv, int,
QX11InfoData *screen = X11->screens + s;
screen->ref = 1; // ensures it doesn't get deleted
screen->screen = s;
- screen->dpiX = (DisplayWidth(X11->display, s) * 254 + DisplayWidthMM(X11->display, s)*5)
- / (DisplayWidthMM(X11->display, s)*10);
- screen->dpiY = (DisplayHeight(X11->display, s) * 254 + DisplayHeightMM(X11->display, s)*5)
- / (DisplayHeightMM(X11->display, s)*10);
+
+ int widthMM = DisplayWidthMM(X11->display, s);
+ if (widthMM != 0) {
+ screen->dpiX = (DisplayWidth(X11->display, s) * 254 + widthMM * 5) / (widthMM * 10);
+ } else {
+ screen->dpiX = 72;
+ }
+
+ int heightMM = DisplayHeightMM(X11->display, s);
+ if (heightMM != 0) {
+ screen->dpiY = (DisplayHeight(X11->display, s) * 254 + heightMM * 5) / (heightMM * 10);
+ } else {
+ screen->dpiY = 72;
+ }
X11->argbVisuals[s] = 0;
X11->argbColormaps[s] = 0;
diff --git a/src/gui/kernel/qboxlayout.cpp b/src/gui/kernel/qboxlayout.cpp
index 5dd77e8..ce86c36 100644
--- a/src/gui/kernel/qboxlayout.cpp
+++ b/src/gui/kernel/qboxlayout.cpp
@@ -452,7 +452,6 @@ void QBoxLayoutPrivate::calcHfw(int w)
vertically.
\ingroup geomanagement
- \ingroup appearance
QBoxLayout takes the space it gets (from its parent layout or from
the parentWidget()), divides it up into a row of boxes, and makes
@@ -1271,8 +1270,6 @@ QBoxLayout::Direction QBoxLayout::direction() const
\brief The QHBoxLayout class lines up widgets horizontally.
\ingroup geomanagement
- \ingroup appearance
- \mainclass
This class is used to construct horizontal box layout objects. See
QBoxLayout for details.
@@ -1389,8 +1386,6 @@ QHBoxLayout::~QHBoxLayout()
\brief The QVBoxLayout class lines up widgets vertically.
\ingroup geomanagement
- \ingroup appearance
- \mainclass
This class is used to construct vertical box layout objects. See
QBoxLayout for details.
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 2779717..fce4f65 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -58,10 +58,6 @@ QT_BEGIN_NAMESPACE
\class QClipboard
\brief The QClipboard class provides access to the window system clipboard.
- \ingroup io
- \ingroup environment
- \mainclass
-
The clipboard offers a simple mechanism to copy and paste data
between applications.
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index c20445a..7ac0d89 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -102,7 +102,7 @@ static dndenum_mapper dnd_enums[] = {
{ NSDragOperationCopy, Qt::CopyAction, true },
{ NSDragOperationGeneric, Qt::CopyAction, false },
{ NSDragOperationEvery, Qt::ActionMask, false },
- { NSDragOperationNone, Qt::IgnoreAction, false }
+ { NSDragOperationNone, Qt::IgnoreAction, false }
};
static NSDragOperation qt_mac_mapDropAction(Qt::DropAction action)
@@ -228,14 +228,14 @@ extern "C" {
currentCustomTypes = new QStringList();
*currentCustomTypes = customTypes;
const NSString* mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
- NSMutableArray *supportedTypes = [NSMutableArray arrayWithObjects:NSColorPboardType,
- NSFilenamesPboardType, NSStringPboardType,
- NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
- NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
- NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
- NSRTFDPboardType, NSHTMLPboardType, NSPICTPboardType,
+ NSMutableArray *supportedTypes = [NSMutableArray arrayWithObjects:NSColorPboardType,
+ NSFilenamesPboardType, NSStringPboardType,
+ NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType,
+ NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType,
+ NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType,
+ NSRTFDPboardType, NSHTMLPboardType, NSPICTPboardType,
NSURLPboardType, NSPDFPboardType, NSVCardPboardType,
- NSFilesPromisePboardType, NSInkTextPboardType,
+ NSFilesPromisePboardType, NSInkTextPboardType,
NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil];
// Add custom types supported by the application.
for (int i = 0; i < customTypes.size(); i++) {
@@ -280,16 +280,16 @@ extern "C" {
dropData = 0;
}
}
-
-- (void)addDropData:(id <NSDraggingInfo>)sender
+
+- (void)addDropData:(id <NSDraggingInfo>)sender
{
[self removeDropData];
- CFStringRef dropPasteboard = (CFStringRef) [[sender draggingPasteboard] name];
+ CFStringRef dropPasteboard = (CFStringRef) [[sender draggingPasteboard] name];
dropData = new QCocoaDropData(dropPasteboard);
-}
+}
-- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
-{
+- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
+{
if (qwidget->testAttribute(Qt::WA_DropSiteRegistered) == false)
return NSDragOperationNone;
NSPoint windowPoint = [sender draggingLocation];
@@ -307,7 +307,7 @@ extern "C" {
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
QPoint posDrag(localPoint.x, localPoint.y);
- NSDragOperation nsActions = [sender draggingSourceOperationMask];
+ NSDragOperation nsActions = [sender draggingSourceOperationMask];
Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations(nsActions);
QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions;
Qt::KeyboardModifiers modifiers = Qt::NoModifier;
@@ -336,8 +336,8 @@ extern "C" {
qDMEvent.accept(); // accept by default, since enter event was accepted.
QApplication::sendEvent(qwidget, &qDMEvent);
if (!qDMEvent.isAccepted() || qDMEvent.dropAction() == Qt::IgnoreAction) {
- // since we accepted the drag enter event, the widget expects
- // future drage move events.
+ // since we accepted the drag enter event, the widget expects
+ // future drage move events.
// ### check if we need to treat this like the drag enter event.
nsActions = QT_PREPEND_NAMESPACE(qt_mac_mapDropAction)(qDEEvent.dropAction());
} else {
@@ -345,7 +345,7 @@ extern "C" {
}
QT_PREPEND_NAMESPACE(qt_mac_copy_answer_rect)(qDMEvent);
return nsActions;
- }
+ }
}
- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
@@ -373,7 +373,7 @@ extern "C" {
if (qt_mac_mouse_inside_answer_rect(posDrag)
&& QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions)
return QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction));
- // send drag move event to the widget
+ // send drag move event to the widget
QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions;
Qt::DropActions qtAllowed = QT_PREPEND_NAMESPACE(qt_mac_mapNSDragOperations)(nsActions);
Qt::KeyboardModifiers modifiers = Qt::NoModifier;
@@ -436,7 +436,7 @@ extern "C" {
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
QPoint posDrop(localPoint.x, localPoint.y);
- NSDragOperation nsActions = [sender draggingSourceOperationMask];
+ NSDragOperation nsActions = [sender draggingSourceOperationMask];
Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations(nsActions);
QMimeData *mimeData = dropData;
if (QDragManager::self()->source())
@@ -563,11 +563,6 @@ extern "C" {
qt_sendSpontaneousEvent(qwidget, &e);
if (!redirectionOffset.isNull())
QPainter::restoreRedirected(qwidget);
-#ifdef QT_RASTER_PAINTENGINE
- if(engine && engine->type() == QPaintEngine::Raster)
- static_cast<QRasterPaintEngine*>(engine)->flush(qwidget,
- qrgn.boundingRect().topLeft());
-#endif
if (engine)
engine->setSystemClip(QRegion());
qwidget->setAttribute(Qt::WA_WState_InPaintEvent, false);
@@ -638,7 +633,7 @@ extern "C" {
QHoverEvent he(QEvent::HoverEnter, QPoint(viewPoint.x, viewPoint.y), QPoint(-1, -1));
QApplicationPrivate::instance()->notify_helper(qwidget, &he);
}
- }
+ }
}
- (void)mouseExited:(NSEvent *)event
@@ -647,7 +642,7 @@ extern "C" {
NSPoint globalPoint = [[event window] convertBaseToScreen:[event locationInWindow]];
if (!qAppInstance()->activeModalWidget() || QApplicationPrivate::tryModalHelper(qwidget, 0)) {
QApplication::sendEvent(qwidget, &leaveEvent);
-
+
// ### Think about if it is necessary to update the cursor, should only be for a few cases.
qt_mac_update_cursor_at_global_pos(flipPoint(globalPoint).toPoint());
if (qwidget->testAttribute(Qt::WA_Hover)
@@ -679,7 +674,7 @@ extern "C" {
{
qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::LeftButton);
// Don't call super here. This prevents us from getting the mouseUp event,
- // which we need to send even if the mouseDown event was not accepted.
+ // which we need to send even if the mouseDown event was not accepted.
// (this is standard Qt behavior.)
}
@@ -843,7 +838,7 @@ extern "C" {
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
-- (void)touchesBeganWithEvent:(NSEvent *)event;
+- (void)touchesBeganWithEvent:(NSEvent *)event;
{
bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents);
qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all));
@@ -877,7 +872,7 @@ extern "C" {
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
qNGEvent.percentage = [event magnification];
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)rotateWithEvent:(NSEvent *)event;
@@ -890,7 +885,7 @@ extern "C" {
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
qNGEvent.percentage = [event rotation];
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)swipeWithEvent:(NSEvent *)event;
@@ -903,7 +898,7 @@ extern "C" {
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
qNGEvent.direction = QSize(-[event deltaX], -[event deltaY]);
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)beginGestureWithEvent:(NSEvent *)event;
@@ -915,7 +910,7 @@ extern "C" {
qNGEvent.gestureType = QNativeGestureEvent::GestureBegin;
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
- (void)endGestureWithEvent:(NSEvent *)event;
@@ -927,7 +922,7 @@ extern "C" {
qNGEvent.gestureType = QNativeGestureEvent::GestureEnd;
NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]];
qNGEvent.position = flipPoint(p).toPoint();
- qApp->sendEvent(qwidget, &qNGEvent);
+ qt_sendSpontaneousEvent(qwidget, &qNGEvent);
}
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
@@ -1128,7 +1123,7 @@ extern "C" {
while (index < composingLength) {
NSRange effectiveRange;
NSRange range = NSMakeRange(index, composingLength-index);
- NSDictionary *attributes = [aString attributesAtIndex:index
+ NSDictionary *attributes = [aString attributesAtIndex:index
longestEffectiveRange:&effectiveRange
inRange:range];
NSNumber *underlineStyle = [attributes objectForKey:NSUnderlineStyleAttributeName];
@@ -1137,7 +1132,7 @@ extern "C" {
NSColor *color = [attributes objectForKey:NSUnderlineColorAttributeName];
if (color) {
clr = colorFrom(color);
- }
+ }
QTextCharFormat format;
format.setFontUnderline(true);
format.setUnderlineColor(clr);
@@ -1213,7 +1208,7 @@ extern "C" {
- (NSRange) markedRange
{
- NSRange range;
+ NSRange range;
if (composing) {
range.location = 0;
range.length = composingLength;
@@ -1238,13 +1233,13 @@ extern "C" {
selRange.length = 0;
}
return selRange;
-
+
}
- (NSRect) firstRectForCharacterRange:(NSRange)theRange
{
Q_UNUSED(theRange);
- // The returned rect is always based on the internal cursor.
+ // The returned rect is always based on the internal cursor.
QRect mr(qwidget->inputMethodQuery(Qt::ImMicroFocus).toRect());
QPoint mp(qwidget->mapToGlobal(QPoint(mr.bottomLeft())));
NSRect rect ;
@@ -1392,7 +1387,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
NSImage *image = (NSImage *)qt_mac_create_nsimage(pix);
[image retain];
DnDParams *dndParams = [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent];
- // save supported actions
+ // save supported actions
[dndParams->view setSupportedActions: qt_mac_mapDropActions(dragPrivate()->possible_actions)];
NSPoint imageLoc = {dndParams->localPoint.x - hotspot.x(),
dndParams->localPoint.y + pix.height() - hotspot.y()};
@@ -1416,7 +1411,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
Qt::DropAction performedAction(qt_mac_mapNSDragOperation(dndParams->performedAction));
// do post drag processing, if required.
if(performedAction != Qt::IgnoreAction) {
- // check if the receiver points us to a file location.
+ // check if the receiver points us to a file location.
// if so, we need to do the file copy/move ourselves.
QCFType<CFURLRef> pasteLocation = 0;
PasteboardCopyPasteLocation(dragBoard.pasteBoard(), &pasteLocation);
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index b83843b..16749b7 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
\ingroup appearance
\ingroup shared
- \mainclass
+
This class is mainly used to create mouse cursors that are
associated with particular widgets and to get and set the position
diff --git a/src/gui/kernel/qdesktopwidget.qdoc b/src/gui/kernel/qdesktopwidget.qdoc
new file mode 100644
index 0000000..8e6673a
--- /dev/null
+++ b/src/gui/kernel/qdesktopwidget.qdoc
@@ -0,0 +1,264 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QDesktopWidget
+ \brief The QDesktopWidget class provides access to screen information on multi-head systems.
+
+ \ingroup advanced
+ \ingroup desktop
+
+ QApplication::desktop() function should be used to get an instance
+ of the QDesktopWidget.
+
+ Systems with more than one graphics card and monitor can manage the
+ physical screen space available either as multiple desktops, or as a
+ large virtual desktop, which usually has the size of the bounding
+ rectangle of all the screens (see virtualDesktop). For an
+ application, one of the available screens is the primary screen, i.e.
+ the screen where the main widget resides (see primaryScreen). All
+ windows opened in the context of the application should be
+ constrained to the boundaries of the primary screen; for example,
+ it would be inconvenient if a dialog box popped up on a different
+ screen, or split over two screens.
+
+ The QDesktopWidget provides information about the geometry of the
+ available screens with screenGeometry(). The number of screens
+ available is returned by screenCount, and the screenCountChanged
+ signal is emitted when screens are added or removed during runtime.
+ The screen number that a particular point or widget is located in
+ is returned by screenNumber().
+
+ Widgets provided by Qt use this class, for example, to place
+ tooltips, menus and dialog boxes according to the parent or
+ application widget. Applications can use this class to save window
+ positions, or to place child widgets and dialogs on one particular
+ screen.
+
+ \img qdesktopwidget.png Managing Multiple Screens
+
+ In the illustration above, Application One's primary screen is
+ screen 0, and App Two's primary screen is screen 1.
+
+ \target multiple screens note
+ \note QDesktopWidget inherits the QWidget properties, width() and
+ height(), which specify the size of the desktop. However, for
+ desktops with multiple screens, the size of the desktop is the union
+ of all the screen sizes, so width() and height() should \e not be
+ used for computing the size of a widget to be placed on one of the
+ screens. The correct width and height values are obtained using
+ availableGeometry() or screenGeometry() for a particular screen.
+
+ \sa QApplication, QApplication::desktop(), QX11Info::appRootWindow()
+*/
+
+/*!
+ \fn QDesktopWidget::QDesktopWidget()
+
+ \internal
+
+ Creates the desktop widget.
+
+ If the system supports a virtual desktop, this widget will have
+ the size of the virtual desktop; otherwise this widget will have
+ the size of the primary screen.
+
+ Instead of using QDesktopWidget directly, use QApplication::desktop().
+*/
+
+/*!
+ \fn QDesktopWidget::~QDesktopWidget()
+
+ \internal
+
+ Destroys the desktop widget and frees any allocated resources.
+*/
+
+/*!
+ \fn int QDesktopWidget::numScreens() const
+
+ Returns the number of available screens.
+
+ \obsolete
+
+ This function is deprecated. Use screenCount instead.
+
+ \sa primaryScreen
+*/
+
+/*!
+ \fn QWidget *QDesktopWidget::screen(int screen)
+
+ Returns a widget that represents the screen with index \a screen
+ (a value of -1 means the default screen).
+
+ If the system uses a virtual desktop, the returned widget will
+ have the geometry of the entire virtual desktop; i.e., bounding
+ every \a screen.
+
+ \sa primaryScreen, screenCount, virtualDesktop
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::availableGeometry(int screen) const
+
+ Returns the available geometry of the screen with index \a screen. What
+ is available will be subrect of screenGeometry() based on what the
+ platform decides is available (for example excludes the dock and menu bar
+ on Mac OS X, or the task bar on Windows). The default screen is used if
+ \a screen is -1.
+
+ \sa screenNumber(), screenGeometry()
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::availableGeometry(const QWidget *widget) const
+ \overload
+
+ Returns the available geometry of the screen which contains \a widget.
+
+ \sa screenGeometry()
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::availableGeometry(const QPoint &p) const
+ \overload
+
+ Returns the available geometry of the screen which contains \a p.
+
+ \sa screenGeometry()
+*/
+
+
+/*!
+ \fn const QRect QDesktopWidget::screenGeometry(int screen) const
+
+ Returns the geometry of the screen with index \a screen. The default
+ screen is used if \a screen is -1.
+
+ \sa screenNumber()
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::screenGeometry(const QWidget *widget) const
+ \overload
+
+ Returns the geometry of the screen which contains \a widget.
+*/
+
+/*!
+ \fn const QRect QDesktopWidget::screenGeometry(const QPoint &p) const
+ \overload
+
+ Returns the geometry of the screen which contains \a p.
+*/
+
+
+/*!
+ \fn int QDesktopWidget::screenNumber(const QWidget *widget) const
+
+ Returns the index of the screen that contains the largest
+ part of \a widget, or -1 if the widget not on a screen.
+
+ \sa primaryScreen
+*/
+
+/*!
+ \fn int QDesktopWidget::screenNumber(const QPoint &point) const
+
+ \overload
+ Returns the index of the screen that contains the \a point, or the
+ screen which is the shortest distance from the \a point.
+
+ \sa primaryScreen
+*/
+
+/*!
+ \fn void QDesktopWidget::resizeEvent(QResizeEvent *event)
+ \reimp
+*/
+
+/*!
+ \fn void QDesktopWidget::resized(int screen)
+
+ This signal is emitted when the size of \a screen changes.
+*/
+
+/*!
+ \fn void QDesktopWidget::workAreaResized(int screen)
+
+ This signal is emitted when the work area available on \a screen changes.
+*/
+
+/*!
+ \property QDesktopWidget::screenCount
+ \brief the number of screens currently available on the system.
+
+ \since 4.6
+
+ \sa screenCountChanged()
+*/
+
+/*!
+ \property QDesktopWidget::primaryScreen
+ \brief the index of the screen that is configured to be the primary screen
+ on the system.
+*/
+
+/*!
+ \property QDesktopWidget::virtualDesktop
+
+ \brief if the system manages the available screens in a virtual desktop.
+
+ For virtual desktops, screen() will always return the same widget.
+ The size of the virtual desktop is the size of this desktop
+ widget.
+*/
+
+/*!
+ \fn void QDesktopWidget::screenCountChanged(int newCount)
+
+ \since 4.6
+
+ This signal is emitted when the number of screens changes to \a newCount.
+
+ \sa screenCount
+*/
diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm
index efe6375..113362a 100644
--- a/src/gui/kernel/qeventdispatcher_mac.mm
+++ b/src/gui/kernel/qeventdispatcher_mac.mm
@@ -500,7 +500,7 @@ static bool IsMouseOrKeyEvent( NSEvent* event )
static inline void qt_mac_waitForMoreEvents()
{
#ifndef QT_MAC_USE_COCOA
- while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e20, true) == kCFRunLoopRunTimedOut);
+ while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e20, true) == kCFRunLoopRunTimedOut) ;
#else
// If no event exist in the cocoa event que, wait
// (and free up cpu time) until at least one event occur.
diff --git a/src/gui/kernel/qformlayout.cpp b/src/gui/kernel/qformlayout.cpp
index 4e632de..b3ecc35 100644
--- a/src/gui/kernel/qformlayout.cpp
+++ b/src/gui/kernel/qformlayout.cpp
@@ -1006,10 +1006,8 @@ QStyle* QFormLayoutPrivate::getStyle() const
\since 4.4
\brief The QFormLayout class manages forms of input widgets and their associated labels.
- \ingroup appearance
\ingroup geomanagement
- \mainclass
QFormLayout is a convenience layout class that lays out its
children in a two-column form. The left column consists of labels
diff --git a/src/gui/kernel/qgridlayout.cpp b/src/gui/kernel/qgridlayout.cpp
index 6624b77..1f25c63 100644
--- a/src/gui/kernel/qgridlayout.cpp
+++ b/src/gui/kernel/qgridlayout.cpp
@@ -980,8 +980,7 @@ QRect QGridLayoutPrivate::cellRect(int row, int col) const
\brief The QGridLayout class lays out widgets in a grid.
\ingroup geomanagement
- \ingroup appearance
- \mainclass
+
QGridLayout takes the space made available to it (by its parent
layout or by the parentWidget()), divides it up into rows and
diff --git a/src/gui/kernel/qkeymapper.cpp b/src/gui/kernel/qkeymapper.cpp
index 0730ef6..7143358 100644
--- a/src/gui/kernel/qkeymapper.cpp
+++ b/src/gui/kernel/qkeymapper.cpp
@@ -51,7 +51,6 @@ QT_BEGIN_NAMESPACE
/*!
\class QKeyMapper
\since 4.2
- \ingroup application
\internal
\sa QObject
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 99e2632..50fe849 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -152,9 +152,8 @@ void Q_AUTOTEST_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mn
\brief The QKeySequence class encapsulates a key sequence as used
by shortcuts.
- \ingroup misc
\ingroup shared
- \mainclass
+
In its most common form, a key sequence describes a combination of
keys that must be used together to perform some action. Key sequences
diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp
index e3cde49..07c017d 100644
--- a/src/gui/kernel/qlayout.cpp
+++ b/src/gui/kernel/qlayout.cpp
@@ -75,7 +75,6 @@ static int menuBarHeightForWidth(QWidget *menubar, int w)
\class QLayout
\brief The QLayout class is the base class of geometry managers.
- \ingroup appearance
\ingroup geomanagement
This is an abstract base class inherited by the concrete classes
diff --git a/src/gui/kernel/qlayoutitem.cpp b/src/gui/kernel/qlayoutitem.cpp
index 47fe5e6..54f37bf 100644
--- a/src/gui/kernel/qlayoutitem.cpp
+++ b/src/gui/kernel/qlayoutitem.cpp
@@ -87,7 +87,6 @@ QSizePolicy::operator QVariant() const
\brief The QLayoutItem class provides an abstract item that a
QLayout manipulates.
- \ingroup appearance
\ingroup geomanagement
This is used by custom layouts.
@@ -116,7 +115,6 @@ QSizePolicy::operator QVariant() const
/*!
\class QSpacerItem
- \ingroup appearance
\ingroup geomanagement
\brief The QSpacerItem class provides blank space in a layout.
@@ -144,7 +142,6 @@ QSizePolicy::operator QVariant() const
/*!
\class QWidgetItem
- \ingroup appearance
\ingroup geomanagement
\brief The QWidgetItem class is a layout item that represents a widget.
diff --git a/src/gui/kernel/qmime_mac.cpp b/src/gui/kernel/qmime_mac.cpp
index f4d4707..9e8de67 100644
--- a/src/gui/kernel/qmime_mac.cpp
+++ b/src/gui/kernel/qmime_mac.cpp
@@ -126,9 +126,8 @@ CFStringRef qt_mac_mime_typeUTI = CFSTR("com.pasteboard.trolltech.marker");
\l{http://developer.apple.com/macosx/uniformtypeidentifiers.html}{Uniform
Type Identifier (UTI)} format.
\since 4.2
- \ingroup io
+
\ingroup draganddrop
- \ingroup misc
Qt's drag and drop and clipboard facilities use the MIME
standard. On X11, this maps trivially to the Xdnd protocol. On
diff --git a/src/gui/kernel/qmime_win.cpp b/src/gui/kernel/qmime_win.cpp
index 63f37af..7f82f53 100644
--- a/src/gui/kernel/qmime_win.cpp
+++ b/src/gui/kernel/qmime_win.cpp
@@ -219,9 +219,7 @@ Q_GLOBAL_STATIC(QWindowsMimeList, theMimeList);
/*!
\class QWindowsMime
\brief The QWindowsMime class maps open-standard MIME to Window Clipboard formats.
- \ingroup io
\ingroup draganddrop
- \ingroup misc
Qt's drag-and-drop and clipboard facilities use the MIME standard.
On X11, this maps trivially to the Xdnd protocol, but on Windows
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 24e735c..c5ae66b 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -399,8 +399,8 @@ void QPalette::setColorGroup(ColorGroup cg, const QColorGroup &g)
\ingroup appearance
\ingroup shared
- \ingroup multimedia
- \mainclass
+ \ingroup painting
+
A palette consists of three color groups: \e Active, \e Disabled,
and \e Inactive. All widgets in Qt contain a palette and
diff --git a/src/gui/kernel/qshortcut.cpp b/src/gui/kernel/qshortcut.cpp
index 194f648..1c5917c 100644
--- a/src/gui/kernel/qshortcut.cpp
+++ b/src/gui/kernel/qshortcut.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
\brief The QShortcut class is used to create keyboard shortcuts.
\ingroup events
- \mainclass
+
The QShortcut class provides a way of connecting keyboard
shortcuts to Qt's \l{signals and slots} mechanism, so that
diff --git a/src/gui/kernel/qsizepolicy.qdoc b/src/gui/kernel/qsizepolicy.qdoc
new file mode 100644
index 0000000..200deb5
--- /dev/null
+++ b/src/gui/kernel/qsizepolicy.qdoc
@@ -0,0 +1,521 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QSizePolicy
+ \brief The QSizePolicy class is a layout attribute describing horizontal
+ and vertical resizing policy.
+
+ \ingroup geomanagement
+
+ The size policy of a widget is an expression of its willingness to
+ be resized in various ways, and affects how the widget is treated
+ by the \l{Layout Management}{layout engine}. Each widget returns a
+ QSizePolicy that describes the horizontal and vertical resizing
+ policy it prefers when being laid out. You can change this for
+ a specific widget by changing its QWidget::sizePolicy property.
+
+ QSizePolicy contains two independent QSizePolicy::Policy values
+ and two stretch factors; one describes the widgets's horizontal
+ size policy, and the other describes its vertical size policy. It
+ also contains a flag to indicate whether the height and width of
+ its preferred size are related.
+
+ The horizontal and vertical policies can be set in the
+ constructor, and altered using the setHorizontalPolicy() and
+ setVerticalPolicy() functions. The stretch factors can be set
+ using the setHorizontalStretch() and setVerticalStretch()
+ functions. The flag indicating whether the widget's
+ \l{QWidget::sizeHint()}{sizeHint()} is width-dependent (such as a
+ menu bar or a word-wrapping label) can be set using the
+ setHeightForWidth() function.
+
+ The current size policies and stretch factors be retrieved using
+ the horizontalPolicy(), verticalPolicy(), horizontalStretch() and
+ verticalStretch() functions. Alternatively, use the transpose()
+ function to swap the horizontal and vertical policies and
+ stretches. The hasHeightForWidth() function returns the current
+ status of the flag indicating the size hint dependencies.
+
+ Use the expandingDirections() function to determine whether the
+ associated widget can make use of more space than its
+ \l{QWidget::sizeHint()}{sizeHint()} function indicates, as well as
+ find out in which directions it can expand.
+
+ Finally, the QSizePolicy class provides operators comparing this
+ size policy to a given policy, as well as a QVariant operator
+ storing this QSizePolicy as a QVariant object.
+
+ \sa QSize, QWidget::sizeHint(), QWidget::sizePolicy,
+ QLayoutItem::sizeHint()
+*/
+
+/*!
+ \enum QSizePolicy::PolicyFlag
+
+ These flags are combined together to form the various \l{Policy}
+ values:
+
+ \value GrowFlag The widget can grow beyond its size hint if necessary.
+ \value ExpandFlag The widget should get as much space as possible.
+ \value ShrinkFlag The widget can shrink below its size hint if necessary.
+ \value IgnoreFlag The widget's size hint is ignored. The widget will get
+ as much space as possible.
+
+ \sa Policy
+*/
+
+/*!
+ \enum QSizePolicy::Policy
+
+ This enum describes the various per-dimension sizing types used
+ when constructing a QSizePolicy.
+
+ \value Fixed The QWidget::sizeHint() is the only acceptable
+ alternative, so the widget can never grow or shrink (e.g. the
+ vertical direction of a push button).
+
+ \value Minimum The sizeHint() is minimal, and sufficient. The
+ widget can be expanded, but there is no advantage to it being
+ larger (e.g. the horizontal direction of a push button).
+ It cannot be smaller than the size provided by sizeHint().
+
+ \value Maximum The sizeHint() is a maximum. The widget can be
+ shrunk any amount without detriment if other widgets need the
+ space (e.g. a separator line).
+ It cannot be larger than the size provided by sizeHint().
+
+ \value Preferred The sizeHint() is best, but the widget can be
+ shrunk and still be useful. The widget can be expanded, but there
+ is no advantage to it being larger than sizeHint() (the default
+ QWidget policy).
+
+ \value Expanding The sizeHint() is a sensible size, but the
+ widget can be shrunk and still be useful. The widget can make use
+ of extra space, so it should get as much space as possible (e.g.
+ the horizontal direction of a horizontal slider).
+
+ \value MinimumExpanding The sizeHint() is minimal, and sufficient.
+ The widget can make use of extra space, so it should get as much
+ space as possible (e.g. the horizontal direction of a horizontal
+ slider).
+
+ \value Ignored The sizeHint() is ignored. The widget will get as
+ much space as possible.
+
+ \sa PolicyFlag, setHorizontalPolicy(), setVerticalPolicy()
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy()
+
+ Constructs a QSizePolicy object with \l Fixed as its horizontal
+ and vertical policies.
+
+ The policies can be altered using the setHorizontalPolicy() and
+ setVerticalPolicy() functions. Use the setHeightForWidth()
+ function if the preferred height of the widget is dependent on the
+ width of the widget (for example, a QLabel with line wrapping).
+
+ \sa setHorizontalStretch(), setVerticalStretch()
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical)
+
+ Constructs a QSizePolicy object with the given \a horizontal and
+ \a vertical policies, and DefaultType as the control type.
+
+ Use setHeightForWidth() if the preferred height of the widget is
+ dependent on the width of the widget (for example, a QLabel with
+ line wrapping).
+
+ \sa setHorizontalStretch(), setVerticalStretch()
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical, ControlType type)
+ \since 4.3
+
+ Constructs a QSizePolicy object with the given \a horizontal and
+ \a vertical policies, and the specified control \a type.
+
+ Use setHeightForWidth() if the preferred height of the widget is
+ dependent on the width of the widget (for example, a QLabel with
+ line wrapping).
+
+ \sa setHorizontalStretch(), setVerticalStretch(), controlType()
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::horizontalPolicy() const
+
+ Returns the horizontal component of the size policy.
+
+ \sa setHorizontalPolicy(), verticalPolicy(), horizontalStretch()
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::verticalPolicy() const
+
+ Returns the vertical component of the size policy.
+
+ \sa setVerticalPolicy(), horizontalPolicy(), verticalStretch()
+*/
+
+/*!
+ \fn void QSizePolicy::setHorizontalPolicy(Policy policy)
+
+ Sets the horizontal component to the given \a policy.
+
+ \sa horizontalPolicy(), setVerticalPolicy(), setHorizontalStretch()
+*/
+
+/*!
+ \fn void QSizePolicy::setVerticalPolicy(Policy policy)
+
+ Sets the vertical component to the given \a policy.
+
+ \sa verticalPolicy(), setHorizontalPolicy(), setVerticalStretch()
+*/
+
+/*!
+ \fn Qt::Orientations QSizePolicy::expandingDirections() const
+
+ Returns whether a widget can make use of more space than the
+ QWidget::sizeHint() function indicates.
+
+ A value of Qt::Horizontal or Qt::Vertical means that the widget
+ can grow horizontally or vertically (i.e., the horizontal or
+ vertical policy is \l Expanding or \l MinimumExpanding), whereas
+ Qt::Horizontal | Qt::Vertical means that it can grow in both
+ dimensions.
+
+ \sa horizontalPolicy(), verticalPolicy()
+*/
+
+/*!
+ \fn ControlType QSizePolicy::controlType() const
+ \since 4.3
+
+ Returns the control type associated with the widget for which
+ this size policy applies.
+*/
+
+/*!
+ \fn void QSizePolicy::setControlType(ControlType type)
+ \since 4.3
+
+ Sets the control type associated with the widget for which this
+ size policy applies to \a type.
+
+ The control type specifies the type of the widget for which this
+ size policy applies. It is used by some styles, notably
+ QMacStyle, to insert proper spacing between widgets. For example,
+ the Mac OS X Aqua guidelines specify that push buttons should be
+ separated by 12 pixels, whereas vertically stacked radio buttons
+ only require 6 pixels.
+
+ \sa QStyle::layoutSpacing()
+*/
+
+/*!
+ \fn void QSizePolicy::setHeightForWidth(bool dependent)
+
+ Sets the flag determining whether the widget's preferred height
+ depends on its width, to \a dependent.
+
+ \sa hasHeightForWidth()
+*/
+
+/*!
+ \fn bool QSizePolicy::hasHeightForWidth() const
+
+ Returns true if the widget's preferred height depends on its
+ width; otherwise returns false.
+
+ \sa setHeightForWidth()
+*/
+
+/*!
+ \fn bool QSizePolicy::operator==(const QSizePolicy &other) const
+
+ Returns true if this policy is equal to \a other; otherwise
+ returns false.
+
+ \sa operator!=()
+*/
+
+/*!
+ \fn bool QSizePolicy::operator!=(const QSizePolicy &other) const
+
+ Returns true if this policy is different from \a other; otherwise
+ returns false.
+
+ \sa operator==()
+*/
+
+/*!
+ \fn int QSizePolicy::horizontalStretch() const
+
+ Returns the horizontal stretch factor of the size policy.
+
+ \sa setHorizontalStretch(), verticalStretch(), horizontalPolicy()
+*/
+
+/*!
+ \fn int QSizePolicy::verticalStretch() const
+
+ Returns the vertical stretch factor of the size policy.
+
+ \sa setVerticalStretch(), horizontalStretch(), verticalPolicy()
+*/
+
+/*!
+ \fn void QSizePolicy::setHorizontalStretch(uchar stretchFactor)
+
+ Sets the horizontal stretch factor of the size policy to the given \a
+ stretchFactor.
+
+ \sa horizontalStretch(), setVerticalStretch(), setHorizontalPolicy()
+*/
+
+/*!
+ \fn void QSizePolicy::setVerticalStretch(uchar stretchFactor)
+
+ Sets the vertical stretch factor of the size policy to the given
+ \a stretchFactor.
+
+ \sa verticalStretch(), setHorizontalStretch(), setVerticalPolicy()
+*/
+
+/*!
+ \fn void QSizePolicy::transpose()
+
+ Swaps the horizontal and vertical policies and stretches.
+*/
+
+/*!
+ \enum QSizePolicy::ControlType
+ \since 4.3
+
+ This enum specifies the different types of widgets in terms of
+ layout interaction:
+
+ \value DefaultType The default type, when none is specified.
+ \value ButtonBox A QDialogButtonBox instance.
+ \value CheckBox A QCheckBox instance.
+ \value ComboBox A QComboBox instance.
+ \value Frame A QFrame instance.
+ \value GroupBox A QGroupBox instance.
+ \value Label A QLabel instance.
+ \value Line A QFrame instance with QFrame::HLine or QFrame::VLine.
+ \value LineEdit A QLineEdit instance.
+ \value PushButton A QPushButton instance.
+ \value RadioButton A QRadioButton instance.
+ \value Slider A QAbstractSlider instance.
+ \value SpinBox A QAbstractSpinBox instance.
+ \value TabWidget A QTabWidget instance.
+ \value ToolButton A QToolButton instance.
+
+ \sa setControlType(), controlType()
+*/
+
+#ifdef QT3_SUPPORT
+/*!
+ \typedef QSizePolicy::SizeType
+ \compat
+
+ Use the QSizePolicy::Policy enum instead.
+*/
+
+/*!
+ \enum QSizePolicy::ExpandData
+ \compat
+
+ Use the Qt::Orientations enum instead.
+
+ \value NoDirection Use 0 instead.
+ \value Horizontally Use Qt::Horizontal instead.
+ \value Vertically Use Qt::Vertical instead.
+ \value BothDirections Use Qt::Horizontal | Qt::Vertical instead.
+*/
+
+/*!
+ \fn bool QSizePolicy::mayShrinkHorizontally() const
+
+ Use the horizontalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayShrinkHorizontally();
+ \newcode
+ bool policy = horizontalPolicy() & QSizePolicy::ShrinkFlag;
+ \endcode
+*/
+
+/*!
+ \fn bool QSizePolicy::mayShrinkVertically() const
+
+ Use the verticalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayShrinkVertically();
+ \newcode
+ bool policy = verticalPolicy() & QSizePolicy::ShrinkFlag;
+ \endcode
+*/
+
+/*!
+ \fn bool QSizePolicy::mayGrowHorizontally() const
+
+ Use the horizontalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayGrowHorizontally();
+ \newcode
+ bool policy = horizontalPolicy() & QSizePolicy::GrowFlag;
+ \endcode
+*/
+
+/*!
+ \fn bool QSizePolicy::mayGrowVertically() const
+
+ Use the verticalPolicy() function combined with the
+ QSizePolicy::PolicyFlag enum instead.
+
+ \oldcode
+ bool policy = mayGrowVertically();
+ \newcode
+ bool policy = verticalPolicy() & QSizePolicy::GrowFlag;
+ \endcode
+*/
+
+/*!
+ \fn Qt::QSizePolicy::Orientations QSizePolicy::expanding() const
+
+ Use expandingDirections() instead.
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical, bool dependent)
+
+ Use the QSizePolicy() constructor and the setHeightForWidth()
+ function instead.
+
+ \oldcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical, dependent);
+ \newcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical);
+ policy->setHeightForWidth(dependent);
+ \endcode
+*/
+
+/*!
+ \fn QSizePolicy::QSizePolicy(Policy horizontal, Policy vertical, uchar horizontalStretch,
+ uchar verticalStretch, bool dependent)
+
+ Use the QSizePolicy() constructor and call the
+ setHorizontalStretch(), setVerticalStretch(), and
+ setHeightForWidth() functions instead.
+
+ \oldcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical,
+ horizontalStretch, verticalStretch,
+ dependent);
+ \newcode
+ QSizePolicy *policy = new QSizePolicy(horizontal, vertical);
+ policy->setHorizontalStretch(horizontalStretch);
+ policy->setVerticalStretch(verticalStretch);
+ policy->setHeightForWidth(dependent);
+ \endcode
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::horData() const
+
+ Use horizontalPolicy() instead.
+*/
+
+/*!
+ \fn QSizePolicy::Policy QSizePolicy::verData() const
+
+ Use verticalPolicy() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setHorData(Policy policy)
+
+ Use setHorizontalPolicy() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setVerData(Policy policy)
+
+ Use setVerticalPolicy() instead.
+*/
+
+/*!
+ \fn uint QSizePolicy::horStretch() const
+
+ Use horizontalStretch() instead.
+*/
+
+/*!
+ \fn uint QSizePolicy::verStretch() const
+
+ Use verticalStretch() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setHorStretch(uchar stretch)
+
+ Use setHorizontalStretch() instead.
+*/
+
+/*!
+ \fn void QSizePolicy::setVerStretch(uchar stretch)
+
+ Use setVerticalStretch() instead.
+*/
+#endif
diff --git a/src/gui/kernel/qsound.cpp b/src/gui/kernel/qsound.cpp
index 3fb750e..e5c263b 100644
--- a/src/gui/kernel/qsound.cpp
+++ b/src/gui/kernel/qsound.cpp
@@ -106,7 +106,7 @@ public:
\brief The QSound class provides access to the platform audio facilities.
\ingroup multimedia
- \mainclass
+
Qt provides the most commonly required audio operation in GUI
applications: asynchronously playing a sound file. This is most
diff --git a/src/gui/kernel/qstackedlayout.cpp b/src/gui/kernel/qstackedlayout.cpp
index 4025b73..c7e25b0 100644
--- a/src/gui/kernel/qstackedlayout.cpp
+++ b/src/gui/kernel/qstackedlayout.cpp
@@ -65,8 +65,6 @@ public:
only one widget is visible at a time.
\ingroup geomanagement
- \ingroup appearance
- \mainclass
QStackedLayout can be used to create a user interface similar to
the one provided by QTabWidget. There is also a convenience
diff --git a/src/gui/kernel/qtooltip.cpp b/src/gui/kernel/qtooltip.cpp
index 3ea9cb4..8193c55 100644
--- a/src/gui/kernel/qtooltip.cpp
+++ b/src/gui/kernel/qtooltip.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
widget.
\ingroup helpsystem
- \mainclass
+
The tip is a short piece of text reminding the user of the
widget's function. It is drawn immediately below the given
diff --git a/src/gui/kernel/qwhatsthis.cpp b/src/gui/kernel/qwhatsthis.cpp
index 5a37801..6d0bc33 100644
--- a/src/gui/kernel/qwhatsthis.cpp
+++ b/src/gui/kernel/qwhatsthis.cpp
@@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE
widget, i.e. answering the question "What's This?".
\ingroup helpsystem
- \mainclass
+
"What's This?" help is part of an application's online help
system, and provides users with information about the
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index c00f953..515eed9 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -454,7 +454,7 @@ void QWidget::setAutoFillBackground(bool enabled)
\brief The QWidget class is the base class of all user interface objects.
\ingroup basicwidgets
- \mainclass
+
The widget is the atom of the user interface: it receives mouse, keyboard
and other events from the window system, and paints a representation of
@@ -2692,7 +2692,7 @@ void QWidget::showFullScreen()
Calling this function only affects \l{isWindow()}{windows}.
On X11, this function may not work properly with certain window
- managers. See \l{geometry.html}{Window Geometry} for an explanation.
+ managers. See the \l{Window Geometry} documentation for an explanation.
\sa setWindowState(), showNormal(), showMinimized(), show(), hide(), isVisible()
*/
@@ -3041,8 +3041,8 @@ void QWidget::setDisabled(bool disable)
\brief geometry of the widget relative to its parent including any
window frame
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of geometry issues with windows.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
By default, this property contains a value that depends on the user's
platform and screen geometry.
@@ -3068,8 +3068,8 @@ QRect QWidget::frameGeometry() const
\brief the x coordinate of the widget relative to its parent including
any window frame
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of window geometry.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
By default, this property has a value of 0.
@@ -3088,8 +3088,8 @@ int QWidget::x() const
\brief the y coordinate of the widget relative to its parent and
including any window frame
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of window geometry.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
By default, this property has a value of 0.
@@ -3121,8 +3121,8 @@ int QWidget::y() const
\warning Calling move() or setGeometry() inside moveEvent() can
lead to infinite recursion.
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of window geometry.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
\sa frameGeometry, size x(), y()
*/
@@ -3152,8 +3152,8 @@ QPoint QWidget::pos() const
\warning Calling setGeometry() inside resizeEvent() or moveEvent()
can lead to infinite recursion.
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of window geometry.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
By default, this property contains a value that depends on the user's
platform and screen geometry.
@@ -3202,8 +3202,8 @@ QPoint QWidget::pos() const
\property QWidget::width
\brief the width of the widget excluding any window frame
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of window geometry.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
\note Do not use this function to find the width of a screen on
a \l{QDesktopWidget}{multiple screen desktop}. Read
@@ -3219,8 +3219,8 @@ QPoint QWidget::pos() const
\property QWidget::height
\brief the height of the widget excluding any window frame
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of window geometry.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
\note Do not use this function to find the height of a screen
on a \l {QDesktopWidget} {multiple screen desktop}. Read
@@ -3239,8 +3239,8 @@ QPoint QWidget::pos() const
The rect property equals QRect(0, 0, width(), height()).
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of window geometry.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
By default, this property contains a value that depends on the user's
platform and screen geometry.
@@ -6228,8 +6228,8 @@ void QWidget::setGeometry(const QRect &r)
\snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 11
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of geometry issues with windows.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
Use QMainWindow::saveState() to save the geometry and the state of
toolbars and dock widgets.
@@ -6270,8 +6270,8 @@ QByteArray QWidget::saveGeometry() const
\snippet doc/src/snippets/code/src_gui_kernel_qwidget.cpp 12
- See the \link geometry.html Window Geometry documentation\endlink
- for an overview of geometry issues with windows.
+ See the \l{Window Geometry} documentation for an overview of geometry
+ issues with windows.
Use QMainWindow::restoreState() to restore the geometry and the
state of toolbars and dock widgets.
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 5948cd4..999faeb 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -72,7 +72,6 @@
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
****************************************************************************/
-//#define QT_RASTER_PAINTENGINE
#include <private/qt_mac_p.h>
#include <private/qeventdispatcher_mac_p.h>
@@ -88,9 +87,6 @@
#include "qlayout.h"
#include "qmenubar.h"
#include <private/qbackingstore_p.h>
-#ifdef QT_RASTER_PAINTENGINE
-# include <private/qpaintengine_raster_p.h>
-#endif
#include <private/qwindowsurface_mac_p.h>
#include <private/qpaintengine_mac_p.h>
#include "qpainter.h"
@@ -111,6 +107,7 @@
#include <private/qcocoapanel_mac_p.h>
#include "qwidget_p.h"
+#include "qevent_p.h"
#include "qdnd_p.h"
#include <QtGui/qgraphicsproxywidget.h>
@@ -733,6 +730,13 @@ static EventTypeSpec window_events[] = {
{ kEventClassWindow, kEventWindowGetRegion },
{ kEventClassWindow, kEventWindowGetClickModality },
{ kEventClassWindow, kEventWindowTransitionCompleted },
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ { kEventClassGesture, kEventGestureStarted },
+ { kEventClassGesture, kEventGestureEnded },
+ { kEventClassGesture, kEventGestureMagnify },
+ { kEventClassGesture, kEventGestureSwipe },
+ { kEventClassGesture, kEventGestureRotate },
+#endif
{ kEventClassMouse, kEventMouseDown }
};
static EventHandlerUPP mac_win_eventUPP = 0;
@@ -1017,6 +1021,69 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
return SendEventToApplication(event);
handled_event = false;
break; }
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ case kEventClassGesture: {
+ // First, find the widget that was under
+ // the mouse when the gesture happened:
+ HIPoint screenLocation;
+ if (GetEventParameter(event, kEventParamMouseLocation, typeHIPoint, 0,
+ sizeof(screenLocation), 0, &screenLocation) != noErr) {
+ handled_event = false;
+ break;
+ }
+ QWidget *widget = QApplication::widgetAt(screenLocation.x, screenLocation.y);
+ if (!widget) {
+ handled_event = false;
+ break;
+ }
+
+ QNativeGestureEvent qNGEvent;
+ qNGEvent.position = QPoint(screenLocation.x, screenLocation.y);
+
+ switch (ekind) {
+ case kEventGestureStarted:
+ qNGEvent.gestureType = QNativeGestureEvent::GestureBegin;
+ break;
+ case kEventGestureEnded:
+ qNGEvent.gestureType = QNativeGestureEvent::GestureEnd;
+ break;
+ case kEventGestureRotate: {
+ CGFloat amount;
+ if (GetEventParameter(event, kEventParamRotationAmount, typeCGFloat, 0,
+ sizeof(amount), 0, &amount) != noErr) {
+ handled_event = false;
+ break;
+ }
+ qNGEvent.gestureType = QNativeGestureEvent::Zoom;
+ qNGEvent.percentage = float(amount);
+ break; }
+ case kEventGestureSwipe: {
+ HIPoint swipeDirection;
+ if (GetEventParameter(event, kEventParamSwipeDirection, typeHIPoint, 0,
+ sizeof(swipeDirection), 0, &swipeDirection) != noErr) {
+ handled_event = false;
+ break;
+ }
+ qNGEvent.gestureType = QNativeGestureEvent::Swipe;
+ qNGEvent.direction = QSize(-swipeDirection.x, -swipeDirection.y);
+ break; }
+ case kEventGestureMagnify: {
+ CGFloat amount;
+ if (GetEventParameter(event, kEventParamMagnificationAmount, typeCGFloat, 0,
+ sizeof(amount), 0, &amount) != noErr) {
+ handled_event = false;
+ break;
+ }
+ qNGEvent.gestureType = QNativeGestureEvent::Zoom;
+ qNGEvent.percentage = float(amount);
+ break; }
+ }
+
+ QApplication::sendSpontaneousEvent(widget, &qNGEvent);
+ break; }
+#endif // gestures
+
default:
handled_event = false;
}
@@ -1220,11 +1287,6 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
QApplication::sendSpontaneousEvent(widget, &e);
if (!redirectionOffset.isNull())
widget->d_func()->restoreRedirected();
-#ifdef QT_RASTER_PAINTENGINE
- if(engine && engine->type() == QPaintEngine::Raster)
- static_cast<QRasterPaintEngine*>(engine)->flush(widget,
- qrgn.boundingRect().topLeft());
-#endif
//cleanup
if (engine)
@@ -3101,7 +3163,7 @@ void QWidgetPrivate::update_sys(const QRegion &rgn)
dirtyOnWidget += rgn;
#ifndef QT_MAC_USE_COCOA
RgnHandle rgnHandle = rgn.toQDRgnForUpdate_sys();
- if (rgnHandle)
+ if (rgnHandle)
HIViewSetNeedsDisplayInRegion(qt_mac_nativeview_for(q), QMacSmartQuickDrawRegion(rgnHandle), true);
else {
HIViewSetNeedsDisplay(qt_mac_nativeview_for(q), true); // do a complete repaint on overflow.
@@ -4555,21 +4617,6 @@ Q_GLOBAL_STATIC(QPaintEngineCleanupHandler, engineHandler)
QPaintEngine *QWidget::paintEngine() const
{
QPaintEngine *&pe = engineHandler()->engine;
-#ifdef QT_RASTER_PAINTENGINE
- if (!pe) {
- if(qgetenv("QT_MAC_USE_COREGRAPHICS").isNull())
- pe = new QRasterPaintEngine();
- else
- pe = new QCoreGraphicsPaintEngine();
- }
- if (pe->isActive()) {
- QPaintEngine *engine =
- qgetenv("QT_MAC_USE_COREGRAPHICS").isNull()
- ? (QPaintEngine*)new QRasterPaintEngine() : (QPaintEngine*)new QCoreGraphicsPaintEngine();
- engine->setAutoDestruct(true);
- return engine;
- }
-#else
if (!pe)
pe = new QCoreGraphicsPaintEngine();
if (pe->isActive()) {
@@ -4577,7 +4624,6 @@ QPaintEngine *QWidget::paintEngine() const
engine->setAutoDestruct(true);
return engine;
}
-#endif
return pe;
}
diff --git a/src/gui/kernel/qwidgetaction.cpp b/src/gui/kernel/qwidgetaction.cpp
index 911d332..a397e39 100644
--- a/src/gui/kernel/qwidgetaction.cpp
+++ b/src/gui/kernel/qwidgetaction.cpp
@@ -54,6 +54,8 @@ QT_BEGIN_NAMESPACE
for inserting custom widgets into action based containers, such
as toolbars.
+ \ingroup mainwindow-classes
+
Most actions in an application are represented as items in menus or
buttons in toolbars. However sometimes more complex widgets are
necessary. For example a zoom action in a word processor may be
@@ -100,9 +102,6 @@ QT_BEGIN_NAMESPACE
DirectConnection.
\endlist
- \ingroup application
- \mainclass
-
\sa QAction, QActionGroup, QWidget
*/
diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp
index 271571c..1c924c7 100644
--- a/src/gui/math3d/qgenericmatrix.cpp
+++ b/src/gui/math3d/qgenericmatrix.cpp
@@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE
\class QGenericMatrix
\brief The QGenericMatrix class is a template class that represents a NxM transformation matrix with N columns and M rows.
\since 4.6
+ \ingroup painting
+ \ingroup painting-3D
The QGenericMatrix template has four parameters:
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index a67a832..8fc439b 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -52,6 +52,7 @@ QT_BEGIN_NAMESPACE
\class QMatrix4x4
\brief The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
\since 4.6
+ \ingroup painting-3D
\sa QVector3D, QGenericMatrix
*/
@@ -1009,11 +1010,24 @@ QMatrix4x4& QMatrix4x4::rotate(qreal angle, const QVector3D& vector)
*/
QMatrix4x4& QMatrix4x4::rotate(qreal angle, qreal x, qreal y, qreal z)
{
+ if (angle == 0.0f)
+ return *this;
QMatrix4x4 m(1); // The "1" says to not load the identity.
- qreal a = angle * M_PI / 180.0f;
- qreal c = qCos(a);
- qreal s = qSin(a);
- qreal ic;
+ qreal c, s, ic;
+ if (angle == 90.0f || angle == -270.0f) {
+ s = 1.0f;
+ c = 0.0f;
+ } else if (angle == -90.0f || angle == 270.0f) {
+ s = -1.0f;
+ c = 0.0f;
+ } else if (angle == 180.0f || angle == -180.0f) {
+ s = 0.0f;
+ c = -1.0f;
+ } else {
+ qreal a = angle * M_PI / 180.0f;
+ c = qCos(a);
+ s = qSin(a);
+ }
bool quick = false;
if (x == 0.0f) {
if (y == 0.0f) {
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 9e56966..b2c598f 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE
\class QQuaternion
\brief The QQuaternion class represents a quaternion consisting of a vector and scalar.
\since 4.6
+ \ingroup painting-3D
Quaternions are used to represent rotations in 3D space, and
consist of a 3D rotation axis specified by the x, y, and z
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index f7fef6c..1662020 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE
\class QVector2D
\brief The QVector2D class represents a vector or vertex in 2D space.
\since 4.6
+ \ingroup painting
+ \ingroup painting-3D
The QVector2D class can also be used to represent vertices in 2D space.
We therefore do not need to provide a separate vertex class.
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index 2915d3a..0e3f4e1 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE
\class QVector3D
\brief The QVector3D class represents a vector or vertex in 3D space.
\since 4.6
+ \ingroup painting-3D
Vectors are one of the main building blocks of 3D representation and
drawing. They consist of three coordinates, traditionally called
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index dd64103..a2efff7 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE
\class QVector4D
\brief The QVector4D class represents a vector or vertex in 4D space.
\since 4.6
+ \ingroup painting-3D
The QVector4D class can also be used to represent vertices in 4D space.
We therefore do not need to provide a separate vertex class.
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index b9d293c..d11e818 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -80,9 +80,6 @@ SOURCES += \
painting/qtransform.cpp \
painting/qwindowsurface.cpp \
- DEFINES += QT_RASTER_IMAGEENGINE
- win32:DEFINES += QT_RASTER_PAINTENGINE
- embedded:DEFINES += QT_RASTER_PAINTENGINE
SOURCES += \
painting/qpaintengine_raster.cpp \
painting/qdrawhelper.cpp \
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 1121c0e..e447301 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -793,8 +793,351 @@ void qt_scale_image_argb32_on_argb32(uchar *destPixels, int dbpl,
}
}
+struct QTransformImageVertex
+{
+ qreal x, y, u, v; // destination coordinates (x, y) and source coordinates (u, v)
+};
+
+template <class SrcT, class DestT, class Blender>
+void qt_transform_image_rasterize(DestT *destPixels, int dbpl,
+ const SrcT *srcPixels, int sbpl,
+ const QTransformImageVertex &topLeft, const QTransformImageVertex &bottomLeft,
+ const QTransformImageVertex &topRight, const QTransformImageVertex &bottomRight,
+ const QRect &sourceRect,
+ const QRect &clip,
+ qreal topY, qreal bottomY,
+ int dudx, int dvdx, int dudy, int dvdy, int u0, int v0,
+ Blender blender)
+{
+ int fromY = qMax(qRound(topY), clip.top());
+ int toY = qMin(qRound(bottomY), clip.top() + clip.height());
+ if (fromY >= toY)
+ return;
+
+ qreal leftSlope = (bottomLeft.x - topLeft.x) / (bottomLeft.y - topLeft.y);
+ qreal rightSlope = (bottomRight.x - topRight.x) / (bottomRight.y - topRight.y);
+ int dx_l = int(leftSlope * 0x10000);
+ int dx_r = int(rightSlope * 0x10000);
+ int x_l = int((topLeft.x + (0.5 + fromY - topLeft.y) * leftSlope + 0.5) * 0x10000);
+ int x_r = int((topRight.x + (0.5 + fromY - topRight.y) * rightSlope + 0.5) * 0x10000);
+
+ int fromX, toX, x1, x2, u, v, i, ii;
+ DestT *line;
+ for (int y = fromY; y < toY; ++y) {
+ line = reinterpret_cast<DestT *>(reinterpret_cast<uchar *>(destPixels) + y * dbpl);
+
+ fromX = qMax(x_l >> 16, clip.left());
+ toX = qMin(x_r >> 16, clip.left() + clip.width());
+ if (fromX < toX) {
+ // Because of rounding, we can get source coordinates outside the source image.
+ // Clamp these coordinates to the source rect to avoid segmentation fault and
+ // garbage on the screen.
+
+ // Find the first pixel on the current scan line where the source coordinates are within the source rect.
+ x1 = fromX;
+ u = x1 * dudx + y * dudy + u0;
+ v = x1 * dvdx + y * dvdy + v0;
+ for (; x1 < toX; ++x1) {
+ int uu = u >> 16;
+ int vv = v >> 16;
+ if (uu >= sourceRect.left() && uu < sourceRect.left() + sourceRect.width()
+ && vv >= sourceRect.top() && vv < sourceRect.top() + sourceRect.height()) {
+ break;
+ }
+ u += dudx;
+ v += dvdx;
+ }
+
+ // Find the last pixel on the current scan line where the source coordinates are within the source rect.
+ x2 = toX;
+ u = (x2 - 1) * dudx + y * dudy + u0;
+ v = (x2 - 1) * dvdx + y * dvdy + v0;
+ for (; x2 > x1; --x2) {
+ int uu = u >> 16;
+ int vv = v >> 16;
+ if (uu >= sourceRect.left() && uu < sourceRect.left() + sourceRect.width()
+ && vv >= sourceRect.top() && vv < sourceRect.top() + sourceRect.height()) {
+ break;
+ }
+ u -= dudx;
+ v -= dvdx;
+ }
+
+ // Set up values at the beginning of the scan line.
+ u = fromX * dudx + y * dudy + u0;
+ v = fromX * dvdx + y * dvdy + v0;
+ line += fromX;
+
+ // Beginning of the scan line, with per-pixel checks.
+ i = x1 - fromX;
+ while (i) {
+ int uu = qBound(sourceRect.left(), u >> 16, sourceRect.left() + sourceRect.width() - 1);
+ int vv = qBound(sourceRect.top(), v >> 16, sourceRect.top() + sourceRect.height() - 1);
+ blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + vv * sbpl)[uu]);
+ u += dudx;
+ v += dvdx;
+ ++line;
+ --i;
+ }
+
+ // Middle of the scan line, without checks.
+ // Manual loop unrolling.
+ i = x2 - x1;
+ ii = i >> 3;
+ while (ii) {
+ blender.write(&line[0], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ blender.write(&line[1], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ blender.write(&line[2], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ blender.write(&line[3], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ blender.write(&line[4], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ blender.write(&line[5], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ blender.write(&line[6], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ blender.write(&line[7], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
+ line += 8;
+ --ii;
+ }
+ switch (i & 7) {
+ case 7: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ case 6: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ case 5: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ case 4: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ case 3: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ case 2: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ case 1: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ }
+
+ // End of the scan line, with per-pixel checks.
+ i = toX - x2;
+ while (i) {
+ int uu = qBound(sourceRect.left(), u >> 16, sourceRect.left() + sourceRect.width() - 1);
+ int vv = qBound(sourceRect.top(), v >> 16, sourceRect.top() + sourceRect.height() - 1);
+ blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + vv * sbpl)[uu]);
+ u += dudx;
+ v += dvdx;
+ ++line;
+ --i;
+ }
+ }
+ x_l += dx_l;
+ x_r += dx_r;
+ }
+}
+
+template <class SrcT, class DestT, class Blender>
+void qt_transform_image(DestT *destPixels, int dbpl,
+ const SrcT *srcPixels, int sbpl,
+ const QRectF &targetRect,
+ const QRectF &sourceRect,
+ const QRect &clip,
+ const QTransform &targetRectTransform,
+ Blender blender)
+{
+ enum Corner
+ {
+ TopLeft,
+ TopRight,
+ BottomRight,
+ BottomLeft
+ };
+
+ // map source rectangle to destination.
+ QTransformImageVertex v[4];
+ v[TopLeft].u = v[BottomLeft].u = sourceRect.left();
+ v[TopLeft].v = v[TopRight].v = sourceRect.top();
+ v[TopRight].u = v[BottomRight].u = sourceRect.right();
+ v[BottomLeft].v = v[BottomRight].v = sourceRect.bottom();
+ targetRectTransform.map(targetRect.left(), targetRect.top(), &v[TopLeft].x, &v[TopLeft].y);
+ targetRectTransform.map(targetRect.right(), targetRect.top(), &v[TopRight].x, &v[TopRight].y);
+ targetRectTransform.map(targetRect.left(), targetRect.bottom(), &v[BottomLeft].x, &v[BottomLeft].y);
+ targetRectTransform.map(targetRect.right(), targetRect.bottom(), &v[BottomRight].x, &v[BottomRight].y);
+
+ // find topmost vertex.
+ int topmost = 0;
+ for (int i = 1; i < 4; ++i) {
+ if (v[i].y < v[topmost].y)
+ topmost = i;
+ }
+ // rearrange array such that topmost vertex is at index 0.
+ switch (topmost) {
+ case 1:
+ {
+ QTransformImageVertex t = v[0];
+ for (int i = 0; i < 3; ++i)
+ v[i] = v[i+1];
+ v[3] = t;
+ }
+ break;
+ case 2:
+ qSwap(v[0], v[2]);
+ qSwap(v[1], v[3]);
+ break;
+ case 3:
+ {
+ QTransformImageVertex t = v[3];
+ for (int i = 3; i > 0; --i)
+ v[i] = v[i-1];
+ v[0] = t;
+ }
+ break;
+ }
+
+ // if necessary, swap vertex 1 and 3 such that 1 is to the left of 3.
+ qreal dx1 = v[1].x - v[0].x;
+ qreal dy1 = v[1].y - v[0].y;
+ qreal dx2 = v[3].x - v[0].x;
+ qreal dy2 = v[3].y - v[0].y;
+ if (dx1 * dy2 - dx2 * dy1 > 0)
+ qSwap(v[1], v[3]);
+
+ QTransformImageVertex u = {v[1].x - v[0].x, v[1].y - v[0].y, v[1].u - v[0].u, v[1].v - v[0].v};
+ QTransformImageVertex w = {v[2].x - v[0].x, v[2].y - v[0].y, v[2].u - v[0].u, v[2].v - v[0].v};
+
+ qreal det = u.x * w.y - u.y * w.x;
+ if (det == 0)
+ return;
+
+ qreal invDet = 1.0 / det;
+ qreal m11, m12, m21, m22, mdx, mdy;
+
+ m11 = (u.u * w.y - u.y * w.u) * invDet;
+ m12 = (u.x * w.u - u.u * w.x) * invDet;
+ m21 = (u.v * w.y - u.y * w.v) * invDet;
+ m22 = (u.x * w.v - u.v * w.x) * invDet;
+ mdx = v[0].u - m11 * v[0].x - m12 * v[0].y;
+ mdy = v[0].v - m21 * v[0].x - m22 * v[0].y;
+
+ int dudx = int(m11 * 0x10000);
+ int dvdx = int(m21 * 0x10000);
+ int dudy = int(m12 * 0x10000);
+ int dvdy = int(m22 * 0x10000);
+ int u0 = qCeil((0.5 * m11 + 0.5 * m12 + mdx) * 0x10000) - 1;
+ int v0 = qCeil((0.5 * m21 + 0.5 * m22 + mdy) * 0x10000) - 1;
+
+ int x1 = qFloor(sourceRect.left());
+ int y1 = qFloor(sourceRect.top());
+ int x2 = qCeil(sourceRect.right());
+ int y2 = qCeil(sourceRect.bottom());
+ QRect sourceRectI(x1, y1, x2 - x1, y2 - y1);
+
+ // rasterize trapezoids.
+ if (v[1].y < v[3].y) {
+ qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[0], v[1], v[0], v[3], sourceRectI, clip, v[0].y, v[1].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
+ qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[1], v[2], v[0], v[3], sourceRectI, clip, v[1].y, v[3].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
+ qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[1], v[2], v[3], v[2], sourceRectI, clip, v[3].y, v[2].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
+ } else {
+ qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[0], v[1], v[0], v[3], sourceRectI, clip, v[0].y, v[3].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
+ qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[0], v[1], v[3], v[2], sourceRectI, clip, v[3].y, v[1].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
+ qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[1], v[2], v[3], v[2], sourceRectI, clip, v[1].y, v[2].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
+ }
+}
+
+void qt_transform_image_rgb16_on_rgb16(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ const QRectF &targetRect,
+ const QRectF &sourceRect,
+ const QRect &clip,
+ const QTransform &targetRectTransform,
+ int const_alpha)
+{
+ if (const_alpha == 256) {
+ Blend_RGB16_on_RGB16_NoAlpha noAlpha;
+ qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
+ reinterpret_cast<const quint16 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, noAlpha);
+ } else {
+ Blend_RGB16_on_RGB16_ConstAlpha constAlpha(const_alpha);
+ qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
+ reinterpret_cast<const quint16 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, constAlpha);
+ }
+}
+
+void qt_transform_image_argb24_on_rgb16(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ const QRectF &targetRect,
+ const QRectF &sourceRect,
+ const QRect &clip,
+ const QTransform &targetRectTransform,
+ int const_alpha)
+{
+ if (const_alpha == 256) {
+ Blend_ARGB24_on_RGB16_SourceAlpha noAlpha;
+ qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
+ reinterpret_cast<const qargb8565 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, noAlpha);
+ } else {
+ Blend_ARGB24_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
+ qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
+ reinterpret_cast<const qargb8565 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, constAlpha);
+ }
+}
+void qt_transform_image_argb32_on_rgb16(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ const QRectF &targetRect,
+ const QRectF &sourceRect,
+ const QRect &clip,
+ const QTransform &targetRectTransform,
+ int const_alpha)
+{
+ if (const_alpha == 256) {
+ Blend_ARGB32_on_RGB16_SourceAlpha noAlpha;
+ qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
+ reinterpret_cast<const quint32 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, noAlpha);
+ } else {
+ Blend_ARGB32_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
+ qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
+ reinterpret_cast<const quint32 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, constAlpha);
+ }
+}
+
+
+void qt_transform_image_rgb32_on_rgb32(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ const QRectF &targetRect,
+ const QRectF &sourceRect,
+ const QRect &clip,
+ const QTransform &targetRectTransform,
+ int const_alpha)
+{
+ if (const_alpha == 256) {
+ Blend_RGB32_on_RGB32_NoAlpha noAlpha;
+ qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
+ reinterpret_cast<const quint32 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, noAlpha);
+ } else {
+ Blend_RGB32_on_RGB32_ConstAlpha constAlpha(const_alpha);
+ qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
+ reinterpret_cast<const quint32 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, constAlpha);
+ }
+}
+
+void qt_transform_image_argb32_on_argb32(uchar *destPixels, int dbpl,
+ const uchar *srcPixels, int sbpl,
+ const QRectF &targetRect,
+ const QRectF &sourceRect,
+ const QRect &clip,
+ const QTransform &targetRectTransform,
+ int const_alpha)
+{
+ if (const_alpha == 256) {
+ Blend_ARGB32_on_ARGB32_SourceAlpha sourceAlpha;
+ qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
+ reinterpret_cast<const quint32 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, sourceAlpha);
+ } else {
+ Blend_ARGB32_on_ARGB32_SourceAndConstAlpha constAlpha(const_alpha);
+ qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
+ reinterpret_cast<const quint32 *>(srcPixels), sbpl,
+ targetRect, sourceRect, clip, targetRectTransform, constAlpha);
+ }
+}
+
SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
{ // Format_Invalid
0, // Format_Invalid,
@@ -1378,5 +1721,295 @@ SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats] =
}
};
+SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats] = {
+ { // Format_Invalid
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_Mono
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_MonoLSB
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_Indexed8
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_RGB32
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ qt_transform_image_rgb32_on_rgb32, // Format_RGB32,
+ 0, // Format_ARGB32,
+ qt_transform_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_ARGB32
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_ARGB32_Premultiplied
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ qt_transform_image_rgb32_on_rgb32, // Format_RGB32,
+ 0, // Format_ARGB32,
+ qt_transform_image_argb32_on_argb32, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_RGB16
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ qt_transform_image_argb32_on_rgb16, // Format_ARGB32_Premultiplied,
+ qt_transform_image_rgb16_on_rgb16, // Format_RGB16,
+ qt_transform_image_argb24_on_rgb16, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_ARGB8565_Premultiplied
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_RGB666
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_ARGB6666_Premultiplied
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_RGB555
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_ARGB8555_Premultiplied
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_RGB888
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_RGB444
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ },
+ { // Format_ARGB4444_Premultiplied
+ 0, // Format_Invalid,
+ 0, // Format_Mono,
+ 0, // Format_MonoLSB,
+ 0, // Format_Indexed8,
+ 0, // Format_RGB32,
+ 0, // Format_ARGB32,
+ 0, // Format_ARGB32_Premultiplied,
+ 0, // Format_RGB16,
+ 0, // Format_ARGB8565_Premultiplied,
+ 0, // Format_RGB666,
+ 0, // Format_ARGB6666_Premultiplied,
+ 0, // Format_RGB555,
+ 0, // Format_ARGB8555_Premultiplied,
+ 0, // Format_RGB888,
+ 0, // Format_RGB444,
+ 0 // Format_ARGB4444_Premultiplied,
+ }
+};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index be5db6b..931d7ff 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -233,7 +233,7 @@ struct QGradientBrushData : public QBrushData
/*!
\class QBrush
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
\brief The QBrush class defines the fill pattern of shapes drawn
@@ -1153,7 +1153,7 @@ QDataStream &operator>>(QDataStream &s, QBrush &b)
/*!
\class QGradient
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
\brief The QGradient class is used in combination with QBrush to
@@ -1517,7 +1517,7 @@ bool QGradient::operator==(const QGradient &gradient)
/*!
\class QLinearGradient
- \ingroup multimedia
+ \ingroup painting
\brief The QLinearGradient class is used in combination with QBrush to
specify a linear gradient brush.
@@ -1696,7 +1696,7 @@ void QLinearGradient::setFinalStop(const QPointF &stop)
/*!
\class QRadialGradient
- \ingroup multimedia
+ \ingroup painting
\brief The QRadialGradient class is used in combination with QBrush to
specify a radial gradient brush.
@@ -1953,7 +1953,7 @@ void QRadialGradient::setFocalPoint(const QPointF &focalPoint)
/*!
\class QConicalGradient
- \ingroup multimedia
+ \ingroup painting
\brief The QConicalGradient class is used in combination with QBrush to
specify a conical gradient brush.
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 11a9ae7..4e93f04 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -66,9 +66,9 @@ QT_BEGIN_NAMESPACE
\class QColor
\brief The QColor class provides colors based on RGB, HSV or CMYK values.
- \ingroup multimedia
+ \ingroup painting
\ingroup appearance
- \mainclass
+
A color is normally specified in terms of RGB (red, green, and
blue) components, but it is also possible to specify it in terms
diff --git a/src/gui/painting/qcolormap.qdoc b/src/gui/painting/qcolormap.qdoc
new file mode 100644
index 0000000..e4a88f0
--- /dev/null
+++ b/src/gui/painting/qcolormap.qdoc
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QColormap
+ \ingroup painting
+
+ \brief The QColormap class maps device independent QColors to device
+ dependent pixel values.
+*/
+
+/*! \enum QColormap::Mode
+
+ This enum describes how QColormap maps device independent RGB
+ values to device dependent pixel values.
+
+ \value Direct Pixel values are derived directly from the RGB
+ values, also known as "True Color."
+
+ \value Indexed Pixel values represent indexes into a vector of
+ available colors, i.e. QColormap uses the index of the color that
+ most closely matches an RGB value.
+
+ \value Gray Similar to \c Indexed, pixel values represent a vector
+ of available gray tones. QColormap uses the index of the gray
+ tone that most closely matches the computed gray tone of an RGB
+ value.
+*/
+
+/*!
+ \fn QColormap QColormap::instance(int screen)
+
+ Returns the colormap for the specified \a screen. If \a screen is
+ -1, this function returns the colormap for the default screen.
+*/
+
+/*!
+ \fn QColormap::QColormap(const QColormap &colormap)
+
+ Constructs a copy of another \a colormap.
+*/
+
+/*!
+ \fn QColormap::~QColormap()
+
+ Destroys the colormap.
+*/
+
+/*!
+ \fn int QColormap::size() const
+
+ Returns the size of the colormap for \c Indexed and \c Gray modes;
+ Returns -1 for \c Direct mode.
+
+ \sa colormap()
+*/
+
+/*!
+ \fn uint QColormap::pixel(const QColor &color) const
+
+ Returns a device dependent pixel value for the \a color.
+
+ \sa colorAt()
+*/
+
+/*!
+ \fn int QColormap::depth() const
+
+ Returns the depth of the device.
+
+ \sa size()
+*/
+
+/*!
+ \fn QColormap::Mode QColormap::mode() const
+
+ Returns the mode of this colormap.
+
+ \sa QColormap::Mode
+*/
+
+/*!
+ \fn const QColor QColormap::colorAt(uint pixel) const
+
+ Returns a QColor for the \a pixel.
+
+ \sa pixel()
+*/
+
+/*!
+ \fn const QVector<QColor> QColormap::colormap() const
+
+ Returns a vector of colors which represents the devices colormap
+ for \c Indexed and \c Gray modes. This function returns an empty
+ vector for \c Direct mode.
+
+ \sa size()
+*/
+
+/*! \fn HPALETTE QColormap::hPal()
+
+ This function is only available on Windows.
+
+ Returns an handle to the HPALETTE used by this colormap. If no
+ HPALETTE is being used, this function returns zero.
+*/
+
+/*! \since 4.2
+
+ \fn QColormap &QColormap::operator=(const QColormap &colormap)
+
+ Assigns the given \a colormap to \e this color map and returns
+ a reference to \e this color map.
+*/
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 18c3358..83d2671 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -146,6 +146,14 @@ typedef void (*SrcOverScaleFunc)(uchar *destPixels, int dbpl,
const QRect &clipRect,
int const_alpha);
+typedef void (*SrcOverTransformFunc)(uchar *destPixels, int dbpl,
+ const uchar *src, int spbl,
+ const QRectF &targetRect,
+ const QRectF &sourceRect,
+ const QRect &clipRect,
+ const QTransform &targetRectTransform,
+ int const_alpha);
+
struct DrawHelper {
ProcessSpans blendColor;
@@ -158,6 +166,7 @@ struct DrawHelper {
extern SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats];
extern SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats];
+extern SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats];
extern DrawHelper qDrawHelper[QImage::NImageFormats];
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index ce71a84..abff9bf 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
coordinate system.
\obsolete
- \ingroup multimedia
+ \ingroup painting
A matrix specifies how to translate, scale, shear or rotate the
coordinate system, and is typically used when rendering graphics.
diff --git a/src/gui/painting/qpaintdevice.cpp b/src/gui/painting/qpaintdevice.cpp
index 6477952..6a2a4c4 100644
--- a/src/gui/painting/qpaintdevice.cpp
+++ b/src/gui/painting/qpaintdevice.cpp
@@ -64,3 +64,5 @@ int QPaintDevice::metric(PaintDeviceMetric) const
qWarning("QPaintDevice::metrics: Device has no metric information");
return 0;
}
+
+QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc
new file mode 100644
index 0000000..5933484
--- /dev/null
+++ b/src/gui/painting/qpaintdevice.qdoc
@@ -0,0 +1,289 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QPaintDevice
+ \brief The QPaintDevice class is the base class of objects that
+ can be painted.
+
+ \ingroup painting
+
+ A paint device is an abstraction of a two-dimensional space that
+ can be drawn using a QPainter. Its default coordinate system has
+ its origin located at the top-left position. X increases to the
+ right and Y increases downwards. The unit is one pixel.
+
+ The drawing capabilities of QPaintDevice are currently implemented
+ by the QWidget, QImage, QPixmap, QGLPixelBuffer, QPicture, and
+ QPrinter subclasses.
+
+ To implement support for a new backend, you must derive from
+ QPaintDevice and reimplement the virtual paintEngine() function to
+ tell QPainter which paint engine should be used to draw on this
+ particular device. Note that you also must create a corresponding
+ paint engine to be able to draw on the device, i.e derive from
+ QPaintEngine and reimplement its virtual functions.
+
+ \warning Qt requires that a QApplication object exists before
+ any paint devices can be created. Paint devices access window
+ system resources, and these resources are not initialized before
+ an application object is created.
+
+ The QPaintDevice class provides several functions returning the
+ various device metrics: The depth() function returns its bit depth
+ (number of bit planes). The height() function returns its height
+ in default coordinate system units (e.g. pixels for QPixmap and
+ QWidget) while heightMM() returns the height of the device in
+ millimeters. Similiarily, the width() and widthMM() functions
+ return the width of the device in default coordinate system units
+ and in millimeters, respectively. Alternatively, the protected
+ metric() function can be used to retrieve the metric information
+ by specifying the desired PaintDeviceMetric as argument.
+
+ The logicalDpiX() and logicalDpiY() functions return the
+ horizontal and vertical resolution of the device in dots per
+ inch. The physicalDpiX() and physicalDpiY() functions also return
+ the resolution of the device in dots per inch, but note that if
+ the logical and vertical resolution differ, the corresponding
+ QPaintEngine must handle the mapping. Finally, the numColors()
+ function returns the number of different colors available for the
+ paint device.
+
+ \sa QPaintEngine, QPainter, {The Coordinate System}, {The Paint
+ System}
+*/
+
+/*!
+ \enum QPaintDevice::PaintDeviceMetric
+
+ Describes the various metrics of a paint device.
+
+ \value PdmWidth The width of the paint device in default
+ coordinate system units (e.g. pixels for QPixmap and QWidget). See
+ also width().
+
+ \value PdmHeight The height of the paint device in default
+ coordinate system units (e.g. pixels for QPixmap and QWidget). See
+ also height().
+
+ \value PdmWidthMM The width of the paint device in millimeters. See
+ also widthMM().
+
+ \value PdmHeightMM The height of the paint device in millimeters. See
+ also heightMM().
+
+ \value PdmNumColors The number of different colors available for
+ the paint device. See also numColors().
+
+ \value PdmDepth The bit depth (number of bit planes) of the paint
+ device. See also depth().
+
+ \value PdmDpiX The horizontal resolution of the device in dots per
+ inch. See also logicalDpiX().
+
+ \value PdmDpiY The vertical resolution of the device in dots per inch. See
+ also logicalDpiY().
+
+ \value PdmPhysicalDpiX The horizontal resolution of the device in
+ dots per inch. See also physicalDpiX().
+
+ \value PdmPhysicalDpiY The vertical resolution of the device in
+ dots per inch. See also physicalDpiY().
+
+ \sa metric()
+*/
+
+/*!
+ \fn QPaintDevice::QPaintDevice()
+
+ Constructs a paint device. This constructor can be invoked only from
+ subclasses of QPaintDevice.
+*/
+
+/*!
+ \fn QPaintDevice::~QPaintDevice()
+
+ Destroys the paint device and frees window system resources.
+*/
+
+/*!
+ \fn int QPaintDevice::devType() const
+
+ \internal
+
+ Returns the device type identifier, which is QInternal::Widget
+ if the device is a QWidget, QInternal::Pixmap if it's a
+ QPixmap, QInternal::Printer if it's a QPrinter,
+ QInternal::Picture if it's a QPicture, or
+ QInternal::UnknownDevice in other cases.
+*/
+
+/*!
+ \fn bool QPaintDevice::paintingActive() const
+
+ Returns true if the device is currently being painted on, i.e. someone has
+ called QPainter::begin() but not yet called QPainter::end() for
+ this device; otherwise returns false.
+
+ \sa QPainter::isActive()
+*/
+
+/*!
+ \fn QPaintEngine *QPaintDevice::paintEngine() const
+
+ Returns a pointer to the paint engine used for drawing on the
+ device.
+*/
+
+/*!
+ \fn int QPaintDevice::metric(PaintDeviceMetric metric) const
+
+ Returns the metric information for the given paint device \a metric.
+
+ \sa PaintDeviceMetric
+*/
+
+/*!
+ \fn int QPaintDevice::width() const
+
+ Returns the width of the paint device in default coordinate system
+ units (e.g. pixels for QPixmap and QWidget).
+
+ \sa widthMM()
+*/
+
+/*!
+ \fn int QPaintDevice::height() const
+
+ Returns the height of the paint device in default coordinate
+ system units (e.g. pixels for QPixmap and QWidget).
+
+ \sa heightMM()
+*/
+
+/*!
+ \fn int QPaintDevice::widthMM() const
+
+ Returns the width of the paint device in millimeters. Due to platform
+ limitations it may not be possible to use this function to determine
+ the actual physical size of a widget on the screen.
+
+ \sa width()
+*/
+
+/*!
+ \fn int QPaintDevice::heightMM() const
+
+ Returns the height of the paint device in millimeters. Due to platform
+ limitations it may not be possible to use this function to determine
+ the actual physical size of a widget on the screen.
+
+ \sa height()
+*/
+
+/*!
+ \fn int QPaintDevice::numColors() const
+
+ Returns the number of different colors available for the paint
+ device. Since this value is an int, it will not be sufficient to represent
+ the number of colors on 32 bit displays, in this case INT_MAX is
+ returned instead.
+*/
+
+/*!
+ \fn int QPaintDevice::depth() const
+
+ Returns the bit depth (number of bit planes) of the paint device.
+*/
+
+/*!
+ \fn int QPaintDevice::logicalDpiX() const
+
+ Returns the horizontal resolution of the device in dots per inch,
+ which is used when computing font sizes. For X11, this is usually
+ the same as could be computed from widthMM().
+
+ Note that if the logicalDpiX() doesn't equal the physicalDpiX(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa logicalDpiY(), physicalDpiX()
+*/
+
+/*!
+ \fn int QPaintDevice::logicalDpiY() const
+
+ Returns the vertical resolution of the device in dots per inch,
+ which is used when computing font sizes. For X11, this is usually
+ the same as could be computed from heightMM().
+
+ Note that if the logicalDpiY() doesn't equal the physicalDpiY(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa logicalDpiX(), physicalDpiY()
+*/
+
+/*!
+ \fn int QPaintDevice::physicalDpiX() const
+
+ Returns the horizontal resolution of the device in dots per inch.
+ For example, when printing, this resolution refers to the physical
+ printer's resolution. The logical DPI on the other hand, refers to
+ the resolution used by the actual paint engine.
+
+ Note that if the physicalDpiX() doesn't equal the logicalDpiX(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa physicalDpiY(), logicalDpiX()
+*/
+
+/*!
+ \fn int QPaintDevice::physicalDpiY() const
+
+ Returns the horizontal resolution of the device in dots per inch.
+ For example, when printing, this resolution refers to the physical
+ printer's resolution. The logical DPI on the other hand, refers to
+ the resolution used by the actual paint engine.
+
+ Note that if the physicalDpiY() doesn't equal the logicalDpiY(),
+ the corresponding QPaintEngine must handle the resolution mapping.
+
+ \sa physicalDpiX(), logicalDpiY()
+*/
diff --git a/src/gui/painting/qpaintdevice_qws.cpp b/src/gui/painting/qpaintdevice_qws.cpp
index 9a6a3d3..b161cb8 100644
--- a/src/gui/painting/qpaintdevice_qws.cpp
+++ b/src/gui/painting/qpaintdevice_qws.cpp
@@ -48,39 +48,6 @@
QT_BEGIN_NAMESPACE
-QPaintDevice::QPaintDevice()
-{
- painters = 0;
-}
-
-extern void qt_painter_removePaintDevice(QPaintDevice *); //qpainter.cpp
-
-
-QPaintDevice::~QPaintDevice()
-{
- if (paintingActive())
- qWarning("QPaintDevice: Cannot destroy paint device that is being "
- "painted");
- qt_painter_removePaintDevice(this);
-}
-
-
-int QPaintDevice::metric(PaintDeviceMetric m) const
-{
- qWarning("QPaintDevice::metrics: Device has no metric information");
- if (m == PdmDpiX) {
- return 72;
- } else if (m == PdmDpiY) {
- return 72;
- } else if (m == PdmNumColors) {
- // FIXME: does this need to be a real value?
- return 256;
- } else {
- qDebug("Unrecognised metric %d!",m);
- return 0;
- }
-}
-
QWSDisplay *QPaintDevice::qwsDisplay()
{
return qt_fbdpy;
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index a8518ea..07fec96 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -145,7 +145,7 @@ QFont QTextItem::font() const
/*!
\class QPaintEngine
- \ingroup multimedia
+ \ingroup painting
\brief The QPaintEngine class provides an abstract definition of how
QPainter draws to a given device on a given platform.
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index d00329b..63c4e32 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2495,10 +2495,7 @@ void QRasterPaintEngine::drawImage(const QPointF &p, const QImage &img)
const QClipData *clip = d->clip();
QPointF pt(p.x() + s->matrix.dx(), p.y() + s->matrix.dy());
- // ### TODO: remove this eventually...
- static bool NO_BLEND_FUNC = !qgetenv("QT_NO_BLEND_FUNCTIONS").isNull();
-
- if (s->flags.fast_images && !NO_BLEND_FUNC) {
+ if (s->flags.fast_images) {
SrcOverBlendFunc func = qBlendFunctions[d->rasterBuffer->format][img.format()];
if (func) {
if (!clip) {
@@ -2511,6 +2508,8 @@ void QRasterPaintEngine::drawImage(const QPointF &p, const QImage &img)
}
}
+
+
d->image_filler.clip = clip;
d->image_filler.initTexture(&img, s->intOpacity, QTextureData::Plain, img.rect());
if (!d->image_filler.blend)
@@ -2545,12 +2544,44 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
const bool aa = s->flags.antialiased || s->flags.bilinear;
- if (!aa && sr.size() == QSize(1, 1)) {
+ int sr_l = qFloor(sr.left());
+ int sr_r = qCeil(sr.right()) - 1;
+ int sr_t = qFloor(sr.top());
+ int sr_b = qCeil(sr.bottom()) - 1;
+
+ if (!aa && sr_l == sr_r && sr_t == sr_b) {
// as fillRect will apply the aliased coordinate delta we need to
// subtract it here as we don't use it for image drawing
QTransform old = s->matrix;
s->matrix = s->matrix * QTransform::fromTranslate(-aliasedCoordinateDelta, -aliasedCoordinateDelta);
- fillRect(r, QColor::fromRgba(img.pixel(sr.x(), sr.y())));
+
+ // Do whatever fillRect() does, but without premultiplying the color if it's already premultiplied.
+ QRgb color = img.pixel(sr_l, sr_t);
+ switch (img.format()) {
+ case QImage::Format_ARGB32_Premultiplied:
+ case QImage::Format_ARGB8565_Premultiplied:
+ case QImage::Format_ARGB6666_Premultiplied:
+ case QImage::Format_ARGB8555_Premultiplied:
+ case QImage::Format_ARGB4444_Premultiplied:
+ // Combine premultiplied color with the opacity set on the painter.
+ d->solid_color_filler.solid.color =
+ ((((color & 0x00ff00ff) * s->intOpacity) >> 8) & 0x00ff00ff)
+ | ((((color & 0xff00ff00) >> 8) * s->intOpacity) & 0xff00ff00);
+ break;
+ default:
+ d->solid_color_filler.solid.color = PREMUL(ARGB_COMBINE_ALPHA(color, s->intOpacity));
+ break;
+ }
+
+ if ((d->solid_color_filler.solid.color & 0xff000000) == 0
+ && s->composition_mode == QPainter::CompositionMode_SourceOver) {
+ return;
+ }
+
+ d->solid_color_filler.clip = d->clip();
+ d->solid_color_filler.adjustSpanMethods();
+ fillRect(r, &d->solid_color_filler);
+
s->matrix = old;
return;
}
@@ -2562,14 +2593,24 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
if (s->matrix.type() > QTransform::TxTranslate || stretch_sr) {
if (s->flags.fast_images) {
- SrcOverScaleFunc func = qScaleFunctions[d->rasterBuffer->format][img.format()];
- if (func && (!clip || clip->hasRectClip)) {
- func(d->rasterBuffer->buffer(), d->rasterBuffer->bytesPerLine(),
- img.bits(), img.bytesPerLine(),
- qt_mapRect_non_normalizing(r, s->matrix), sr,
- !clip ? d->deviceRect : clip->clipRect,
- s->intOpacity);
- return;
+ if (s->matrix.type() > QTransform::TxScale) {
+ SrcOverTransformFunc func = qTransformFunctions[d->rasterBuffer->format][img.format()];
+ if (func && (!clip || clip->hasRectClip)) {
+ func(d->rasterBuffer->buffer(), d->rasterBuffer->bytesPerLine(), img.bits(),
+ img.bytesPerLine(), r, sr, !clip ? d->deviceRect : clip->clipRect,
+ s->matrix, s->intOpacity);
+ return;
+ }
+ } else {
+ SrcOverScaleFunc func = qScaleFunctions[d->rasterBuffer->format][img.format()];
+ if (func && (!clip || clip->hasRectClip)) {
+ func(d->rasterBuffer->buffer(), d->rasterBuffer->bytesPerLine(),
+ img.bits(), img.bytesPerLine(),
+ qt_mapRect_non_normalizing(r, s->matrix), sr,
+ !clip ? d->deviceRect : clip->clipRect,
+ s->intOpacity);
+ return;
+ }
}
}
@@ -4056,7 +4097,7 @@ void QRasterPaintEnginePrivate::recalculateFastImages()
s->flags.fast_images = !(s->renderHints & QPainter::SmoothPixmapTransform)
&& rasterBuffer->compositionMode == QPainter::CompositionMode_SourceOver
- && s->matrix.type() <= QTransform::TxScale;
+ && s->matrix.type() <= QTransform::TxShear;
}
@@ -5189,6 +5230,13 @@ static void drawLine_midpoint_i(int x1, int y1, int x2, int y2, ProcessSpans spa
dy = -dy;
}
+ int x_lower_limit = - 128;
+ if (x1 < x_lower_limit) {
+ int cy = dy * (x_lower_limit - x1) / dx + y1;
+ drawLine_midpoint_i(x_lower_limit, cy, x2, y2, span_func, data, style, devRect);
+ return;
+ }
+
if (style == LineDrawNormal)
--x2;
@@ -5326,6 +5374,13 @@ static void drawLine_midpoint_i(int x1, int y1, int x2, int y2, ProcessSpans spa
dx = -dx;
}
+ int y_lower_limit = - 128;
+ if (y1 < y_lower_limit) {
+ int cx = dx * (y_lower_limit - y1) / dy + x1;
+ drawLine_midpoint_i(cx, y_lower_limit, x2, y2, span_func, data, style, devRect);
+ return;
+ }
+
if (style == LineDrawNormal)
--y2;
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 6816aac..a4d34b5 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -2459,15 +2459,23 @@ void QX11PaintEngine::drawFreetype(const QPointF &p, const QTextItemInt &ti)
XRectangle rects[rectcount];
int num_rects = 0;
+ QPoint delta(qRound(d->matrix.dx()), qRound(d->matrix.dy()));
+ QRect clip(d->polygonClipper.boundingRect());
for (int i=0; i < path.elementCount(); i+=5) {
int x = qRound(path.elementAt(i).x);
int y = qRound(path.elementAt(i).y);
int w = qRound(path.elementAt(i+1).x) - x;
int h = qRound(path.elementAt(i+2).y) - y;
- rects[num_rects].x = x + qRound(d->matrix.dx());
- rects[num_rects].y = y + qRound(d->matrix.dy());
- rects[num_rects].width = w;
- rects[num_rects].height = h;
+
+ QRect rect = QRect(x + delta.x(), y + delta.y(), w, h);
+ rect = rect.intersected(clip);
+ if (rect.isEmpty())
+ continue;
+
+ rects[num_rects].x = short(rect.x());
+ rects[num_rects].y = short(rect.y());
+ rects[num_rects].width = ushort(rect.width());
+ rects[num_rects].height = ushort(rect.height());
++num_rects;
if (num_rects == rectcount) {
XFillRectangles(d->dpy, d->hd, d->gc, rects, num_rects);
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 0762138..ab35ead 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -924,8 +924,8 @@ void QPainterPrivate::updateState(QPainterState *newState)
\brief The QPainter class performs low-level painting on widgets and
other paint devices.
- \ingroup multimedia
- \mainclass
+ \ingroup painting
+
\reentrant
QPainter provides highly optimized functions to do most of the
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index ed57e63..5bc4bdb 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -153,7 +153,7 @@ static void qt_debug_path(const QPainterPath &path)
/*!
\class QPainterPath
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
\brief The QPainterPath class provides a container for painting operations,
@@ -2396,7 +2396,7 @@ void qt_path_stroke_cubic_to(qfixed c1x, qfixed c1y,
/*!
\since 4.1
\class QPainterPathStroker
- \ingroup multimedia
+ \ingroup painting
\brief The QPainterPathStroker class is used to generate fillable
outlines for a given painter path.
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 047fd9b..51929a2 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -52,9 +52,9 @@ typedef QPenPrivate QPenData;
/*!
\class QPen
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
\brief The QPen class defines how a QPainter should draw lines and outlines
of shapes.
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index 87a9848..044b2c5 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -91,7 +91,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP
\reentrant
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
A QPolygon object is a QVector<QPoint>. The easiest way to add
@@ -489,7 +489,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a)
floating point precision.
\reentrant
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
A QPolygonF is a QVector<QPointF>. The easiest way to add points
diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp
index f8399af..666719f 100644
--- a/src/gui/painting/qprinter.cpp
+++ b/src/gui/painting/qprinter.cpp
@@ -268,8 +268,8 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
\brief The QPrinter class is a paint device that paints on a printer.
- \ingroup multimedia
- \mainclass
+ \ingroup printing
+
This device represents a series of pages of printed output, and is
used in almost exactly the same way as other paint devices such as
@@ -2204,7 +2204,7 @@ bool QPrinter::isOptionEnabled( PrinterOption option ) const
\class QPrintEngine
\reentrant
- \ingroup multimedia
+ \ingroup printing
\brief The QPrintEngine class defines an interface for how QPrinter
interacts with a given printing subsystem.
diff --git a/src/gui/painting/qprinterinfo.qdoc b/src/gui/painting/qprinterinfo.qdoc
new file mode 100644
index 0000000..e3cbe96
--- /dev/null
+++ b/src/gui/painting/qprinterinfo.qdoc
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \class QPrinterInfo
+
+ \brief The QPrinterInfo class gives access to information about
+ existing printers.
+
+ \ingroup printing
+
+ Use the static functions to generate a list of QPrinterInfo
+ objects. Each QPrinterInfo object in the list represents a single
+ printer and can be queried for name, supported paper sizes, and
+ whether or not it is the default printer.
+
+ \since 4.4
+*/
+
+/*!
+ \fn QList<QPrinterInfo> QPrinterInfo::availablePrinters()
+
+ Returns a list of available printers on the system.
+*/
+
+/*!
+ \fn QPrinterInfo QPrinterInfo::defaultPrinter()
+
+ Returns the default printer on the system.
+
+ The return value should be checked using isNull() before being
+ used, in case there is no default printer.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn QPrinterInfo::QPrinterInfo()
+
+ Constructs an empty QPrinterInfo object.
+
+ \sa isNull()
+*/
+
+/*!
+ \fn QPrinterInfo::QPrinterInfo(const QPrinterInfo& src)
+
+ Constructs a copy of \a src.
+*/
+
+/*!
+ \fn QPrinterInfo::QPrinterInfo(const QPrinter& printer)
+
+ Constructs a QPrinterInfo object from \a printer.
+*/
+
+/*!
+ \fn QPrinterInfo::~QPrinterInfo()
+
+ Destroys the QPrinterInfo object. References to the values in the
+ object become invalid.
+*/
+
+/*!
+ \fn QPrinterInfo& QPrinterInfo::operator=(const QPrinterInfo& src)
+
+ Sets the QPrinterInfo object to be equal to \a src.
+*/
+
+/*!
+ \fn QString QPrinterInfo::printerName() const
+
+ Returns the name of the printer.
+
+ \sa QPrinter::setPrinterName()
+*/
+
+/*!
+ \fn bool QPrinterInfo::isNull() const
+
+ Returns whether this QPrinterInfo object holds a printer definition.
+
+ An empty QPrinterInfo object could result for example from calling
+ defaultPrinter() when there are no printers on the system.
+*/
+
+/*!
+ \fn bool QPrinterInfo::isDefault() const
+
+ Returns whether this printer is the default printer.
+*/
+
+/*!
+ \fn QList< QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
+ \since 4.4
+
+ Returns a list of supported paper sizes by the printer.
+
+ Not all printer drivers support this query, so the list may be empty.
+ On Mac OS X 10.3, this function always returns an empty list.
+*/
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 4e75911..4ddc8f3 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
\class QRegion
\brief The QRegion class specifies a clip region for a painter.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
QRegion is used with QPainter::setClipRegion() to limit the paint
diff --git a/src/gui/painting/qstylepainter.cpp b/src/gui/painting/qstylepainter.cpp
index 959caa9..93512d0 100644
--- a/src/gui/painting/qstylepainter.cpp
+++ b/src/gui/painting/qstylepainter.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
elements inside a widget.
\ingroup appearance
- \ingroup multimedia
+ \ingroup painting
QStylePainter extends QPainter with a set of high-level \c
draw...() functions implemented on top of QStyle's API. The
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 8832a3d..859767b 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -93,7 +93,7 @@ QT_BEGIN_NAMESPACE
\class QTransform
\brief The QTransform class specifies 2D transformations of a coordinate system.
\since 4.3
- \ingroup multimedia
+ \ingroup painting
A transformation specifies how to translate, scale, shear, rotate
or project the coordinate system, and is typically used when
diff --git a/src/gui/styles/qmacstyle.qdoc b/src/gui/styles/qmacstyle.qdoc
new file mode 100644
index 0000000..171ddb0
--- /dev/null
+++ b/src/gui/styles/qmacstyle.qdoc
@@ -0,0 +1,261 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+/*!
+ \class QMacStyle
+ \brief The QMacStyle class provides a Mac OS X style using the Apple Appearance Manager.
+
+ \ingroup appearance
+
+ This class is implemented as a wrapper to the HITheme
+ APIs, allowing applications to be styled according to the current
+ theme in use on Mac OS X. This is done by having primitives
+ in QStyle implemented in terms of what Mac OS X would normally theme.
+
+ \warning This style is only available on Mac OS X because it relies on the
+ HITheme APIs.
+
+ There are additional issues that should be taken
+ into consideration to make an application compatible with the
+ \link http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html
+ Apple Human Interface Guidelines \endlink. Some of these issues are outlined
+ below.
+
+ \list
+
+ \i Layout - The restrictions on window layout are such that some
+ aspects of layout that are style-dependent cannot be achieved
+ using QLayout. Changes are being considered (and feedback would be
+ appreciated) to make layouts QStyle-able. Some of the restrictions
+ involve horizontal and vertical widget alignment and widget size
+ (covered below).
+
+ \i Widget size - Mac OS X allows widgets to have specific fixed sizes. Qt
+ does not fully implement this behavior so as to maintain cross-platform
+ compatibility. As a result some widgets sizes may be inappropriate (and
+ subsequently not rendered correctly by the HITheme APIs).The
+ QWidget::sizeHint() will return the appropriate size for many
+ managed widgets (widgets enumerated in \l QStyle::ContentsType).
+
+ \i Effects - QMacStyle uses HITheme for performing most of the drawing, but
+ also uses emulation in a few cases where HITheme does not provide the
+ required functionality (for example, tab bars on Panther, the toolbar
+ separator, etc). We tried to make the emulation as close to the original as
+ possible. Please report any issues you see in effects or non-standard
+ widgets.
+
+ \endlist
+
+ There are other issues that need to be considered in the feel of
+ your application (including the general color scheme to match the
+ Aqua colors). The Guidelines mentioned above will remain current
+ with new advances and design suggestions for Mac OS X.
+
+ Note that the functions provided by QMacStyle are
+ reimplementations of QStyle functions; see QStyle for their
+ documentation.
+
+ \img qmacstyle.png
+ \sa QWindowsXPStyle, QWindowsStyle, QPlastiqueStyle, QCDEStyle, QMotifStyle
+*/
+
+
+/*!
+ \enum QMacStyle::WidgetSizePolicy
+
+ \value SizeSmall
+ \value SizeLarge
+ \value SizeMini
+ \value SizeDefault
+ \omitvalue SizeNone
+*/
+
+/*! \fn QMacStyle::QMacStyle()
+ Constructs a QMacStyle object.
+*/
+
+/*! \fn QMacStyle::~QMacStyle()
+ Destructs a QMacStyle object.
+*/
+
+/*! \fn void QMacStyle::polish(QPalette &pal)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::polish(QApplication *)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::unpolish(QApplication *)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::polish(QWidget* w)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::unpolish(QWidget* w)
+ \reimp
+*/
+
+/*! \fn int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QPalette QMacStyle::standardPalette() const
+ \reimp
+*/
+
+/*! \fn int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *hret) const
+ \reimp
+*/
+
+/*! \fn QPixmap QMacStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
+ \reimp
+*/
+
+/*! \fn QPixmap QMacStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const
+ \reimp
+*/
+
+/*!
+ \enum QMacStyle::FocusRectPolicy
+
+ This type is used to signify a widget's focus rectangle policy.
+
+ \value FocusEnabled show a focus rectangle when the widget has focus.
+ \value FocusDisabled never show a focus rectangle for the widget.
+ \value FocusDefault show a focus rectangle when the widget has
+ focus and the widget is a QSpinWidget, QDateTimeEdit, QLineEdit,
+ QListBox, QListView, editable QTextEdit, or one of their
+ subclasses.
+*/
+
+/*! \fn void QMacStyle::setFocusRectPolicy(QWidget *w, FocusRectPolicy policy)
+ \obsolete
+ Sets the focus rectangle policy of \a w. The \a policy can be one of
+ \l{QMacStyle::FocusRectPolicy}.
+
+ This is now simply an interface to the Qt::WA_MacShowFocusRect attribute and the
+ FocusDefault value does nothing anymore. If you want to set a widget back
+ to its default value, you must save the old value of the attribute before
+ you change it.
+
+ \sa focusRectPolicy() QWidget::setAttribute()
+*/
+
+/*! \fn QMacStyle::FocusRectPolicy QMacStyle::focusRectPolicy(const QWidget *w)
+ \obsolete
+ Returns the focus rectangle policy for the widget \a w.
+
+ The focus rectangle policy can be one of \l{QMacStyle::FocusRectPolicy}.
+
+ In 4.3 and up this function will simply test for the
+ Qt::WA_MacShowFocusRect attribute and will never return
+ QMacStyle::FocusDefault.
+
+ \sa setFocusRectPolicy(), QWidget::testAttribute()
+*/
+
+/*! \fn void QMacStyle::setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy policy)
+
+ \obsolete
+
+ Call QWidget::setAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize,
+ or Qt::WA_MacNormalSize instead.
+*/
+
+/*! \fn QMacStyle::WidgetSizePolicy QMacStyle::widgetSizePolicy(const QWidget *widget)
+ \obsolete
+
+ Call QWidget::testAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize,
+ or Qt::WA_MacNormalSize instead.
+*/
+
+/*! \fn void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const
+
+ \reimp
+*/
+
+/*! \fn void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p, const QWidget *w) const
+
+ \reimp
+*/
+
+/*! \fn QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *widget) const
+
+ \reimp
+*/
+
+/*! \fn void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &csz, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn void QMacStyle::drawItemText(QPainter *p, const QRect &r, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole) const
+ \reimp
+*/
+
+/*! \fn bool QMacStyle::event(QEvent *e)
+ \reimp
+*/
+
+/*! \fn QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt, const QWidget *widget) const
+ \internal
+*/
+
+/*! \fn int QMacStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option, const QWidget *widget) const
+
+ \internal
+*/
+
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index eabbb8d..04ecbc4 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -4937,7 +4937,7 @@ QStyleOptionSizeGrip::QStyleOptionSizeGrip(int version)
\brief The QStyleOptionGraphicsItem class is used to describe
the parameters needed to draw a QGraphicsItem.
\since 4.2
- \ingroup multimedia
+ \ingroup graphicsview-api
For performance reasons, the access to the member variables is
direct (i.e., using the \c . or \c -> operator). This low-level feel
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index 8b21c8f..f2ddeb6 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
\brief The QAbstractTextDocumentLayout class is an abstract base
class used to implement custom layouts for QTextDocuments.
- \ingroup text
+ \ingroup richtext-processing
The standard layout provided by Qt can handle simple word processing
including inline images, lists and tables.
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index d838f45..21277c5 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -408,11 +408,11 @@ QFontEngineData::~QFontEngineData()
\brief The QFont class specifies a font used for drawing text.
- \ingroup multimedia
+ \ingroup painting
\ingroup appearance
\ingroup shared
- \ingroup text
- \mainclass
+ \ingroup richtext-processing
+
When you create a QFont object you specify various attributes that
you want the font to have. Qt will use the font with the specified
@@ -2270,9 +2270,8 @@ QDataStream &operator>>(QDataStream &s, QFont &font)
\brief The QFontInfo class provides general information about fonts.
- \ingroup multimedia
+ \ingroup appearance
\ingroup shared
- \ingroup text
The QFontInfo class provides the same access functions as QFont,
e.g. family(), pointSize(), italic(), weight(), fixedPitch(),
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 03ecc84..7f0a7aa 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1295,9 +1295,7 @@ QString QFontDatabase::styleString(const QFontInfo &fontInfo)
\brief The QFontDatabase class provides information about the fonts available in the underlying window system.
- \ingroup environment
- \ingroup multimedia
- \ingroup text
+ \ingroup appearance
The most common uses of this class are to query the database for
the list of font families() and for the pointSizes() and styles()
@@ -2427,7 +2425,7 @@ QStringList QFontDatabase::applicationFontFamilies(int id)
means that all QPainter::drawText() calls outside the GUI thread
will not produce readable output.
- \sa threads.html#painting-in-threads
+ \sa {Thread-Support in Qt Modules#Painting In Threads}{Painting In Threads}
*/
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index b3d1a5f..c017f8b 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -75,9 +75,8 @@ extern int qt_defaultDpi();
\brief The QFontMetrics class provides font metrics information.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \ingroup text
QFontMetrics functions calculate the size of characters and
strings for a given font. There are three ways you can create a
@@ -941,9 +940,8 @@ int QFontMetrics::lineWidth() const
\brief The QFontMetricsF class provides font metrics information.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \ingroup text
QFontMetricsF functions calculate the size of characters and
strings for a given font. You can construct a QFontMetricsF object
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index 5c54500..cdb30ef 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -219,7 +219,7 @@ void QSyntaxHighlighterPrivate::reformatBlock(QTextBlock block)
\since 4.1
- \ingroup text
+ \ingroup richtext-processing
The QSyntaxHighlighter class is a base class for implementing
QTextEdit syntax highlighters. A syntax highligher automatically
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 58f8a06..1c14d20 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -2262,7 +2262,7 @@ void QTextControl::print(QPrinter *printer) const
{
#ifndef QT_NO_PRINTER
Q_D(const QTextControl);
- if (printer && !printer->isValid())
+ if (!printer || !printer->isValid())
return;
QTextDocument *tempDoc = 0;
const QTextDocument *doc = d->doc;
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 6ab89dc..5a938e3 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -125,7 +125,7 @@ QTextCursorPrivate::AdjustResult QTextCursorPrivate::adjustPosition(int position
void QTextCursorPrivate::setX()
{
- if (priv && priv->isInEditBlock()) {
+ if (priv->isInEditBlock()) {
x = -1; // mark dirty
return;
}
@@ -855,9 +855,9 @@ QTextLayout *QTextCursorPrivate::blockLayout(QTextBlock &block) const{
\brief The QTextCursor class offers an API to access and modify QTextDocuments.
- \ingroup text
+ \ingroup richtext-processing
\ingroup shared
- \mainclass
+
Text cursors are objects that are used to access and modify the contents
and underlying structure of text documents via a programming interface
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 6fa3e90..bfed368 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -247,8 +247,8 @@ QTextCodec *Qt::codecForHtml(const QByteArray &ba)
\brief The QTextDocument class holds formatted text that can be
viewed and edited using a QTextEdit.
- \ingroup text
- \mainclass
+ \ingroup richtext-processing
+
QTextDocument is a container for structured rich text documents, providing
support for styled text and various types of document elements, such as
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index da7025c..953e965 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -259,7 +259,7 @@ void QTextDocumentFragmentPrivate::insert(QTextCursor &_cursor) const
\brief The QTextDocumentFragment class represents a piece of formatted text
from a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
\ingroup shared
A QTextDocumentFragment is a fragment of rich text, that can be inserted into
diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp
index 33a5018..bdb5247 100644
--- a/src/gui/text/qtextdocumentwriter.cpp
+++ b/src/gui/text/qtextdocumentwriter.cpp
@@ -76,7 +76,7 @@ public:
\brief The QTextDocumentWriter class provides a format-independent interface for writing a QTextDocument to files or other devices.
- \ingroup text
+ \ingroup richtext-processing
\ingroup io
To write a document, construct a QTextDocumentWriter object with either a
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 075f2ff..950e45c 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
\brief The QTextLength class encapsulates the different types of length
used in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
When we specify a value for the length of an element in a text document,
we often need to provide some other information so that the length is
@@ -415,7 +415,7 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
\brief The QTextFormat class provides formatting information for a
QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
\ingroup shared
A QTextFormat is a generic class used for describing the format of
@@ -448,7 +448,7 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
associate the format with a QTextObject. It is used to represent
lists, frames, and tables inside the document.
- \sa {Text Processing Classes}
+ \sa {Rich Text Processing}
*/
/*!
@@ -1184,7 +1184,7 @@ bool QTextFormat::operator==(const QTextFormat &rhs) const
\brief The QTextCharFormat class provides formatting information for
characters in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
The character format of text in a document specifies the visual properties
of the text, as well as information about its role in a hypertext document.
@@ -1797,7 +1797,7 @@ QFont QTextCharFormat::font() const
\brief The QTextBlockFormat class provides formatting information for
blocks of text in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
A document is composed of a list of blocks, represented by QTextBlock
objects. Each block can contain an item of some kind, such as a
@@ -2088,7 +2088,7 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const
\brief The QTextListFormat class provides formatting information for
lists in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
A list is composed of one or more items, represented as text blocks.
The list's format specifies the appearance of items in the list.
@@ -2198,7 +2198,7 @@ QTextListFormat::QTextListFormat(const QTextFormat &fmt)
\brief The QTextFrameFormat class provides formatting information for
frames in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
A text frame groups together one or more blocks of text, providing a layer
of structure larger than the paragraph. The format of a frame specifies
@@ -2524,7 +2524,7 @@ qreal QTextFrameFormat::rightMargin() const
\brief The QTextTableFormat class provides formatting information for
tables in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
A table is a group of cells ordered into rows and columns. Each table
contains at least one row and one column. Each cell contains a block.
@@ -2730,7 +2730,7 @@ QTextTableFormat::QTextTableFormat(const QTextFormat &fmt)
\brief The QTextImageFormat class provides formatting information for
images in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
Inline images are represented by an object replacement character
(0xFFFC in Unicode) which has an associated QTextImageFormat. The
@@ -2999,7 +2999,7 @@ QTextTableCellFormat::QTextTableCellFormat(const QTextFormat &fmt)
\brief The QTextTableCellFormat class provides formatting information for
table cells in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
The table cell format of a table cell in a document specifies the visual
properties of the table cell.
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 242dbbf..cde5b5f 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -128,7 +128,7 @@ static QFixed alignLine(QTextEngine *eng, const QScriptLine &line)
\brief The QTextInlineObject class represents an inline object in
a QTextLayout.
- \ingroup text
+ \ingroup richtext-processing
This class is only used if the text layout is used to lay out
parts of a QTextDocument.
@@ -285,7 +285,7 @@ Qt::LayoutDirection QTextInlineObject::textDirection() const
\brief The QTextLayout class is used to lay out and paint a single
paragraph of text.
- \ingroup text
+ \ingroup richtext-processing
It offers most features expected from a modern text layout
engine, including Unicode compliant rendering, line breaking and
@@ -1368,7 +1368,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
\brief The QTextLine class represents a line of text inside a QTextLayout.
- \ingroup text
+ \ingroup richtext-processing
A text line is usually created by QTextLayout::createLine().
diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp
index 8348c92..3e5d7b0 100644
--- a/src/gui/text/qtextlist.cpp
+++ b/src/gui/text/qtextlist.cpp
@@ -63,7 +63,7 @@ public:
\brief The QTextList class provides a decorated list of items in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
A list contains a sequence of text blocks, each of which is marked with a
bullet point or other symbol. Multiple levels of lists can be used, and
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index 98c92eb..4ac0276 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
\brief The QTextObject class is a base class for different kinds
of objects that can group parts of a QTextDocument together.
- \ingroup text
+ \ingroup richtext-processing
The common grouping text objects are lists (QTextList), frames
(QTextFrame), and tables (QTextTable). A text object has an
@@ -183,7 +183,7 @@ QTextDocumentPrivate *QTextObject::docHandle() const
\brief The QTextBlockGroup class provides a container for text blocks within
a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
Block groups can be used to organize blocks of text within a document.
They maintain an up-to-date list of the text blocks that belong to
@@ -305,7 +305,7 @@ QTextFrameLayoutData::~QTextFrameLayoutData()
\brief The QTextFrame class represents a frame in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
Text frames provide structure for the text in a document. They are used
as generic containers for other document elements.
@@ -412,11 +412,6 @@ QTextFrameLayoutData::~QTextFrameLayoutData()
QTextFrame::QTextFrame(QTextDocument *doc)
: QTextObject(*new QTextFramePrivate(doc), doc)
{
- Q_D(QTextFrame);
- d->fragment_start = 0;
- d->fragment_end = 0;
- d->parentFrame = 0;
- d->layoutData = 0;
}
// ### DOC: What does this do to child frames?
@@ -435,11 +430,6 @@ QTextFrame::~QTextFrame()
QTextFrame::QTextFrame(QTextFramePrivate &p, QTextDocument *doc)
: QTextObject(p, doc)
{
- Q_D(QTextFrame);
- d->fragment_start = 0;
- d->fragment_end = 0;
- d->parentFrame = 0;
- d->layoutData = 0;
}
/*!
@@ -609,7 +599,7 @@ void QTextFramePrivate::remove_me()
\brief The iterator class provides an iterator for reading
the contents of a QTextFrame.
- \ingroup text
+ \ingroup richtext-processing
A frame consists of an arbitrary sequence of \l{QTextBlock}s and
child \l{QTextFrame}s. This class provides a way to iterate over the
@@ -809,7 +799,7 @@ QTextFrame::iterator &QTextFrame::iterator::operator--()
\brief The QTextBlockUserData class is used to associate custom data with blocks of text.
\since 4.1
- \ingroup text
+ \ingroup richtext-processing
QTextBlockUserData provides an abstract interface for container classes that are used
to associate application-specific user data with text blocks in a QTextDocument.
@@ -839,7 +829,7 @@ QTextBlockUserData::~QTextBlockUserData()
\brief The QTextBlock class provides a container for text fragments in a
QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
A text block encapsulates a block or paragraph of text in a QTextDocument.
QTextBlock provides read-only access to the block/paragraph structure of
@@ -934,7 +924,7 @@ QTextBlockUserData::~QTextBlockUserData()
\brief The QTextBlock::iterator class provides an iterator for reading
the contents of a QTextBlock.
- \ingroup text
+ \ingroup richtext-processing
A block consists of a sequence of text fragments. This class provides
a way to iterate over these, and read their contents. It does not provide
@@ -1535,7 +1525,7 @@ QTextBlock::iterator &QTextBlock::iterator::operator--()
\brief The QTextFragment class holds a piece of text in a
QTextDocument with a single QTextCharFormat.
- \ingroup text
+ \ingroup richtext-processing
A text fragment describes a piece of text that is stored with a single
character format. Text in which the character format changes can be
diff --git a/src/gui/text/qtextobject_p.h b/src/gui/text/qtextobject_p.h
index e862b30..22034c8 100644
--- a/src/gui/text/qtextobject_p.h
+++ b/src/gui/text/qtextobject_p.h
@@ -94,7 +94,7 @@ class QTextFramePrivate : public QTextObjectPrivate
Q_DECLARE_PUBLIC(QTextFrame)
public:
QTextFramePrivate(QTextDocument *doc)
- : QTextObjectPrivate(doc)
+ : QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), parentFrame(0), layoutData(0)
{
}
virtual void fragmentAdded(const QChar &type, uint fragment);
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index ca30ed4..20ba9bf 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -197,7 +197,7 @@ QList<QTextOption::Tab> QTextOption::tabs() const
\brief The QTextOption class provides a description of general rich text
properties.
- \ingroup text
+ \ingroup richtext-processing
QTextOption is used to encapsulate common rich text properties in a single
object. It contains information about text alignment, layout direction,
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 9097b4e..576758e 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
\brief The QTextTableCell class represents the properties of a
cell in a QTextTable.
- \ingroup text
+ \ingroup richtext-processing
Table cells are pieces of document structure that belong to a table.
The table orders cells into particular rows and columns; cells can
@@ -492,7 +492,7 @@ void QTextTablePrivate::update() const
\brief The QTextTable class represents a table in a QTextDocument.
- \ingroup text
+ \ingroup richtext-processing
A table is a group of cells ordered into rows and columns. Each table
contains at least one row and one column. Each cell contains a block, and
diff --git a/src/gui/text/qtexttable_p.h b/src/gui/text/qtexttable_p.h
index 4dd52c7..7783b5d 100644
--- a/src/gui/text/qtexttable_p.h
+++ b/src/gui/text/qtexttable_p.h
@@ -62,7 +62,7 @@ class QTextTablePrivate : public QTextFramePrivate
{
Q_DECLARE_PUBLIC(QTextTable)
public:
- QTextTablePrivate(QTextDocument *document) : QTextFramePrivate(document), grid(0), nRows(0), dirty(true), blockFragmentUpdates(false) {}
+ QTextTablePrivate(QTextDocument *document) : QTextFramePrivate(document), grid(0), nRows(0), nCols(0), dirty(true), blockFragmentUpdates(false) {}
~QTextTablePrivate();
static QTextTable *createTable(QTextDocumentPrivate *, int pos, int rows, int cols, const QTextTableFormat &tableFormat);
diff --git a/src/gui/util/qsystemtrayicon.cpp b/src/gui/util/qsystemtrayicon.cpp
index f4d2f7f..64591c7 100644
--- a/src/gui/util/qsystemtrayicon.cpp
+++ b/src/gui/util/qsystemtrayicon.cpp
@@ -65,7 +65,6 @@ QT_BEGIN_NAMESPACE
\class QSystemTrayIcon
\brief The QSystemTrayIcon class provides an icon for an application in the system tray.
\since 4.2
- \ingroup application
\ingroup desktop
Modern operating systems usually provide a special area on the desktop,
diff --git a/src/gui/util/qundogroup.cpp b/src/gui/util/qundogroup.cpp
index 9fcfe95..07a3a3d 100644
--- a/src/gui/util/qundogroup.cpp
+++ b/src/gui/util/qundogroup.cpp
@@ -61,7 +61,6 @@ public:
\class QUndoGroup
\brief The QUndoGroup class is a group of QUndoStack objects.
\since 4.2
- \ingroup misc
For an overview of the Qt's undo framework, see the
\link qundo.html overview\endlink.
diff --git a/src/gui/util/qundostack.cpp b/src/gui/util/qundostack.cpp
index a5e8004..065cc24 100644
--- a/src/gui/util/qundostack.cpp
+++ b/src/gui/util/qundostack.cpp
@@ -52,7 +52,6 @@ QT_BEGIN_NAMESPACE
\class QUndoCommand
\brief The QUndoCommand class is the base class of all commands stored on a QUndoStack.
\since 4.2
- \ingroup misc
For an overview of Qt's Undo Framework, see the
\l{Overview of Qt's Undo Framework}{overview document}.
@@ -292,7 +291,6 @@ const QUndoCommand *QUndoCommand::child(int index) const
\class QUndoStack
\brief The QUndoStack class is a stack of QUndoCommand objects.
\since 4.2
- \ingroup misc
For an overview of Qt's Undo Framework, see the
\l{Overview of Qt's Undo Framework}{overview document}.
diff --git a/src/gui/util/qundoview.cpp b/src/gui/util/qundoview.cpp
index 0241500..079a62f 100644
--- a/src/gui/util/qundoview.cpp
+++ b/src/gui/util/qundoview.cpp
@@ -253,7 +253,7 @@ QIcon QUndoModel::cleanIcon() const
\class QUndoView
\brief The QUndoView class displays the contents of a QUndoStack.
\since 4.2
- \ingroup misc
+
\ingroup advanced
QUndoView is a QListView which displays the list of commands pushed on an undo stack.
diff --git a/src/gui/widgets/qbuttongroup.cpp b/src/gui/widgets/qbuttongroup.cpp
index 8b89a86..26a9d51 100644
--- a/src/gui/widgets/qbuttongroup.cpp
+++ b/src/gui/widgets/qbuttongroup.cpp
@@ -48,8 +48,6 @@
\ingroup organizers
\ingroup geomanagement
- \ingroup appearance
- \mainclass
QButtonGroup provides an abstract container into which button widgets can
be placed. It does not provide a visual representation of this container
diff --git a/src/gui/widgets/qcalendarwidget.cpp b/src/gui/widgets/qcalendarwidget.cpp
index 8d5d0c7..377b4bb 100644
--- a/src/gui/widgets/qcalendarwidget.cpp
+++ b/src/gui/widgets/qcalendarwidget.cpp
@@ -1960,7 +1960,7 @@ void QCalendarWidgetPrivate::_q_editingFinished()
\brief The QCalendarWidget class provides a monthly based
calendar widget allowing the user to select a date.
\since 4.2
- \mainclass
+
\ingroup advanced
\image cleanlooks-calendarwidget.png
diff --git a/src/gui/widgets/qcheckbox.cpp b/src/gui/widgets/qcheckbox.cpp
index 8cdf3b9..faec9d0 100644
--- a/src/gui/widgets/qcheckbox.cpp
+++ b/src/gui/widgets/qcheckbox.cpp
@@ -73,7 +73,7 @@ public:
\brief The QCheckBox widget provides a checkbox with a text label.
\ingroup basicwidgets
- \mainclass
+
A QCheckBox is an option button that can be switched on (checked) or off
(unchecked). Checkboxes are typically used to represent features in an
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index f3027be..0f54bac 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -863,7 +863,7 @@ QComboBox::QComboBox(bool rw, QWidget *parent, const char *name)
\brief The QComboBox widget is a combined button and popup list.
\ingroup basicwidgets
- \mainclass
+
A QComboBox provides a means of presenting a list of options to the user
in a way that takes up the minimum amount of screen space.
diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp
index 3d12ce9..206221f 100644
--- a/src/gui/widgets/qcommandlinkbutton.cpp
+++ b/src/gui/widgets/qcommandlinkbutton.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
\brief The QCommandLinkButton widget provides a Vista style command link button.
\ingroup basicwidgets
- \mainclass
+
The command link is a new control that was introduced by Windows Vista. It's
intended use is similar to that of a radio button in that it is used to choose
diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp
index 2900d39..0fca0b7 100644
--- a/src/gui/widgets/qdatetimeedit.cpp
+++ b/src/gui/widgets/qdatetimeedit.cpp
@@ -75,7 +75,7 @@ QT_BEGIN_NAMESPACE
\brief The QDateTimeEdit class provides a widget for editing dates and times.
\ingroup basicwidgets
- \mainclass
+
QDateTimeEdit allows the user to edit dates by using the keyboard or
the arrow keys to increase and decrease date and time values. The
@@ -1505,7 +1505,7 @@ void QDateTimeEdit::mousePressEvent(QMouseEvent *event)
the QDateTimeEdit widget.
\ingroup basicwidgets
- \mainclass
+
Many of the properties and functions provided by QTimeEdit are implemented in
QDateTimeEdit. The following properties are most relevant to users of this
@@ -1567,7 +1567,7 @@ QTimeEdit::QTimeEdit(const QTime &time, QWidget *parent)
the QDateTimeEdit widget.
\ingroup basicwidgets
- \mainclass
+
Many of the properties and functions provided by QDateEdit are implemented in
QDateTimeEdit. The following properties are most relevant to users of this
diff --git a/src/gui/widgets/qdial.cpp b/src/gui/widgets/qdial.cpp
index 3fe7c68..90f1c85 100644
--- a/src/gui/widgets/qdial.cpp
+++ b/src/gui/widgets/qdial.cpp
@@ -168,7 +168,7 @@ int QDialPrivate::valueFromPoint(const QPoint &p) const
\brief The QDial class provides a rounded range control (like a speedometer or potentiometer).
\ingroup basicwidgets
- \mainclass
+
QDial is used when the user needs to control a value within a
program-definable range, and the range either wraps around
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index 5560367..515efc4 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -57,8 +57,8 @@ QT_BEGIN_NAMESPACE
\brief The QDialogButtonBox class is a widget that presents buttons in a
layout that is appropriate to the current widget style.
- \ingroup application
- \mainclass
+ \ingroup dialog-classes
+
Dialogs and message boxes typically present buttons in a layout that
conforms to the interface guidelines for that platform. Invariably,
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index a521921..1193b3e 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1069,7 +1069,7 @@ void QDockWidgetPrivate::setWindowState(bool floating, bool unplug, const QRect
inside a QMainWindow or floated as a top-level window on the
desktop.
- \ingroup application
+ \ingroup mainwindow-classes
QDockWidget provides the concept of dock widgets, also know as
tool palettes or utility windows. Dock windows are secondary
diff --git a/src/gui/widgets/qfocusframe.cpp b/src/gui/widgets/qfocusframe.cpp
index 2c88a2e..65dc7d0 100644
--- a/src/gui/widgets/qfocusframe.cpp
+++ b/src/gui/widgets/qfocusframe.cpp
@@ -118,7 +118,7 @@ void QFocusFrame::initStyleOption(QStyleOption *option) const
outside of a widget's normal paintable area.
\ingroup basicwidgets
- \mainclass
+
Normally an application will not need to create its own
QFocusFrame as QStyle will handle this detail for
diff --git a/src/gui/widgets/qfontcombobox.cpp b/src/gui/widgets/qfontcombobox.cpp
index 24af989..d3f5bf9 100644
--- a/src/gui/widgets/qfontcombobox.cpp
+++ b/src/gui/widgets/qfontcombobox.cpp
@@ -276,7 +276,6 @@ void QFontComboBoxPrivate::_q_currentChanged(const QString &text)
\since 4.2
\ingroup basicwidgets
- \ingroup text
The combobox is populated with an alphabetized list of font
family names, such as Arial, Helvetica, and Times New Roman.
diff --git a/src/gui/widgets/qframe.cpp b/src/gui/widgets/qframe.cpp
index a7861ad..62f2ddf 100644
--- a/src/gui/widgets/qframe.cpp
+++ b/src/gui/widgets/qframe.cpp
@@ -73,7 +73,7 @@ inline void QFramePrivate::init()
\brief The QFrame class is the base class of widgets that can have a frame.
\ingroup abstractwidgets
- \mainclass
+
QMenu uses this to "raise" the menu above the surrounding
screen. QProgressBar has a "sunken" look. QLabel has a flat look.
diff --git a/src/gui/widgets/qgroupbox.cpp b/src/gui/widgets/qgroupbox.cpp
index 03a08e8..daf92c0 100644
--- a/src/gui/widgets/qgroupbox.cpp
+++ b/src/gui/widgets/qgroupbox.cpp
@@ -147,8 +147,6 @@ void QGroupBoxPrivate::click()
\ingroup organizers
\ingroup geomanagement
- \ingroup appearance
- \mainclass
A group box provides a frame, a title and a keyboard shortcut, and
displays various other widgets inside itself. The title is on top,
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index fd97c8f..a9c7e12 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -61,8 +61,6 @@ QT_BEGIN_NAMESPACE
\brief The QLabel widget provides a text or image display.
\ingroup basicwidgets
- \ingroup text
- \mainclass
QLabel is used for displaying text or an image. No user
interaction functionality is provided. The visual appearance of
diff --git a/src/gui/widgets/qlcdnumber.cpp b/src/gui/widgets/qlcdnumber.cpp
index c4c97ab..d6f5e61 100644
--- a/src/gui/widgets/qlcdnumber.cpp
+++ b/src/gui/widgets/qlcdnumber.cpp
@@ -74,7 +74,7 @@ public:
\brief The QLCDNumber widget displays a number with LCD-like digits.
\ingroup basicwidgets
- \mainclass
+
It can display a number in just about any size. It can display
decimal, hexadecimal, octal or binary numbers. It is easy to
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 3f44bc8..56cc828 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -128,7 +128,7 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const
\brief The QLineEdit widget is a one-line text editor.
\ingroup basicwidgets
- \mainclass
+
A line edit allows the user to enter and edit a single line of
plain text with a useful collection of editing functions,
@@ -1388,6 +1388,7 @@ bool QLineEdit::event(QEvent * e)
if (QApplication::keypadNavigationEnabled()) {
if (e->type() == QEvent::EnterEditFocus) {
end(false);
+ d->setCursorVisible(true);
int cft = QApplication::cursorFlashTime();
d->control->setCursorBlinkPeriod(cft/2);
} else if (e->type() == QEvent::LeaveEditFocus) {
@@ -1396,7 +1397,6 @@ bool QLineEdit::event(QEvent * e)
if (d->control->hasAcceptableInput() || d->control->fixup())
emit editingFinished();
}
- return true;
}
#endif
return QWidget::event(e);
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 88059a0..e19961f 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -146,8 +146,8 @@ void QMainWindowPrivate::init()
\class QMainWindow
\brief The QMainWindow class provides a main application
window.
- \ingroup application
- \mainclass
+ \ingroup mainwindow-classes
+
\tableofcontents
diff --git a/src/gui/widgets/qmdiarea.cpp b/src/gui/widgets/qmdiarea.cpp
index 2390c25..e206bcf 100644
--- a/src/gui/widgets/qmdiarea.cpp
+++ b/src/gui/widgets/qmdiarea.cpp
@@ -43,8 +43,8 @@
\class QMdiArea
\brief The QMdiArea widget provides an area in which MDI windows are displayed.
\since 4.3
- \ingroup application
- \mainclass
+ \ingroup mainwindow-classes
+
QMdiArea functions, essentially, like a window manager for MDI
windows. For instance, it draws the windows it manages on itself
diff --git a/src/gui/widgets/qmdisubwindow.cpp b/src/gui/widgets/qmdisubwindow.cpp
index c645429..d51bd99 100644
--- a/src/gui/widgets/qmdisubwindow.cpp
+++ b/src/gui/widgets/qmdisubwindow.cpp
@@ -44,8 +44,8 @@
\brief The QMdiSubWindow class provides a subwindow class for
QMdiArea.
\since 4.3
- \ingroup application
- \mainclass
+ \ingroup mainwindow-classes
+
QMdiSubWindow represents a top-level window in a QMdiArea, and consists
of a title bar with window decorations, an internal widget, and
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index eb3b6b1..da63b0d 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1200,9 +1200,9 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
\brief The QMenu class provides a menu widget for use in menu
bars, context menus, and other popup menus.
- \ingroup application
+ \ingroup mainwindow-classes
\ingroup basicwidgets
- \mainclass
+
A menu widget is a selection menu. It can be either a pull-down
menu in a menu bar or a standalone context menu. Pull-down menus
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 640ac5b..2989f94 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -590,8 +590,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
\class QMenuBar
\brief The QMenuBar class provides a horizontal menu bar.
- \ingroup application
- \mainclass
+ \ingroup mainwindow-classes
A menu bar consists of a list of pull-down menu items. You add
menu items with addMenu(). For example, asuming that \c menubar
@@ -715,7 +714,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti
\section1 Examples
The \l{mainwindows/menus}{Menus} example shows how to use QMenuBar
- and QMenu. The other \l{Qt Examples#Main Windows}{main window
+ and QMenu. The other \l{Main Window Examples}{main window
application examples} also provide menus using these classes.
\sa QMenu, QShortcut, QAction,
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index e489f3b..16b7c1e 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -111,8 +111,7 @@ public:
\since 4.4
\brief The QPlainTextDocumentLayout class implements a plain text layout for QTextDocument
- \ingroup text
-
+ \ingroup richtext-processing
A QPlainTextDocumentLayout is required for text documents that can
be display or edited in a QPlainTextEdit. See
@@ -1007,8 +1006,8 @@ void QPlainTextEditPrivate::ensureViewportLayouted()
\brief The QPlainTextEdit class provides a widget that is used to edit and display
plain text.
- \ingroup text
- \mainclass
+ \ingroup richtext-processing
+
\tableofcontents
diff --git a/src/gui/widgets/qprintpreviewwidget.cpp b/src/gui/widgets/qprintpreviewwidget.cpp
index ade6223..40ea5a1 100644
--- a/src/gui/widgets/qprintpreviewwidget.cpp
+++ b/src/gui/widgets/qprintpreviewwidget.cpp
@@ -452,7 +452,7 @@ void QPrintPreviewWidgetPrivate::setZoomFactor(qreal _zoomFactor)
\brief The QPrintPreviewWidget class provides a widget for
previewing page layouts for printer output.
- \ingroup multimedia
+ \ingroup printing
QPrintPreviewDialog uses a QPrintPreviewWidget internally, and the
purpose of QPrintPreviewWidget is to make it possible to embed the
diff --git a/src/gui/widgets/qprogressbar.cpp b/src/gui/widgets/qprogressbar.cpp
index b35b9d3..9f91cf7 100644
--- a/src/gui/widgets/qprogressbar.cpp
+++ b/src/gui/widgets/qprogressbar.cpp
@@ -172,7 +172,7 @@ bool QProgressBarPrivate::repaintRequired() const
\brief The QProgressBar widget provides a horizontal or vertical progress bar.
\ingroup basicwidgets
- \mainclass
+
A progress bar is used to give the user an indication of the
progress of an operation and to reassure them that the application
diff --git a/src/gui/widgets/qpushbutton.cpp b/src/gui/widgets/qpushbutton.cpp
index 94b39e0..f991620 100644
--- a/src/gui/widgets/qpushbutton.cpp
+++ b/src/gui/widgets/qpushbutton.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
\brief The QPushButton widget provides a command button.
\ingroup basicwidgets
- \mainclass
+
The push button, or command button, is perhaps the most commonly
used widget in any graphical user interface. Push (click) a button
diff --git a/src/gui/widgets/qradiobutton.cpp b/src/gui/widgets/qradiobutton.cpp
index feada97..4b5cead 100644
--- a/src/gui/widgets/qradiobutton.cpp
+++ b/src/gui/widgets/qradiobutton.cpp
@@ -80,7 +80,7 @@ void QRadioButtonPrivate::init()
\brief The QRadioButton widget provides a radio button with a text label.
\ingroup basicwidgets
- \mainclass
+
A QRadioButton is an option button that can be switched on (checked) or
off (unchecked). Radio buttons typically present the user with a "one
diff --git a/src/gui/widgets/qrubberband.cpp b/src/gui/widgets/qrubberband.cpp
index 5b61bd4..a04bc55 100644
--- a/src/gui/widgets/qrubberband.cpp
+++ b/src/gui/widgets/qrubberband.cpp
@@ -98,9 +98,6 @@ void QRubberBand::initStyleOption(QStyleOptionRubberBand *option) const
\brief The QRubberBand class provides a rectangle or line that can
indicate a selection or a boundary.
- \ingroup misc
- \mainclass
-
A rubber band is often used to show a new bounding area (as in a
QSplitter or a QDockWidget that is undocking). Historically this has
been implemented using a QPainter and XOR, but this approach
diff --git a/src/gui/widgets/qscrollarea.cpp b/src/gui/widgets/qscrollarea.cpp
index 32d3c2b..31e558b 100644
--- a/src/gui/widgets/qscrollarea.cpp
+++ b/src/gui/widgets/qscrollarea.cpp
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
another widget.
\ingroup basicwidgets
- \mainclass
+
A scroll area is used to display the contents of a child widget
within a frame. If the widget exceeds the size of the frame, the
diff --git a/src/gui/widgets/qsizegrip.cpp b/src/gui/widgets/qsizegrip.cpp
index 080e328..8a1a0e6 100644
--- a/src/gui/widgets/qsizegrip.cpp
+++ b/src/gui/widgets/qsizegrip.cpp
@@ -165,9 +165,8 @@ Qt::Corner QSizeGripPrivate::corner() const
\brief The QSizeGrip class provides a resize handle for resizing top-level windows.
- \ingroup application
+ \ingroup mainwindow-classes
\ingroup basicwidgets
- \ingroup appearance
This widget works like the standard Windows resize handle. In the
X11 version this resize handle generally works differently from
diff --git a/src/gui/widgets/qslider.cpp b/src/gui/widgets/qslider.cpp
index 0b7e7c1..d9c98e1 100644
--- a/src/gui/widgets/qslider.cpp
+++ b/src/gui/widgets/qslider.cpp
@@ -203,7 +203,7 @@ QStyle::SubControl QSliderPrivate::newHoverControl(const QPoint &pos)
\brief The QSlider widget provides a vertical or horizontal slider.
\ingroup basicwidgets
- \mainclass
+
The slider is the classic widget for controlling a bounded value.
It lets the user move a slider handle along a horizontal or vertical
diff --git a/src/gui/widgets/qspinbox.cpp b/src/gui/widgets/qspinbox.cpp
index c903610..f17c15f 100644
--- a/src/gui/widgets/qspinbox.cpp
+++ b/src/gui/widgets/qspinbox.cpp
@@ -106,7 +106,7 @@ public:
\brief The QSpinBox class provides a spin box widget.
\ingroup basicwidgets
- \mainclass
+
QSpinBox is designed to handle integers and discrete sets of
values (e.g., month names); use QDoubleSpinBox for floating point
@@ -527,7 +527,7 @@ void QSpinBox::fixup(QString &input) const
takes doubles.
\ingroup basicwidgets
- \mainclass
+
QDoubleSpinBox allows the user to choose a value by clicking the
up and down buttons or by pressing Up or Down on the keyboard to
diff --git a/src/gui/widgets/qsplashscreen.cpp b/src/gui/widgets/qsplashscreen.cpp
index e4f7307..2357164 100644
--- a/src/gui/widgets/qsplashscreen.cpp
+++ b/src/gui/widgets/qsplashscreen.cpp
@@ -72,9 +72,6 @@ public:
\brief The QSplashScreen widget provides a splash screen that can
be shown during application startup.
- \ingroup misc
- \mainclass
-
A splash screen is a widget that is usually displayed when an
application is being started. Splash screens are often used for
applications that have long start up times (e.g. database or
diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp
index 98cf2a8..0aa89f4 100644
--- a/src/gui/widgets/qsplitter.cpp
+++ b/src/gui/widgets/qsplitter.cpp
@@ -931,7 +931,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
\brief The QSplitter class implements a splitter widget.
\ingroup organizers
- \mainclass
+
A splitter lets the user control the size of child widgets by dragging the
boundary between the children. Any number of widgets may be controlled by a
diff --git a/src/gui/widgets/qstackedwidget.cpp b/src/gui/widgets/qstackedwidget.cpp
index da942d1..7dedf4a 100644
--- a/src/gui/widgets/qstackedwidget.cpp
+++ b/src/gui/widgets/qstackedwidget.cpp
@@ -65,8 +65,7 @@ public:
\ingroup organizers
\ingroup geomanagement
- \ingroup appearance
- \mainclass
+
QStackedWidget can be used to create a user interface similar to
the one provided by QTabWidget. It is a convenience layout widget
diff --git a/src/gui/widgets/qstatusbar.cpp b/src/gui/widgets/qstatusbar.cpp
index ed2d5d8..eb58c61 100644
--- a/src/gui/widgets/qstatusbar.cpp
+++ b/src/gui/widgets/qstatusbar.cpp
@@ -158,9 +158,9 @@ QRect QStatusBarPrivate::messageRect() const
\brief The QStatusBar class provides a horizontal bar suitable for
presenting status information.
- \ingroup application
+ \ingroup mainwindow-classes
\ingroup helpsystem
- \mainclass
+
Each status indicator falls into one of three categories:
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 410c26f..5166390 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -192,7 +192,7 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const
\brief The QTabBar class provides a tab bar, e.g. for use in tabbed dialogs.
\ingroup basicwidgets
- \mainclass
+
QTabBar is straightforward to use; it draws the tabs using one of
the predefined \link QTabBar::Shape shapes\endlink, and emits a
diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp
index 6828c50..14a554a 100644
--- a/src/gui/widgets/qtabwidget.cpp
+++ b/src/gui/widgets/qtabwidget.cpp
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
\ingroup organizers
\ingroup basicwidgets
- \mainclass
+
A tab widget provides a tab bar (see QTabBar) and a "page area"
that is used to display pages related to each tab. By default, the
diff --git a/src/gui/widgets/qtextbrowser.cpp b/src/gui/widgets/qtextbrowser.cpp
index 803b6fb..7a67a8d 100644
--- a/src/gui/widgets/qtextbrowser.cpp
+++ b/src/gui/widgets/qtextbrowser.cpp
@@ -580,7 +580,7 @@ void QTextBrowserPrivate::restoreHistoryEntry(const HistoryEntry entry)
\class QTextBrowser
\brief The QTextBrowser class provides a rich text browser with hypertext navigation.
- \ingroup text
+ \ingroup richtext-processing
This class extends QTextEdit (in read-only mode), adding some navigation
functionality so that users can follow links in hypertext documents.
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index a82adf7..a6e3c83 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -333,8 +333,8 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect)
\brief The QTextEdit class provides a widget that is used to edit and display
both plain and rich text.
- \ingroup text
- \mainclass
+ \ingroup richtext-processing
+
\tableofcontents
diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp
index 37c7998..ef0847b 100644
--- a/src/gui/widgets/qtoolbar.cpp
+++ b/src/gui/widgets/qtoolbar.cpp
@@ -412,8 +412,8 @@ void QToolBarPrivate::plug(const QRect &r)
\brief The QToolBar class provides a movable panel that contains a
set of controls.
- \ingroup application
- \mainclass
+ \ingroup mainwindow-classes
+
Toolbar buttons are added by adding \e actions, using addAction()
or insertAction(). Groups of buttons can be separated using
diff --git a/src/gui/widgets/qtoolbox.cpp b/src/gui/widgets/qtoolbox.cpp
index 803c6ab..378ed17 100644
--- a/src/gui/widgets/qtoolbox.cpp
+++ b/src/gui/widgets/qtoolbox.cpp
@@ -252,7 +252,7 @@ void QToolBoxButton::paintEvent(QPaintEvent *)
\brief The QToolBox class provides a column of tabbed widget items.
- \mainclass
+
\ingroup basicwidgets
A toolbox is a widget that displays a column of tabs one above the
diff --git a/src/gui/widgets/qtoolbutton.cpp b/src/gui/widgets/qtoolbutton.cpp
index bb8c32f..4ca3d62 100644
--- a/src/gui/widgets/qtoolbutton.cpp
+++ b/src/gui/widgets/qtoolbutton.cpp
@@ -116,7 +116,7 @@ bool QToolButtonPrivate::hasMenu() const
commands or options, usually used inside a QToolBar.
\ingroup basicwidgets
- \mainclass
+
A tool button is a special button that provides quick-access to
specific commands or options. As opposed to a normal command
diff --git a/src/gui/widgets/qvalidator.cpp b/src/gui/widgets/qvalidator.cpp
index 7db0247..8f43097 100644
--- a/src/gui/widgets/qvalidator.cpp
+++ b/src/gui/widgets/qvalidator.cpp
@@ -55,9 +55,6 @@ QT_BEGIN_NAMESPACE
\class QValidator
\brief The QValidator class provides validation of input text.
- \ingroup misc
- \mainclass
-
The class itself is abstract. Two subclasses, \l QIntValidator and
\l QDoubleValidator, provide basic numeric-range checking, and \l
QRegExpValidator provides general checking using a custom regular
@@ -246,8 +243,6 @@ void QValidator::fixup(QString &) const
\brief The QIntValidator class provides a validator that ensures
a string contains a valid integer within a specified range.
- \ingroup misc
-
Example of use:
\snippet doc/src/snippets/code/src_gui_widgets_qvalidator.cpp 0
@@ -497,8 +492,6 @@ public:
\brief The QDoubleValidator class provides range checking of
floating-point numbers.
- \ingroup misc
-
QDoubleValidator provides an upper bound, a lower bound, and a
limit on the number of digits after the decimal point. It does not
provide a fixup() function.
@@ -767,8 +760,6 @@ QDoubleValidator::Notation QDoubleValidator::notation() const
\brief The QRegExpValidator class is used to check a string
against a regular expression.
- \ingroup misc
-
QRegExpValidator uses a regular expression (regexp) to
determine whether an input string is \l Acceptable, \l
Intermediate, or \l Invalid. The regexp can either be supplied
diff --git a/src/gui/widgets/qworkspace.cpp b/src/gui/widgets/qworkspace.cpp
index d8bcf9b..cd98671 100644
--- a/src/gui/widgets/qworkspace.cpp
+++ b/src/gui/widgets/qworkspace.cpp
@@ -834,7 +834,6 @@ QSize QWorkspaceTitleBar::sizeHint() const
\obsolete
\brief The QWorkspace widget provides a workspace window that can be
used in an MDI application.
- \ingroup application
This class is deprecated. Use QMdiArea instead.