mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
737 B
24 lines
737 B
#include "pagewithbackbutton.h" |
|
#include "QVBoxLayout" |
|
#include "QHBoxLayout" |
|
#include "QPushButton" |
|
|
|
PageWithBackButton::PageWithBackButton(QWidget *parent, QWidget* child) : QWidget(parent) |
|
{ |
|
QVBoxLayout * layout = new QVBoxLayout(); |
|
setLayout(layout); |
|
QWidget * topBar = new QWidget(); |
|
QHBoxLayout * topBarLayout = new QHBoxLayout(); |
|
topBar->setLayout(topBarLayout); |
|
layout->addWidget(topBar); |
|
layout->addWidget(child); |
|
|
|
QPushButton * backButton = new QPushButton(topBar); |
|
backButton->setText("< Back"); |
|
topBarLayout->addWidget(backButton); |
|
connect(backButton, SIGNAL(released()), this, SLOT(backReleasedSlot())); |
|
} |
|
|
|
void PageWithBackButton::backReleasedSlot() { |
|
emit backReleased(); |
|
}
|
|
|