Beispiel #1
0
MNotePad::MNotePad()
{
    creerAction();
    creerMenu();
    creerToolBar();

    //la zone centrale
    zoneCentrale = new QMdiArea;
    nouveauTab();
    nouveauTab();
    nouveauTab();
    //connect(zoneCentrale,SIGNAL(subWindowActivated(QMdiSubWindow)),this,SLOT(changerTab(QMdiSubWindow)));
    //zoneCentrale->setViewMode(QMdiArea::TabbedView);

    setCentralWidget(zoneCentrale);
}
Beispiel #2
0
int OthelloQt::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: creerAction(); break;
        case 1: nouvellePartie(); break;
        case 2: fermerPartie(); break;
        case 3: jouerCoup(); break;
        default: ;
        }
        _id -= 4;
    }
    return _id;
}
Beispiel #3
0
OthelloQt::OthelloQt(QWidget *parent)
    : QMainWindow(parent)
{
	ui.setupUi(this);
	ui.frame->hide();												//cache les contrôles car aucune partie lancée
	ui.actionNouveau->setShortcut(QKeySequence(tr("Ctrl+N")));
	ui.actionCharger->setShortcut(QKeySequence(tr("Ctrl+C")));
	ui.actionSauver->setShortcut(QKeySequence(tr("Ctrl+S")));
	ui.actionQuitter->setShortcut(QKeySequence(tr("Ctrl+Q")));
	ui.actionFermer->setShortcut(QKeySequence(tr("Ctrl+F")));
	ui.actionTexte->setShortcut(QKeySequence(tr("Ctrl+T")));
	ui.actionExpert->setShortcut(QKeySequence(tr("Ctrl+E")));
	ui.actionOthello->setShortcut(QKeySequence(tr("Ctrl+R")));
	ui.actionAuteur->setShortcut(QKeySequence(tr("Ctrl+A")));
	obsTxt = 0;
	obsExpe = 0;
	creerAction();
}
VueGestionEnsemble::VueGestionEnsemble(QWidget* parent) :
    QDialog(parent),
    ui(new Ui::VueGestionEnsemble)
{
    ui->setupUi(this);
    nom = new ChampFormulaire(tr("Ce champ est requis."), this);
    nom->setFocus();
    ui->formLayout->setWidget(0,QFormLayout::FieldRole, nom);
    configurerBoutonOk();
    setTabOrder(nom->getChamp(), ui->champDescription);
    connect(nom, SIGNAL(valeurChangee()), this, SLOT(verifierNom()));
    ui->boutonAjouter->setEnabled(false);
    ui->boutonRetirer->setEnabled(false);
    connect(ui->listeExistantes, SIGNAL(activated(QModelIndex)), this, SLOT(horsEnsembleSelectionnee()));
    connect(ui->listeExistantes, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(ajouter()));
    connect(ui->boutonAjouter, SIGNAL(clicked()), this, SLOT(ajouter()));
    connect(ui->listeSelectionnees, SIGNAL(clicked(QModelIndex)), this, SLOT(dansEnsembleSelectionnee()));
    connect(ui->listeSelectionnees, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(retirer()));
    connect(ui->boutonRetirer, SIGNAL(clicked()), this, SLOT(retirer()));
    connect(ui->boutonNouvelle, SIGNAL(clicked()), this, SLOT(creerAction()));
}