#ifndef UTILITY_H
#define UTILITY_H

#define Q_OS_LINUX

#include <QFile>
#include <QLineEdit>
#include <syslog.h>



class utility 
{
   
 
public:
enum LogPrior {Log_Emerg,Log_Alert,Log_Crit,Log_Err,Log_Warning,Log_Notice,Log_Info,Log_Debug};
enum KeybMode { KBMode_Numeric, KBMode_Alpha, KBMode_Leaving };
static bool SetKeyboardMode(KeybMode mode);
static QHBoxLayout* CreateHeader(QString title,QString picture);
static QChar WinToUtf(char key);
static int PixmapMessageBox(QString title, QString text, QPixmap picture, QMessageBox::StandardButtons buttons);
static void LogMessage(char priority ,char* message);

};

class PLineEdit : public QLineEdit{


public:// slots:

void Keypressed(QByteArray &keyt);


};

class PRights{

public:
static const char User='U';
static const char GroupAdmin='G';
static const char SuperAdmin='A';

PRights();
void LoadRights(QByteArray rights);
char GetRights();
int GetGroup();
bool isAdmin();
private:
QByteArray Rights;
int Group;


};
//! [0]

#endif

