Ejemplo n.º 1
0
/**
 * Saves the selected pictures.
 * First pops up a dialog box asking for the target dir. Then pops up 
 * a progress dialog for feedback.
 */
void MainWindow::saveSelected() 
{
    /* Select target */
    selectWorkDir();

    /* Create a progress dialog */
    QProgressDialog* progress = new QProgressDialog(
        i18n("Downloading ..."), i18n("Cancel"), 100, this, "progress", TRUE);
    progress->setCaption("Download");
    connect(GPMessenger::instance(),SIGNAL(progressChanged(int)),
            progress,SLOT(setProgress(int)));
    progress->setAutoReset(false);
    progress->setAutoClose(false); 
    progress->setProgress(0);
    KApplication::kApplication()->processEvents();
     
    /* Download all pictures */
    for (QIconViewItem *i = iconView->firstItem(); 
                    i && !progress->wasCancelled(); i = i->nextItem() ) {
        if (i->isSelected()) {
            /* Update progress dialog */
            progress->setLabelText(i18n("Downloading ") + i->text() + "...");

            /* Download picture */
            GPInterface::downloadPicture(i->text(),"/");
        }
    } 

    progress->setProgress(100);
    delete progress;
}
Ejemplo n.º 2
0
void  ThumbView::slCheckForUpdate( KFileItem *kfit )
{
   if( ! kfit ) return;

   kdDebug(28000) << "Checking for update of thumbview!" << endl;

   KURL searchUrl = kfit->url();
   bool haveItem = false;

   /* iterate over all icon items and compare urls.
    * TODO: Check the parent url to avoid iteration over all */
   for ( QIconViewItem *item = m_iconView->firstItem(); item && !haveItem;
	 item = item->nextItem() )
   {
      if( searchUrl == static_cast<ThumbViewItem*>(item)->itemUrl() )
      {
	 haveItem = true;
      }
   }

   /* if we still do not have the item, it is not in the thumbview. */
   if( ! haveItem )
   {
      KFileItemList kfiList;

      kfiList.append( kfit );
      slNewFileItems( kfiList );
   }

}
Ejemplo n.º 3
0
TemplateItem* NewFileWizard::getSelection()const
{
	for(QIconViewItem *item = m_newDocumentWidget->templateIconView->firstItem(); item; item = item->nextItem()) {
		if(item->isSelected()) {
			return static_cast<TemplateItem*>(item);
		}
	}
	return NULL;
}
Ejemplo n.º 4
0
void MontageView::removeItem()
{
  QIconViewItem* item = currentItem(); 
  if( item ) {
    emit removedItem( item->text() );
    delete item;
    arrangeItemsInGrid();
  }
}
Ejemplo n.º 5
0
/**
 * Notify that the selection has changed.
 * Will check if there are still items selected, and will enable
 * actions based on the result. 
 */
