public slots:
void on_sizeslider_valuechanged(int value);
void on_skillslider_valuechanged(int value);
void on_texslider_valuechanged(int value);
void on_enterplayername_textedited
(const QString &arg1
);
void on_acceptbutton_clicked();
public slots:
void on_sizeslider_valuechanged(int value);
void on_skillslider_valuechanged(int value);
void on_texslider_valuechanged(int value);
void on_enterplayername_textedited(const QString &arg1);
void on_acceptbutton_clicked();
To copy to clipboard, switch view to plain text mode
//slots (these are at the end of the constructor)
QObject::connect(acceptbutton,
SIGNAL(clicked
()),
this,
SLOT(on_acceptbutton_clicked
()));
QObject::connect(sizeslider,
SIGNAL(valueChanged
(int)),
this,
SLOT(on_sizeslider_valuechanged
(int value
)));
QObject::connect(namebox,
SIGNAL(textEdited
(QString)),
this,
SLOT(on_enterplayername_textedited
(const QString)));
QObject::connect(texslider,
SIGNAL(valueChanged
(int)),
this,
SLOT(on_texslider_valuechanged
(int)));
QObject::connect(skillslider,
SIGNAL(valueChanged
(int)),
this,
SLOT(on_skillslider_valuechanged
(int)));
}
void Dialog::on_sizeslider_valuechanged(int value){
if (value == 1) {
sizeoptions->setText("Small");
}
if (value == 2) {
sizeoptions->setText("Medium");
}
if (value == 3) {
sizeoptions->setText("Large");
}
if (value == 4) {
sizeoptions->setText("XLarge");
}
//sizechoice = value;
}
void Dialog::on_skillslider_valuechanged(int value){
if (value == 1) {
skilloptions->setText("Shrink & Boost");
}
if (value == 2) {
skilloptions->setText("Gravity Gun");
}
if (value == 3) {
skilloptions->setText("Tron");
}
//skillchoice = value;
}
void Dialog::on_texslider_valuechanged(int value){
if(value == 1){
textcubeimg
->setPixmap
(QPixmap("checkertexture150x125.png"));
}
if(value == 2){
textcubeimg
->setPixmap
(QPixmap("checkertexturepink150x125.png"));
}
if(value == 3){
textcubeimg
->setPixmap
(QPixmap("checkertextureblue150x125.png"));
}
//texchoice = value;
}
void Dialog
::on_enterplayername_textedited(const QString &arg1
){
playername = arg1;
}
void Dialog::on_acceptbutton_clicked(){
qDebug() << playername;
this->close();
}
//slots (these are at the end of the constructor)
QObject::connect(acceptbutton, SIGNAL(clicked()),this, SLOT(on_acceptbutton_clicked()));
QObject::connect(sizeslider, SIGNAL(valueChanged(int)), this, SLOT(on_sizeslider_valuechanged(int value)));
QObject::connect(namebox, SIGNAL(textEdited(QString)), this, SLOT(on_enterplayername_textedited(const QString)));
QObject::connect(texslider, SIGNAL(valueChanged(int)), this, SLOT(on_texslider_valuechanged(int)));
QObject::connect(skillslider, SIGNAL(valueChanged(int)), this, SLOT(on_skillslider_valuechanged(int)));
}
void Dialog::on_sizeslider_valuechanged(int value){
if (value == 1) {
sizeoptions->setText("Small");
}
if (value == 2) {
sizeoptions->setText("Medium");
}
if (value == 3) {
sizeoptions->setText("Large");
}
if (value == 4) {
sizeoptions->setText("XLarge");
}
//sizechoice = value;
}
void Dialog::on_skillslider_valuechanged(int value){
if (value == 1) {
skilloptions->setText("Shrink & Boost");
}
if (value == 2) {
skilloptions->setText("Gravity Gun");
}
if (value == 3) {
skilloptions->setText("Tron");
}
//skillchoice = value;
}
void Dialog::on_texslider_valuechanged(int value){
if(value == 1){
textcubeimg->setPixmap(QPixmap("checkertexture150x125.png"));
}
if(value == 2){
textcubeimg->setPixmap(QPixmap("checkertexturepink150x125.png"));
}
if(value == 3){
textcubeimg->setPixmap(QPixmap("checkertextureblue150x125.png"));
}
//texchoice = value;
}
void Dialog::on_enterplayername_textedited(const QString &arg1){
playername = arg1;
}
void Dialog::on_acceptbutton_clicked(){
qDebug() << playername;
this->close();
}
To copy to clipboard, switch view to plain text mode
Bookmarks