2022-06-08 11:30:04 +00:00
|
|
|
// Copyright (C) 2017 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-12-09 14:27:12 +00:00
|
|
|
|
|
|
|
#include "annotatedurl.h"
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
2017-12-20 14:38:06 +00:00
|
|
|
#include <QtNfc/qnearfieldmanager.h>
|
|
|
|
#include <QtNfc/qndefnfctextrecord.h>
|
|
|
|
#include <QtNfc/qndefnfcurirecord.h>
|
2011-12-09 14:27:12 +00:00
|
|
|
|
2017-12-20 14:38:06 +00:00
|
|
|
#include <QtWidgets/QApplication>
|
2011-12-09 14:27:12 +00:00
|
|
|
|
2021-05-28 11:01:34 +00:00
|
|
|
//! [0]
|
2011-12-09 14:27:12 +00:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
MainWindow mainWindow;
|
|
|
|
AnnotatedUrl annotatedUrl;
|
|
|
|
|
2017-12-20 14:38:06 +00:00
|
|
|
QObject::connect(&annotatedUrl, &AnnotatedUrl::annotatedUrl,
|
|
|
|
&mainWindow, &MainWindow::displayAnnotatedUrl);
|
2021-06-08 10:18:58 +00:00
|
|
|
QObject::connect(&annotatedUrl, &AnnotatedUrl::nfcStateChanged,
|
|
|
|
&mainWindow, &MainWindow::nfcStateChanged);
|
2021-06-09 09:45:59 +00:00
|
|
|
QObject::connect(&annotatedUrl, &AnnotatedUrl::tagError,
|
|
|
|
&mainWindow, &MainWindow::showTagError);
|
2011-12-09 14:27:12 +00:00
|
|
|
|
2021-05-28 11:01:34 +00:00
|
|
|
annotatedUrl.startDetection();
|
2011-12-09 14:27:12 +00:00
|
|
|
mainWindow.show();
|
|
|
|
|
|
|
|
return a.exec();
|
|
|
|
}
|
2021-05-28 11:01:34 +00:00
|
|
|
//! [0]
|