void RegisterWindow::addElem(){ QFont test( "", 60, QFont::Bold); title = new QLabel("Inscription", this); id = new QLabel("Identifiant : ", this); email = new QLabel("Email : ", this); mdp = new QLabel("Mot de passe : ", this); title->setFont(test); title->setAlignment(Qt::AlignCenter); idText = new QLineEdit(this); emailText = new QLineEdit(this); mdpText = new QLineEdit(this); back = new QPushButton("Retour", this); registration = new QPushButton("Inscription", this); connect(back, SIGNAL(clicked()), this, SLOT(backSelected())); connect(registration, SIGNAL(clicked()), this, SLOT(registerSelected())); layout->addWidget(title, 0, 1, 1, 3); layout->addWidget(id, 1, 1); layout->addWidget(email, 2, 1); layout->addWidget(mdp, 3, 1); layout->addWidget(idText, 1, 3); layout->addWidget(emailText, 2, 3); layout->addWidget(mdpText, 3, 3); layout->addWidget(back, 4, 1); layout->addWidget(registration, 4, 3); }
MainWindowView::MainWindowView(MainWindow *parent) : m_ui(new Ui::MainWindowView) , m_parent(parent) , m_model(0) , m_pt(0) { m_ui->setupUi(this); m_ui->splitter->setStretchFactor(1, 3); QMenu* moreButtonMenu = new QMenu(m_ui->moreButton); moreButtonMenu->addAction(QIcon::fromTheme("view-preview"), i18n("New Image"))->setProperty("type", int(CARD_IMAGE)); moreButtonMenu->addAction(QIcon::fromTheme("preferences-plugin"), i18n("New Logic Relation"))->setProperty("type", int(CARD_LOGIC)); moreButtonMenu->addAction(QIcon::fromTheme("preferences-desktop-text-to-speech"), i18n("New Sound"))->setProperty("type", int(CARD_SOUND)); moreButtonMenu->addAction(QIcon::fromTheme("preferences-desktop-font"), i18n("New Word"))->setProperty("type", int(CARD_WORD)); moreButtonMenu->addAction(QIcon::fromTheme("dialog-ok-apply"), i18n("New Found Sound"))->setProperty("type", int(CARD_FOUND)); connect(moreButtonMenu, SIGNAL(triggered(QAction*)), this, SLOT(addFeature(QAction*))); m_ui->moreButton->setMenu(moreButtonMenu); connect(m_ui->fileKurl, SIGNAL(urlSelected(KUrl)), this, SLOT(fileSelected())); connect(m_ui->backKurl, SIGNAL(urlSelected(KUrl)), this, SLOT(backSelected())); connect(m_ui->wordEdit, SIGNAL(textChanged(QString)), this, SLOT(wordChanged(QString))); connect(m_ui->playButton, SIGNAL(clicked()), this, SLOT(playSound())); connect(m_ui->delButton, SIGNAL(clicked()), this, SLOT(deleteElement())); connect(m_ui->addButton, SIGNAL(clicked()), this, SLOT(addElement())); connect(m_ui->titleEdit, SIGNAL(textEdited(QString)), this, SIGNAL(changed())); connect(m_ui->descriptionEdit, SIGNAL(textEdited(QString)), this, SIGNAL(changed())); connect(m_ui->authorEdit, SIGNAL(textEdited(QString)), this, SIGNAL(changed())); connect(m_ui->versionEdit, SIGNAL(textEdited(QString)), this, SIGNAL(changed())); connect(m_ui->dateEdit, SIGNAL(dateChanged(QDate)), this, SIGNAL(changed())); connect(m_ui->maintypeBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed())); m_media = new Phonon::MediaObject(this); Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::GameCategory, this); createPath(m_media, audioOutput); }