QTfrontend/ui/page/AbstractPage.cpp
changeset 6583 4218782d8ca0
parent 6572 0d0af531c1c7
child 6699 83dd3447a212
equal deleted inserted replaced
6582:d32b5fde9ea6 6583:4218782d8ca0
    69     // connect signals
    69     // connect signals
    70     connect(btnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
    70     connect(btnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
    71     connectSignals();
    71     connectSignals();
    72 }
    72 }
    73 
    73 
    74 QPushButton * AbstractPage::formattedButton(const QString & name, bool hasIcon)
    74 QPushButtonWithSound * AbstractPage::formattedButton(const QString & name, bool hasIcon)
    75 {
    75 {
    76     QPushButtonWithSound * btn = new QPushButtonWithSound(this);
    76     QPushButtonWithSound * btn = new QPushButtonWithSound(this);
    77 
    77 
    78     if (hasIcon)
    78     if (hasIcon)
    79     {
    79     {
    91         btn->setText(name);
    91         btn->setText(name);
    92     }
    92     }
    93     return btn;
    93     return btn;
    94 }
    94 }
    95 
    95 
    96 QPushButton * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon)
    96 QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon)
    97 {
    97 {
    98     QPushButton * btn = formattedButton(name, hasIcon);
    98     QPushButtonWithSound * btn = formattedButton(name, hasIcon);
    99     grid->addWidget(btn, row, column, rowSpan, columnSpan);
    99     grid->addWidget(btn, row, column, rowSpan, columnSpan);
   100     return btn;
   100     return btn;
   101 }
   101 }
   102 
   102 
   103 QPushButton * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon)
   103 QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon)
   104 {
   104 {
   105     QPushButton * btn = formattedButton(name, hasIcon);
   105     QPushButtonWithSound * btn = formattedButton(name, hasIcon);
   106     box->addWidget(btn, where);
   106     box->addWidget(btn, where);
   107     return btn;
   107     return btn;
   108 }
   108 }
   109 
   109 
   110 void AbstractPage::setBackButtonVisible(bool visible)
   110 void AbstractPage::setBackButtonVisible(bool visible)