-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewtree.h
57 lines (52 loc) · 1.34 KB
/
viewtree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef VIEWTREE_H
#define VIEWTREE_H
#include "binarytree.h"
#include "QGraphicsScene"
#include "treenode.h"
#include <QDialog>
/**
*@file viewtree.h
* @version 1.0
* @date 5/3/18
* @author Oscar Isaac Porras Perez
* @title ViewTree
* @brief contiene todo lo referente a la ventana del arbol binario
*/
namespace Ui {
class ViewTree;
}
/**
* @brief The ViewTree class clase que se encarga de la ventana del Arbol binario
*/
class ViewTree : public QDialog
{
Q_OBJECT
public:
explicit ViewTree(QWidget *parent = 0);
~ViewTree();
private slots:
/**
* @brief on_InsertarButton_clicked inserta un nodo en el arbol
*/
void on_InsertarButton_clicked();
/**
* @brief on_EliminarButton_clicked elimina un nodo en el arbol
*/
void on_EliminarButton_clicked();
/**
* @brief recorreDibuja dibuja el arbol entero en el recuadro
* @param nodo el nodo que se va a dibujar
* @param corx la cordenada en x donde se va a dibujar
* @param cory la coordenada en y donde se va a dibujar
* @param lado si el nodo es del lado derecho o izquierdo
*/
void recorreDibuja(TreeNode *nodo, int corx, int cory, QString lado);
private:
Ui::ViewTree *ui;
BinaryTree *arbol;
QGraphicsScene *scene;
int coordenadax;
int coordenaday;
bool sedibujoantes;
};
#endif // VIEWTREE_H