tychoBCGEN  0.5
 All Data Structures Namespaces Files Functions Variables
tutorial.cpp
Go to the documentation of this file.
1 
5 #include "tutorial.h"
6 #include "global.h"
7 #include "ui_tutorial.h"
8 
9 
10 tutorial::tutorial(QWidget *parent) :
11  QDialog(parent),
12  ui(new Ui::tutorial)
13 {
14  ui->setupUi(this);
15 
16  QString file("./images/workflow.png");
17 
18  connect(ui->close, SIGNAL(clicked()), this, SLOT(close()));
19 
20  image_tutorial.load(file);
21  pixmap_tutorial = QPixmap::fromImage(image_tutorial);
22  if (image_tutorial.width() > 0){
23  scene_tutorial = new QGraphicsScene;
24  scene_tutorial->addPixmap(pixmap_tutorial);
25  ui->graphicsView->setScene(scene_tutorial);
26  ui->graphicsView->setDragMode(ui->graphicsView->ScrollHandDrag);
27  }
28 
29 }
30 
32 {
33  delete ui;
34 }
35 
36 
37 void tutorial::resizeEvent(QResizeEvent *){
38 
39  int width = tutorial::width();
40  int heigth = tutorial::height();
41 
42  ui->close->setGeometry(width-100, heigth-50, 86, 25);
43 
44  ui->textBrowser->setGeometry(10, 10, width/2-200, heigth-75);
45  ui->graphicsView->setGeometry(width/2-180,10, width/2+170, heigth-75);
46 
47 }