43 QHBoxLayout * bottomLeftLayout = new QHBoxLayout(); |
43 QHBoxLayout * bottomLeftLayout = new QHBoxLayout(); |
44 pageLayout->addLayout(bottomLeftLayout, 1, 0); |
44 pageLayout->addLayout(bottomLeftLayout, 1, 0); |
45 |
45 |
46 // stretch grid space for body and footer |
46 // stretch grid space for body and footer |
47 pageLayout->setColumnStretch(0,1); |
47 pageLayout->setColumnStretch(0,1); |
48 pageLayout->setColumnStretch(1,2); |
48 pageLayout->setColumnStretch(1,8); |
49 pageLayout->setColumnStretch(2,1); |
49 pageLayout->setColumnStretch(2,1); |
50 pageLayout->setRowStretch(0,1); |
50 pageLayout->setRowStretch(0,1); |
51 pageLayout->setRowStretch(1,0); |
51 pageLayout->setRowStretch(1,0); |
52 |
52 |
53 // add back/exit button |
53 // add back/exit button |
125 btn->setText(name); |
125 btn->setText(name); |
126 } |
126 } |
127 return btn; |
127 return btn; |
128 } |
128 } |
129 |
129 |
130 QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon) |
130 QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon, Qt::Alignment alignment) |
131 { |
131 { |
132 QPushButtonWithSound * btn = formattedButton(name, hasIcon); |
132 QPushButtonWithSound * btn = formattedButton(name, hasIcon); |
133 grid->addWidget(btn, row, column, rowSpan, columnSpan); |
133 grid->addWidget(btn, row, column, rowSpan, columnSpan, alignment); |
134 return btn; |
134 return btn; |
135 } |
135 } |
136 |
136 |
137 QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon) |
137 QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon, Qt::Alignment alignment) |
138 { |
138 { |
139 QPushButtonWithSound * btn = formattedButton(name, hasIcon); |
139 QPushButtonWithSound * btn = formattedButton(name, hasIcon); |
140 box->addWidget(btn, where); |
140 box->addWidget(btn, where, alignment); |
141 return btn; |
141 return btn; |
142 } |
142 } |
143 |
143 |
144 QPushButton* AbstractPage::addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon) |
144 QPushButton* AbstractPage::addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon, Qt::Alignment alignment) |
145 { |
145 { |
146 QPushButton* btn = formattedSoundlessButton(name, hasIcon); |
146 QPushButton* btn = formattedSoundlessButton(name, hasIcon); |
147 box->addWidget(btn, where); |
147 box->addWidget(btn, where, alignment); |
148 return btn; |
148 return btn; |
149 } |
149 } |
150 |
150 |
151 void AbstractPage::setBackButtonVisible(bool visible) |
151 void AbstractPage::setBackButtonVisible(bool visible) |
152 { |
152 { |