diff options
Diffstat (limited to 'examples')
78 files changed, 231 insertions, 807 deletions
diff --git a/examples/activeqt/qutlook/addressview.cpp b/examples/activeqt/qutlook/addressview.cpp index 6e79250..19425c1 100644 --- a/examples/activeqt/qutlook/addressview.cpp +++ b/examples/activeqt/qutlook/addressview.cpp @@ -243,7 +243,7 @@ AddressView::AddressView(QWidget *parent) model = new AddressBookModel(this); treeView->setModel(model); - connect(treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), this, SLOT(itemSelected(QModelIndex))); + connect(treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(itemSelected(QModelIndex))); mainGrid->addWidget(treeView, 2, 0, 1, 5); } diff --git a/examples/activeqt/simple/main.cpp b/examples/activeqt/simple/main.cpp index 4adc00d..78fa1b4 100644 --- a/examples/activeqt/simple/main.cpp +++ b/examples/activeqt/simple/main.cpp @@ -64,8 +64,8 @@ public: LCD = new QLCDNumber( 3, this ); edit = new QLineEdit( this ); - connect( slider, SIGNAL( valueChanged( int ) ), this, SLOT( setValue(int) ) ); - connect( edit, SIGNAL(textChanged(const QString&)), this, SLOT(setText(const QString&)) ); + connect( slider, SIGNAL(valueChanged(int)), this, SLOT(setValue(int)) ); + connect( edit, SIGNAL(textChanged(QString)), this, SLOT(setText(QString)) ); vbox->addWidget( slider ); vbox->addWidget( LCD ); diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp index 1435ca6..0720111 100644 --- a/examples/assistant/simpletextviewer/findfiledialog.cpp +++ b/examples/assistant/simpletextviewer/findfiledialog.cpp @@ -176,9 +176,9 @@ void FindFileDialog::createComboBoxes() directoryComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)), + connect(fileNameComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(update())); - connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)), + connect(directoryComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(update())); } @@ -190,8 +190,8 @@ void FindFileDialog::createFilesTree() foundFilesTree->setRootIsDecorated(false); foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection); - connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)), - this, SLOT(openFile(QTreeWidgetItem *))); + connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem*,int)), + this, SLOT(openFile(QTreeWidgetItem*))); } void FindFileDialog::createLabels() diff --git a/examples/designer/containerextension/multipagewidgetplugin.cpp b/examples/designer/containerextension/multipagewidgetplugin.cpp index ec61b67..b6a172f 100644 --- a/examples/designer/containerextension/multipagewidgetplugin.cpp +++ b/examples/designer/containerextension/multipagewidgetplugin.cpp @@ -102,8 +102,8 @@ QWidget *MultiPageWidgetPlugin::createWidget(QWidget *parent) MultiPageWidget *widget = new MultiPageWidget(parent); connect(widget, SIGNAL(currentIndexChanged(int)), this, SLOT(currentIndexChanged(int))); - connect(widget, SIGNAL(pageTitleChanged(const QString &)), - this, SLOT(pageTitleChanged(const QString &))); + connect(widget, SIGNAL(pageTitleChanged(QString)), + this, SLOT(pageTitleChanged(QString))); return widget; } diff --git a/examples/dialogs/configdialog/configdialog.cpp b/examples/dialogs/configdialog/configdialog.cpp index 5c5d161..8d73f92 100644 --- a/examples/dialogs/configdialog/configdialog.cpp +++ b/examples/dialogs/configdialog/configdialog.cpp @@ -104,8 +104,8 @@ void ConfigDialog::createIcons() queryButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); connect(contentsWidget, - SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), - this, SLOT(changePage(QListWidgetItem *, QListWidgetItem*))); + SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, SLOT(changePage(QListWidgetItem*,QListWidgetItem*))); } void ConfigDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous) diff --git a/examples/dialogs/findfiles/window.cpp b/examples/dialogs/findfiles/window.cpp index afe6399..66e1b46 100644 --- a/examples/dialogs/findfiles/window.cpp +++ b/examples/dialogs/findfiles/window.cpp @@ -76,7 +76,7 @@ Window::Window(QWidget *parent) mainLayout->addWidget(directoryComboBox, 2, 1); mainLayout->addWidget(browseButton, 2, 2); mainLayout->addWidget(filesTable, 3, 0, 1, 3); - mainLayout->addWidget(filesFoundLabel, 4, 0); + mainLayout->addWidget(filesFoundLabel, 4, 0, 1, 3); mainLayout->addLayout(buttonsLayout, 5, 0, 1, 3); setLayout(mainLayout); @@ -232,8 +232,8 @@ void Window::createFilesTable() filesTable->verticalHeader()->hide(); filesTable->setShowGrid(false); - connect(filesTable, SIGNAL(cellActivated(int, int)), - this, SLOT(openFileOfItem(int, int))); + connect(filesTable, SIGNAL(cellActivated(int,int)), + this, SLOT(openFileOfItem(int,int))); } //! [11] diff --git a/examples/draganddrop/delayedencoding/sourcewidget.cpp b/examples/draganddrop/delayedencoding/sourcewidget.cpp index 0d399a5..29ee8d7 100644 --- a/examples/draganddrop/delayedencoding/sourcewidget.cpp +++ b/examples/draganddrop/delayedencoding/sourcewidget.cpp @@ -102,8 +102,8 @@ void SourceWidget::startDrag() { mimeData = new MimeData; - connect(mimeData, SIGNAL(dataRequested(const QString &)), - this, SLOT(createData(const QString &)), Qt::DirectConnection); + connect(mimeData, SIGNAL(dataRequested(QString)), + this, SLOT(createData(QString)), Qt::DirectConnection); QDrag *drag = new QDrag(this); drag->setMimeData(mimeData); diff --git a/examples/draganddrop/dropsite/dropsitewindow.cpp b/examples/draganddrop/dropsite/dropsitewindow.cpp index 7187b9c..93c04de 100644 --- a/examples/draganddrop/dropsite/dropsitewindow.cpp +++ b/examples/draganddrop/dropsite/dropsitewindow.cpp @@ -56,8 +56,8 @@ DropSiteWindow::DropSiteWindow() //! [constructor part2] dropArea = new DropArea; - connect(dropArea, SIGNAL(changed(const QMimeData *)), - this, SLOT(updateFormatsTable(const QMimeData *))); + connect(dropArea, SIGNAL(changed(const QMimeData*)), + this, SLOT(updateFormatsTable(const QMimeData*))); //! [constructor part2] //! [constructor part3] diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp deleted file mode 100644 index 956637d..0000000 --- a/examples/effects/customshader/blureffect.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples 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 Technology Preview License Agreement accompanying -** this package. -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "blureffect.h" - -#include <QDebug> - -BlurEffect::BlurEffect(QGraphicsItem *item) - : QGraphicsBlurEffect() - , m_baseLine(200), item(item) -{ -} - -void BlurEffect::adjustForItem() -{ - qreal y = m_baseLine - item->pos().y(); - qreal radius = qBound(qreal(0.0), y / 32, qreal(16.0)); - setBlurRadius(radius); -} - -QRectF BlurEffect::boundingRect() const -{ - const_cast<BlurEffect *>(this)->adjustForItem(); - return QGraphicsBlurEffect::boundingRect(); -} - -void BlurEffect::draw(QPainter *painter) -{ - adjustForItem(); - QGraphicsBlurEffect::draw(painter); -} diff --git a/examples/effects/customshader/blureffect.h b/examples/effects/customshader/blureffect.h deleted file mode 100644 index 3d1d433..0000000 --- a/examples/effects/customshader/blureffect.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples 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 Technology Preview License Agreement accompanying -** this package. -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef BLUREFFECT_H -#define BLUREFFECT_H - -#include <QGraphicsEffect> -#include <QGraphicsItem> - -class BlurEffect: public QGraphicsBlurEffect -{ -public: - BlurEffect(QGraphicsItem *item); - - void setBaseLine(qreal y) { m_baseLine = y; } - - QRectF boundingRect() const; - - void draw(QPainter *painter); - -private: - void adjustForItem(); - -private: - qreal m_baseLine; - QGraphicsItem *item; -}; - -#endif // BLUREFFECT_H diff --git a/examples/effects/customshader/blurpicker.cpp b/examples/effects/customshader/blurpicker.cpp deleted file mode 100644 index d38d99b..0000000 --- a/examples/effects/customshader/blurpicker.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples 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 Technology Preview License Agreement accompanying -** this package. -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "blurpicker.h" - -#include <QtGui> - -#include "blureffect.h" -#include "customshadereffect.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -BlurPicker::BlurPicker(QWidget *parent): QGraphicsView(parent), m_index(0.0), m_animation(this, "index") -{ - setBackgroundBrush(QPixmap(":/images/background.jpg")); - setScene(new QGraphicsScene(this)); - - setupScene(); - setIndex(0); - - m_animation.setDuration(400); - m_animation.setEasingCurve(QEasingCurve::InOutSine); - - setRenderHint(QPainter::Antialiasing, true); - setFrameStyle(QFrame::NoFrame); -} - -qreal BlurPicker::index() const -{ - return m_index; -} - -void BlurPicker::setIndex(qreal index) -{ - m_index = index; - - qreal baseline = 0; - for (int i = 0; i < m_icons.count(); ++i) { - QGraphicsItem *icon = m_icons[i]; - qreal a = ((i + m_index) * 2 * M_PI) / m_icons.count(); - qreal xs = 170 * sin(a); - qreal ys = 100 * cos(a); - QPointF pos(xs, ys); - pos = QTransform().rotate(-20).map(pos); - pos -= QPointF(40, 40); - icon->setPos(pos); - baseline = qMax(baseline, ys); - if (i != 3) - static_cast<BlurEffect *>(icon->graphicsEffect())->setBaseLine(baseline); - } - - scene()->update(); -} - -void BlurPicker::setupScene() -{ - scene()->setSceneRect(-200, -120, 400, 240); - - QStringList names; - names << ":/images/accessories-calculator.png"; - names << ":/images/accessories-text-editor.png"; - names << ":/images/help-browser.png"; - names << ":/images/internet-group-chat.png"; - names << ":/images/internet-mail.png"; - names << ":/images/internet-web-browser.png"; - names << ":/images/office-calendar.png"; - names << ":/images/system-users.png"; - - for (int i = 0; i < names.count(); i++) { - QPixmap pixmap(names[i]); - QGraphicsPixmapItem *icon = scene()->addPixmap(pixmap); - icon->setZValue(1); - if (i == 3) - icon->setGraphicsEffect(new CustomShaderEffect()); - else - icon->setGraphicsEffect(new BlurEffect(icon)); - m_icons << icon; - } - - QGraphicsPixmapItem *bg = scene()->addPixmap(QPixmap(":/images/background.jpg")); - bg->setZValue(0); - bg->setPos(-200, -150); -} - -void BlurPicker::keyPressEvent(QKeyEvent *event) -{ - int delta = 0; - switch (event->key()) - { - case Qt::Key_Left: - delta = -1; - break; - case Qt::Key_Right: - delta = 1; - break; - default: - break; - } - if (m_animation.state() == QAbstractAnimation::Stopped && delta) { - m_animation.setEndValue(m_index + delta); - m_animation.start(); - event->accept(); - } -} diff --git a/examples/effects/customshader/blurpicker.h b/examples/effects/customshader/blurpicker.h deleted file mode 100644 index b302db4..0000000 --- a/examples/effects/customshader/blurpicker.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples 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 Technology Preview License Agreement accompanying -** this package. -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef BLURPICKER_H -#define BLURPICKER_H - -#include <QGraphicsEffect> -#include <QGraphicsView> -#include <QPropertyAnimation> - -#include "blureffect.h" - -class BlurPicker: public QGraphicsView -{ - Q_OBJECT - Q_PROPERTY(qreal index READ index WRITE setIndex); - -public: - BlurPicker(QWidget *parent = 0); - - qreal index() const; - void setIndex(qreal); - -protected: - void keyPressEvent(QKeyEvent *event); - -private: - void setupScene(); - -private: - qreal m_index; - QList<QGraphicsItem*> m_icons; - QPropertyAnimation m_animation; -}; - -#endif // BLURPICKER_H diff --git a/examples/effects/customshader/blurpicker.qrc b/examples/effects/customshader/blurpicker.qrc deleted file mode 100644 index e88eaca..0000000 --- a/examples/effects/customshader/blurpicker.qrc +++ /dev/null @@ -1,14 +0,0 @@ -<RCC> - <qresource prefix="/" > - <file>images/background.jpg</file> - <file>images/accessories-calculator.png</file> - <file>images/accessories-text-editor.png</file> - <file>images/help-browser.png</file> - <file>images/internet-group-chat.png</file> - <file>images/internet-mail.png</file> - <file>images/internet-web-browser.png</file> - <file>images/office-calendar.png</file> - <file>images/system-users.png</file> - </qresource> -</RCC> - diff --git a/examples/effects/customshader/customshader.pro b/examples/effects/customshader/customshader.pro deleted file mode 100644 index 4ce5d2b..0000000 --- a/examples/effects/customshader/customshader.pro +++ /dev/null @@ -1,10 +0,0 @@ -SOURCES += main.cpp blurpicker.cpp blureffect.cpp customshadereffect.cpp -HEADERS += blurpicker.h blureffect.h customshadereffect.h -RESOURCES += blurpicker.qrc -QT += opengl - -# install -target.path = $$[QT_INSTALL_EXAMPLES]/effects/customshader -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS customshader.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/effects/customshader -INSTALLS += target sources diff --git a/examples/effects/customshader/customshadereffect.cpp b/examples/effects/customshader/customshadereffect.cpp deleted file mode 100644 index 73bbf4f..0000000 --- a/examples/effects/customshader/customshadereffect.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples 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 Technology Preview License Agreement accompanying -** this package. -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "customshadereffect.h" -#include <QGLShaderProgram> - -static char const colorizeShaderCode[] = - "uniform lowp vec4 effectColor;\n" - "mediump vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {\n" - " vec4 src = texture2D(imageTexture, textureCoords);\n" - " float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n" - " vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n" - " return vec4(colorize.rgb * src.a, src.a);\n" - "}"; - -CustomShaderEffect::CustomShaderEffect() - : QGraphicsShaderEffect(), - color(Qt::red) -{ - setPixelShaderFragment(colorizeShaderCode); -} - -void CustomShaderEffect::setEffectColor(const QColor& c) -{ - color = c; - setUniformsDirty(); -} - -void CustomShaderEffect::setUniforms(QGLShaderProgram *program) -{ - program->setUniformValue("effectColor", color); -} diff --git a/examples/effects/customshader/customshadereffect.h b/examples/effects/customshader/customshadereffect.h deleted file mode 100644 index 48940db..0000000 --- a/examples/effects/customshader/customshadereffect.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples 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 Technology Preview License Agreement accompanying -** this package. -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef CUSTOMSHADEREFFECT_H -#define CUSTOMSHADEREFFECT_H - -#include <QGraphicsEffect> -#include <QtOpenGL/private/qgraphicsshadereffect_p.h> -#include <QGraphicsItem> - -class CustomShaderEffect: public QGraphicsShaderEffect -{ -public: - CustomShaderEffect(); - - QColor effectColor() const { return color; } - void setEffectColor(const QColor& c); - -protected: - void setUniforms(QGLShaderProgram *program); - -private: - QColor color; -}; - -#endif // CUSTOMSHADEREFFECT_H diff --git a/examples/effects/customshader/images/README.txt b/examples/effects/customshader/images/README.txt deleted file mode 100644 index 0927e17..0000000 --- a/examples/effects/customshader/images/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -The background is taken from a public domain photo at: -http://www.photos8.com/view/computer_board2-800x600.html - -All other icons are from the Tango Desktop project: -http://tango.freedesktop.org/Tango_Desktop_Project diff --git a/examples/effects/customshader/images/accessories-calculator.png b/examples/effects/customshader/images/accessories-calculator.png Binary files differdeleted file mode 100644 index 4e7661f..0000000 --- a/examples/effects/customshader/images/accessories-calculator.png +++ /dev/null diff --git a/examples/effects/customshader/images/accessories-text-editor.png b/examples/effects/customshader/images/accessories-text-editor.png Binary files differdeleted file mode 100644 index 33bef0b..0000000 --- a/examples/effects/customshader/images/accessories-text-editor.png +++ /dev/null diff --git a/examples/effects/customshader/images/background.jpg b/examples/effects/customshader/images/background.jpg Binary files differdeleted file mode 100644 index e75b388..0000000 --- a/examples/effects/customshader/images/background.jpg +++ /dev/null diff --git a/examples/effects/customshader/images/help-browser.png b/examples/effects/customshader/images/help-browser.png Binary files differdeleted file mode 100644 index 8ef4fae..0000000 --- a/examples/effects/customshader/images/help-browser.png +++ /dev/null diff --git a/examples/effects/customshader/images/internet-group-chat.png b/examples/effects/customshader/images/internet-group-chat.png Binary files differdeleted file mode 100644 index dd92d93..0000000 --- a/examples/effects/customshader/images/internet-group-chat.png +++ /dev/null diff --git a/examples/effects/customshader/images/internet-mail.png b/examples/effects/customshader/images/internet-mail.png Binary files differdeleted file mode 100644 index 7e6b93b..0000000 --- a/examples/effects/customshader/images/internet-mail.png +++ /dev/null diff --git a/examples/effects/customshader/images/internet-web-browser.png b/examples/effects/customshader/images/internet-web-browser.png Binary files differdeleted file mode 100644 index a979a92..0000000 --- a/examples/effects/customshader/images/internet-web-browser.png +++ /dev/null diff --git a/examples/effects/customshader/images/office-calendar.png b/examples/effects/customshader/images/office-calendar.png Binary files differdeleted file mode 100644 index e095906..0000000 --- a/examples/effects/customshader/images/office-calendar.png +++ /dev/null diff --git a/examples/effects/customshader/images/system-users.png b/examples/effects/customshader/images/system-users.png Binary files differdeleted file mode 100644 index a7f630a..0000000 --- a/examples/effects/customshader/images/system-users.png +++ /dev/null diff --git a/examples/effects/customshader/main.cpp b/examples/effects/customshader/main.cpp deleted file mode 100644 index dfcdcd2..0000000 --- a/examples/effects/customshader/main.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples 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 Technology Preview License Agreement accompanying -** this package. -** -** 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.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "blurpicker.h" -#include <QApplication> - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - - BlurPicker blurPicker; - blurPicker.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Application Picker")); - blurPicker.setFixedSize(400, 300); - blurPicker.show(); - - return app.exec(); -} diff --git a/examples/graphicsview/diagramscene/diagramscene.cpp b/examples/graphicsview/diagramscene/diagramscene.cpp index ad7dbdf..a4f1d78 100644 --- a/examples/graphicsview/diagramscene/diagramscene.cpp +++ b/examples/graphicsview/diagramscene/diagramscene.cpp @@ -163,10 +163,10 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) textItem->setFont(myFont); textItem->setTextInteractionFlags(Qt::TextEditorInteraction); textItem->setZValue(1000.0); - connect(textItem, SIGNAL(lostFocus(DiagramTextItem *)), - this, SLOT(editorLostFocus(DiagramTextItem *))); - connect(textItem, SIGNAL(selectedChange(QGraphicsItem *)), - this, SIGNAL(itemSelected(QGraphicsItem *))); + connect(textItem, SIGNAL(lostFocus(DiagramTextItem*)), + this, SLOT(editorLostFocus(DiagramTextItem*))); + connect(textItem, SIGNAL(selectedChange(QGraphicsItem*)), + this, SIGNAL(itemSelected(QGraphicsItem*))); addItem(textItem); textItem->setDefaultTextColor(myTextColor); textItem->setPos(mouseEvent->scenePos()); diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp index 868a3eb..d4edcc4 100644 --- a/examples/graphicsview/diagramscene/mainwindow.cpp +++ b/examples/graphicsview/diagramscene/mainwindow.cpp @@ -58,12 +58,12 @@ MainWindow::MainWindow() scene = new DiagramScene(itemMenu); scene->setSceneRect(QRectF(0, 0, 5000, 5000)); - connect(scene, SIGNAL(itemInserted(DiagramItem *)), - this, SLOT(itemInserted(DiagramItem *))); - connect(scene, SIGNAL(textInserted(QGraphicsTextItem *)), - this, SLOT(textInserted(QGraphicsTextItem *))); - connect(scene, SIGNAL(itemSelected(QGraphicsItem *)), - this, SLOT(itemSelected(QGraphicsItem *))); + connect(scene, SIGNAL(itemInserted(DiagramItem*)), + this, SLOT(itemInserted(DiagramItem*))); + connect(scene, SIGNAL(textInserted(QGraphicsTextItem*)), + this, SLOT(textInserted(QGraphicsTextItem*))); + connect(scene, SIGNAL(itemSelected(QGraphicsItem*)), + this, SLOT(itemSelected(QGraphicsItem*))); createToolbars(); QHBoxLayout *layout = new QHBoxLayout; @@ -347,8 +347,8 @@ void MainWindow::createToolBox() itemWidget->setLayout(layout); backgroundButtonGroup = new QButtonGroup; - connect(backgroundButtonGroup, SIGNAL(buttonClicked(QAbstractButton *)), - this, SLOT(backgroundButtonGroupClicked(QAbstractButton *))); + connect(backgroundButtonGroup, SIGNAL(buttonClicked(QAbstractButton*)), + this, SLOT(backgroundButtonGroupClicked(QAbstractButton*))); QGridLayout *backgroundLayout = new QGridLayout; backgroundLayout->addWidget(createBackgroundCellWidget(tr("Blue Grid"), @@ -462,8 +462,8 @@ void MainWindow::createToolbars() fontCombo = new QFontComboBox(); fontSizeCombo = new QComboBox(); - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - this, SLOT(currentFontChanged(const QFont &))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + this, SLOT(currentFontChanged(QFont))); fontSizeCombo = new QComboBox; fontSizeCombo->setEditable(true); @@ -471,8 +471,8 @@ void MainWindow::createToolbars() fontSizeCombo->addItem(QString().setNum(i)); QIntValidator *validator = new QIntValidator(2, 64, this); fontSizeCombo->setValidator(validator); - connect(fontSizeCombo, SIGNAL(currentIndexChanged(const QString &)), - this, SLOT(fontSizeChanged(const QString &))); + connect(fontSizeCombo, SIGNAL(currentIndexChanged(QString)), + this, SLOT(fontSizeChanged(QString))); fontColorToolButton = new QToolButton; fontColorToolButton->setPopupMode(QToolButton::MenuButtonPopup); @@ -539,8 +539,8 @@ void MainWindow::createToolbars() scales << tr("50%") << tr("75%") << tr("100%") << tr("125%") << tr("150%"); sceneScaleCombo->addItems(scales); sceneScaleCombo->setCurrentIndex(2); - connect(sceneScaleCombo, SIGNAL(currentIndexChanged(const QString &)), - this, SLOT(sceneScaleChanged(const QString &))); + connect(sceneScaleCombo, SIGNAL(currentIndexChanged(QString)), + this, SLOT(sceneScaleChanged(QString))); pointerToolbar = addToolBar(tr("Pointer type")); pointerToolbar->addWidget(pointerButton); diff --git a/examples/graphicsview/portedasteroids/toplevel.cpp b/examples/graphicsview/portedasteroids/toplevel.cpp index c51ecca..c2b5904 100644 --- a/examples/graphicsview/portedasteroids/toplevel.cpp +++ b/examples/graphicsview/portedasteroids/toplevel.cpp @@ -129,10 +129,10 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *name ) view = new KAsteroidsView( mainWin ); view->setFocusPolicy( Qt::StrongFocus ); - connect( view, SIGNAL( shipKilled() ), SLOT( slotShipKilled() ) ); - connect( view, SIGNAL( rockHit(int) ), SLOT( slotRockHit(int) ) ); - connect( view, SIGNAL( rocksRemoved() ), SLOT( slotRocksRemoved() ) ); - connect( view, SIGNAL( updateVitals() ), SLOT( slotUpdateVitals() ) ); + connect( view, SIGNAL(shipKilled()), SLOT(slotShipKilled()) ); + connect( view, SIGNAL(rockHit(int)), SLOT(slotRockHit(int)) ); + connect( view, SIGNAL(rocksRemoved()), SLOT(slotRocksRemoved()) ); + connect( view, SIGNAL(updateVitals()), SLOT(slotUpdateVitals()) ); Q3VBoxLayout *vb = new Q3VBoxLayout( mainWin ); Q3HBoxLayout *hb = new Q3HBoxLayout; diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.cpp b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp index 15a0b29..a09409a 100644 --- a/examples/help/contextsensitivehelp/wateringconfigdialog.cpp +++ b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp @@ -54,8 +54,8 @@ WateringConfigDialog::WateringConfigDialog() m_widgetInfo.insert(m_ui.sourceComboBox, tr("water source")); m_widgetInfo.insert(m_ui.filterCheckBox, tr("water filtering")); - connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)), - this, SLOT(focusChanged(QWidget*, QWidget*))); + connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), + this, SLOT(focusChanged(QWidget*,QWidget*))); } void WateringConfigDialog::focusChanged(QWidget *, QWidget *now) diff --git a/examples/help/remotecontrol/remotecontrol.cpp b/examples/help/remotecontrol/remotecontrol.cpp index adb92d0..84f81df 100644 --- a/examples/help/remotecontrol/remotecontrol.cpp +++ b/examples/help/remotecontrol/remotecontrol.cpp @@ -68,7 +68,7 @@ RemoteControl::RemoteControl(QWidget *parent, Qt::WFlags flags) ui.startUrlLineEdit->setText(rc); process = new QProcess(this); - connect(process, SIGNAL(finished(int, QProcess::ExitStatus)), + connect(process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(helpViewerClosed())); } diff --git a/examples/help/simpletextviewer/findfiledialog.cpp b/examples/help/simpletextviewer/findfiledialog.cpp index b1ac448..fd5d2a6 100644 --- a/examples/help/simpletextviewer/findfiledialog.cpp +++ b/examples/help/simpletextviewer/findfiledialog.cpp @@ -177,9 +177,9 @@ void FindFileDialog::createComboBoxes() directoryComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)), + connect(fileNameComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(update())); - connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)), + connect(directoryComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(update())); } @@ -191,8 +191,8 @@ void FindFileDialog::createFilesTree() foundFilesTree->setRootIsDecorated(false); foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection); - connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)), - this, SLOT(openFile(QTreeWidgetItem *))); + connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem*,int)), + this, SLOT(openFile(QTreeWidgetItem*))); } void FindFileDialog::createLabels() diff --git a/examples/ipc/localfortuneclient/client.cpp b/examples/ipc/localfortuneclient/client.cpp index 803ec3d..9262fbe 100644 --- a/examples/ipc/localfortuneclient/client.cpp +++ b/examples/ipc/localfortuneclient/client.cpp @@ -66,7 +66,7 @@ Client::Client(QWidget *parent) socket = new QLocalSocket(this); - connect(hostLineEdit, SIGNAL(textChanged(const QString &)), + connect(hostLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune())); diff --git a/examples/itemviews/addressbook/addresswidget.cpp b/examples/itemviews/addressbook/addresswidget.cpp index e7e8a9c..741fc0b 100644 --- a/examples/itemviews/addressbook/addresswidget.cpp +++ b/examples/itemviews/addressbook/addresswidget.cpp @@ -49,8 +49,8 @@ AddressWidget::AddressWidget(QWidget *parent) { table = new TableModel(this); newAddressTab = new NewAddressTab(this); - connect(newAddressTab, SIGNAL(sendDetails(QString, QString)), - this, SLOT(addEntry(QString, QString))); + connect(newAddressTab, SIGNAL(sendDetails(QString,QString)), + this, SLOT(addEntry(QString,QString))); addTab(newAddressTab, "Address Book"); @@ -186,8 +186,8 @@ void AddressWidget::setupTabs() proxyModel->sort(0, Qt::AscendingOrder); connect(tableView->selectionModel(), - SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), - this, SIGNAL(selectionChanged(const QItemSelection &))); + SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + this, SIGNAL(selectionChanged(QItemSelection))); addTab(tableView, str); } diff --git a/examples/itemviews/addressbook/mainwindow.cpp b/examples/itemviews/addressbook/mainwindow.cpp index 278786d..fb0ba5a 100644 --- a/examples/itemviews/addressbook/mainwindow.cpp +++ b/examples/itemviews/addressbook/mainwindow.cpp @@ -97,8 +97,8 @@ void MainWindow::createMenus() connect(removeAct, SIGNAL(triggered()), addressWidget, SLOT(removeEntry())); - connect(addressWidget, SIGNAL(selectionChanged(const QItemSelection &)), - this, SLOT(updateActions(const QItemSelection &))); + connect(addressWidget, SIGNAL(selectionChanged(QItemSelection)), + this, SLOT(updateActions(QItemSelection))); } //! [1b] diff --git a/examples/itemviews/basicsortfiltermodel/window.cpp b/examples/itemviews/basicsortfiltermodel/window.cpp index b090896..cd0b52c 100644 --- a/examples/itemviews/basicsortfiltermodel/window.cpp +++ b/examples/itemviews/basicsortfiltermodel/window.cpp @@ -82,7 +82,7 @@ Window::Window() filterColumnLabel = new QLabel(tr("Filter &column:")); filterColumnLabel->setBuddy(filterColumnComboBox); - connect(filterPatternLineEdit, SIGNAL(textChanged(const QString &)), + connect(filterPatternLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterRegExpChanged())); connect(filterSyntaxComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterRegExpChanged())); diff --git a/examples/itemviews/customsortfiltermodel/window.cpp b/examples/itemviews/customsortfiltermodel/window.cpp index 290314a..78f8f81 100644 --- a/examples/itemviews/customsortfiltermodel/window.cpp +++ b/examples/itemviews/customsortfiltermodel/window.cpp @@ -89,15 +89,15 @@ Window::Window() toLabel = new QLabel(tr("&To:")); toLabel->setBuddy(toDateEdit); - connect(filterPatternLineEdit, SIGNAL(textChanged(const QString &)), + connect(filterPatternLineEdit, SIGNAL(textChanged(QString)), this, SLOT(textFilterChanged())); connect(filterSyntaxComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(textFilterChanged())); connect(filterCaseSensitivityCheckBox, SIGNAL(toggled(bool)), this, SLOT(textFilterChanged())); - connect(fromDateEdit, SIGNAL(dateChanged(const QDate &)), + connect(fromDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(dateFilterChanged())); - connect(toDateEdit, SIGNAL(dateChanged(const QDate &)), + connect(toDateEdit, SIGNAL(dateChanged(QDate)), //! [3] //! [4] this, SLOT(dateFilterChanged())); //! [4] diff --git a/examples/itemviews/fetchmore/window.cpp b/examples/itemviews/fetchmore/window.cpp index bf01664..327754d 100644 --- a/examples/itemviews/fetchmore/window.cpp +++ b/examples/itemviews/fetchmore/window.cpp @@ -59,9 +59,9 @@ Window::Window(QWidget *parent) logViewer = new QTextBrowser; logViewer->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); - connect(lineEdit, SIGNAL(textChanged(const QString &)), - model, SLOT(setDirPath(const QString &))); - connect(lineEdit, SIGNAL(textChanged(const QString &)), + connect(lineEdit, SIGNAL(textChanged(QString)), + model, SLOT(setDirPath(QString))); + connect(lineEdit, SIGNAL(textChanged(QString)), logViewer, SLOT(clear())); connect(model, SIGNAL(numberPopulated(int)), this, SLOT(updateLog(int))); diff --git a/examples/itemviews/frozencolumn/freezetablewidget.cpp b/examples/itemviews/frozencolumn/freezetablewidget.cpp index 1031527..ee50ae1 100644 --- a/examples/itemviews/frozencolumn/freezetablewidget.cpp +++ b/examples/itemviews/frozencolumn/freezetablewidget.cpp @@ -52,10 +52,10 @@ FreezeTableWidget::FreezeTableWidget(QAbstractItemModel * model) init(); //connect the headers and scrollbars of both tableviews together - connect(horizontalHeader(),SIGNAL(sectionResized ( int ,int,int )), this, - SLOT(updateSectionWidth(int, int, int))); - connect(verticalHeader(),SIGNAL(sectionResized ( int ,int,int )), this, - SLOT(updateSectionHeight(int, int, int))); + connect(horizontalHeader(),SIGNAL(sectionResized(int,int,int)), this, + SLOT(updateSectionWidth(int,int,int))); + connect(verticalHeader(),SIGNAL(sectionResized(int,int,int)), this, + SLOT(updateSectionHeight(int,int,int))); connect(frozenTableView->verticalScrollBar(), SIGNAL(valueChanged(int)), verticalScrollBar(), SLOT(setValue(int))); diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp index 01b8026..a50ff68 100644 --- a/examples/mainwindows/dockwidgets/mainwindow.cpp +++ b/examples/mainwindows/dockwidgets/mainwindow.cpp @@ -335,9 +335,9 @@ void MainWindow::createDockWindows() addDockWidget(Qt::RightDockWidgetArea, dock); viewMenu->addAction(dock->toggleViewAction()); - connect(customerList, SIGNAL(currentTextChanged(const QString &)), - this, SLOT(insertCustomer(const QString &))); - connect(paragraphsList, SIGNAL(currentTextChanged(const QString &)), - this, SLOT(addParagraph(const QString &))); + connect(customerList, SIGNAL(currentTextChanged(QString)), + this, SLOT(insertCustomer(QString))); + connect(paragraphsList, SIGNAL(currentTextChanged(QString)), + this, SLOT(addParagraph(QString))); } //! [9] diff --git a/examples/mainwindows/mdi/mainwindow.cpp b/examples/mainwindows/mdi/mainwindow.cpp index edb33b7..5f0aa06 100644 --- a/examples/mainwindows/mdi/mainwindow.cpp +++ b/examples/mainwindows/mdi/mainwindow.cpp @@ -50,11 +50,11 @@ MainWindow::MainWindow() mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); setCentralWidget(mdiArea); - connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)), + connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(updateMenus())); windowMapper = new QSignalMapper(this); - connect(windowMapper, SIGNAL(mapped(QWidget *)), - this, SLOT(setActiveSubWindow(QWidget *))); + connect(windowMapper, SIGNAL(mapped(QWidget*)), + this, SLOT(setActiveSubWindow(QWidget*))); createActions(); createMenus(); diff --git a/examples/network/blockingfortuneclient/blockingclient.cpp b/examples/network/blockingfortuneclient/blockingclient.cpp index a3d7c23..441b6f7 100644 --- a/examples/network/blockingfortuneclient/blockingclient.cpp +++ b/examples/network/blockingfortuneclient/blockingclient.cpp @@ -85,19 +85,19 @@ BlockingClient::BlockingClient(QWidget *parent) buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole); buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole); - connect(hostLineEdit, SIGNAL(textChanged(const QString &)), + connect(hostLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); - connect(portLineEdit, SIGNAL(textChanged(const QString &)), + connect(portLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune())); connect(quitButton, SIGNAL(clicked()), this, SLOT(close())); //! [0] - connect(&thread, SIGNAL(newFortune(const QString &)), - this, SLOT(showFortune(const QString &))); + connect(&thread, SIGNAL(newFortune(QString)), + this, SLOT(showFortune(QString))); //! [0] //! [1] - connect(&thread, SIGNAL(error(int, const QString &)), - this, SLOT(displayError(int, const QString &))); + connect(&thread, SIGNAL(error(int,QString)), + this, SLOT(displayError(int,QString))); //! [1] QGridLayout *mainLayout = new QGridLayout; diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp index e043f78..f870c0e 100644 --- a/examples/network/fortuneclient/client.cpp +++ b/examples/network/fortuneclient/client.cpp @@ -95,9 +95,9 @@ Client::Client(QWidget *parent) tcpSocket = new QTcpSocket(this); //! [1] - connect(hostLineEdit, SIGNAL(textChanged(const QString &)), + connect(hostLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); - connect(portLineEdit, SIGNAL(textChanged(const QString &)), + connect(portLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableGetFortuneButton())); connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune())); diff --git a/examples/network/googlesuggest/googlesuggest.cpp b/examples/network/googlesuggest/googlesuggest.cpp index a1075ec..e9746b5 100644 --- a/examples/network/googlesuggest/googlesuggest.cpp +++ b/examples/network/googlesuggest/googlesuggest.cpp @@ -66,7 +66,7 @@ GSuggestCompletion::GSuggestCompletion(QLineEdit *parent): QObject(parent), edit popup->installEventFilter(this); - connect(popup, SIGNAL(itemClicked(QTreeWidgetItem*, int)), + connect(popup, SIGNAL(itemClicked(QTreeWidgetItem*,int)), SLOT(doneCompletion())); timer = new QTimer(this); diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp index d7b4b8c..b0139ef 100644 --- a/examples/network/http/httpwindow.cpp +++ b/examples/network/http/httpwindow.cpp @@ -72,19 +72,19 @@ HttpWindow::HttpWindow(QWidget *parent) http = new QHttp(this); - connect(urlLineEdit, SIGNAL(textChanged(const QString &)), + connect(urlLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableDownloadButton())); - connect(http, SIGNAL(requestFinished(int, bool)), - this, SLOT(httpRequestFinished(int, bool))); - connect(http, SIGNAL(dataReadProgress(int, int)), - this, SLOT(updateDataReadProgress(int, int))); - connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), - this, SLOT(readResponseHeader(const QHttpResponseHeader &))); - connect(http, SIGNAL(authenticationRequired(const QString &, quint16, QAuthenticator *)), - this, SLOT(slotAuthenticationRequired(const QString &, quint16, QAuthenticator *))); + connect(http, SIGNAL(requestFinished(int,bool)), + this, SLOT(httpRequestFinished(int,bool))); + connect(http, SIGNAL(dataReadProgress(int,int)), + this, SLOT(updateDataReadProgress(int,int))); + connect(http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), + this, SLOT(readResponseHeader(QHttpResponseHeader))); + connect(http, SIGNAL(authenticationRequired(QString,quint16,QAuthenticator*)), + this, SLOT(slotAuthenticationRequired(QString,quint16,QAuthenticator*))); #ifndef QT_NO_OPENSSL - connect(http, SIGNAL(sslErrors(const QList<QSslError> &)), - this, SLOT(sslErrors(const QList<QSslError> &))); + connect(http, SIGNAL(sslErrors(QList<QSslError>)), + this, SLOT(sslErrors(QList<QSslError>))); #endif connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload())); connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile())); diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp index 4406844..2dbfd0e 100644 --- a/examples/network/network-chat/chatdialog.cpp +++ b/examples/network/network-chat/chatdialog.cpp @@ -58,12 +58,12 @@ ChatDialog::ChatDialog(QWidget *parent) connect(sendButton, SIGNAL(clicked()), this, SLOT(returnPressed())); #endif connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed())); - connect(&client, SIGNAL(newMessage(const QString &, const QString &)), - this, SLOT(appendMessage(const QString &, const QString &))); - connect(&client, SIGNAL(newParticipant(const QString &)), - this, SLOT(newParticipant(const QString &))); - connect(&client, SIGNAL(participantLeft(const QString &)), - this, SLOT(participantLeft(const QString &))); + connect(&client, SIGNAL(newMessage(QString,QString)), + this, SLOT(appendMessage(QString,QString))); + connect(&client, SIGNAL(newParticipant(QString)), + this, SLOT(newParticipant(QString))); + connect(&client, SIGNAL(participantLeft(QString)), + this, SLOT(participantLeft(QString))); myNickName = client.nickName(); newParticipant(myNickName); diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp index f1d4ced..58d74fb 100644 --- a/examples/network/network-chat/client.cpp +++ b/examples/network/network-chat/client.cpp @@ -51,10 +51,10 @@ Client::Client() peerManager->setServerPort(server.serverPort()); peerManager->startBroadcasting(); - QObject::connect(peerManager, SIGNAL(newConnection(Connection *)), - this, SLOT(newConnection(Connection *))); - QObject::connect(&server, SIGNAL(newConnection(Connection *)), - this, SLOT(newConnection(Connection *))); + QObject::connect(peerManager, SIGNAL(newConnection(Connection*)), + this, SLOT(newConnection(Connection*))); + QObject::connect(&server, SIGNAL(newConnection(Connection*)), + this, SLOT(newConnection(Connection*))); } void Client::sendMessage(const QString &message) @@ -107,8 +107,8 @@ void Client::readyForUse() connection->peerPort())) return; - connect(connection, SIGNAL(newMessage(const QString &, const QString &)), - this, SIGNAL(newMessage(const QString &, const QString &))); + connect(connection, SIGNAL(newMessage(QString,QString)), + this, SIGNAL(newMessage(QString,QString))); peers.insert(connection->peerAddress(), connection); QString nick = connection->name(); diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp index f3fc52b..493b440 100644 --- a/examples/network/qftp/ftpwindow.cpp +++ b/examples/network/qftp/ftpwindow.cpp @@ -85,9 +85,9 @@ FtpWindow::FtpWindow(QWidget *parent) progressDialog = new QProgressDialog(this); - connect(fileList, SIGNAL(itemActivated(QTreeWidgetItem *, int)), - this, SLOT(processItem(QTreeWidgetItem *, int))); - connect(fileList, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), + connect(fileList, SIGNAL(itemActivated(QTreeWidgetItem*,int)), + this, SLOT(processItem(QTreeWidgetItem*,int))); + connect(fileList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(enableDownloadButton())); connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload())); connect(connectButton, SIGNAL(clicked()), this, SLOT(connectOrDisconnect())); @@ -163,12 +163,12 @@ void FtpWindow::connectOrDisconnect() //![1] ftp = new QFtp(this); - connect(ftp, SIGNAL(commandFinished(int, bool)), - this, SLOT(ftpCommandFinished(int, bool))); - connect(ftp, SIGNAL(listInfo(const QUrlInfo &)), - this, SLOT(addToList(const QUrlInfo &))); - connect(ftp, SIGNAL(dataTransferProgress(qint64, qint64)), - this, SLOT(updateDataTransferProgress(qint64, qint64))); + connect(ftp, SIGNAL(commandFinished(int,bool)), + this, SLOT(ftpCommandFinished(int,bool))); + connect(ftp, SIGNAL(listInfo(QUrlInfo)), + this, SLOT(addToList(QUrlInfo))); + connect(ftp, SIGNAL(dataTransferProgress(qint64,qint64)), + this, SLOT(updateDataTransferProgress(qint64,qint64))); fileList->clear(); currentPath.clear(); diff --git a/examples/network/torrent/addtorrentdialog.cpp b/examples/network/torrent/addtorrentdialog.cpp index ce7c402..da9f24c 100644 --- a/examples/network/torrent/addtorrentdialog.cpp +++ b/examples/network/torrent/addtorrentdialog.cpp @@ -70,8 +70,8 @@ AddTorrentDialog::AddTorrentDialog(QWidget *parent) this, SLOT(selectTorrent())); connect(ui.browseDestination, SIGNAL(clicked()), this, SLOT(selectDestination())); - connect(ui.torrentFile, SIGNAL(textChanged(const QString &)), - this, SLOT(setTorrent(const QString &))); + connect(ui.torrentFile, SIGNAL(textChanged(QString)), + this, SLOT(setTorrent(QString))); ui.destinationFolder->setText(destinationDirectory = QDir::current().path()); ui.torrentFile->setFocus(); diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index f38682e..4c35d93 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -175,8 +175,8 @@ MainWindow::MainWindow(QWidget *parent) // Set up connections connect(torrentView, SIGNAL(itemSelectionChanged()), this, SLOT(setActionsEnabled())); - connect(torrentView, SIGNAL(fileDropped(const QString &)), - this, SLOT(acceptFileDrop(const QString &))); + connect(torrentView, SIGNAL(fileDropped(QString)), + this, SLOT(acceptFileDrop(QString))); connect(uploadLimitSlider, SIGNAL(valueChanged(int)), this, SLOT(setUploadLimit(int))); connect(downloadLimitSlider, SIGNAL(valueChanged(int)), diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 5eaab10..62c1a13 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -225,20 +225,20 @@ TorrentClient::TorrentClient(QObject *parent) : QObject(parent), d(new TorrentClientPrivate(this)) { // Connect the file manager - connect(&d->fileManager, SIGNAL(dataRead(int, int, int, const QByteArray &)), - this, SLOT(sendToPeer(int, int, int, const QByteArray &))); + connect(&d->fileManager, SIGNAL(dataRead(int,int,int,QByteArray)), + this, SLOT(sendToPeer(int,int,int,QByteArray))); connect(&d->fileManager, SIGNAL(verificationProgress(int)), this, SLOT(updateProgress(int))); connect(&d->fileManager, SIGNAL(verificationDone()), this, SLOT(fullVerificationDone())); - connect(&d->fileManager, SIGNAL(pieceVerified(int, bool)), - this, SLOT(pieceVerified(int, bool))); + connect(&d->fileManager, SIGNAL(pieceVerified(int,bool)), + this, SLOT(pieceVerified(int,bool))); connect(&d->fileManager, SIGNAL(error()), this, SLOT(handleFileError())); // Connect the tracker client - connect(&d->trackerClient, SIGNAL(peerListUpdated(const QList<TorrentPeer> &)), - this, SLOT(addToPeerList(const QList<TorrentPeer> &))); + connect(&d->trackerClient, SIGNAL(peerListUpdated(QList<TorrentPeer>)), + this, SLOT(addToPeerList(QList<TorrentPeer>))); connect(&d->trackerClient, SIGNAL(stopped()), this, SIGNAL(stopped())); } @@ -836,12 +836,12 @@ void TorrentClient::initializeConnection(PeerWireClient *client) this, SLOT(removeClient())); connect(client, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(removeClient())); - connect(client, SIGNAL(piecesAvailable(const QBitArray &)), - this, SLOT(peerPiecesAvailable(const QBitArray &))); - connect(client, SIGNAL(blockRequested(int, int, int)), - this, SLOT(peerRequestsBlock(int, int, int))); - connect(client, SIGNAL(blockReceived(int, int, const QByteArray &)), - this, SLOT(blockReceived(int, int, const QByteArray &))); + connect(client, SIGNAL(piecesAvailable(QBitArray)), + this, SLOT(peerPiecesAvailable(QBitArray))); + connect(client, SIGNAL(blockRequested(int,int,int)), + this, SLOT(peerRequestsBlock(int,int,int))); + connect(client, SIGNAL(blockReceived(int,int,QByteArray)), + this, SLOT(blockReceived(int,int,QByteArray))); connect(client, SIGNAL(choked()), this, SLOT(peerChoked())); connect(client, SIGNAL(unchoked()), diff --git a/examples/network/torrent/torrentserver.cpp b/examples/network/torrent/torrentserver.cpp index a7955c8..e9ae234 100644 --- a/examples/network/torrent/torrentserver.cpp +++ b/examples/network/torrent/torrentserver.cpp @@ -69,8 +69,8 @@ void TorrentServer::incomingConnection(int socketDescriptor) if (client->setSocketDescriptor(socketDescriptor)) { if (ConnectionManager::instance()->canAddConnection() && !clients.isEmpty()) { - connect(client, SIGNAL(infoHashReceived(const QByteArray &)), - this, SLOT(processInfoHash(const QByteArray &))); + connect(client, SIGNAL(infoHashReceived(QByteArray)), + this, SLOT(processInfoHash(QByteArray))); connect(client, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(removeClient())); RateController::instance()->addSocket(client); diff --git a/examples/painting/fontsampler/mainwindow.cpp b/examples/painting/fontsampler/mainwindow.cpp index 9ef4ad3..4f83ba9 100644 --- a/examples/painting/fontsampler/mainwindow.cpp +++ b/examples/painting/fontsampler/mainwindow.cpp @@ -53,10 +53,10 @@ MainWindow::MainWindow(QWidget *parent) setupFontTree(); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); - connect(fontTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), - this, SLOT(showFont(QTreeWidgetItem *))); - connect(fontTree, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateStyles(QTreeWidgetItem *, int))); + connect(fontTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), + this, SLOT(showFont(QTreeWidgetItem*))); + connect(fontTree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateStyles(QTreeWidgetItem*,int))); fontTree->setItemSelected(fontTree->topLevelItem(0), true); showFont(fontTree->topLevelItem(0)); @@ -279,8 +279,8 @@ void MainWindow::on_printPreviewAction_triggered() QPrinter printer(QPrinter::HighResolution); QPrintPreviewDialog preview(&printer, this); - connect(&preview, SIGNAL(paintRequested(QPrinter *)), - this, SLOT(printDocument(QPrinter *))); + connect(&preview, SIGNAL(paintRequested(QPrinter*)), + this, SLOT(printDocument(QPrinter*))); preview.exec(); } diff --git a/examples/painting/svgviewer/mainwindow.cpp b/examples/painting/svgviewer/mainwindow.cpp index c204de3..6bef5ce 100644 --- a/examples/painting/svgviewer/mainwindow.cpp +++ b/examples/painting/svgviewer/mainwindow.cpp @@ -103,8 +103,8 @@ MainWindow::MainWindow() connect(openAction, SIGNAL(triggered()), this, SLOT(openFile())); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); - connect(rendererGroup, SIGNAL(triggered(QAction *)), - this, SLOT(setRenderer(QAction *))); + connect(rendererGroup, SIGNAL(triggered(QAction*)), + this, SLOT(setRenderer(QAction*))); setCentralWidget(m_view); setWindowTitle(tr("SVG Viewer")); diff --git a/examples/phonon/qmusicplayer/mainwindow.cpp b/examples/phonon/qmusicplayer/mainwindow.cpp index 787ae53..bc1fa1b 100644 --- a/examples/phonon/qmusicplayer/mainwindow.cpp +++ b/examples/phonon/qmusicplayer/mainwindow.cpp @@ -54,12 +54,12 @@ MainWindow::MainWindow() //![0] //![2] connect(mediaObject, SIGNAL(tick(qint64)), this, SLOT(tick(qint64))); - connect(mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), - this, SLOT(stateChanged(Phonon::State, Phonon::State))); + connect(mediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), + this, SLOT(stateChanged(Phonon::State,Phonon::State))); connect(metaInformationResolver, SIGNAL(stateChanged(Phonon::State,Phonon::State)), - this, SLOT(metaStateChanged(Phonon::State, Phonon::State))); - connect(mediaObject, SIGNAL(currentSourceChanged(const Phonon::MediaSource &)), - this, SLOT(sourceChanged(const Phonon::MediaSource &))); + this, SLOT(metaStateChanged(Phonon::State,Phonon::State))); + connect(mediaObject, SIGNAL(currentSourceChanged(Phonon::MediaSource)), + this, SLOT(sourceChanged(Phonon::MediaSource))); connect(mediaObject, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish())); //![2] @@ -328,8 +328,8 @@ void MainWindow::setupUi() musicTable->setHorizontalHeaderLabels(headers); musicTable->setSelectionMode(QAbstractItemView::SingleSelection); musicTable->setSelectionBehavior(QAbstractItemView::SelectRows); - connect(musicTable, SIGNAL(cellPressed(int, int)), - this, SLOT(tableClicked(int, int))); + connect(musicTable, SIGNAL(cellPressed(int,int)), + this, SLOT(tableClicked(int,int))); QHBoxLayout *seekerLayout = new QHBoxLayout; seekerLayout->addWidget(seekSlider); diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp index 8228549..1c561c8 100644 --- a/examples/qtconcurrent/progressdialog/main.cpp +++ b/examples/qtconcurrent/progressdialog/main.cpp @@ -74,7 +74,7 @@ int main(int argc, char **argv) QFutureWatcher<void> futureWatcher; QObject::connect(&futureWatcher, SIGNAL(finished()), &dialog, SLOT(reset())); QObject::connect(&dialog, SIGNAL(canceled()), &futureWatcher, SLOT(cancel())); - QObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int, int)), &dialog, SLOT(setRange(int, int))); + QObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int,int)), &dialog, SLOT(setRange(int,int))); QObject::connect(&futureWatcher, SIGNAL(progressValueChanged(int)), &dialog, SLOT(setValue(int))); // Start the computation. diff --git a/examples/script/context2d/window.cpp b/examples/script/context2d/window.cpp index a260347..b0fe231 100644 --- a/examples/script/context2d/window.cpp +++ b/examples/script/context2d/window.cpp @@ -106,7 +106,7 @@ Window::Window(QWidget *parent) QFileInfoList entries = dir.entryInfoList(QStringList() << "*.js"); for (int i = 0; i < entries.size(); ++i) m_view->addItem(entries.at(i).fileName()); - connect(m_view, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), + connect(m_view, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(selectScript(QListWidgetItem*))); //! [1] diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp index 08fe2ac..a440aad 100644 --- a/examples/sql/drilldown/informationwindow.cpp +++ b/examples/sql/drilldown/informationwindow.cpp @@ -83,16 +83,15 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices, connect(imageFileEditor, SIGNAL(currentIndexChanged(int)), this, SLOT(enableButtons())); - QGridLayout *layout = new QGridLayout; - layout->addWidget(locationLabel, 0, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(countryLabel, 1, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(imageFileLabel, 2, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(descriptionLabel, 3, 0, Qt::AlignLeft | Qt::AlignTop); - layout->addWidget(locationText, 0, 1); - layout->addWidget(countryText, 1, 1); - layout->addWidget(imageFileEditor, 2, 1); - layout->addWidget(descriptionEditor, 3, 1); - layout->addWidget(buttonBox, 4, 0, 1, 2); + QFormLayout *formLayout = new QFormLayout; + formLayout->addRow(locationLabel, locationText); + formLayout->addRow(countryLabel, countryText); + formLayout->addRow(imageFileLabel, imageFileEditor); + formLayout->addRow(descriptionLabel, descriptionEditor); + + QVBoxLayout *layout = new QVBoxLayout; + layout->addLayout(formLayout); + layout->addWidget(buttonBox); setLayout(layout); locationId = id; @@ -101,9 +100,6 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices, setWindowFlags(Qt::Window); enableButtons(false); setWindowTitle(tr("Office: %1").arg(locationText->text())); -#ifndef Q_OS_SYMBIAN - resize(320, sizeHint().height()); -#endif } //! [4] @@ -154,8 +150,8 @@ void InformationWindow::createButtons() //! [8] //! [9] - buttonBox = new QDialogButtonBox; - buttonBox->addButton(submitButton, QDialogButtonBox::ResetRole); + buttonBox = new QDialogButtonBox(this); + buttonBox->addButton(submitButton, QDialogButtonBox::AcceptRole); buttonBox->addButton(revertButton, QDialogButtonBox::ResetRole); buttonBox->addButton(closeButton, QDialogButtonBox::RejectRole); } diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp index ff4c511..da29198 100644 --- a/examples/sql/drilldown/view.cpp +++ b/examples/sql/drilldown/view.cpp @@ -134,20 +134,20 @@ void View::showInformation(ImageItem *image) #ifndef Q_OS_SYMBIAN window->show(); #else - window->showFullScreen(); + window->showMaximized(); #endif } else { InformationWindow *window; window = new InformationWindow(id, officeTable, this); - connect(window, SIGNAL(imageChanged(int, QString)), - this, SLOT(updateImage(int, QString))); + connect(window, SIGNAL(imageChanged(int,QString)), + this, SLOT(updateImage(int,QString))); #ifndef Q_OS_SYMBIAN window->move(pos() + QPoint(20, 40)); window->show(); #else - window->showFullScreen(); + window->showMaximized(); #endif informationWindows.append(window); } diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp index 24bcda8..d2b4d45 100644 --- a/examples/sql/masterdetail/mainwindow.cpp +++ b/examples/sql/masterdetail/mainwindow.cpp @@ -69,10 +69,10 @@ MainWindow::MainWindow(const QString &artistTable, const QString &albumTable, uniqueAlbumId = model->rowCount(); uniqueArtistId = artistView->count(); - connect(model, SIGNAL(rowsInserted(QModelIndex, int, int)), - this, SLOT(updateHeader(QModelIndex, int, int))); - connect(model, SIGNAL(rowsRemoved(QModelIndex, int, int)), - this, SLOT(updateHeader(QModelIndex, int, int))); + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(updateHeader(QModelIndex,int,int))); + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(updateHeader(QModelIndex,int,int))); QGridLayout *layout = new QGridLayout; layout->addWidget(artists, 0, 0); diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp index 6db781f..3835cc8 100644 --- a/examples/threads/mandelbrot/mandelbrotwidget.cpp +++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp @@ -65,8 +65,8 @@ MandelbrotWidget::MandelbrotWidget(QWidget *parent) curScale = DefaultScale; qRegisterMetaType<QImage>("QImage"); - connect(&thread, SIGNAL(renderedImage(const QImage &, double)), - this, SLOT(updatePixmap(const QImage &, double))); + connect(&thread, SIGNAL(renderedImage(QImage,double)), + this, SLOT(updatePixmap(QImage,double))); setWindowTitle(tr("Mandelbrot")); #ifndef QT_NO_CURSOR diff --git a/examples/tools/customcompleter/textedit.cpp b/examples/tools/customcompleter/textedit.cpp index 83ab070..5965368 100644 --- a/examples/tools/customcompleter/textedit.cpp +++ b/examples/tools/customcompleter/textedit.cpp @@ -79,8 +79,8 @@ void TextEdit::setCompleter(QCompleter *completer) c->setWidget(this); c->setCompletionMode(QCompleter::PopupCompletion); c->setCaseSensitivity(Qt::CaseInsensitive); - QObject::connect(c, SIGNAL(activated(const QString&)), - this, SLOT(insertCompletion(const QString&))); + QObject::connect(c, SIGNAL(activated(QString)), + this, SLOT(insertCompletion(QString))); } //! [2] diff --git a/examples/tools/inputpanel/myinputpanel.cpp b/examples/tools/inputpanel/myinputpanel.cpp index 2d897cb..8b9c96a 100644 --- a/examples/tools/inputpanel/myinputpanel.cpp +++ b/examples/tools/inputpanel/myinputpanel.cpp @@ -49,8 +49,8 @@ MyInputPanel::MyInputPanel() { form.setupUi(this); - connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), - this, SLOT(saveFocusWidget(QWidget *, QWidget *))); + connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), + this, SLOT(saveFocusWidget(QWidget*,QWidget*))); signalMapper.setMapping(form.panelButton_1, form.panelButton_1); signalMapper.setMapping(form.panelButton_2, form.panelButton_2); @@ -90,8 +90,8 @@ MyInputPanel::MyInputPanel() connect(form.panelButton_hash, SIGNAL(clicked()), &signalMapper, SLOT(map())); - connect(&signalMapper, SIGNAL(mapped(QWidget *)), - this, SLOT(buttonClicked(QWidget *))); + connect(&signalMapper, SIGNAL(mapped(QWidget*)), + this, SLOT(buttonClicked(QWidget*))); } //! [0] diff --git a/examples/tools/regexp/regexpdialog.cpp b/examples/tools/regexp/regexpdialog.cpp index 3becc2b..254456e 100644 --- a/examples/tools/regexp/regexpdialog.cpp +++ b/examples/tools/regexp/regexpdialog.cpp @@ -126,9 +126,9 @@ RegExpDialog::RegExpDialog(QWidget *parent) } setLayout(mainLayout); - connect(patternComboBox, SIGNAL(editTextChanged(const QString &)), + connect(patternComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(refresh())); - connect(textComboBox, SIGNAL(editTextChanged(const QString &)), + connect(textComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(refresh())); connect(caseSensitiveCheckBox, SIGNAL(toggled(bool)), this, SLOT(refresh())); diff --git a/examples/tools/settingseditor/settingstree.cpp b/examples/tools/settingseditor/settingstree.cpp index e7e8ba8..bf4db3d 100644 --- a/examples/tools/settingseditor/settingstree.cpp +++ b/examples/tools/settingseditor/settingstree.cpp @@ -121,14 +121,14 @@ void SettingsTree::refresh() if (!settings) return; - disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateSetting(QTreeWidgetItem *))); + disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateSetting(QTreeWidgetItem*))); settings->sync(); updateChildItems(0); - connect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateSetting(QTreeWidgetItem *))); + connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateSetting(QTreeWidgetItem*))); } bool SettingsTree::event(QEvent *event) diff --git a/examples/tools/treemodelcompleter/mainwindow.cpp b/examples/tools/treemodelcompleter/mainwindow.cpp index e6f6c42..0fe9de0 100644 --- a/examples/tools/treemodelcompleter/mainwindow.cpp +++ b/examples/tools/treemodelcompleter/mainwindow.cpp @@ -52,8 +52,8 @@ MainWindow::MainWindow(QWidget *parent) completer = new TreeModelCompleter(this); completer->setModel(modelFromFile(":/resources/treemodel.txt")); completer->setSeparator(QLatin1String(".")); - QObject::connect(completer, SIGNAL(highlighted(const QModelIndex&)), - this, SLOT(highlight(const QModelIndex&))); + QObject::connect(completer, SIGNAL(highlighted(QModelIndex)), + this, SLOT(highlight(QModelIndex))); QWidget *centralWidget = new QWidget; @@ -82,8 +82,8 @@ MainWindow::MainWindow(QWidget *parent) QLineEdit *separatorLineEdit = new QLineEdit; separatorLineEdit->setText(completer->separator()); - connect(separatorLineEdit, SIGNAL(textChanged(const QString&)), - completer, SLOT(setSeparator(const QString&))); + connect(separatorLineEdit, SIGNAL(textChanged(QString)), + completer, SLOT(setSeparator(QString))); QCheckBox *wrapCheckBox = new QCheckBox; wrapCheckBox->setText(tr("Wrap around completions")); @@ -92,8 +92,8 @@ MainWindow::MainWindow(QWidget *parent) contentsLabel = new QLabel; contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(separatorLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(updateContentsLabel(const QString&))); + connect(separatorLineEdit, SIGNAL(textChanged(QString)), + this, SLOT(updateContentsLabel(QString))); treeView = new QTreeView; treeView->setModel(completer->model()); diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp index 9de953b..2a0f037 100644 --- a/examples/tools/undoframework/mainwindow.cpp +++ b/examples/tools/undoframework/mainwindow.cpp @@ -61,8 +61,8 @@ MainWindow::MainWindow() diagramScene->setBackgroundBrush(pixmapBrush); diagramScene->setSceneRect(QRect(0, 0, 500, 500)); - connect(diagramScene, SIGNAL(itemMoved(DiagramItem *, const QPointF &)), - this, SLOT(itemMoved(DiagramItem *, const QPointF &))); + connect(diagramScene, SIGNAL(itemMoved(DiagramItem*,QPointF)), + this, SLOT(itemMoved(DiagramItem*,QPointF))); setWindowTitle("Undo Framework"); QGraphicsView *view = new QGraphicsView(diagramScene); diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp index 3f20bbc..844106f 100644 --- a/examples/webkit/fancybrowser/mainwindow.cpp +++ b/examples/webkit/fancybrowser/mainwindow.cpp @@ -62,7 +62,7 @@ MainWindow::MainWindow() view = new QWebView(this); view->load(QUrl("http://www.google.com/ncr")); connect(view, SIGNAL(loadFinished(bool)), SLOT(adjustLocation())); - connect(view, SIGNAL(titleChanged(const QString&)), SLOT(adjustTitle())); + connect(view, SIGNAL(titleChanged(QString)), SLOT(adjustTitle())); connect(view, SIGNAL(loadProgress(int)), SLOT(setProgress(int))); connect(view, SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool))); diff --git a/examples/widgets/calendarwidget/window.cpp b/examples/widgets/calendarwidget/window.cpp index b8cb39c..f0bcc6c 100644 --- a/examples/widgets/calendarwidget/window.cpp +++ b/examples/widgets/calendarwidget/window.cpp @@ -196,7 +196,7 @@ void Window::createPreviewGroupBox() calendar->setMaximumDate(QDate(3000, 1, 1)); calendar->setGridVisible(true); - connect(calendar, SIGNAL(currentPageChanged(int, int)), + connect(calendar, SIGNAL(currentPageChanged(int,int)), this, SLOT(reformatCalendarPage())); previewLayout = new QGridLayout; @@ -357,14 +357,14 @@ void Window::createDatesGroupBox() maximumDateLabel->setBuddy(maximumDateEdit); //! [13] //! [14] - connect(currentDateEdit, SIGNAL(dateChanged(const QDate &)), - calendar, SLOT(setSelectedDate(const QDate &))); + connect(currentDateEdit, SIGNAL(dateChanged(QDate)), + calendar, SLOT(setSelectedDate(QDate))); connect(calendar, SIGNAL(selectionChanged()), this, SLOT(selectedDateChanged())); - connect(minimumDateEdit, SIGNAL(dateChanged(const QDate &)), - this, SLOT(minimumDateChanged(const QDate &))); - connect(maximumDateEdit, SIGNAL(dateChanged(const QDate &)), - this, SLOT(maximumDateChanged(const QDate &))); + connect(minimumDateEdit, SIGNAL(dateChanged(QDate)), + this, SLOT(minimumDateChanged(QDate))); + connect(maximumDateEdit, SIGNAL(dateChanged(QDate)), + this, SLOT(maximumDateChanged(QDate))); //! [14] QGridLayout *dateBoxLayout = new QGridLayout; @@ -418,7 +418,7 @@ void Window::createTextFormatsGroupBox() this, SLOT(weekdayFormatChanged())); connect(weekendColorCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(weekendFormatChanged())); - connect(headerTextFormatCombo, SIGNAL(currentIndexChanged(const QString &)), + connect(headerTextFormatCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(reformatHeaders())); connect(firstFridayCheckBox, SIGNAL(toggled(bool)), this, SLOT(reformatCalendarPage())); diff --git a/examples/widgets/charactermap/mainwindow.cpp b/examples/widgets/charactermap/mainwindow.cpp index 199d471..8850e0d 100644 --- a/examples/widgets/charactermap/mainwindow.cpp +++ b/examples/widgets/charactermap/mainwindow.cpp @@ -79,19 +79,19 @@ MainWindow::MainWindow() //! [3] //! [4] - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - this, SLOT(findStyles(const QFont &))); - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - this, SLOT(findSizes(const QFont &))); - connect(fontCombo, SIGNAL(currentFontChanged(const QFont &)), - characterWidget, SLOT(updateFont(const QFont &))); - connect(sizeCombo, SIGNAL(currentIndexChanged(const QString &)), - characterWidget, SLOT(updateSize(const QString &))); - connect(styleCombo, SIGNAL(currentIndexChanged(const QString &)), - characterWidget, SLOT(updateStyle(const QString &))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + this, SLOT(findStyles(QFont))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + this, SLOT(findSizes(QFont))); + connect(fontCombo, SIGNAL(currentFontChanged(QFont)), + characterWidget, SLOT(updateFont(QFont))); + connect(sizeCombo, SIGNAL(currentIndexChanged(QString)), + characterWidget, SLOT(updateSize(QString))); + connect(styleCombo, SIGNAL(currentIndexChanged(QString)), + characterWidget, SLOT(updateStyle(QString))); //! [4] //! [5] - connect(characterWidget, SIGNAL(characterSelected(const QString &)), - this, SLOT(insertCharacter(const QString &))); + connect(characterWidget, SIGNAL(characterSelected(QString)), + this, SLOT(insertCharacter(QString))); connect(clipboardButton, SIGNAL(clicked()), this, SLOT(updateClipboard())); //! [5] connect(fontMerging, SIGNAL(toggled(bool)), characterWidget, SLOT(updateFontMerging(bool))); diff --git a/examples/widgets/codeeditor/codeeditor.cpp b/examples/widgets/codeeditor/codeeditor.cpp index 4632466..e8eb8cf 100644 --- a/examples/widgets/codeeditor/codeeditor.cpp +++ b/examples/widgets/codeeditor/codeeditor.cpp @@ -50,7 +50,7 @@ CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent) lineNumberArea = new LineNumberArea(this); connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int))); - connect(this, SIGNAL(updateRequest(const QRect &, int)), this, SLOT(updateLineNumberArea(const QRect &, int))); + connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int))); connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine())); updateLineNumberAreaWidth(0); diff --git a/examples/widgets/icons/mainwindow.cpp b/examples/widgets/icons/mainwindow.cpp index 51e4619..2fb7267 100644 --- a/examples/widgets/icons/mainwindow.cpp +++ b/examples/widgets/icons/mainwindow.cpp @@ -293,7 +293,7 @@ void MainWindow::createImagesGroupBox() //! [23] //! [24] - connect(imagesTable, SIGNAL(itemChanged(QTableWidgetItem *)), + connect(imagesTable, SIGNAL(itemChanged(QTableWidgetItem*)), //! [24] //! [25] this, SLOT(changeIcon())); diff --git a/examples/widgets/spinboxes/window.cpp b/examples/widgets/spinboxes/window.cpp index 19f6d26..3a75fd3 100644 --- a/examples/widgets/spinboxes/window.cpp +++ b/examples/widgets/spinboxes/window.cpp @@ -144,8 +144,8 @@ void Window::createDateTimeEdits() formatComboBox->addItem("hh:mm ap"); //! [9] //! [10] - connect(formatComboBox, SIGNAL(activated(const QString &)), - this, SLOT(setFormatString(const QString &))); + connect(formatComboBox, SIGNAL(activated(QString)), + this, SLOT(setFormatString(QString))); //! [10] setFormatString(formatComboBox->currentText()); diff --git a/examples/widgets/styles/widgetgallery.cpp b/examples/widgets/styles/widgetgallery.cpp index 9526761..5cef57c 100644 --- a/examples/widgets/styles/widgetgallery.cpp +++ b/examples/widgets/styles/widgetgallery.cpp @@ -70,9 +70,9 @@ WidgetGallery::WidgetGallery(QWidget *parent) //! [0] //! [1] - connect(styleComboBox, SIGNAL(activated(const QString &)), + connect(styleComboBox, SIGNAL(activated(QString)), //! [1] //! [2] - this, SLOT(changeStyle(const QString &))); + this, SLOT(changeStyle(QString))); connect(useStylePaletteCheckBox, SIGNAL(toggled(bool)), this, SLOT(changePalette())); connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)), diff --git a/examples/widgets/tablet/mainwindow.cpp b/examples/widgets/tablet/mainwindow.cpp index 2a94259..9fa8c24 100644 --- a/examples/widgets/tablet/mainwindow.cpp +++ b/examples/widgets/tablet/mainwindow.cpp @@ -169,8 +169,8 @@ void MainWindow::createActions() alphaChannelGroup->addAction(alphaChannelPressureAction); alphaChannelGroup->addAction(alphaChannelTiltAction); alphaChannelGroup->addAction(noAlphaChannelAction); - connect(alphaChannelGroup, SIGNAL(triggered(QAction *)), - this, SLOT(alphaActionTriggered(QAction *))); + connect(alphaChannelGroup, SIGNAL(triggered(QAction*)), + this, SLOT(alphaActionTriggered(QAction*))); //! [9] colorSaturationVTiltAction = new QAction(tr("&Vertical Tilt"), this); @@ -191,8 +191,8 @@ void MainWindow::createActions() colorSaturationGroup->addAction(colorSaturationHTiltAction); colorSaturationGroup->addAction(colorSaturationPressureAction); colorSaturationGroup->addAction(noColorSaturationAction); - connect(colorSaturationGroup, SIGNAL(triggered(QAction *)), - this, SLOT(saturationActionTriggered(QAction *))); + connect(colorSaturationGroup, SIGNAL(triggered(QAction*)), + this, SLOT(saturationActionTriggered(QAction*))); lineWidthPressureAction = new QAction(tr("&Pressure"), this); lineWidthPressureAction->setCheckable(true); @@ -208,8 +208,8 @@ void MainWindow::createActions() lineWidthGroup->addAction(lineWidthPressureAction); lineWidthGroup->addAction(lineWidthTiltAction); lineWidthGroup->addAction(lineWidthFixedAction); - connect(lineWidthGroup, SIGNAL(triggered(QAction *)), - this, SLOT(lineWidthActionTriggered(QAction *))); + connect(lineWidthGroup, SIGNAL(triggered(QAction*)), + this, SLOT(lineWidthActionTriggered(QAction*))); exitAction = new QAction(tr("E&xit"), this); exitAction->setShortcuts(QKeySequence::Quit); diff --git a/examples/xml/dombookmarks/xbeltree.cpp b/examples/xml/dombookmarks/xbeltree.cpp index 996decc..7e2cc08 100644 --- a/examples/xml/dombookmarks/xbeltree.cpp +++ b/examples/xml/dombookmarks/xbeltree.cpp @@ -90,8 +90,8 @@ bool XbelTree::read(QIODevice *device) clear(); - disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateDomElement(QTreeWidgetItem *, int))); + disconnect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateDomElement(QTreeWidgetItem*,int))); QDomElement child = root.firstChildElement("folder"); while (!child.isNull()) { @@ -99,8 +99,8 @@ bool XbelTree::read(QIODevice *device) child = child.nextSiblingElement("folder"); } - connect(this, SIGNAL(itemChanged(QTreeWidgetItem *, int)), - this, SLOT(updateDomElement(QTreeWidgetItem *, int))); + connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), + this, SLOT(updateDomElement(QTreeWidgetItem*,int))); return true; } diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp index 526f3e0..73797b5 100644 --- a/examples/xml/rsslisting/rsslisting.cpp +++ b/examples/xml/rsslisting/rsslisting.cpp @@ -83,18 +83,18 @@ RSSListing::RSSListing(QWidget *parent) abortButton->setEnabled(false); treeWidget = new QTreeWidget(this); - connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*, int)), + connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(itemActivated(QTreeWidgetItem*))); QStringList headerLabels; headerLabels << tr("Title") << tr("Link"); treeWidget->setHeaderLabels(headerLabels); treeWidget->header()->setResizeMode(QHeaderView::ResizeToContents); - connect(&http, SIGNAL(readyRead(const QHttpResponseHeader &)), - this, SLOT(readData(const QHttpResponseHeader &))); + connect(&http, SIGNAL(readyRead(QHttpResponseHeader)), + this, SLOT(readData(QHttpResponseHeader))); - connect(&http, SIGNAL(requestFinished(int, bool)), - this, SLOT(finished(int, bool))); + connect(&http, SIGNAL(requestFinished(int,bool)), + this, SLOT(finished(int,bool))); connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(fetch())); connect(fetchButton, SIGNAL(clicked()), this, SLOT(fetch())); |