renamer.cpp File Reference

#include <assert.h>
#include <cstdio>
#include <ctype.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <stdlib.h>
#include <qfiledialog.h>
#include <stdio.h>
#include <qradiobutton.h>
#include <qmessagebox.h>
#include "renamer.h"
#include "selector.h"
#include "scripts.h"
#include "capacity.h"
#include "song-iterator.h"
#include "info.h"
#include "qt-helpers.h"
Include dependency graph for renamer.cpp:

Classes

class  UpdateSongFilename
class  UpdateIndexedSong

Defines

#define FOREACH(operation)

Functions

 for (set< QTreeWidgetItem * >::iterator it2=todelete.begin();it2!=todelete.end();it2++) delete(*it2)
renamer start_dialog ()

Define Documentation

#define FOREACH ( operation   ) 
Value:
{                                            \
  map<QTreeWidgetItem*,QString> newtexts;                            \
  QTreeWidgetItemIterator it(NameList);                              \
  for(;*it;++it) {                                                   \
    QTreeWidgetItem * item = *it;                                    \
    if (item->isSelected())                                          \
      newtexts[item]=operation(item->text(0));                       \
  }                                                                  \
  for(map<QTreeWidgetItem*,QString>::iterator it=newtexts.begin();   \
      it!=newtexts.end(); it++)                                      \
    it->first->setText(0,it->second);                                \
  }

Since Qt4 a modification to a text item directly resorts the surrounding item list, the interator looses completely track. This double iteration deals with that.

Referenced by RenamerLogic::removeSpaces(), and RenamerLogic::removeSpecials().


Function Documentation

for ( set< QTreeWidgetItem * >::iterator  it2 = todelete.begin();it2!=todelete.end();it2++  ) 

Delete this part of the selection

renamer start_dialog (  ) 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by  doxygen 1.6.2