コード例 #1
0
ファイル: MNotePad.cpp プロジェクト: 0decimal0/mnotepad
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);
}
コード例 #2
0
ファイル: moc_othelloqt.cpp プロジェクト: Maethy/OthelloQt
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;
}
コード例 #3
0
ファイル: othelloqt.cpp プロジェクト: befrost/OthelloQt
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();
}
コード例 #4
0
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()));
}