示例#1
0
void CoreDbWatch::sendImageChange(const ImageChangeset& cset)
{
    // send local signal
    emit imageChange(cset);
#ifdef HAVE_DBUS
    // send DBUS signal
    emit imageChange(d->databaseId, d->applicationId, cset);
#endif
}
示例#2
0
MapViewModelHelper::MapViewModelHelper(QItemSelectionModel* const selection,
                                       DCategorizedSortFilterProxyModel* const filterModel,
                                       QObject* const parent,
                                       const MapWidgetView::Application application)
    : GeoIface::ModelHelper(parent),
      d(new Private())
{
    d->selectionModel = selection;
    d->application    = application;

    switch (d->application)
    {
        case MapWidgetView::ApplicationDigikam:
            d->model               = dynamic_cast<ImageFilterModel*>(filterModel);
            d->thumbnailLoadThread = new ThumbnailLoadThread(this);

            connect(d->thumbnailLoadThread, SIGNAL(signalThumbnailLoaded(LoadingDescription, QPixmap)),
                    this, SLOT(slotThumbnailLoaded(LoadingDescription, QPixmap)));

            // Note: Here we only monitor changes to the database, because changes to the model
            //       are also sent when thumbnails are generated, and we don't want to update
            //       the marker tiler for that!
            connect(CoreDbAccess::databaseWatch(), SIGNAL(imageChange(ImageChangeset)),
                    this, SLOT(slotImageChange(ImageChangeset)), Qt::QueuedConnection);
            break;

        case MapWidgetView::ApplicationImportUI:
            d->importModel = dynamic_cast<ImportFilterModel*>(filterModel);

            connect(ImportUI::instance()->getCameraThumbsCtrl(), SIGNAL(signalThumbInfoReady(CamItemInfo)),
                    this, SLOT(slotThumbnailLoaded(CamItemInfo)));

            break;
    }
}
示例#3
0
void CoreDbWatch::slotImageChangeDBus(const QString& databaseIdentifier,
                                      const QString& applicationIdentifier,
                                      const ImageChangeset& changeset)
{
    if (applicationIdentifier != d->applicationId &&
        databaseIdentifier    == d->databaseId)
    {
        emit imageChange(changeset);
    }
}
void GraphicImageEffectElement::setInputElement(GraphicElement *ge)
{
	switch(ge->type()){
//		case DotMatrix::DotMatrixType:{
//			DotMatrix *dm = dynamic_cast<DotMatrix*>(ge);
//			dm->setOutputElement(this);
//			connect(dm, SIGNAL(statusChanged(QVector<int>)), SLOT(onDotMatrixStatusChanged(QVector<int>)));
//			break;
//		}
		case GraphicImageElement::GraphicImageElementType:{
			GraphicImageElement *gie = dynamic_cast<GraphicImageElement*>(ge);
			gie->setOutputElement(this);
			connect(gie, SIGNAL(imageChange(QImage)), SLOT(onInputImageChanged(QImage)));
			onInputImageChanged(gie->getImage());
			break;
		}
	}
	inputElement = ge;
}