void RenderPanel::update(const QImage& screen) { fundolb->setPixmap(QPixmap::fromImage(screen)); fundolb->show(); repaint(); emit atualizaMain(); }
MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); fila = new CommandQueue(); centralpanel = new RenderPanel(fila, this); setCentralWidget(centralpanel); connect(ui->toolBar, SIGNAL(actionTriggered( QAction * )), this, SLOT(clicou(QAction*))); connect(ui->actionBondary, SIGNAL(toggled(bool)), this, SLOT(bondaryClick(bool))); connect(centralpanel, SIGNAL(atualizaMain()), this, SLOT(update())); setFixedSize(800, 600); }