-
Notifications
You must be signed in to change notification settings - Fork 4
/
mycell.cpp
106 lines (88 loc) · 2.42 KB
/
mycell.cpp
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/**
* @file mycell.cpp
* This Class defines a table cell item.
* @brief Source file for MyCell class definition.
*
* This class implements a QTableWidgetItem with a specific tags, text alignment and color.
*
* @author Plinio Andrade <PAndrade@fele.com>
* @version 1.0.0.0 (Qt: 5.3.1)
*/
#include "mycell.h"
#include <QMouseEvent>
MyCell::MyCell(const QString &text)
{
//QTableWidgetItem(1001);
this->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
this->setTextAlignment(Qt::AlignCenter);
this->setText(text);
this->setFlags(this->flags()|Qt::ItemIsDragEnabled|Qt::ItemIsDropEnabled);
this->MyCellParent = 0;
this->children = new QList<MyCell *>;
}
void MyCell::setApptID(int id){
this->apptID = id;
}
int MyCell::getApptID(){
return this->apptID;
}
void MyCell::setApptStylistID(int stylistID){
this->apptStylistID = stylistID;
}
int MyCell::getApptStylistID(){
return this->apptStylistID;
}
void MyCell::setApptStylistName(QString stylistName){
this->apptStylistName = new QString (stylistName);
}
void MyCell::setApptServiceName(QString serviceName){
this->apptServiceName = new QString (serviceName);
}
void MyCell::setApptDetails(QString details){
this->apptDetails = new QString (details);
}
void MyCell::setApptCustomerName(QString customerName){
this->apptCustomerName = new QString (customerName);
}
void MyCell::setApptBeginTime (QString beginTime){
this->apptBeginTime = new QString (beginTime);
}
void MyCell::setApptEndTime (QString endTime){
this->apptEndTime = new QString (endTime);
}
QString MyCell::getApptStylistName(){
return *this->apptStylistName;
}
QString MyCell::getApptServiceName(){
return *this->apptServiceName;
}
QString MyCell::getApptDetails(){
return *this->apptDetails;
}
QString MyCell::getApptCustomerName(){
return *this->apptCustomerName;
}
QString MyCell::getApptBeginTime(){
return *this->apptBeginTime;
}
QString MyCell::getApptEndTime(){
return *this->apptEndTime;
}
/*
void MyCell::dropEvent(QDropEvent *event)
{
QTableWidget::dropEvent(event);
}
void MyCell::dragMoveEvent(QDragMoveEvent *event)
{
QTableWidget::dragMoveEvent(event);
}
void MyCell::dragEnterEvent(QDragEnterEvent *event)
{
QTableWidget::dragEnterEvent(event);
}
bool MyCell::dropMimeData(int row, int column, const QMimeData *data, Qt::DropAction action)
{
return QTableWidget::dropMimeData(row, column, data, action);
}
*/