void MainWindow::selectionChanged()
{
    /* Check if there are items selected */
    bool selected = false;
    for (QIconViewItem *i = iconView->firstItem(); i; i = i->nextItem())
        selected = selected || i->isSelected();
        
    saveAction->setEnabled(selected);
    deleteAction->setEnabled(selected);
}
Ejemplo n.º 6
0
void MontageView::drawPoints(const QPointArray& pa, QValueList<int>& corners, int correct)
{
  if(ccv::debug) std::cerr << "MontageView::drawPoints - pa = " << pa.count() << " corners = " << corners.count() << "\n";

  QIconViewItem* item = firstItem();
  if( !item )
    return;

  m_dirty = true;

  QImage img = item->pixmap()->convertToImage();
  
  int item_nr = 0;

  bool failed = corners[item_nr] != correct;

  for( uint i=0; i<pa.count()+1; ++i ){

    if( corners[item_nr] == 0 ) {

      QPixmap pm(img);
      item->setPixmap( pm );
      item = item->nextItem();
      if( !item )
	return;

      img = item->pixmap()->convertToImage();

      item_nr++;
      failed = corners[item_nr] != correct;
    }    

    if(ccv::debug) std::cerr << " Point: " << i << " Image: " << item_nr 
			     << " (" << pa[i].x() << "," << pa[i].y() << ")" 
			     << " Corners: " << corners[item_nr] << "\n"; 

    if( !failed ) {
      img.setPixel( pa[i].x()  , pa[i].y()-1, qRgb(255,255,0) );
      img.setPixel( pa[i].x()-1, pa[i].y()  , qRgb(255,255,0) );
      img.setPixel( pa[i].x()  , pa[i].y()  , qRgb(255,0,0)   );
      img.setPixel( pa[i].x()+1, pa[i].y()  , qRgb(255,255,0) );
      img.setPixel( pa[i].x()  , pa[i].y()+1, qRgb(255,255,0) );
    }
    else {
      img.setPixel( pa[i].x()  , pa[i].y()-1, qRgb(255,0,0)   );
      img.setPixel( pa[i].x()-1, pa[i].y()  , qRgb(255,0,0)   );
      img.setPixel( pa[i].x()  , pa[i].y()  , qRgb(255,255,0) );
      img.setPixel( pa[i].x()+1, pa[i].y()  , qRgb(255,0,0)   );
      img.setPixel( pa[i].x()  , pa[i].y()+1, qRgb(255,0,0)   );
    }
    corners[item_nr]--;
  }
}
Ejemplo n.º 7
0
void StartDialog::insertRecentItems( QStringList &files, bool isProject )
{
    QString iconName = "designer_newform.png";
    if ( isProject )
	iconName = "designer_project.png";
    QIconViewItem *item;
    QStringList::iterator it = files.begin();
    for( ; it != files.end(); ++it ) {
	QFileInfo fi( *it );
	item = new QIconViewItem( recentView, fi.fileName() );
	recentFiles[recentView->index( item )] = *it;
	item->setPixmap( QPixmap::fromMimeSource( iconName ) );
	item->setDragEnabled( FALSE );
    }
}
Ejemplo n.º 8
0
void MontageView::resetIcons()
{
  if( !m_dirty )
    return;

  m_dirty = false;

  // FixMe: This should be optimized by caching the old images instead
  for( QIconViewItem* item = firstItem(); item; item = item->nextItem() ) {
    QPixmap pm = *item->pixmap();
    QSize size = pm.size();
    QImage icon( item->text() );
    pm = icon.smoothScale( size );
  }

}
Ejemplo n.º 9
0
void IconViewEditor::applyClicked()
{
    QIconViewItem *i = 0;
    QValueList<PopulateIconViewCommand::Item> items;
    for ( i = preview->firstItem(); i; i = i->nextItem() ) {
	PopulateIconViewCommand::Item item;
	if ( i->pixmap() )
	    item.pix = *i->pixmap();
	item.text = i->text();
	items.append( item );
    }

    PopulateIconViewCommand *cmd = new PopulateIconViewCommand( tr( "Edit Items of '%1'" ).arg( iconview->name() ),
								formwindow, iconview, items );
    cmd->execute();
    formwindow->commandHistory()->addCommand( cmd );
}
Ejemplo n.º 10
0
/******************************************************************************
 * Public Slots                                                               *
 *****************************************************************************/
