Esempio n. 1
0
Afficheur::Afficheur(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::Afficheur)
{
    ui->setupUi(this);

    setWindowTitle(tr("calcul'utc"));
    clavierGroup = new QActionGroup(this);
    clavierGroup->addAction(ui->actionPas_de_clavier);
    clavierGroup->addAction(ui->actionClavier_simple);
    clavierGroup->addAction(ui->actionClavier_etendu);

    onglet *o = new onglet(this);
    ui->tabWidget->addTab(o, QString("Onglet 1"));
    ui->tabWidget->setCurrentIndex(0);
    o->chargerPiles();

    // Menus
    connect(ui->actionQuitter, SIGNAL(triggered()), qApp, SLOT(quit()));
    connect(ui->actionNouvel_onglet, SIGNAL(triggered()), this, SLOT(nouvelOnglet()));
    connect(ui->actionNouvel_onglet_copie, SIGNAL(triggered()), this, SLOT(nouvelOngletCopie()));
    connect(ui->actionFermer_onglet, SIGNAL(triggered()), this, SLOT(fermeOnglet()));
    connect(ui->actionPas_de_clavier, SIGNAL(triggered()), this, SLOT(clavierOff()));
    connect(ui->actionClavier_simple, SIGNAL(triggered()), this, SLOT(clavierSimple()));
    connect(ui->actionClavier_etendu, SIGNAL(triggered()), this, SLOT(clavierEtendu()));
    connect(ui->actionAnnuler, SIGNAL(triggered()), this, SLOT(undo()));
    connect(ui->actionRetablir, SIGNAL(triggered()), this, SLOT(redo()));
}
Esempio n. 2
0
void NavFichiers::ajouterOnglet()
{
	onglets->addTab(nouvelOnglet(), QDir::home().dirName());
	onglets->setCurrentIndex(onglets->count() - 1);

	if (onglets->count() > 1)
	{
		onglets->setTabsClosable(true);
		actionFermerOnglet->setEnabled(true);
	}

	afficherCheminActuel->setText(pageActuelle()->chemin());
}
Esempio n. 3
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    nbonglet=0;
    mesonglets = new Onglet();
    ui->setupUi(this);
    QVBoxLayout* l = new QVBoxLayout();
    ui->centralWidget->setLayout(l);;
    l->addWidget(mesonglets);
    l->addWidget(ui->frame);
    mesonglets->setMaximumHeight(24);
    mesonglets->setTabsClosable(true);

    nouvelOnglet();

    QObject::connect(ui->num0,SIGNAL(clicked()),this,SLOT(num0Pressed()));
    QObject::connect(ui->num1,SIGNAL(clicked()),this,SLOT(num1Pressed()));
    QObject::connect(ui->num2,SIGNAL(clicked()),this,SLOT(num2Pressed()));
    QObject::connect(ui->num3,SIGNAL(clicked()),this,SLOT(num3Pressed()));
    QObject::connect(ui->num4,SIGNAL(clicked()),this,SLOT(num4Pressed()));
    QObject::connect(ui->num5,SIGNAL(clicked()),this,SLOT(num5Pressed()));
    QObject::connect(ui->num6,SIGNAL(clicked()),this,SLOT(num6Pressed()));
    QObject::connect(ui->num7,SIGNAL(clicked()),this,SLOT(num7Pressed()));
    QObject::connect(ui->num8,SIGNAL(clicked()),this,SLOT(num8Pressed()));
    QObject::connect(ui->num9,SIGNAL(clicked()),this,SLOT(num9Pressed()));
    QObject::connect(ui->sinButton,SIGNAL(clicked()),this,SLOT(SINPressed()));
    QObject::connect(ui->sinhButton,SIGNAL(clicked()),this,SLOT(SINHPressed()));
    QObject::connect(ui->cosButton,SIGNAL(clicked()),this,SLOT(COSPressed()));
    QObject::connect(ui->coshButton,SIGNAL(clicked()),this,SLOT(COSHPressed()));
    QObject::connect(ui->tanButton,SIGNAL(clicked()),this,SLOT(TANPressed()));
    QObject::connect(ui->tanhButton,SIGNAL(clicked()),this,SLOT(TANHPressed()));
    QObject::connect(ui->lnButton,SIGNAL(clicked()),this,SLOT(LNPressed()));
    QObject::connect(ui->logButton,SIGNAL(clicked()),this,SLOT(LOGPressed()));
    QObject::connect(ui->cubeButton,SIGNAL(clicked()),this,SLOT(CUBEPressed()));
    QObject::connect(ui->sqrButton,SIGNAL(clicked()),this,SLOT(SQRPressed()));
    QObject::connect(ui->sqrtButton,SIGNAL(clicked()),this,SLOT(SQRTPressed()));
    QObject::connect(ui->invButton,SIGNAL(clicked()),this,SLOT(INVPressed()));
    QObject::connect(ui->factButton,SIGNAL(clicked()),this,SLOT(FACTPressed()));
    QObject::connect(ui->addButton,SIGNAL(clicked()),this,SLOT(ADDPressed()));
    QObject::connect(ui->minusButton,SIGNAL(clicked()),this,SLOT(MINUSPressed()));
    QObject::connect(ui->multiplyButton,SIGNAL(clicked()),this,SLOT(MULTPressed()));
    QObject::connect(ui->divButton,SIGNAL(clicked()),this,SLOT(DIVPressed()));
    QObject::connect(ui->powButton,SIGNAL(clicked()),this,SLOT(POWPressed()));
    QObject::connect(ui->modButton,SIGNAL(clicked()),this,SLOT(MODPressed()));
    QObject::connect(ui->signButton,SIGNAL(clicked()),this,SLOT(SIGNPressed()));
    QObject::connect(ui->spaceButton,SIGNAL(clicked()),this,SLOT(spacePressed()));
    QObject::connect(ui->ratioButton,SIGNAL(clicked()),this,SLOT(ratioClicked()));
    QObject::connect(ui->realButton,SIGNAL(clicked()),this,SLOT(realClicked()));
    QObject::connect(ui->integerButton,SIGNAL(clicked()),this,SLOT(integerClicked()));
    QObject::connect(ui->degreButton,SIGNAL(clicked()),this,SLOT(degreClicked()));
    QObject::connect(ui->radianButton,SIGNAL(clicked()),this,SLOT(radianClicked()));
    QObject::connect(ui->trueComplexButton,SIGNAL(clicked()),this,SLOT(trueComplexClicked()));
    QObject::connect(ui->falseComplexButton,SIGNAL(clicked()),this,SLOT(falseComplexClicked()));
    QObject::connect(mesonglets,SIGNAL(tabCloseRequested(int)),this,SLOT(fermerOnglet(int)));
    QObject::connect(ui->actionNouvel_Onglet,SIGNAL(triggered()),this,SLOT(nouvelOnglet()));
    QObject::connect(ui->pointButton,SIGNAL(clicked()),this,SLOT(pointPressed()));
    QObject::connect(ui->slashButton,SIGNAL(clicked()),this,SLOT(slashPressed()));
    QObject::connect(ui->dollarButton,SIGNAL(clicked()),this,SLOT(dollarPressed()));
    QObject::connect(ui->quoteButton,SIGNAL(clicked()),this,SLOT(quotePressed()));
    QObject::connect(mesonglets,SIGNAL(currentChanged(int)),this,SLOT(changerOnglet(int)));
    QObject::connect(ui->evalButton,SIGNAL(clicked()),this,SLOT(evalPressed()));
    QObject::connect(ui->action_Quit,SIGNAL(triggered()),this,SLOT(Quitter()));
    QObject::connect(ui->actionAnnuler,SIGNAL(triggered()),this,SLOT(annuler()));
    QObject::connect(ui->actionR_tablir,SIGNAL(triggered()),this,SLOT(retablir()));

}