猫阅览界面

master
p54670231 4 years ago
parent 091041c4bb
commit 788fb97403

@ -0,0 +1,102 @@
#include "cat_book.h"
#include "ui_cat_book.h"
#include "book.h"
#include "puppet_cat.h"
#include "li_cat.h"
#include "english_short_blue_cat.h"
#include "silver_gradient.h"
#include "canadian_hairless.h"
#include "siamese_cat.h"
Cat_book::Cat_book(QWidget *parent) :
QWidget(parent),
ui(new Ui::Cat_book)
{
ui->setupUi(this);
QPixmap myPix(":/image/资料阅览-2-猫猫背景.png");
ui->cat_sample->setPixmap(myPix);
ui->cat_sample->setScaledContents(true);
ui->cat_sample->show();
ui->puppet_cat->setStyleSheet("QPushButton{border-radius:5px;background:rgb(250,234,142);color:black;}");
ui->Li_cat->setStyleSheet("QPushButton{border-radius:5px;background:rgb(250,234,142);color:black;}");
ui->silver_gradient->setStyleSheet("QPushButton{border-radius:5px;background:rgb(250,234,142);color:black;}");
ui->Siamese_cat->setStyleSheet("QPushButton{border-radius:5px;background:rgb(250,234,142);color:black;}");
ui->English_blue_short_cat->setStyleSheet("QPushButton{border-radius:5px;background:rgb(250,234,142);color:black;}");
ui->Canadian_hairless->setStyleSheet("QPushButton{border-radius:5px;background:rgb(250,234,142);color:black;}");
}
Cat_book::~Cat_book()
{
delete ui;
}
void Cat_book::cat_book_set_background()
{
this->setWindowTitle("阅览界面-猫");
// ui->label->setStyleSheet("background-color:red");//背景色
this->setMinimumSize(1280,720);
this->setMaximumSize(1280,720);
this->setAutoFillBackground(true);
QPalette palette;
QPixmap pixmap = QPixmap(":/image/背景_book.png").scaled(this->size());
palette.setBrush(QPalette::Window, QBrush(pixmap));
this->setPalette(palette);
}
void Cat_book::on_go_back_clicked()
{
Book* to_book1 = new Book;
to_book1->book_set_background();
to_book1->show();
delete this;
}
void Cat_book::on_puppet_cat_clicked()
{
Puppet_cat *to_puppet = new Puppet_cat;
to_puppet->puppet_cat_set_background();
to_puppet->show();
delete this;
}
void Cat_book::on_Li_cat_clicked()
{
Li_cat *to_li_cat = new Li_cat;
to_li_cat->li_cat_set_background();
to_li_cat->show();
delete this;
}
void Cat_book::on_English_blue_short_cat_clicked()
{
English_short_blue_cat *new_cat = new English_short_blue_cat;
new_cat->set_background();
new_cat->show();
delete this;
}
void Cat_book::on_silver_gradient_clicked()
{
Silver_gradient *new_silver = new Silver_gradient;
new_silver->silver_book_set_background();
new_silver->show();
delete this;
}
void Cat_book::on_Canadian_hairless_clicked()
{
Canadian_hairless *new_canadian = new Canadian_hairless;
new_canadian->canadian_book_set_background();
new_canadian->show();
delete this;
}
void Cat_book::on_Siamese_cat_clicked()
{
Siamese_cat *new_Cat = new Siamese_cat;
new_Cat->siamese_book_set_background();
new_Cat->show();
delete this;
}
Loading…
Cancel
Save