mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 16:51:25 -04:00
Changed the standard dialog buttons from single buttons to buttonbox to have a standard layout and a standard translation.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5657 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e10ce3ff35
commit
b67f9f88fe
39 changed files with 110 additions and 671 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "CreateLobbyDialog.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <algorithm>
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
@ -48,8 +49,8 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list, in
|
|||
#endif
|
||||
ui->nickName_LE->setText(QString::fromUtf8(default_nick.c_str())) ;
|
||||
|
||||
connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( createLobby( ) ) );
|
||||
connect( ui->cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancel( ) ) );
|
||||
connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(createLobby()));
|
||||
connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
||||
connect( ui->lobbyName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
|
||||
connect( ui->lobbyTopic_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
|
||||
connect( ui->nickName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
|
||||
|
@ -89,9 +90,9 @@ void CreateLobbyDialog::changeEvent(QEvent *e)
|
|||
void CreateLobbyDialog::checkTextFields()
|
||||
{
|
||||
if(ui->lobbyName_LE->text() == "" || ui->nickName_LE->text() == "")
|
||||
ui->shareButton->setEnabled(false) ;
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false) ;
|
||||
else
|
||||
ui->shareButton->setEnabled(true) ;
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true) ;
|
||||
}
|
||||
|
||||
void CreateLobbyDialog::createLobby()
|
||||
|
@ -128,8 +129,3 @@ void CreateLobbyDialog::createLobby()
|
|||
|
||||
close();
|
||||
}
|
||||
|
||||
void CreateLobbyDialog::cancel()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue