#include "login.h"
#include <QApplication>
#include "connexion.h"
#include <QSystemTrayIcon>


int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    login w;
    Connexion c ;
    QSystemTrayIcon *notifier;
    bool test=c.ouvrirConnexion();
    if(test)
    {w.show();
        notifier = new QSystemTrayIcon();
        notifier->setIcon(QIcon("notification.png"));
        notifier->show();
        notifier->showMessage("Succés","Connecter a la base de données",QSystemTrayIcon::Warning,10000);
}
else
    {
        notifier = new QSystemTrayIcon();
        notifier->setIcon(QIcon("notification.png"));
        notifier->show();
        notifier->showMessage("Echec !","La connection a echoué !",QSystemTrayIcon::Warning,10000);
    }


    return a.exec();
}

