Mercurial > hg > svgui
comparison layer/ImageLayer.cpp @ 378:22b72f0f6a4e
* More work to abstract out interactive components used in the data library,
so that it does not need to depend on QtGui.
author | Chris Cannam |
---|---|
date | Fri, 14 Mar 2008 17:14:21 +0000 |
parents | e1a9e478b7f2 |
children | 69089c9dc42e |
comparison
equal
deleted
inserted
replaced
377:0bcb449d15f4 | 378:22b72f0f6a4e |
---|---|
22 | 22 |
23 #include "data/model/ImageModel.h" | 23 #include "data/model/ImageModel.h" |
24 #include "data/fileio/FileSource.h" | 24 #include "data/fileio/FileSource.h" |
25 | 25 |
26 #include "widgets/ImageDialog.h" | 26 #include "widgets/ImageDialog.h" |
27 #include "widgets/ProgressDialog.h" | |
27 | 28 |
28 #include <QPainter> | 29 #include <QPainter> |
29 #include <QMouseEvent> | 30 #include <QMouseEvent> |
30 #include <QInputDialog> | 31 #include <QInputDialog> |
31 #include <QMutexLocker> | 32 #include <QMutexLocker> |
910 | 911 |
911 if (m_remoteFiles.find(img) != m_remoteFiles.end()) { | 912 if (m_remoteFiles.find(img) != m_remoteFiles.end()) { |
912 return; | 913 return; |
913 } | 914 } |
914 | 915 |
915 FileSource *rf = new FileSource(img, FileSource::ProgressDialog); | 916 ProgressDialog dialog(tr("Opening image URL..."), true, 2000); |
917 FileSource *rf = new FileSource(img, &dialog); | |
916 if (rf->isOK()) { | 918 if (rf->isOK()) { |
917 std::cerr << "ok, adding it (local filename = " << rf->getLocalFilename().toStdString() << ")" << std::endl; | 919 std::cerr << "ok, adding it (local filename = " << rf->getLocalFilename().toStdString() << ")" << std::endl; |
918 m_remoteFiles[img] = rf; | 920 m_remoteFiles[img] = rf; |
919 connect(rf, SIGNAL(ready()), this, SLOT(remoteFileReady())); | 921 connect(rf, SIGNAL(ready()), this, SLOT(remoteFileReady())); |
920 } else { | 922 } else { |