Commit 9640713917e9c041e75f931f7e5876aefd8c065b

Authored by 김태훈
1 parent 99bdfc5567
Exists in master and in 2 other branches fhd, fhd-demo

길게 눌러 팝업이 뜬 상태로 다시 이벤트가 발생하는 문제 회피

app/gui/oven_control/cookpanelbutton.cpp
... ... @@ -74,6 +74,13 @@ void CookPanelButton::setLongPressEnabled(bool enabled)
74 74 longPressEnabled = enabled;
75 75 }
76 76  
  77 +void CookPanelButton::setEnabled(bool enabled)
  78 +{
  79 + ui->pushButton->setEnabled(enabled);
  80 + ui->showInfoButton->setEnabled(enabled);
  81 + ui->deleteButton->setEnabled(enabled);
  82 +}
  83 +
77 84 void CookPanelButton::emitLongPressed()
78 85 {
79 86 emitted = true;
... ...
app/gui/oven_control/cookpanelbutton.h
... ... @@ -39,6 +39,9 @@ public:
39 39  
40 40 CookRecord record;
41 41  
  42 +public slots:
  43 + void setEnabled(bool enabled = true);
  44 +
42 45 private slots:
43 46 void emitLongPressed();
44 47  
... ...
app/gui/oven_control/programmingwindow.cpp
... ... @@ -180,8 +180,11 @@ void ProgrammingWindow::onDeleteButtonClicked(CookPanelButton *panelButton)
180 180  
181 181 void ProgrammingWindow::onLongPressed(CookPanelButton *panelButton)
182 182 {
  183 + panelButton->setEnabled(false);
  184 +
183 185 ProgrammingNamePopup *p = new ProgrammingNamePopup(this, panelButton->record);
184 186 connect(p, SIGNAL(changed()), SLOT(updateView()));
  187 + connect(p, SIGNAL(destroyed(QObject*)), panelButton, SLOT(setEnabled()));
185 188 p->showFullScreen();
186 189 }
187 190  
... ...