@@ -83,17 +83,17 @@ Schedule::Schedule(QWidget*parent): ScreenWidget(parent) {
83
83
84
84
// in absence add mode
85
85
QObject::connect (calendar, &QTableWidget::cellClicked, this , [&](){
86
- coordinator->dayOfWeek = calendar->currentRow ();
87
- coordinator->hourStart = calendar->currentColumn ();
88
- auto item = calendar->item (coordinator->dayOfWeek , coordinator->hourStart );
89
- if (!item) {
90
- qDebug () << " ITEM IS NOT SELECTED!!!" ;
91
- notDeletable.show ();
92
- return ;
93
- }
86
+ qDebug ()<< " cell clicked" ;
94
87
if (isAbsenceMode == true ){
95
- coordinator->showInputAbsence (new InputAbsenceData (" Petr" ));
88
+ qDebug ()<< " if statement triggered" ;
89
+ dayOfWeek = calendar->currentRow ();
90
+ hourStart = calendar->currentColumn ();
91
+ qDebug () << " variables set" ;
92
+ // crashes here
93
+ coordinator->showInputAbsence (new InputAbsenceData (QString::number (hourStart, dayOfWeek)));
94
+ qDebug () << " show input absence called" ;
96
95
emit sendImputAbsenceData ();
96
+ qDebug () <<" signal emited" ;
97
97
}else {
98
98
return ;
99
99
}
@@ -155,6 +155,15 @@ Schedule::Schedule(QWidget*parent): ScreenWidget(parent) {
155
155
}
156
156
});
157
157
158
+ for (int i = 0 ; i < 5 ; i++){
159
+ for (int j = 0 ; j <10 ;j++){
160
+ auto item = calendar->item (i, j);
161
+ if (!item){
162
+ calendar->setItem (i,j,new QTableWidgetItem (" " ));
163
+ }
164
+ }
165
+ qDebug () << " ROW " << i <<" SET" ;
166
+ }
158
167
// void scheduleAbsenceOpened();
159
168
160
169
deleteItemButton->hide ();
@@ -363,6 +372,6 @@ bool Schedule::exeptionForAdd(){
363
372
364
373
}
365
374
366
- void Schedule::configure (ShowBasicData*) {
375
+ void Schedule::configure (ShowBasicData*, ShowBasicData2 * ) {
367
376
368
377
}
0 commit comments