Skip to content

Commit

Permalink
Ventana del Arbol
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacporras committed Mar 2, 2018
1 parent cb42d88 commit 9cf2217
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 3 deletions.
9 changes: 6 additions & 3 deletions StructureVisualizator.pro
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ SOURCES += \
mainwindow.cpp \
listasimple.cpp \
enlazadadoble.cpp \
viewcircularlist.cpp
viewcircularlist.cpp \
viewtree.cpp

HEADERS += \
mainwindow.h \
Expand All @@ -40,13 +41,15 @@ HEADERS += \
nododobleenlazado.h \
viewcircularlist.h \
circularlist.h \
nodolistacircular.h
nodolistacircular.h \
viewtree.h

FORMS += \
mainwindow.ui \
listasimple.ui \
enlazadadoble.ui \
viewcircularlist.ui
viewcircularlist.ui \
viewtree.ui

RESOURCES += \
photos.qrc
8 changes: 8 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "listasimple.h"
#include "enlazadadoble.h"
#include "viewcircularlist.h"
#include "viewtree.h"

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
Expand Down Expand Up @@ -39,3 +40,10 @@ void MainWindow::on_ButtonCircular_clicked()
ventanacircular.setModal(true);
ventanacircular.exec();
}

void MainWindow::on_ButtonArbol_clicked()
{
ViewTree ventanaArbol;
ventanaArbol.setModal(true);
ventanaArbol.exec();
}
2 changes: 2 additions & 0 deletions mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ private slots:

void on_ButtonCircular_clicked();

void on_ButtonArbol_clicked();

private:
Ui::MainWindow *ui;
};
Expand Down
14 changes: 14 additions & 0 deletions viewtree.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "viewtree.h"
#include "ui_viewtree.h"

ViewTree::ViewTree(QWidget *parent) :
QDialog(parent),
ui(new Ui::ViewTree)
{
ui->setupUi(this);
}

ViewTree::~ViewTree()
{
delete ui;
}
22 changes: 22 additions & 0 deletions viewtree.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef VIEWTREE_H
#define VIEWTREE_H

#include <QDialog>

namespace Ui {
class ViewTree;
}

class ViewTree : public QDialog
{
Q_OBJECT

public:
explicit ViewTree(QWidget *parent = 0);
~ViewTree();

private:
Ui::ViewTree *ui;
};

#endif // VIEWTREE_H
114 changes: 114 additions & 0 deletions viewtree.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ViewTree</class>
<widget class="QDialog" name="ViewTree">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>824</width>
<height>481</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>40</x>
<y>30</y>
<width>91</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Arbol Binario:</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>30</x>
<y>110</y>
<width>60</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Insertar:</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>30</x>
<y>250</y>
<width>60</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Eliminar:</string>
</property>
</widget>
<widget class="QLineEdit" name="LabelInsertar">
<property name="geometry">
<rect>
<x>90</x>
<y>110</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="LabelEliminar">
<property name="geometry">
<rect>
<x>90</x>
<y>250</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="InsertarButton">
<property name="geometry">
<rect>
<x>200</x>
<y>110</y>
<width>41</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>OK</string>
</property>
</widget>
<widget class="QPushButton" name="EliminarButton">
<property name="geometry">
<rect>
<x>200</x>
<y>250</y>
<width>41</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>OK</string>
</property>
</widget>
<widget class="QGraphicsView" name="graphicsView">
<property name="geometry">
<rect>
<x>290</x>
<y>20</y>
<width>501</width>
<height>411</height>
</rect>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

0 comments on commit 9cf2217

Please sign in to comment.