Beispiel #1
0
ShoppingPage::ShoppingPage(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ShoppingPage)
{
    ui->setupUi(this);

    connect(ui->blockButton_2, SIGNAL(pressed()), this, SLOT(blockClicked()));
    connect(ui->txButton_2, SIGNAL(pressed()), this, SLOT(txClicked()));

}
Beispiel #2
0
BlockBrowser::BlockBrowser(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::BlockBrowser) {
    ui->setupUi(this);

    setFixedSize(400, 420);

    connect(ui->blockButton, SIGNAL(pressed()), this, SLOT(blockClicked()));
    connect(ui->txButton, SIGNAL(pressed()), this, SLOT(txClicked()));
}
Beispiel #3
0
Board::Board(QWidget *parent, LVL lvl):QFrame(parent), lvl(lvl), animation(0)
{
	this->setParent(parent);

	this->setFixedSize(DIM*BUT_SIZE,DIM*BUT_SIZE);
	this->orgImg = new QPixmap(":/img.jpg");
	int j=0;
	for (int i=0; i<DIM*DIM-1; i++) {
		this->blocks[i] = new Block(this, QPixmap(orgImg->copy((i%DIM)*BUT_SIZE,
															 j*BUT_SIZE,BUT_SIZE,
															 BUT_SIZE)), i, i%DIM, j);
		this->blocks[i]->setGeometry((i%DIM)*BUT_SIZE, j*BUT_SIZE, BUT_SIZE,
							   BUT_SIZE);
		connect(blocks[i],SIGNAL(clicked()), this, SLOT(blockClicked()));
		if ((i%DIM)+1 == DIM)
			j++;
	}

	this->emptyBl = new Block(this, QPixmap(), DIM*DIM-1, DIM-1, DIM-1);
	this->emptyBl->setVisible(0);

	this->orgImg->~QPixmap();
}