Changeset e4dcafe in confclerk_git


Ignore:
Timestamp:
07/28/21 23:42:09 (10 months ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master
Children:
31d8a4c
Parents:
5b7fa79
Message:

Save adjusted displayTimeShift to database.

Location:
src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gui/conferenceeditor.cpp

    r5b7fa79 re4dcafe  
    5151    connect(refreshBtn, SIGNAL(clicked()), SLOT(refreshClicked()));
    5252    connect(buttonBox, SIGNAL(rejected()), SLOT(close()));
     53    connect(conferenceDtsHours, SIGNAL(valueChanged(int)), SLOT(dtsChanged()));
     54    connect(conferenceDtsMinutes, SIGNAL(valueChanged(int)), SLOT(dtsChanged()));
    5355
    5456    // it's OK to emit selection signals here
     
    103105            conferenceUtcOffset->setText("N/A");
    104106        }
     107        int dts = conf.displayTimeShift();
     108        conferenceDtsHours->setValue(dts / 60);
     109        conferenceDtsMinutes->setValue(abs(dts) % 60);
    105110        conferenceInfo->setCurrentIndex(0);
    106111        removeBtn->show();
     
    167172    importStarted(); // just to show the progress bar
    168173    emit haveConferenceUrl(url, selected_id);
     174}
     175
     176void ConferenceEditor::dtsChanged() {
     177    if (selected_id < 0) return;
     178    Conference& conference = model->conferenceFromIndex(model->indexFromId(selected_id));
     179    int minutes = conferenceDtsMinutes->value();
     180    if (conferenceDtsHours->value() < 0) minutes *= -1;
     181    conference.setDisplayTimeShift(conferenceDtsHours->value() * 60 + minutes);
    169182}
    170183
  • src/gui/conferenceeditor.h

    r5b7fa79 re4dcafe  
    6565    void changeUrlClicked();
    6666    void refreshClicked();
     67    void dtsChanged();
    6768
    6869private:
Note: See TracChangeset for help on using the changeset viewer.