QTfrontend/ui/page/AbstractPage.cpp
changeset 11818 b421923c2577
parent 11814 8eccc307ca1e
child 12245 5206f9a803d1
equal deleted inserted replaced
11817:5f21387edff1 11818:b421923c2577
   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 {