Ejemplo n.º 1
0
Tree::menuClicDroit::menuClicDroit(MainWindow *mainWindow)
{
    // Constructeur menu clic droit sur l'arborescence
    this->menu = new QMenu();
    this->nouveauSample = new QAction(trUtf8("Nouvel échantillon..."), this->menu);
    connect(this->nouveauSample, SIGNAL(triggered()), mainWindow, SLOT(importerSmpl()));
    this->menu->addAction(this->nouveauSample);
    this->nouvelInstrument = new QAction(trUtf8("Nouvel instrument..."), this->menu);
    connect(this->nouvelInstrument, SIGNAL(triggered()), mainWindow, SLOT(nouvelInstrument()));
    this->menu->addAction(this->nouvelInstrument);
    this->nouveauPreset = new QAction(trUtf8("Nouveau preset..."), this->menu);
    connect(this->nouveauPreset, SIGNAL(triggered()), mainWindow, SLOT(nouveauPreset()));
    this->menu->addAction(this->nouveauPreset);
    this->menu->addSeparator();

    // Remplacer / associer
    this->associer = new QAction(trUtf8("Associer à..."), this->menu);
    connect(this->associer, SIGNAL(triggered()), mainWindow, SLOT(associer()));
    this->menu->addAction(this->associer);
    this->remplacer = new QAction(trUtf8("Remplacer par..."), this->menu);
    connect(this->remplacer, SIGNAL(triggered()), mainWindow, SLOT(remplacer()));
    this->menu->addAction(this->remplacer);
    this->menu->addSeparator();

    // Copier / coller / supprimer
    this->copier = new QAction(trUtf8("Copier"), this->menu);
    this->copier->setShortcut(QString("Ctrl+C"));
    connect(this->copier, SIGNAL(triggered()), mainWindow, SLOT(copier()));
    this->menu->addAction(this->copier);
    this->coller = new QAction(trUtf8("Coller"), this->menu);
    this->coller->setShortcut(QString("Ctrl+V"));
    connect(this->coller, SIGNAL(triggered()), mainWindow, SLOT(coller()));
    this->menu->addAction(this->coller);
    this->supprimer = new QAction(trUtf8("Supprimer"), this->menu);
    this->supprimer->setShortcut(QString("Del"));
    connect(this->supprimer, SIGNAL(triggered()), mainWindow, SLOT(supprimerElt()));
    this->menu->addAction(this->supprimer);
    this->menu->addSeparator();

    // Renommer
    this->renommer = new QAction(trUtf8("Renommer..."), this->menu);
    this->renommer->setShortcut(Qt::Key_F2);
    connect(this->renommer, SIGNAL(triggered()), mainWindow, SLOT(renommer()));
    this->menu->addAction(this->renommer);
    this->menu->addSeparator();

    // Fermer
    this->fermer = new QAction(trUtf8("Fermer le fichier"), this->menu);
    this->fermer->setShortcut(QString("Ctrl+W"));
    connect(this->fermer, SIGNAL(triggered()), mainWindow, SLOT(Fermer()));
    this->menu->addAction(this->fermer);
}
Ejemplo n.º 2
0
const char *  cleanAccents ( char* txt )
{
    txt = remplacer( txt , "é", "é" , NULL);
    txt = remplacer( txt , "è", "è" , NULL);

    txt = remplacer( txt , "à", "à" , NULL);
    txt = remplacer( txt , "ç", "ç" , NULL);
    txt = remplacer( txt , "ô", "ô" , NULL);

    txt = remplacer( txt , "â", "â" , NULL);
    txt = remplacer( txt , "ê", "ê" , NULL);
    return txt;
}