
#ifndef ADDWIZARD_H
#define ADDWIZARD_H

#define Q_OS_LINUX

#include <QApplication>
#include <QMessageBox>
#include <QProcess>
#include <QLineEdit>
#include <QComboBox>
#include <QPushButton>
#include <QTextCodec>
#include <QByteArray>
#include <QByteArray>
#include <QStackedLayout>
#include <QRadioButton>
#include <QInputDialog>
#include <QGroupBox>
#include <QtSql>
#include "userinfo.h"
#include "window.h"
#include "analogclock.h"
#include "utility.h"
class QLabel;


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

public:

enum Action {UpdateFprOnly,AddUser};
    
addwizard(QWidget *parent = 0, PRights* rights=NULL ,Action curract = AddUser, int ID=0);
//addwizard(Action CurrentAction);  

enum State { PageName, PageFingerprint, PageOther, PageGroup };


public slots:


	void keypressed(QByteArray &keyt);
        void buttNext();
	void buttPrev();
	void buttCanc();
	void buttScan();	

private:

int PixmapMessageBox(QString title, QString text, QPixmap picture, QMessageBox::StandardButtons buttons);
void updateInterface(void);

QWidget* CreateGetNamePage(void);
QWidget* CreateScanFPRPage(void);
QWidget* CreateOthersPage(void);
QWidget* CreateGroupPage(void);


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

QComboBox* GroupSelectBox;

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

QProcess *Speaker;

QWidget* firstPageWidget;
QWidget* secondPageWidget;
QWidget* thirdPageWidget;

QString Surname;
QString Name;

QLabel *Title;

QPushButton* Next;
QPushButton* Prev; 
QPushButton* Cancel;
QPushButton* LoadRfid;
QPushButton* ScanFinger;
PRights* UserRights;
int CurrentState;
int CurrentAction;
PUserInfo* CurrentUser;
QLabel *ScanStatus;

private slots:
void RfidToggled (bool on);
void PinToggled (bool on);


};
//! [0]

#endif