void KIconViewSearchLine::updateSearch(const QString &s)
{
    QIconView *iv = d->iconView;
    if(!iv)
        return; // disabled

    QString search = d->search = s.isNull() ? text() : s;

    QIconViewItemList *hi = &(d->hiddenItems);

    QIconViewItem *currentItem = iv->currentItem();

    QIconViewItem *item = NULL;

    // Remove Non-Matching items, add them them to hidden list
    QIconViewItem *i = iv->firstItem();
    while(i != NULL)
    {
        item = i;
        i = i->nextItem(); // Point to next, otherwise will loose it.
        if(!itemMatches(item, search))
        {
            hideItem(item);

            if(item == currentItem)
                currentItem = NULL; // It's not in iconView anymore.
        }
    }

    // Add Matching items, remove from hidden list
    QIconViewItemList::iterator it = hi->begin();
    while(it != hi->end())
    {
        item = *it;
        ++it;
        if(itemMatches(item, search))
            showItem(item);
    }

    iv->sort();

    if(currentItem != NULL)
        iv->ensureItemVisible(currentItem);
}
Ejemplo n.º 11
0
QValueList<int> ClusterPalette::selectedClusters() {
    //Get the list of clusters with their color
    ItemColors& clusterColors = doc->clusterColors();

    QValueList<int> selectedClusters;

    ClusterPaletteIconViewItem* clusterPaletteItem;

    for(QIconViewItem* item = iconView->firstItem(); item; item = item->nextItem()) {
        clusterPaletteItem  = static_cast<ClusterPaletteIconViewItem*>(item);
        if(item->isSelected()) {
            selectedClusters.append(clusterColors.itemId(item->index()));
        }
    }

    //Selection has just changed
    isUpToDate = false;

    return selectedClusters;
}
Ejemplo n.º 12
0
void ThumbView::slImageRenamed( KFileItem *kfit, const KURL& newUrl )
{
    const KURL url = kfit->url();

    if( kfit->isDir() ) {
	clear();
    }
    
    for ( QIconViewItem *item = m_iconView->firstItem(); item; item = item->nextItem() )
    {
        ThumbViewItem *it=static_cast<ThumbViewItem*>( item );

        if( url == it->itemUrl() )
        {
            it->setItemUrl( newUrl );

            break;
        }
   }
}
Ejemplo n.º 13
0
IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw )
    : IconViewEditorBase( parent, 0, TRUE ), formwindow( fw )
{
    connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
    iconview = (QIconView*)editWidget;

    itemText->setText( "" );
    itemText->setEnabled( FALSE );
    itemPixmap->setText( "" );
    itemChoosePixmap->setEnabled( FALSE );
    itemDeletePixmap->setEnabled( FALSE );

    QIconViewItem *i = 0;
    for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
	(void)new QIconViewItem( preview, i->text(), *i->pixmap()  );
    }

    if ( preview->firstItem() )
	preview->setCurrentItem( preview->firstItem() );
}
Ejemplo n.º 14
0
bool ThumbView::deleteImage( KFileItem *kfit )
{
   if( ! kfit ) return false;


   KURL searchUrl = kfit->url();
   bool haveItem = false;

   /* iterate over all icon items and compare urls.
    * TODO: Check the parent url to avoid iteration over all */
   for ( QIconViewItem *item = m_iconView->firstItem(); item && !haveItem; item = item->nextItem() )
   {
      if( searchUrl == static_cast<ThumbViewItem*>(item)->itemUrl() )
      {
	 m_iconView->takeItem( item );
	 haveItem = true;
      }
   }
   kdDebug(28000) << "Deleting image from thumbview, result is " << haveItem << endl;
   return( haveItem );
}
Ejemplo n.º 15
0
//We reimplement this method to add automatic change of the grid size
void GofunIconView::arrangeItemsInGrid(bool update)
{
	int b_height, b_width = 0;
	
	QIconViewItem* item = firstItem();
	while(item)
	{
		//if(item->height() > b_height) //Outcommented because we currently don't need
		//	b_height = item->height(); //it anyways, but maybe in a later implementation
		if(item->width() > b_width)
			b_width = item->width();
		item = item->nextItem();
	}
	
	if(gridX() != b_width && b_width)
		setGridX(b_width);
	//if(gridY() != b_width && b_height) //FIXME: If we uncomment this we end up with
	//	setGridY(b_height); //an endless loop and bugs all the way. Not of high priority thought.
	
	QIconView::arrangeItemsInGrid(update);
}
Ejemplo n.º 16
0
void ClusterPalette::hideUserClusterInformation() {
    //update the flag
    isInUserClusterInfoMode = false;

    iconView->setItemTextPos(QIconView::Bottom);
    //Let's go back to normal
    QFontInfo fontInfo = QFontInfo(QFont());
    iconView->setGridX(fontInfo.pixelSize() * 2);
    iconView->setGridY(15);
    iconView->arrangeItemsInGrid();

    ItemColors& clusterColors = doc->clusterColors();
    int clusterId;

    for(QIconViewItem* item = iconView->firstItem(); item; item = item->nextItem()) {
        clusterId = clusterColors.itemId(item->index());
        item->setText(QString("%1").arg(clusterId));
    }

    iconView->setWordWrapIconText(true);
    iconView->resize(this->width(),this->height());
}
Ejemplo n.º 17
0
/**
 * Sirve para leer los usuarios que se van a mostrar (falta leer desde un XML).
 */
