QTfrontend/ui/page/AbstractPage.cpp
changeset 11818 b421923c2577
parent 11814 8eccc307ca1e
child 12245 5206f9a803d1
--- a/QTfrontend/ui/page/AbstractPage.cpp	Fri May 06 18:49:41 2016 +0200
+++ b/QTfrontend/ui/page/AbstractPage.cpp	Fri May 06 19:23:26 2016 +0200
@@ -127,24 +127,24 @@
     return btn;
 }
 
-QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon)
+QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon, Qt::Alignment alignment)
 {
     QPushButtonWithSound * btn = formattedButton(name, hasIcon);
-    grid->addWidget(btn, row, column, rowSpan, columnSpan);
+    grid->addWidget(btn, row, column, rowSpan, columnSpan, alignment);
     return btn;
 }
 
-QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon)
+QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon, Qt::Alignment alignment)
 {
     QPushButtonWithSound * btn = formattedButton(name, hasIcon);
-    box->addWidget(btn, where);
+    box->addWidget(btn, where, alignment);
     return btn;
 }
 
-QPushButton* AbstractPage::addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon)
+QPushButton* AbstractPage::addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon, Qt::Alignment alignment)
 {
     QPushButton* btn = formattedSoundlessButton(name, hasIcon);
-    box->addWidget(btn, where);
+    box->addWidget(btn, where, alignment);
     return btn;
 }