-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrmpriorityqueue.h
More file actions
47 lines (34 loc) · 945 Bytes
/
frmpriorityqueue.h
File metadata and controls
47 lines (34 loc) · 945 Bytes
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
#ifndef FRMPRIORITYQUEUE_H
#define FRMPRIORITYQUEUE_H
#include "binarytreebalanced.h"
#include <QWidget>
#include <QGraphicsScene>
#include "heap.h"
namespace Ui {
class frmPriorityQueue;
}
class frmPriorityQueue : public QWidget
{
Q_OBJECT
public:
explicit frmPriorityQueue(QWidget *parent = 0, bool byMin=true);
~frmPriorityQueue();
private slots:
void on_cmdAddItem_clicked();
void on_tblHeap_clicked(const QModelIndex &index);
void on_cmdDelete_clicked();
void on_cmdClear_clicked();
void on_cmdPurgeQueue_clicked();
void on_tblHeap_cellChanged(int row, int column);
void on_tblHeap_cellEntered(int row, int column);
private:
Ui::frmPriorityQueue *ui;
QGraphicsScene* scene;
collections::Heap<TreeNode*> heap;
BinaryTreeBalanced* tree;
size_t itemSelected;
void drawTable();
void drawTree();
void writeLog(std::string log);
};
#endif // FRMPRIORITYQUEUE_H