1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
void TextEditor::initialisationActionTextEditor(){
p_actionQuitter = new QAction("Quitter", this);
connect(p_actionQuitter, SIGNAL(triggered()), SLOT(close()));
p_actionNouveau = new QAction("Nouveau", this);
p_actionNouveau->setShortcut(tr("Ctrl+N"));
p_actionNouveau->setIcon(QIcon(ICON_NEW_FILE));
connect(p_actionNouveau, SIGNAL(triggered()), this, SLOT(nouveau()));
p_actionOuvrir = new QAction("Ouvrir", this);
p_actionOuvrir->setShortcut(tr("Ctrl+O"));
p_actionOuvrir->setIcon(QIcon(ICON_OPEN_FILE));
connect(p_actionOuvrir, SIGNAL(triggered()), this, SLOT(ouvrir()));
p_actionEnregistrer = new QAction("Enregistrer", this);
p_actionEnregistrer->setShortcut(tr("Ctrl+S"));
p_actionEnregistrer->setIcon(QIcon(ICON_SAVE_FILE));
connect(p_actionEnregistrer, SIGNAL(triggered()), this, SLOT(enregistrer()));
p_actionEnregistrerSous = new QAction("Enregistrer-sous", this);
p_actionEnregistrerSous->setIcon(QIcon(ICON_SAVE_AS_FILE));
connect(p_actionEnregistrerSous, SIGNAL(triggered()), this, SLOT(enregistrerSous()));
}
|