askjnfl2
This commit is contained in:
parent
dff8358e89
commit
264a538364
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 7.0.0, 2022-04-06T19:14:20. -->
|
||||
<!-- Written by QtCreator 7.0.0, 2022-04-06T23:28:17. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
14
idkaart.cpp
14
idkaart.cpp
@ -1,4 +1,5 @@
|
||||
#include "idkaart.h"
|
||||
#include <algorithm>
|
||||
|
||||
IdKaart::IdKaart(std::string naam, std::string adres):id(naam+" "+adres),naamEigenaar(naam), adresEigenaar(adres){
|
||||
|
||||
@ -8,14 +9,15 @@ std::string IdKaart::userId(){
|
||||
return id;
|
||||
}
|
||||
|
||||
void IdKaart::geefToegang(KaartSlot*){
|
||||
|
||||
void IdKaart::geefToegang(KaartSlot* K){
|
||||
toegang.push_back(K);
|
||||
}
|
||||
|
||||
void IdKaart::verwijderToegang(KaartSlot*){
|
||||
|
||||
void IdKaart::verwijderToegang(KaartSlot* K){
|
||||
auto it = std::find(toegang.begin(), toegang.end(), K) != toegang.end();
|
||||
toegang.erase(toegang.begin() + it);
|
||||
}
|
||||
|
||||
bool IdKaart::heeftToegangTot(KaartSlot*){
|
||||
|
||||
bool IdKaart::heeftToegangTot(KaartSlot* K){
|
||||
return (std::find(toegang.begin(), toegang.end(), K) != toegang.end());
|
||||
}
|
||||
|
@ -152,3 +152,10 @@ void MainWindow::on_deleteIdCard_clicked(){
|
||||
delete kaart;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MainWindow::on_idVoegToe_clicked(){
|
||||
KaartSlot* kaart = new KaartSlot;
|
||||
kaart
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,10 @@ private slots:
|
||||
|
||||
void on_deleteIdCard_clicked();
|
||||
|
||||
void on_idKaart_returnPressed();
|
||||
|
||||
void on_idVoegToe_clicked();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
Hallsensor *s1;
|
||||
|
@ -17,8 +17,8 @@
|
||||
<widget class="QPushButton" name="schuifdeurSensorKnop">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>510</x>
|
||||
<y>100</y>
|
||||
<x>1010</x>
|
||||
<y>0</y>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@ -190,6 +190,42 @@
|
||||
<string>Delete id Card</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="idVerwijder">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>640</x>
|
||||
<y>270</y>
|
||||
<width>47</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deny</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="idKaart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>576</x>
|
||||
<y>220</y>
|
||||
<width>114</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="idVoegToe">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>576</x>
|
||||
<y>270</y>
|
||||
<width>47</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Allow</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
|
Loading…
Reference in New Issue
Block a user