Skip to content

Commit

Permalink
Dodanie linków, update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kazimierczak-robert committed Jan 19, 2018
1 parent 2e072cd commit 3b6d78f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions LeonCam/DataBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ bool DataBase::CreateAlertsDeleteSettings()
if (queryResult == 0 && result==true)
{
query.clear();
//https://stackoverflow.com/a/25736288
query.exec("BEGIN IMMEDIATE TRANSACTION");
query.prepare("INSERT INTO AlertsDeleteSettings (Date) VALUES (?)");
QVariantList times;
Expand Down
1 change: 1 addition & 0 deletions LeonCam/GeneratedFiles/ui_MainApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ class Ui_MainApp
"left: 342px;\n"
"}\n"
"\n"
"/*https://stackoverflow.com/a/26159728*/\n"
"QTabBar::tab {\n"
"background-color: transparent;\n"
"color: rgb(133, 196, 255);\n"
Expand Down
3 changes: 3 additions & 0 deletions LeonCam/MainApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ void MainApp::UpdateThumbnail(const QPixmap& pixmap, int cameraID)
{
if (getCameraIDFromLayout(vectorCameraLayoutsPages->at(i)->at(j)) == cameraID)
{
//https://stackoverflow.com/a/12799623
((QPushButton*)vectorCameraLayoutsPages->at(i)->at(j)->itemAtPosition(0, 0)->widget())->setIcon(QIcon(pixmap));
return;
}
Expand Down Expand Up @@ -674,6 +675,7 @@ void MainApp::DeleteCameraFromMemory(QGridLayout* layout)
int number = ui.LTotalNumber->text().split(" ").last().toInt();
ui.LTotalNumber->setText("Total number of cameras: " + QVariant(number - 1).toString());

//https://stackoverflow.com/a/7569928
//Removing all item in layout
QLayoutItem * itemLayout;
QWidget * widget;
Expand All @@ -690,6 +692,7 @@ void MainApp::DeleteCameraFromMemory(QGridLayout* layout)
}
}

//https://stackoverflow.com/a/3385251
item->erase(std::remove(item->begin(), item->end(), layout), item->end());
delete layout;

Expand Down
3 changes: 1 addition & 2 deletions LeonCam/MainApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "CameraPreview.h"
#include "UserCamera.h"
#include "CameraEdition.h"
#include <algorithm>
#include <QHBoxLayout>
#include <QFormLayout>
#include <qdialogbuttonbox.h>
Expand All @@ -25,7 +24,6 @@
#include <QtCharts/QValueAxis>
#include <QDate>
#include <QLocale>
#include <algorithm>
#include <regex>

using namespace QtCharts;
Expand Down Expand Up @@ -72,6 +70,7 @@ private slots:
void ChangeSecurityQuestion();
public slots:
void OpenCameraEdit(int cameraID);
//https://stackoverflow.com/a/8701986
void UpdateThumbnail(const QPixmap& pixmap, int cameraID);
void InsertGreenAlert(int greenAlertID, int faceID, int cameraID, QString dateTimeNow);
void InsertRedAlert(int redAlertID, int cameraID, QString dateTimeNow);
Expand Down
1 change: 1 addition & 0 deletions LeonCam/MainApp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ QTabWidget::tab-bar {
left: 342px;
}

/*https://stackoverflow.com/a/26159728*/
QTabBar::tab {
background-color: transparent;
color: rgb(133, 196, 255);
Expand Down
2 changes: 2 additions & 0 deletions LeonCam/MainAppCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void MainAppCamera::UpdateDBAfterPrediction(int predictionLabel)
filePath = filePath + "\\" + QVariant(query.value(0).toInt()).toString() + ".avi";
//the last parameter: color or not video
//CV_FOURCC('M', 'J', 'P', 'G')
//https://stackoverflow.com/a/24197540
videowriter.open(filePath.toStdString(), CV_FOURCC('X','2','6','4'), (double)cameraFPS/updateImagePeriod, cv::Size(640, 360), true);
}
else
Expand Down Expand Up @@ -430,6 +431,7 @@ void MainAppCamera::Process()
//There is an alert add red border
if (redAlert->redAlertID != -1)
{
//http://www.qtcentre.org/threads/52964-Draw-rectangle-on-QImage?s=e283053d55d3b36ab4616fb2051808c3&p=237304#post237304
qPainter.begin(&pixmapWithRedBorder);
qPainter.setBrush(Qt::NoBrush);
qPainter.setPen(pen);
Expand Down
2 changes: 2 additions & 0 deletions LeonCam/UserCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ UserCamera::UserCamera(QWidget *parent, int userID)
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{
ui.setupUi(this);
//https://stackoverflow.com/a/18275148
ui.CBAvailableCameras->lineEdit()->setPlaceholderText("IPv4 address:port number");
this->setResult(QDialog::Rejected);
//Create DesignB instance
Expand All @@ -28,6 +29,7 @@ UserCamera::~UserCamera()
watcher->waitForFinished();
}
}
//https://github.com/Lycycz/onvif_device/blob/master/onvif.cpp
std::string UserCamera::GenerateUuid()
{
const int kGUIDSize = 39;
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ Supervisor: dr Anna Grocholewska-Czuryło
Attributions
------------
- http://doc.qt.io/qt-5.9/index.html
- https://github.com/linkingvision/rapidonvif/tree/onvifcpplib
- https://github.com/peters/opencv.ffmpeg
- https://github.com/Lycycz/onvif_device/blob/master/onvif.cpp
- https://asmaloney.com/2013/11/code/converting-between-cvmat-and-qimage-or-qpixmap
- http://develnoter.blogspot.com/2012/05/integrating-opencv-in-qt-gui.html
- http://www.qtcentre.org/threads/3416-Center-a-widget-in-a-cell-on-a-QTableWidget
Expand All @@ -70,3 +73,5 @@ Attributions
- https://pixabay.com/
- https://stackoverflow.com/ (hyperlinks in the source code)
- https://wiki.openssl.org/index.php/EVP_Symmetric_Encryption_and_Decryption
- http://www.qtcentre.org/threads/52964-Draw-rectangle-on-QImage?s=e283053d55d3b36ab4616fb2051808c3&p=237304#post237304
- https://github.com/therecipe/qt/wiki/Setting-the-Application-Icon

0 comments on commit 3b6d78f

Please sign in to comment.