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