void GCLSelectUser::leerUsuarios()
{
	QFile *archivoXML = new QFile(XMLCLIENTDATADIR + "qpusuarios.xml"); // FIXME: Este archivo debe estar localizado en .qapital !
	QXmlInputSource *source = new QXmlInputSource( archivoXML );
	QXmlSimpleReader reader;
	GUILectorXml *handler = new GUILectorXml();
	reader.setContentHandler( handler );
	
	if ( reader.parse( source, true ) )
	{
		qDebug(tr("GCLPrincipal/GCLPrincipal: Lectura XML exitosa"));
	}
	
	QStringList nombres = handler->obtenerListaDeTexto();

	for (uint i = 0; i < nombres.count(); i+=2)
	{
		QIconViewItem *unUsuario = new QIconViewItem (this, nombres[i], QPixmap( nombres[i+1] ));
		unUsuario->setDragEnabled (false);
		unUsuario->setDropEnabled (false);
	}
}
Ejemplo n.º 18
0
void GofunWidget::unloadData()
{
	int cats_bg_count = cats_bg->count();
	for(int i = 1; i < cats_bg_count+1 && cats_bg_count > 1; ++i)
	{
		GofunDirectoryButton* cb = dynamic_cast<GofunDirectoryButton*>(cats_bg->find(i));
		if(cb)
		{
			for(QIconViewItem* item = cb->iconview->firstItem(); item; 0)
			{
				QIconViewItem* next = item->nextItem();
				delete item;
				item = next;
			}
			view_ws->removeWidget(cb->iconview);
			cats_bg->remove(cb);
			delete cb;
		}
	}
	
	view_ws->raiseWidget(tools_cat->iconview);
}
Ejemplo n.º 19
0
/**
 * Deletes the selected files (after asking for confirmation).
 */
