askjnfl2
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<!DOCTYPE QtCreatorProject>
 | 
					<!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>
 | 
					<qtcreator>
 | 
				
			||||||
 <data>
 | 
					 <data>
 | 
				
			||||||
  <variable>EnvironmentId</variable>
 | 
					  <variable>EnvironmentId</variable>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								idkaart.cpp
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								idkaart.cpp
									
									
									
									
									
								
							@@ -1,4 +1,5 @@
 | 
				
			|||||||
#include "idkaart.h"
 | 
					#include "idkaart.h"
 | 
				
			||||||
 | 
					#include <algorithm>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IdKaart::IdKaart(std::string naam, std::string adres):id(naam+" "+adres),naamEigenaar(naam), adresEigenaar(adres){
 | 
					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;
 | 
					    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;
 | 
					   delete kaart;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::on_idVoegToe_clicked(){
 | 
				
			||||||
 | 
					    KaartSlot* kaart = new KaartSlot;
 | 
				
			||||||
 | 
					    kaart
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,10 @@ private slots:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    void on_deleteIdCard_clicked();
 | 
					    void on_deleteIdCard_clicked();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void on_idKaart_returnPressed();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void on_idVoegToe_clicked();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
    Ui::MainWindow *ui;
 | 
					    Ui::MainWindow *ui;
 | 
				
			||||||
    Hallsensor *s1;
 | 
					    Hallsensor *s1;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,8 +17,8 @@
 | 
				
			|||||||
   <widget class="QPushButton" name="schuifdeurSensorKnop">
 | 
					   <widget class="QPushButton" name="schuifdeurSensorKnop">
 | 
				
			||||||
    <property name="geometry">
 | 
					    <property name="geometry">
 | 
				
			||||||
     <rect>
 | 
					     <rect>
 | 
				
			||||||
      <x>510</x>
 | 
					      <x>1010</x>
 | 
				
			||||||
      <y>100</y>
 | 
					      <y>0</y>
 | 
				
			||||||
      <width>31</width>
 | 
					      <width>31</width>
 | 
				
			||||||
      <height>31</height>
 | 
					      <height>31</height>
 | 
				
			||||||
     </rect>
 | 
					     </rect>
 | 
				
			||||||
@@ -190,6 +190,42 @@
 | 
				
			|||||||
     <string>Delete id Card</string>
 | 
					     <string>Delete id Card</string>
 | 
				
			||||||
    </property>
 | 
					    </property>
 | 
				
			||||||
   </widget>
 | 
					   </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>
 | 
				
			||||||
  <widget class="QMenuBar" name="menuBar">
 | 
					  <widget class="QMenuBar" name="menuBar">
 | 
				
			||||||
   <property name="geometry">
 | 
					   <property name="geometry">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user