BuildmLearn/BuildmLearn-Toolkit — pull request #11 by beginnee (2014-03-19 18:29:18+00:00)
Title: Updated Start Simulation buttons QuizTemplate and FlashTemplate 

When I was going through the issues in the BuildmLearn Toolkit, I found the following bug:
https://github.com/BuildmLearn/Toolkit-mobile-templates/issues/20

The Start Simulation Button overlaps with the mobile screen in FlashTemplate.cpp and QuizTemplate.cpp. Because of this overlapping, the Start Simulation button seems to be non functional and non-clickable.
Also, Generate Application and Back Button(<-) were placed on the mobile and were looking messy at those positions.

I reduced the space for the widget in the center and took some space to place all these three buttons.
For this ,I first added two private variables ,widget4 and widget5 ,in QuizTemplate.h as well as in FlashTemplate.h.
Then in FlashTemplate.cpp,
FlashcardTemplate::FlashcardTemplate(QWidget *parent) :
QWidget(parent)
{
//same as earlier
//initializing the widgets
widget3 = new QWidget();
widget4 = new QWidget();
widget5 = new QWidget();

//--same as earlier--
widget2_vlayout->update();
//Addling a new QVBoxLayout
QVBoxLayout* widget4_vlayout= new QVBoxLayout(widget4);
widget4_vlayout->setMargin(10);
widget4->setFixedHeight(300);
widget4_vlayout->setAlignment(Qt::AlignCenter);
widget4_vlayout->update();

startSimulation = new QPushButton("Start Simulation", widget4);
startSimulation->setGeometry(120,500,100,30);
//--same as earlier--
backButton = new QPushButton("<-",widget4);
backButton->setFixedWidth(phoneWidget->width());

generateButton = new QPushButton("Generate Application");
generateButton->setGeometry(5,0,10,200);
widget3_vlayout->addWidget(phoneBody);

//Adding buttons to widget4_vlayout
widget4_vlayout->addWidget(startSimulation);
widget4_vlayout->addWidget(backButton);
widget4_vlayout->addWidget(generateButton);

//Using QGridLayout for placing iScrollArea and widget4 on a single widget
QGridLayout *gridlayout=new QGridLayout(widget5);
iScrollArea->setFixedHeight(500);
gridlayout->addWidget(iScrollArea,0,0,Qt::AlignTop);
widget4->setFixedHeight(100);
gridlayout->addWidget(widget4,1,0,Qt::AlignTop);

//Positioning widgets on QHBoxLayout
QHBoxLayout* hlayout = new QHBoxLayout(this);
hlayout->addWidget(widget1,Qt::AlignTop);
hlayout->addWidget(widget5,Qt::AlignTop);
hlayout->addWidget(widget3,Qt::AlignTop);
}

Now, the Start Simulation button works smoothly and also the entire screen looks more organized.