void MainWindow::deleteSelected()
{
    if (KMessageBox::questionYesNo(this, 
        i18n("Are you sure you want to delete the selected pictures ?"), 
        i18n("Delete")) == KMessageBox::Yes) {

        try {
        for (QIconViewItem *i = iconView->firstItem();i; i=i->nextItem()) {
            if (i->isSelected()) {
                statusBar()->message(i18n("Deleting ") + i->text() + " ...");
                GPInterface::deletePicture(i->text(),"/");
                delete i;
                iconView->arrangeItemsInGrid();
            }
        }
        statusBar()->message(i18n("Done"));
        } catch (QString err) { 
            KMessageBox::error(this, err); 
            statusBar()->message(i18n("Error"), MESSAGE_TIME);
        }
    }
}
Ejemplo n.º 20
0
DnDDemo::DnDDemo( QWidget* parent, const char* name )
    : DnDDemoBase( parent, name )
{
    buttonPixmap1->setEditor( StyledButton::PixmapEditor );
    buttonPixmap2->setEditor( StyledButton::PixmapEditor );
    buttonPixmap3->setEditor( StyledButton::PixmapEditor );
    buttonPixmap4->setEditor( StyledButton::PixmapEditor );

    multiLine1->setTextFormat( RichText );
    multiLine1->setText( "<p><b>Faust</b> - <i>Goethe</i></p>"
                         "Habe nun, ach! Philosophie,<br>"
			 "Juristerei und Medizin,<br>"
                         "Und leider auch Theologie<br>"
                         "Durchaus studiert, mit heißem Bemühn.<br>"
                         "Da steh ich nun, ich armer Tor!<br>"
                         "Und bin so klug als wie zuvor;<br>"
                         "Heiße Magister, heiße Doktor gar<br>"
                         "Und ziehe schon an die zehen Jahr<br>"
                         "Herauf, herab und quer und krumm<br>"
                         "Meine Schüler an der Nase herum-<br>"
                         "Und sehe, daß wir nichts wissen können!<br>"
                         "Das will mir schier das Herz verbrennen.<br>"
                         "Zwar bin ich gescheiter als all die Laffen,<br>"
                         "Doktoren, Magister, Schreiber und Pfaffen;<br>"
                         "Mich plagen keine Skrupel noch Zweifel,<br>"
                         "Fürchte mich weder vor Hölle noch Teufel-<br>"
                         "Dafür ist mir auch alle Freud entrissen,<br>"
                         "Bilde mir nicht ein, was Rechts zu wissen,<br>"
                         "Bilde mir nicht ein, ich könnte was lehren,<br>"
                         "Die Menschen zu bessern und zu bekehren.<br>"
                         "Auch hab ich weder Gut noch Geld,<br>"
                         "Noch Ehr und Herrlichkeit der Welt;<br>"
                         "Es möchte kein Hund so länger leben!<br>"
                         "Drum hab ich mich der Magie ergeben,<br>"
                         "Ob mir durch Geistes Kraft und Mund<br>"
                         "Nicht manch Geheimnis würde kund;<br>"
                         "Daß ich nicht mehr mit saurem Schweiß<br>"
                         "Zu sagen brauche, was ich nicht weiß;<br>"
                         "Daß ich erkenne, was die Welt<br>"
                         "Im Innersten zusammenhält,<br>"
                         "Schau alle Wirkenskraft und Samen,<br>"
                         "Und tu nicht mehr in Worten kramen. <br>" );

    multiLine2->setTextFormat( RichText );
    multiLine2->setText( "<p><b>To Milton</b> - <i>Oscar Wilde</i></p>"
                         "Milton!  I think thy spirit hath passed away<br>"
                         "From these white cliffs and high-embattled towers;<br>"
                         "This gorgeous fiery-coloured world of ours<br>"
                         "Seems fallen into ashes dull and grey,<br>"
                         "And the age changed unto a mimic play<br>"
                         "Wherein we waste our else too-crowded hours:<br>"
                         "For all our pomp and pageantry and powers<br>"
                         "We are but fit to delve the common clay,<br>"
                         "Seeing this little isle on which we stand,<br>"
                         "This England, this sea-lion of the sea,<br>"
                         "By ignorant demagogues is held in fee,<br>"
                         "Who love her not:  Dear God! is this the land<br>"
                         "Which bare a triple empire in her hand<br>"
                         "When Cromwell spake the word Democracy!<br>" );


    items.insert( tr("copy"), IconItem( tr("Copy"), "editcopy.png" ) );
    items.insert( tr("cut"), IconItem( tr("Cut"), "editcut.png" ));
    items.insert( tr("paste"), IconItem( tr("Paste"), "editpaste.png" ));
    items.insert( tr("raise"), IconItem( tr("Raise"), "editraise.png" ));
    items.insert( tr("lower"), IconItem( tr("Lower"), "editlower.png" ));
    items.insert( tr("new"), IconItem( tr("New"), "filenew.png" ));
    items.insert( tr("load"), IconItem( tr("Load"), "fileopen.png" ));
    items.insert( tr("save"), IconItem( tr("Save"), "filesave.png" ));
    items.insert( tr("undo"), IconItem( tr("Undo"), "undo.png" ));
    items.insert( tr("redo"), IconItem( tr("Redo"), "redo.png" ));
    items.insert( tr("delete"), IconItem( tr("Delete"), "editdelete.png" ));
    items.insert( tr("help"), IconItem( tr("Help"), "help.png" ));
    items.insert( tr("home"), IconItem( tr("Home"), "home.png" ));

    listView->addColumn( tr("Actions"), 240 );
    listView->setColumnWidthMode( 0, QListView::Maximum );

    QMap<QString,IconItem>::Iterator it;
    for( it = items.begin(); it != items.end(); ++it ) {
        IconItem item = it.data();

        QIconViewItem *iitem = new IconViewItem( iconView, item.name(), *item.pixmap(), it.key() );
        iitem->setRenameEnabled( TRUE );
        QListViewItem *litem = new ListViewItem( listView, item.name(), it.key() );
        litem->setPixmap( 0, *item.pixmap() );
    }
}
Ejemplo n.º 21
0
void TemplateIconView::addTemplateIcons(KileDocument::Type type)
{
	if(!m_templateManager) return;

	QString emptyIcon = KGlobal::dirs()->findResource("appdata", "pics/"+ QString(DEFAULT_EMPTY_ICON) + ".png" );

	KileTemplate::Info emptyDocumentInfo;
	emptyDocumentInfo.name = DEFAULT_EMPTY_CAPTION;
	emptyDocumentInfo.icon = emptyIcon;
	emptyDocumentInfo.type = type;
	TemplateItem *emp = new TemplateItem(this, emptyDocumentInfo);
	setSelected(emp, true);

	if(type == KileDocument::LaTeX) {
		// disable non standard templates
		QMap<QString,bool> map;
		map["Scrartcl"] = false;
		map["Scrbook"]  = false;
		map["Scrreprt"] = false;
		map["Scrlttr2"] = false;
		map["Beamer"]   = false;
		map["Prosper"]  = false;
		map["HA-prosper"] = false;
		
		// split search results and look, which class files are present
		QStringList list = QStringList::split("\n",m_output);
		for ( QStringList::Iterator it=list.begin(); it!=list.end(); ++it ) 
		{
			QString filename = QFileInfo(*it).fileName();
			if ( filename=="scrartcl.cls" )
			{
				map["Scrartcl"] = true;
				map["Scrbook"]  = true;
				map["Scrreprt"] = true;
				map["Scrlttr2"] = true;
			}
			else if ( filename=="beamer.cls" )  
				map["Beamer"] = true;
			else if ( filename=="prosper.cls" )
				map["Prosper"] = true;
			else if ( filename=="HA-prosper.sty" )
				map["HA-prosper"] = true;
		}
		
	
		KileTemplate::TemplateList templateList = m_templateManager->getTemplates(KileDocument::LaTeX);
		// insert all standard templates, all user defined templates 
		// and those templates, which have a present class 
		for (KileTemplate::TemplateListIterator i=templateList.begin(); i != templateList.end(); ++i)
		{
			KileTemplate::Info info = *i;
			QString classname = info.name;
			if ( !map.contains(classname) || map[classname]==true )
			{
				new TemplateItem(this, info);
			}
		}
	}
	else {
		KileTemplate::TemplateList templateList = m_templateManager->getTemplates(type); 
		for (KileTemplate::TemplateListIterator i=templateList.begin(); i != templateList.end(); ++i)
		{
			new TemplateItem(this, *i);
		}
	}

	// sort all items (item for 'Empty Document' will always be the first one)
	sort();
	
	// set the default item, if its given
	for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
		if ( static_cast<TemplateItem*>(item)->name() == m_selicon ) {
			setSelected(item, true);
			ensureItemVisible(item);
		}
	}
}
Ejemplo n.º 22
0
void ClusterPalette::showUserClusterInformation(int electrodeGroupId) {
    //update the flag
    isInUserClusterInfoMode = true;

    iconView->setItemTextPos(QIconView::Right);
    iconView->setGridX(2500);
    iconView->arrangeItemsInGrid();

    QMap<int,ClusterUserInformation> clusterUserInformationMap = QMap<int,ClusterUserInformation>();
    doc->data().getClusterUserInformation(electrodeGroupId,clusterUserInformationMap);

    ItemColors& clusterColors = doc->clusterColors();
    int clusterId;
    ClusterUserInformation currentClusterInformation;

    for(QIconViewItem* item = iconView->firstItem(); item; item = item->nextItem()) {
        clusterId = clusterColors.itemId(item->index());

        QString clusterText = item->text();

        if(clusterId == 0) {
            clusterText.append(" - ").append("artefact");
        }
        else if(clusterId == 1) {
            clusterText.append(" - ").append("noise");
        }
        else {
            currentClusterInformation = clusterUserInformationMap[clusterId];
            bool first = true;

            if(currentClusterInformation.getStructure() != "") {
                first = false;
                clusterText.append(" - ").append(currentClusterInformation.getStructure());
            }
            if(currentClusterInformation.getType() != "") {
                if(!first) {
                    clusterText.append(", ").append(currentClusterInformation.getType());
                }
                else {
                    clusterText.append(" - ").append(currentClusterInformation.getType());
                    first = false;
                }
            }
            if(currentClusterInformation.getId() != "") {
                if(!first) {
                    clusterText.append(", ").append(currentClusterInformation.getId());
                }
                else {
                    clusterText.append(" - ").append(currentClusterInformation.getId());
                    first = false;
                }
            }
            if(currentClusterInformation.getQuality() != "") {
                if(!first) {
                    clusterText.append(", ").append(currentClusterInformation.getQuality());
                }
                else {
                    clusterText.append(" - ").append(currentClusterInformation.getQuality());
                    first = false;
                }
            }
            if(currentClusterInformation.getNotes() != "") {
                if(!first) {
                    clusterText.append(", ").append(currentClusterInformation.getNotes());
                }
                else {
                    clusterText.append(" - ").append(currentClusterInformation.getNotes());
                    first = false;
                }
            }
        }
        item->setText(clusterText);
    }
    iconView->setWordWrapIconText(false);
    iconView->adjustSize();
}