Пример #1
0
void DccRenameDialog::cancelClicked()
{
	hide();
	emit cancelSelected(this, m_pDescriptor);
	this->deleteLater();
	//g_pApp->collectGarbage(this);
}
Пример #2
0
void DccRenameDialog::closeEvent(QCloseEvent * e)
{
	hide();
	e->ignore();
	if(m_pDescriptor)
	{
		emit cancelSelected(this, m_pDescriptor);
		//g_pApp->collectGarbage(this);
		this->deleteLater();
	}
}
GameAttributes::GameAttributes(QWidget *parent)
	: QDialog(parent)
{
	setupUi(this);
	substitutionComboBox->addItem("Softball - Unlimited");
	substitutionComboBox->addItem("Hybrid Baseball/Softball");
	substitutionComboBox->addItem("Baseball - Restricted");
	if(getVariablesFromFile())
	{
		qDebug() << "Variables set correctly";
	}
	
	connect( buttonBox, SIGNAL( accepted() ), this, SLOT( saveSelected() ) );
	connect( buttonBox, SIGNAL( rejected() ), this, SLOT( cancelSelected() ) );
}
void ModificationWindow::addElem(){
	title = new QLabel("Modification des informations", this);
	title->setAlignment(Qt::AlignCenter);
	mail = new QLabel("Adresse mail : ", this);
	pseudo = new QLabel("Pseudo : ", this);
	password = new QLabel("Password : "******"Créer un adminsitrateur : ");

	QFont h1("", 25, QFont::Bold);
	title->setFont(h1);

	mailL = new QLineEdit(this);
	pseudoL = new QLineEdit(this);
	passwordL = new QLineEdit(this);
	loadData();

	cancel = new QPushButton("Retour", this);
	connect(cancel, SIGNAL(clicked()), this, SLOT(cancelSelected()));
	save = new QPushButton("Sauver", this);
	connect(save, SIGNAL(clicked()), this, SLOT(saveSelected()));
	ok = new QPushButton("Admin !", this);
	connect(ok, SIGNAL(clicked()), this, SLOT(okSelected()));

	users = new QComboBox(this);
	if (_user.isAdmin)
		loadIsAdmin();
	else
		loadIsNotAdmin();

	layout->addWidget(title, 0, 0, 1, 4);
	layout->addWidget(mail, 1, 0);
	layout->addWidget(pseudo, 2, 0);
	layout->addWidget(password, 3, 0);
	layout->addWidget(changeAdmin, 4, 0);
	layout->addWidget(cancel, 5, 0, 1, 2);
	layout->addWidget(mailL, 1, 2, 1, 2);
	layout->addWidget(pseudoL, 2, 2, 1, 2);
	layout->addWidget(passwordL, 3, 2, 1, 2);
	layout->addWidget(users, 4, 2);
	layout->addWidget(save, 5, 2, 1, 2);
	layout->addWidget(ok, 4, 3);
}