qgscategorizedsymbolrendererv2widget_label-r12477.diff

markbaas -, 2009-12-15 10:41 AM

Download (1.66 KB)

View differences:

src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp (working copy)
61 61
  connect( btnAddCategories, SIGNAL( clicked() ), this, SLOT( addCategories() ) );
62 62
  connect( btnDeleteCategory, SIGNAL( clicked() ), this, SLOT( deleteCategory() ) );
63 63
  connect( btnDeleteAllCategories, SIGNAL( clicked() ), this, SLOT( deleteAllCategories() ) );
64
  connect( m, SIGNAL( itemChanged( QStandardItem * ) ), this, SLOT( changeCurrentValue( QStandardItem * ) ) );
64 65

  
65 66
  // update GUI from renderer
66 67
  updateUiFromRenderer();
......
330 331
  populateCategories();
331 332
}
332 333

  
334
void QgsCategorizedSymbolRendererV2Widget::changeCurrentValue( QStandardItem * item )
335
{
336
  if ( item->column() == 1 )
337
  {
338
    QString label = item->text();
339
    int idx = item->row();
340
    mRenderer->updateCategoryLabel( idx, label );
341
  }
342
}
src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h (working copy)
2 2
#define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H
3 3

  
4 4
#include "qgsrendererv2widget.h"
5
#include <QStandardItem>
5 6

  
6 7
class QgsCategorizedSymbolRendererV2;
7 8

  
......
27 28
    void addCategories();
28 29
    void deleteCategory();
29 30
    void deleteAllCategories();
31
    void changeCurrentValue( QStandardItem * item );
30 32

  
31 33
  protected:
32 34