| 200 | } |
| 201 | |
| 202 | void |
| 203 | KnobGuiFile::updateGUI(int /*dimension*/) |
| 204 | { |
| 205 | KnobFilePtr knob = _knob.lock(); |
| 206 | |
| 207 | _lineEdit->setText( QString::fromUtf8( knob->getValue().c_str() ) ); |
| 208 | |
| 209 | bool useNotifications = appPTR->getCurrentSettings()->notifyOnFileChange(); |
| 210 | if ( useNotifications && knob->getHolder() && knob->getEvaluateOnChange() ) { |
| 211 | std::string newValue = knob->getFileName( knob->getCurrentTime(), ViewIdx(0) ); |
| 212 | if ( knob->getHolder()->getApp() ) { |
| 213 | knob->getHolder()->getApp()->getProject()->canonicalizePath(newValue); |
| 214 | } |
| 215 | QString file( QString::fromUtf8( newValue.c_str() ) ); |
| 216 | |
| 217 | //The sequence probably changed, clear modification dates |
| 218 | _lastModificationDates.clear(); |
| 219 | |
| 220 | if ( QFile::exists(file) ) { |
| 221 | //If the file exists at the current time, set the modification date in the tooltip |
| 222 | QFileInfo info(file); |
| 223 | QDateTime dateTime = info.lastModified(); |
| 224 | |
| 225 | _lastModificationDates[newValue] = dateTime; |
| 226 | |
| 227 | QString tt = toolTip(); |
| 228 | tt.append( QString::fromUtf8("\n\nLast modified: ") ); |
| 229 | tt.append( dateTime.toString(Qt::SystemLocaleShortDate) ); |
| 230 | _lineEdit->setToolTip(tt); |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | void |
| 236 | KnobGuiFile::onTimelineFrameChanged(SequenceTime time, |
nothing calls this directly
no test coverage detected