void buildDisplay() { // delete all the children foreach( QWidget* w, wl ) delete w; wl.clear(); // remove the stretch we added in the last call if ( QLayoutItem* item = layout->takeAt( 0 ) ) delete item; // create new labels for( QStringList::const_iterator it = tags.constBegin(); it != tags.constEnd(); ++it ) { if ( it != tags.constBegin() ) { QLabel* label = new QLabel( "-", parent ); wl.append( label ); layout->addWidget( label ); // FIXME: display some nicer symbol like a big dot } KUrlLabel* label = new KUrlLabel( *it, *it, parent ); wl.append( label ); label->setUnderline( false ); layout->addWidget( label ); connect( label, SIGNAL(leftClickedUrl(QString)), parent, SIGNAL(tagClicked(QString)) ); } layout->addStretch( 1 ); }
void Nepomuk::TagCloud::slotTagClicked( const QString& tag ) { emit tagClicked( Tag(tag) ); }
void TagColorEditor::tagClicked(int row, int colm) { if (colm == 0) emit tagClicked(row+1); }