#ifndef EDITWIZARD_H
#define EDITWIZARD_H

#define Q_OS_LINUX

#include <QApplication>
#include <QMessageBox>
#include <QLineEdit>
#include <QComboBox>
#include <QPushButton>
#include <QTextCodec>
#include <QByteArray>
#include <QTabWidget>
#include <QStackedLayout>
#include <QGroupBox>
#include <QTabWidget>
#include <QTableView>
#include <QLabel>
#include <QScrollBar>
#include <QGroupBox>
#include <QHeaderView>
#include <QFormLayout>
#include "userinfo.h"
#include "window.h"
#include "analogclock.h"
#include "utility.h"
#include "addwizard.h"

class QLabel;


//! [0]
class editwizard : public PWindow
{
   Q_OBJECT

public:

editwizard(PRights *userrights, QWidget *parent = 0);
enum KeybMode { KBMode_Numeric, KBMode_Alpha, KBMode_Leaving }; 
public slots:
	void keypressed(QByteArray &keyt);
	void userSelected(const QModelIndex & index);
private:

QPushButton* Save;
QPushButton* Cancel;
QPushButton* Prev;


QTableView *UserList;
PLineEdit* SearchEdit;
QPushButton* SearchButton;    
PUserInfo* CurrentUser;
QStackedLayout * MainLayout;
QWidget* CreateSearchPage(void);
QWidget* CreateSettingsPage(void);
addwizard* Scanwizard;

void RefreshData(void);	

PLineEdit* NameEdit;
PLineEdit* SurnameEdit;
QLineEdit* RfidEdit;
QLineEdit* PinEdit;

PRights * UserRights;

QWidget* CreateNameTab(void);
QWidget* CreateFprTab(void);
QWidget* CreateRfidTab(void);
QWidget* CreatePinTab(void);
QWidget* CreateGroupTab(void);

QRadioButton *SuperAdmin;
QRadioButton *GroupAdmin;
QRadioButton *StandardUser;

QPushButton* Delete; 
QPushButton* Scan; 

QLabel* FprDate;

QComboBox* GroupSelect;

bool ScanningActive;

private slots:
void Search(void);
void buttSave(void);
void buttPrev(void);
void buttCancel(void);
void buttDelete(void);
void buttScan(void);

void WizzardClose(void);

signals:
void DataForScan(QByteArray &data);

};
//! [0]



#endif
