-
Notifications
You must be signed in to change notification settings - Fork 0
/
widget.h
68 lines (57 loc) · 1.77 KB
/
widget.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
58
59
60
61
62
63
64
65
66
67
68
#ifndef WIDGET_H
#define WIDGET_H
#include <QtGui/QWidget>
#include <QList>
#include "solucao.h"
#include "task.h"
#include "mylabel.h"
#include <QDate>
//namespace Ui
//{
// class WidgetClass;
//}
QT_BEGIN_NAMESPACE
class QDragEnterEvent;
class QDropEvent;
QT_END_NAMESPACE
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(Scheduling scheduling = Scheduling::SchedulingVazia(),QWidget *parent = 0);
void desenharTrabalhos(QDate data);
int getIntervaloInicio(){return intervalo_inicio;}
int getIntervaloFim(){return intervalo_fim;}
QDate getDataAtual(){return data_atual;}
//~Widget();
public slots:
void redraw(int data_offset);
void redrawZoom(int newzoom);
void redrawDate(QDate data);
void redrawIntervalBegin(int value);
void redrawIntervalEnd(int value);
// void desenhaLinhas();
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
void paintEvent(QPaintEvent *event);
private:
QString Widget::gerarToolTip(Task trabalho);
Scheduling scheduling;
int tamanho_vertical; //definido pelo construtor
int tamanho_horizontal;
int y_teto; //define distância entre topo do widget e o desenho do gráfico. é relativo às barras
int escala;
int posicao_zero; //define posição zero para o grafico de gantt
//variáveis utilizadas pra escrever as datas na linha do tempo
QDate data_atual; //data atual do programa, utilizado como referência pra mostrar para o usuário
QDate data_inicio;
QDate data_fim;
int dias;
int intervalo_inicio;
int intervalo_fim;
//private:
//Ui::WidgetClass *ui;
};
#endif // WIDGET_H