void TagFilterModel::setUserData(UserData *userData) { if(p->userData == userData) return; if(p->userData) disconnect(p->userData, SIGNAL(tagsChanged(QString)), this, SLOT(refresh())); p->userData = userData; if(p->userData) connect(p->userData, SIGNAL(tagsChanged(QString)), this, SLOT(refresh())); Q_EMIT userDataChanged(); refresh(); }
void TagEditor::setTags(const QList<Nepomuk2::Tag>& tags) { if( m_tagList == tags ) return; m_tagList = tags; clear(); if( m_tagList.isEmpty() ) return; // Update the string QStringList list; foreach( const Nepomuk2::Tag &tag, m_tagList ) list << tag.genericLabel(); setPlainText( list.join(QLatin1String(", ")) ); QTextCursor tc = textCursor(); tc.movePosition( QTextCursor::EndOfLine ); tc.insertText( QLatin1String(", ") ); setTextCursor( tc ); emit tagsChanged( m_tagList ); }
void MrimContact::setContactInList(bool inList) { if (p->inList == inList) return; QStringList groups = tags(); p->inList = inList; emit inListChanged(inList); emit tagsChanged(tags(), groups); }
void MrimContact::setGroupId(quint32 id) { if (id > MRIM_MAX_GROUPS && id != MRIM_PHONE_GROUP_ID) { id = MRIM_DEFAULT_GROUP_ID; } QStringList oldTags = tags(); p->groupId = id; emit tagsChanged(tags(), oldTags); }
void VContact::setContactTags(const QStringList& tags) { Q_D(VContact); if (d->tags != tags) { QStringList previous = d->tags; d->tags = tags; emit tagsChanged(tags, previous); } }
void JContact::setContactTags(const QStringList &tags) { Q_D(JContact); if (d->tags == tags) return; QStringList previous = d->tags; d->tags = tags; emit tagsChanged(tags, previous); }
void ChilitagsDetection::setTags(const std::map<std::string, cv::Matx44d> &tags) { m_tags.clear(); for (auto tag : tags) { // manual conversion from float[16] to double[16] float values[16]; for (int i = 0; i<16; ++i) values[i] = tag.second.val[i]; m_tags.insert(QString::fromStdString(tag.first), QMatrix4x4(values)); } emit tagsChanged(m_tags); }
TimerWidget::TimerWidget(QWidget *parent) : QFrame(parent), ui(new Ui::TimerWidget), timer(new QTimer(this)), duration(0), project(""), tagsHolder(""), timeEntryAutocompleteNeedsUpdate(false), descriptionModel(new AutocompleteListModel(this)), timeEntry(nullptr), selectedTaskId(0), selectedProjectId(0) { ui->setupUi(this); ui->start->installEventFilter(this); connect(TogglApi::instance, SIGNAL(displayStoppedTimerState()), this, SLOT(displayStoppedTimerState())); connect(TogglApi::instance, SIGNAL(displayRunningTimerState(TimeEntryView*)), // NOLINT this, SLOT(displayRunningTimerState(TimeEntryView*))); // NOLINT connect(TogglApi::instance, SIGNAL(displayMinitimerAutocomplete(QVector<AutocompleteView*>)), // NOLINT this, SLOT(displayMinitimerAutocomplete(QVector<AutocompleteView*>))); // NOLINT connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)), this, SLOT(focusChanged(QWidget*, QWidget*))); connect(timer, SIGNAL(timeout()), this, SLOT(timeout())); connect(ui->description, SIGNAL(returnPressed()), this, SLOT(descriptionReturnPressed())); connect(ui->description, SIGNAL(projectSelected(QString,uint64_t,QString,QString,uint64_t)), this, SLOT(descriptionProjectSelected(QString,uint64_t,QString,QString,uint64_t))); connect(ui->description, SIGNAL(billableChanged(bool)), this, SLOT(descriptionBillableChanged(bool))); connect(ui->description, SIGNAL(tagsChanged(QString)), this, SLOT(descriptionTagsChanged(QString))); connect(ui->description, &QComboBox::editTextChanged, this, &TimerWidget::updateCoverLabel); connect(ui->deleteProject, &QPushButton::clicked, this, &TimerWidget::clearProject); connect(ui->deleteTask, &QPushButton::clicked, this, &TimerWidget::clearTask); ui->description->setModel(descriptionModel); ui->taskFrame->setVisible(false); ui->projectFrame->setVisible(false); ui->billable->setVisible(false); ui->tags->setVisible(false); descriptionPlaceholder = "What are you doing?"; tagsHolder = ""; }
void TagEditor::addTag(const Nepomuk2::Tag& tag) { if( !m_tagList.contains( tag ) ) { m_tagList << tag; QTextCursor tc = textCursor(); tc.insertText( tag.genericLabel() + QLatin1String(", ") ); tc.movePosition( QTextCursor::EndOfLine ); setTextCursor( tc ); emit tagsChanged( m_tagList ); } }
TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstPad> pad) : m_index(index) , m_pad(pad) , m_owner(owner) { ASSERT(m_pad); g_signal_connect(m_pad.get(), "notify::active", G_CALLBACK(trackPrivateActiveChangedCallback), this); g_signal_connect(m_pad.get(), "notify::tags", G_CALLBACK(trackPrivateTagsChangedCallback), this); // We can't call notifyTrackOfTagsChanged() directly, because we need tagsChanged() // to setup m_tags. tagsChanged(); }
void UserData::addTag(const QString &t) { const QString &tag = t.toLower(); if(p->tags.contains(tag)) return; QSqlQuery mute_query(p->db); mute_query.prepare("INSERT OR REPLACE INTO tags (tag) VALUES (:tag)"); mute_query.bindValue(":tag",tag); mute_query.exec(); CHECK_QUERY_ERROR(mute_query); p->tags.insert(tag, true); emit tagsChanged(tag); }
InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(gint index, GRefPtr<GstPad> pad) : InbandTextTrackPrivate(WebVTT) , m_index(index) , m_pad(pad) , m_sampleTimerHandler(0) , m_streamTimerHandler(0) , m_tagTimerHandler(0) { ASSERT(m_pad); m_eventProbe = gst_pad_add_probe(m_pad.get(), GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, reinterpret_cast<GstPadProbeCallback>(textTrackPrivateEventCallback), this, 0); /* We want to check these in case we got events before the track was created */ streamChanged(); tagsChanged(); }
void QGstreamerPlayerSession::load(const QNetworkRequest &request) { m_request = request; if (m_playbin) { m_tags.clear(); emit tagsChanged(); g_object_set(G_OBJECT(m_playbin), "uri", m_request.url().toEncoded().constData(), NULL); if (!m_streamTypes.isEmpty()) { m_streamProperties.clear(); m_streamTypes.clear(); emit streamsChanged(); } } }
void QGstreamerPlayerSession::load(const QUrl &url) { m_url = url; if (m_playbin) { m_tags.clear(); emit tagsChanged(); g_object_set(G_OBJECT(m_playbin), "uri", m_url.toEncoded().constData(), NULL); // if (!m_streamTypes.isEmpty()) { // m_streamProperties.clear(); // m_streamTypes.clear(); // // emit streamsChanged(); // } } }
void QGstreamerPlayerSession::updateVideoResolutionTag() { QSize size; QSize aspectRatio; GstPad *pad = gst_element_get_static_pad(m_videoIdentity, "src"); GstCaps *caps = gst_pad_get_negotiated_caps(pad); if (caps) { const GstStructure *structure = gst_caps_get_structure(caps, 0); gst_structure_get_int(structure, "width", &size.rwidth()); gst_structure_get_int(structure, "height", &size.rheight()); gint aspectNum = 0; gint aspectDenum = 0; if (!size.isEmpty() && gst_structure_get_fraction( structure, "pixel-aspect-ratio", &aspectNum, &aspectDenum)) { if (aspectDenum > 0) aspectRatio = QSize(aspectNum, aspectDenum); } gst_caps_unref(caps); } gst_object_unref(GST_OBJECT(pad)); QSize currentSize = m_tags.value("resolution").toSize(); QSize currentAspectRatio = m_tags.value("pixel-aspect-ratio").toSize(); if (currentSize != size || currentAspectRatio != aspectRatio) { if (aspectRatio.isEmpty()) m_tags.remove("pixel-aspect-ratio"); if (size.isEmpty()) { m_tags.remove("resolution"); } else { m_tags.insert("resolution", QVariant(size)); if (!aspectRatio.isEmpty()) m_tags.insert("pixel-aspect-ratio", QVariant(aspectRatio)); } emit tagsChanged(); } }
void QAndroidPlayerSession::load(const QNetworkRequest &request) { m_savedRequest = request; QUrl mediaUrl = request.url(); QString mediaPath = mediaUrl.path(); if(!mediaPath.isEmpty()) { QByteArray mediaPathByteArray = mediaPath.toLatin1(); m_rawDataPath = mediaPathByteArray.data(); if(!m_helper) { m_helper = new QAndroidVideoHelper(m_widget); } m_helper->doTheWork(2,0);; m_helper->setPath(mediaPath); m_helper->doTheWork(0,0); m_qduration = (qint64)QtMediaPlayerJNI::setQtMediaPlayer(this,m_uniqueID,mediaPath); emit durationChanged(m_qduration); m_metaDataRetriever.setDataSource(m_rawDataPath); emit tagsChanged(); } }
void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message) { GstMessage* gm = message.rawMessage(); if (gm == 0) { // Null message, query current position quint32 newPos = position(); if (newPos/1000 != m_lastPosition) { m_lastPosition = newPos/1000; emit positionChanged(newPos); } double volume = 1.0; g_object_get(G_OBJECT(m_playbin), "volume", &volume, NULL); if (m_volume != int(volume*100)) { m_volume = int(volume*100); emit volumeChanged(m_volume); } } else { //tag message comes from elements inside playbin, not from playbin itself if (GST_MESSAGE_TYPE(gm) == GST_MESSAGE_TAG) { //qDebug() << "tag message"; GstTagList *tag_list; gst_message_parse_tag(gm, &tag_list); gst_tag_list_foreach(tag_list, addTagToMap, &m_tags); //qDebug() << m_tags; emit tagsChanged(); } if (GST_MESSAGE_SRC(gm) == GST_OBJECT_CAST(m_playbin)) { switch (GST_MESSAGE_TYPE(gm)) { case GST_MESSAGE_STATE_CHANGED: { GstState oldState; GstState newState; GstState pending; gst_message_parse_state_changed(gm, &oldState, &newState, &pending); #ifdef DEBUG_PLAYBIN QStringList states; states << "GST_STATE_VOID_PENDING" << "GST_STATE_NULL" << "GST_STATE_READY" << "GST_STATE_PAUSED" << "GST_STATE_PLAYING"; qDebug() << QString("state changed: old: %1 new: %2 pending: %3") \ .arg(states[oldState]) \ .arg(states[newState]) \ .arg(states[pending]); #endif switch (newState) { case GST_STATE_VOID_PENDING: case GST_STATE_NULL: setSeekable(false); finishVideoOutputChange(); if (m_state != QMediaPlayer::StoppedState) emit stateChanged(m_state = QMediaPlayer::StoppedState); break; case GST_STATE_READY: setSeekable(false); if (m_state != QMediaPlayer::StoppedState) emit stateChanged(m_state = QMediaPlayer::StoppedState); break; case GST_STATE_PAUSED: { QMediaPlayer::State prevState = m_state; m_state = QMediaPlayer::PausedState; //check for seekable if (oldState == GST_STATE_READY) { getStreamsInfo(); updateVideoResolutionTag(); /* //gst_element_seek_simple doesn't work reliably here, have to find a better solution GstFormat format = GST_FORMAT_TIME; gint64 position = 0; bool seekable = false; if (gst_element_query_position(m_playbin, &format, &position)) { seekable = gst_element_seek_simple(m_playbin, format, GST_SEEK_FLAG_NONE, position); } setSeekable(seekable); */ setSeekable(true); if (!qFuzzyCompare(m_playbackRate, qreal(1.0))) { qreal rate = m_playbackRate; m_playbackRate = 1.0; setPlaybackRate(rate); } } if (m_state != prevState) emit stateChanged(m_state); break; } case GST_STATE_PLAYING: if (m_state != QMediaPlayer::PlayingState) emit stateChanged(m_state = QMediaPlayer::PlayingState); break; } } break; case GST_MESSAGE_EOS: emit playbackFinished(); break; case GST_MESSAGE_TAG: case GST_MESSAGE_STREAM_STATUS: case GST_MESSAGE_UNKNOWN: break; case GST_MESSAGE_ERROR: { GError *err; gchar *debug; gst_message_parse_error (gm, &err, &debug); emit error(int(QMediaPlayer::ResourceError), QString::fromUtf8(err->message)); qWarning() << "Error:" << QString::fromUtf8(err->message); g_error_free (err); g_free (debug); } break; case GST_MESSAGE_WARNING: { GError *err; gchar *debug; gst_message_parse_warning (gm, &err, &debug); qWarning() << "Warning:" << QString::fromUtf8(err->message); g_error_free (err); g_free (debug); } break; case GST_MESSAGE_INFO: #ifdef DEBUG_PLAYBIN { GError *err; gchar *debug; gst_message_parse_info (gm, &err, &debug); qDebug() << "Info:" << QString::fromUtf8(err->message); g_error_free (err); g_free (debug); } #endif break; case GST_MESSAGE_BUFFERING: { int progress = 0; gst_message_parse_buffering(gm, &progress); emit bufferingProgressChanged(progress); } break; case GST_MESSAGE_STATE_DIRTY: case GST_MESSAGE_STEP_DONE: case GST_MESSAGE_CLOCK_PROVIDE: case GST_MESSAGE_CLOCK_LOST: case GST_MESSAGE_NEW_CLOCK: case GST_MESSAGE_STRUCTURE_CHANGE: case GST_MESSAGE_APPLICATION: case GST_MESSAGE_ELEMENT: break; case GST_MESSAGE_SEGMENT_START: { const GstStructure *structure = gst_message_get_structure(gm); qint64 position = g_value_get_int64(gst_structure_get_value(structure, "position")); position /= 1000000; m_lastPosition = position; emit positionChanged(position); } break; case GST_MESSAGE_SEGMENT_DONE: break; case GST_MESSAGE_DURATION: { GstFormat format = GST_FORMAT_TIME; gint64 duration = 0; if (gst_element_query_duration(m_playbin, &format, &duration)) { int newDuration = duration / 1000000; if (m_duration != newDuration) { m_duration = newDuration; emit durationChanged(m_duration); } } } break; case GST_MESSAGE_LATENCY: #if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 13) case GST_MESSAGE_ASYNC_START: case GST_MESSAGE_ASYNC_DONE: #if GST_VERSION_MICRO >= 23 case GST_MESSAGE_REQUEST_STATE: #endif #endif case GST_MESSAGE_ANY: break; default: break; } } else if (m_videoSink && m_renderer && GST_MESSAGE_SRC(gm) == GST_OBJECT_CAST(m_videoSink) && GST_MESSAGE_TYPE(gm) == GST_MESSAGE_STATE_CHANGED) { GstState oldState; GstState newState; gst_message_parse_state_changed(gm, &oldState, &newState, 0); if (oldState == GST_STATE_READY && newState == GST_STATE_PAUSED) m_renderer->precessNewStream(); } } }
void WContact::setTags(const QStringList &) { emit tagsChanged( m_tags, m_tags ); }
MusicControl::MusicControl(QWidget *parent) : QWidget(parent) { setStyleSheet("QPushButton{ background-color: transparent; border: none; color:white; }" "QPushButton:pressed{ background-color: qradialgradient(spread:pad, cx:0.468355, cy:0.472, radius:0.449, fx:0.472658, fy:0.477045, stop:0.261603 rgba(255, 255, 255, 130), stop:1 rgba(255, 255, 255, 0));}" "QPushButton:checked{ background-color: qradialgradient(spread:pad, cx:0.468355, cy:0.472, radius:0.449, fx:0.472658, fy:0.477045, stop:0.261603 rgba(255, 255, 255, 130), stop:1 rgba(255, 255, 255, 0));}" "QLabel{ color:white; }"); m_c = Core::instance(); connect(m_c, SIGNAL(lengthChanged()), this, SLOT(updateTime())); connect(m_c, SIGNAL(posChanged(int)), this, SLOT(updateTime())); connect(m_c, SIGNAL(tagsChanged()), this, SLOT(showTags())); connect(m_c, SIGNAL(currentMusicChanged()), this, SLOT(musicChanged())); connect(m_c, SIGNAL(videoAppearanceChanged(bool)), this, SLOT(moveWidgets())); connect(m_c, SIGNAL(isPlayingChanged()), this, SLOT(isPlayingChanged())); m_cover = new Cover(this); m_musicTagsLabel = new QLabel(this); m_musicTagsLabel->setAlignment(Qt::AlignCenter); m_musicTagsLabel->setText(QString(tr("<b>Welcome!</b>"))); QGraphicsDropShadowEffect *shadowEffect = new QGraphicsDropShadowEffect(); shadowEffect->setOffset(1, 1); m_musicTagsLabel->setGraphicsEffect(shadowEffect); //Player button, slider and label m_previousButton = new QPushButton(this); m_previousButton->setIcon(QIcon(QString(":/Player_Previous.png"))); m_previousButton->setIconSize(QSize(32, 32)); m_previousButton->setShortcut(QKeySequence(Qt::Key_Left)); m_previousButton->setToolTip(tr("Previous media in the playlist")); connect(m_previousButton, SIGNAL(clicked()), this, SLOT(previous())); m_playButton = new QPushButton(this); m_playButton->setIcon(QIcon(QString(":/Player_Play.png"))); m_playButton->setIconSize(QSize(50, 50)); m_playButton->setShortcut(QKeySequence(Qt::Key_Space)); m_playButton->setToolTip(tr("Play/Pause")); connect(m_playButton, SIGNAL(clicked()), this, SLOT(play())); m_nextButton = new QPushButton(this); m_nextButton->setIcon(QIcon(QString(":/Player_Next.png"))); m_nextButton->setIconSize(QSize(32, 32)); m_nextButton->setShortcut(QKeySequence(Qt::Key_Right)); m_nextButton->setToolTip(tr("Next media in the playlist")); connect(m_nextButton, SIGNAL(clicked()), this, SLOT(next())); m_volumeIcon = new QPushButton(this); m_volumeIcon->setIcon(QIcon(":/Volume.png")); m_volumeIcon->setIconSize(m_volumeIcon->size()); m_volumeIcon->setToolTip(tr("Mute or not")); connect(m_volumeIcon, SIGNAL(clicked()), this, SLOT(mute())); m_volumeIcon->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); m_volumeSlider = new QSlider(this); m_volumeSlider->setOrientation(Qt::Vertical); m_volumeSlider->setToolTip(tr("Change the volume")); m_volumeSlider->setValue(m_c->volume()); m_volumeSlider->setMaximum(200); connect(m_volumeSlider, SIGNAL(valueChanged(int)), m_c, SLOT(setVolume(int))); m_seekSlider = new QSlider(this); m_seekSlider->setOrientation(Qt::Horizontal); m_seekSlider->setToolTip(tr("Change the position in the media")); connect(m_seekSlider, SIGNAL(sliderMoved(int)), m_c, SLOT(setPosition(int))); m_timeLabel = new QLabel(this); m_timeLabel->setMinimumSize(150, 0); m_timeLabel->setAlignment(Qt::AlignRight); m_timeLabel->setText("0:00 / 0:00"); m_randButton = new QPushButton(this); m_randButton->setIconSize(QSize(22, 22)); m_randButton->setIcon(QIcon(QString(":/Random.png"))); m_randButton->setCheckable(true); m_randButton->setToolTip(tr("Random medias in the playlist or not")); m_randButton->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); m_repeatButton = new QPushButton(this); m_repeatButton->setIconSize(QSize(22, 22)); m_repeatButton->setIcon(QIcon(QString(":/Repeat.png"))); m_repeatButton->setCheckable(true); m_repeatButton->setToolTip(tr("Repeat the media or not")); m_repeatButton->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); moveWidgets(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), mSelected(NULL) { ui->setupUi(this); connect(ui->findButton, SIGNAL(clicked(bool)), this, SLOT(onLeftButton())); connect(ui->infoButton, SIGNAL(clicked(bool)), this, SLOT(onRightButton())); connect(ui->filterTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onFilterSelected())); connect(ui->filterComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onFilterChanged())); connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onFilterChanged())); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName("database.sqlite"); db.open(); mProgress = new QProgressDialog(this); mProgress->setWindowTitle(tr("Resistance is futile")); mPrinter = new PrintHelper(this); mPrintDialog = new PrintSelectDialog(this); mTracks = new TracksModel(this); mFiles = new FilesModel(mTracks, this); mProperties = new PropertyModel(mTracks, this); mTags = new TagsModel(mTracks, this); mFilter = new FilterModel(mTracks, this); mFilter->setSourceModel(mTracks); mSettings = new SettingsDialog(mTracks, this); connect(mTracks, SIGNAL(progressStart(int,QString)), this, SLOT(onProgressInit(int,QString))); connect(mTracks, SIGNAL(progress(int)), mProgress, SLOT(setValue(int))); connect(mTracks, SIGNAL(progressEnd()), mProgress, SLOT(reset())); ui->dbView->setModel(mFilter); connect(ui->dbView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTrackSelected(QModelIndex))); connect(mTracks, SIGNAL(recordSelected(Record*)), this, SLOT(onSelected(Record*))); connect(mTracks, SIGNAL(dbChanged()), this, SLOT(onDBChanged())); connect(mTracks, SIGNAL(tagsChanged()), this, SLOT(onTagsChanged())); connect(mTracks, SIGNAL(recordChanged()), this, SLOT(onRecordChanged())); connect(mTracks, SIGNAL(recordSelected(Record*)), this, SLOT(onRecordChanged())); connect(ui->filesView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onFileActivated(QModelIndex))); connect(ui->actionSaveTrack, SIGNAL(triggered(bool)), mTracks, SLOT(saveRecord())); connect(ui->actionNewTrack, SIGNAL(triggered(bool)), mTracks, SLOT(newRecord())); connect(ui->actionCancelChanges, SIGNAL(triggered(bool)), mTracks, SLOT(revertRecord())); connect(ui->actionPlayTrack, SIGNAL(triggered(bool)), this, SLOT(onPlayPlus())); connect(ui->actionPlayTrackMinus, SIGNAL(triggered(bool)), this, SLOT(onPlayMinus())); connect(ui->actionPrint, SIGNAL(triggered(bool)), this, SLOT(onPrint())); connect(ui->actionAddFolder, SIGNAL(triggered(bool)), this, SLOT(onSetStorage())); connect(ui->actionExport, SIGNAL(triggered(bool)), this, SLOT(onExport())); connect(ui->actionImport, SIGNAL(triggered(bool)), this, SLOT(onImport())); connect(ui->actionSettings, SIGNAL(triggered(bool)), this, SLOT(onSettings())); connect(ui->actionFilterFilesOnly, SIGNAL(toggled(bool)), this, SLOT(onFFilter(bool))); connect(ui->actionFilterFullInfo, SIGNAL(toggled(bool)), this, SLOT(onIFFilter(bool))); connect(ui->actionFilterInfoOnly, SIGNAL(toggled(bool)), this, SLOT(onIFilter(bool))); connect(ui->addTagButton, SIGNAL(clicked(bool)), this, SLOT(onAddTag())); connect(ui->removeTagButton, SIGNAL(clicked(bool)), this, SLOT(onRemoveTag())); connect(ui->addFileButton, SIGNAL(clicked(bool)), this, SLOT(onAddFile())); connect(ui->deleteFileButton, SIGNAL(clicked(bool)), this, SLOT(onDeleteFile())); connect(ui->moveFileButton, SIGNAL(clicked(bool)), this, SLOT(onMoveFile())); connect(ui->autoFileButton, SIGNAL(clicked(bool)), this, SLOT(onAutoFile())); // no logic yet ui->moveFileButton->setVisible(false); ui->filesView->setModel(mFiles); ui->propertyView->setModel(mProperties); ui->propertyView->setItemDelegateForColumn( PropertyModel::valueColumn, new ComboCheckBoxDelegate(this, ", ")); ui->tagsView->setModel(mTags); load(); }
QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent) :QMetaDataReaderControl(parent), m_session(session) { connect(m_session, SIGNAL(tagsChanged()), SLOT(updateTags())); }
AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer(GRefPtr<GstElement> playbin, gint index, GRefPtr<GstPad> pad) : TrackPrivateBaseGStreamer("notify::current-audio", playbin, index, pad) { activeChanged(); tagsChanged(); }
void PEMetadataView::tagsEntry() { static QStringList keys; keys = m_tagsEdit->hash().keys(); emit tagsChanged(keys); }
/*! \reimp */ void FacebookPhotoInterface::emitPropertyChangeSignals(const QVariantMap &oldData, const QVariantMap &newData) { QString aidStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_ALBUMIDENTIFIER).toString(); QVariantList tagsList = newData.value(FACEBOOK_ONTOLOGY_PHOTO_TAGS).toList(); QVariantMap fromMap = newData.value(FACEBOOK_ONTOLOGY_PHOTO_FROM).toMap(); QString nameStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_NAME).toString(); QVariantMap ntMap = newData.value(FACEBOOK_ONTOLOGY_PHOTO_NAMETAGS).toMap(); QString iconStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_ICON).toString(); QString picStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_PICTURE).toString(); QString srcStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_SOURCE).toString(); QString heightInt = newData.value(FACEBOOK_ONTOLOGY_PHOTO_HEIGHT).toString(); QString widthInt = newData.value(FACEBOOK_ONTOLOGY_PHOTO_WIDTH).toString(); QVariantMap imgsMap = newData.value(FACEBOOK_ONTOLOGY_PHOTO_IMAGES).toMap(); QString linkStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_LINK).toString(); QVariantMap placeMap = newData.value(FACEBOOK_ONTOLOGY_PHOTO_PLACE).toMap(); // XXX TODO: Location/Place object reference QString ctStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_CREATEDTIME).toString(); QString utStr = newData.value(FACEBOOK_ONTOLOGY_PHOTO_UPDATEDTIME).toString(); QString posInt = newData.value(FACEBOOK_ONTOLOGY_PHOTO_POSITION).toString(); QString likedBool = newData.value(FACEBOOK_ONTOLOGY_PHOTO_LIKED).toString(); QString oldAidStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_ALBUMIDENTIFIER).toString(); QVariantList oldTagsList = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_TAGS).toList(); QVariantMap oldFromMap = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_FROM).toMap(); QString oldNameStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_NAME).toString(); QVariantMap oldNtMap = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_NAMETAGS).toMap(); QString oldIconStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_ICON).toString(); QString oldPicStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_PICTURE).toString(); QString oldSrcStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_SOURCE).toString(); QString oldHeightInt = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_HEIGHT).toString(); QString oldWidthInt = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_WIDTH).toString(); QVariantMap oldImgsMap = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_IMAGES).toMap(); QString oldLinkStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_LINK).toString(); QVariantMap oldPlaceMap = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_PLACE).toMap(); // XXX TODO: Location/Place object reference QString oldCtStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_CREATEDTIME).toString(); QString oldUtStr = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_UPDATEDTIME).toString(); QString oldPosInt = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_POSITION).toString(); QString oldLikedBool = oldData.value(FACEBOOK_ONTOLOGY_PHOTO_LIKED).toString(); if (aidStr != oldAidStr) emit albumIdentifierChanged(); if (nameStr != oldNameStr) emit nameChanged(); if (ntMap != oldNtMap) emit nameTagsChanged(); if (iconStr != oldIconStr) emit iconChanged(); if (picStr != oldPicStr) emit pictureChanged(); if (srcStr != oldSrcStr) emit sourceChanged(); if (heightInt != oldHeightInt) emit heightChanged(); if (widthInt != oldWidthInt) emit widthChanged(); if (imgsMap != oldImgsMap) emit imagesChanged(); if (linkStr != oldLinkStr) emit linkChanged(); if (placeMap != oldPlaceMap) emit placeChanged(); if (ctStr != oldCtStr) emit createdTimeChanged(); if (utStr != oldUtStr) emit updatedTimeChanged(); if (posInt != oldPosInt) emit positionChanged(); if (likedBool != oldLikedBool) { f->liked = likedBool == QLatin1String("true"); emit likedChanged(); } // update tags list if (tagsList != oldTagsList) { // clear the old tags foreach (FacebookTagInterface *doomedTag, f->tags) doomedTag->deleteLater(); f->tags.clear(); // update with the new tag data for (int i = 0; i < tagsList.size(); ++i) { QVariantMap currTagMap = tagsList.at(i).toMap(); currTagMap.insert(FACEBOOK_ONTOLOGY_TAG_TARGETIDENTIFIER, identifier()); FacebookTagInterface *currTag = new FacebookTagInterface(f); qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(currTag, currTagMap); f->tags.append(currTag); } // emit change signal emit tagsChanged(); } // update from reference if (fromMap != oldFromMap) { QVariantMap newFromData; newFromData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTTYPE, FacebookInterface::User); // could also be a Profile ... newFromData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER, fromMap.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTIDENTIFIER)); newFromData.insert(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME, fromMap.value(FACEBOOK_ONTOLOGY_OBJECTREFERENCE_OBJECTNAME)); qobject_cast<FacebookInterface*>(socialNetwork())->setFacebookContentItemData(f->from, newFromData); emit fromChanged(); } // call the super class implementation IdentifiableContentItemInterface::emitPropertyChangeSignals(oldData, newData); }
TagsWidget_ListModel::TagsWidget_ListModel(QObject *parent) :QAbstractListModel(parent), newTagString(tr("New Tag")) { connect(FMFontDb::DB(), SIGNAL(tagsChanged()), this, SLOT(updateTags())); }