examples: port embedded examples to new connection style

Task-number: QTBUG-106893
Change-Id: I6d00c53b7747b36c5f0094e566713f13fe74f3de
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Samuel Gaist 2022-10-25 22:53:32 +02:00
parent abe3bc1c43
commit c47e2aebb6
3 changed files with 14 additions and 13 deletions

View File

@ -23,7 +23,8 @@ public:
{ {
setAttribute(Qt::WA_OpaquePaintEvent, true); setAttribute(Qt::WA_OpaquePaintEvent, true);
setAttribute(Qt::WA_NoSystemBackground, true); setAttribute(Qt::WA_NoSystemBackground, true);
connect(&m_animator, SIGNAL(frameChanged(int)), SLOT(update())); connect(&m_animator, &QTimeLine::frameChanged,
this, qOverload<>(&Digits::update));
m_animator.setFrameRange(0, 100); m_animator.setFrameRange(0, 100);
m_animator.setDuration(600); m_animator.setDuration(600);
m_animator.setEasingCurve(QEasingCurve::InOutSine); m_animator.setEasingCurve(QEasingCurve::InOutSine);
@ -272,9 +273,9 @@ public:
QAction *slideAction = new QAction("&Slide", this); QAction *slideAction = new QAction("&Slide", this);
QAction *flipAction = new QAction("&Flip", this); QAction *flipAction = new QAction("&Flip", this);
QAction *rotateAction = new QAction("&Rotate", this); QAction *rotateAction = new QAction("&Rotate", this);
connect(slideAction, SIGNAL(triggered()), SLOT(chooseSlide())); connect(slideAction, &QAction::triggered, this, &DigiFlip::chooseSlide);
connect(flipAction, SIGNAL(triggered()), SLOT(chooseFlip())); connect(flipAction, &QAction::triggered, this, &DigiFlip::chooseFlip);
connect(rotateAction, SIGNAL(triggered()), SLOT(chooseRotate())); connect(rotateAction, &QAction::triggered, this, &DigiFlip::chooseRotate);
addAction(slideAction); addAction(slideAction);
addAction(flipAction); addAction(flipAction);
addAction(rotateAction); addAction(rotateAction);

View File

@ -71,8 +71,8 @@ public:
ui.searchBar->hide(); ui.searchBar->hide();
ui.infoBox->hide(); ui.infoBox->hide();
connect(ui.searchButton, SIGNAL(clicked()), SLOT(startSearch())); connect(ui.searchButton, &QPushButton::clicked, this, &FlightInfo::startSearch);
connect(ui.flightEdit, SIGNAL(returnPressed()), SLOT(startSearch())); connect(ui.flightEdit, &QLineEdit::returnPressed, this, &FlightInfo::startSearch);
setWindowTitle("Flight Info"); setWindowTitle("Flight Info");
@ -83,11 +83,11 @@ public:
QAction *searchTodayAction = new QAction("Today's Flight", this); QAction *searchTodayAction = new QAction("Today's Flight", this);
QAction *searchYesterdayAction = new QAction("Yesterday's Flight", this); QAction *searchYesterdayAction = new QAction("Yesterday's Flight", this);
QAction *randomAction = new QAction("Random Flight", this); QAction *randomAction = new QAction("Random Flight", this);
connect(searchTodayAction, SIGNAL(triggered()), SLOT(today())); connect(searchTodayAction, &QAction::triggered, this, &FlightInfo::today);
connect(searchYesterdayAction, SIGNAL(triggered()), SLOT(yesterday())); connect(searchYesterdayAction, &QAction::triggered, this, &FlightInfo::yesterday);
connect(randomAction, SIGNAL(triggered()), SLOT(randomFlight())); connect(randomAction, &QAction::triggered, this, &FlightInfo::randomFlight);
connect(&m_manager, SIGNAL(finished(QNetworkReply*)), connect(&m_manager, &QNetworkAccessManager::finished,
this, SLOT(handleNetworkData(QNetworkReply*))); this, &FlightInfo::handleNetworkData);
addAction(searchTodayAction); addAction(searchTodayAction);
addAction(searchYesterdayAction); addAction(searchYesterdayAction);
addAction(randomAction); addAction(randomAction);

View File

@ -24,8 +24,8 @@ LightMaps::LightMaps(QWidget *parent)
{ {
m_normalMap = new SlippyMap(this); m_normalMap = new SlippyMap(this);
m_largeMap = new SlippyMap(this); m_largeMap = new SlippyMap(this);
connect(m_normalMap, SIGNAL(updated(QRect)), SLOT(updateMap(QRect))); connect(m_normalMap, &SlippyMap::updated, this, &LightMaps::updateMap);
connect(m_largeMap, SIGNAL(updated(QRect)), SLOT(update())); connect(m_largeMap, &SlippyMap::updated, this, &LightMaps::updateMap);
} }
void LightMaps::setCenter(qreal lat, qreal lng) void LightMaps::setCenter(qreal lat, qreal lng)