Changeset fff253e in subsurface


Ignore:
Timestamp:
Apr 30, 2017, 12:44:58 PM (8 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
d5af6cab
Parents:
9084bba
git-author:
Stefan Fuchs <sfuchs@…> (04/30/17 11:31:56)
git-committer:
Dirk Hohndel <dirk@…> (04/30/17 12:44:58)
Message:

Picture feature: Improve UI and translation of shift image times dialog

For the list of pictures with inappropriate date/time not fitting with
the dive time use a QTextEdit in read only mode with scroll bars
enabled instead of a QLabel.
Also update and translate some strings used there.

Signed-off-by: Stefan Fuchs <sfuchs@…>

Location:
desktop-widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/shiftimagetimes.ui

    re49d621 rfff253e  
    1111    <y>0</y>
    1212    <width>693</width>
    13     <height>606</height>
     13    <height>600</height>
    1414   </rect>
    1515  </property>
     
    140140      </item>
    141141      <item>
    142        <widget class="QLabel" name="invalidLabel">
     142       <widget class="QTextEdit" name="invalidFilesText">
    143143        <property name="styleSheet">
    144144         <string notr="true">color: red; </string>
    145145        </property>
    146         <property name="text">
     146        <property name="lineWrapMode">
     147         <enum>QTextEdit::NoWrap</enum>
     148        </property>
     149        <property name="readOnly">
     150         <bool>true</bool>
     151        </property>
     152        <property name="text" stdset="0">
    147153         <string/>
    148154        </property>
  • desktop-widgets/simplewidgets.cpp

    r9021a44 rfff253e  
    381381        bool allValid = true;
    382382        ui.warningLabel->hide();
    383         ui.invalidLabel->hide();
     383        ui.invalidFilesText->hide();
    384384        QDateTime time = QDateTime::fromTime_t(displayed_dive.when, Qt::UTC);
    385         ui.invalidLabel->setText("Dive:" + time.toString() + "\n");
     385        ui.invalidFilesText->setPlainText(tr("Dive date/time") + ": " + time.toString() + "\n");
     386        ui.invalidFilesText->append(tr("Files with inappropriate date/time") + ":");
    386387
    387388        Q_FOREACH (const QString &fileName, fileNames) {
     
    392393                timestamp = picture_get_timestamp(fileName.toUtf8().data());
    393394                time.setTime_t(timestamp + m_amount);
    394                 ui.invalidLabel->setText(ui.invalidLabel->text() + fileName + " " + time.toString() + "\n");
     395                ui.invalidFilesText->append(fileName + " " + time.toString());
    395396                allValid = false;
    396397        }
     
    398399        if (!allValid){
    399400                ui.warningLabel->show();
    400                 ui.invalidLabel->show();
     401                ui.invalidFilesText->show();
    401402        }
    402403}
Note: See TracChangeset for help on using the changeset viewer.