comparison widgets/PropertyStack.cpp @ 552:2e8194a30f40 sv-v1.7.1

* Layer data editor window: fix sorting for columns in region model, add Find feature * RDF import: assign names to layers based on event types, if no suitable labels are found in the RDF * Add label to status bar showing the last text that was passed in current layer (so e.g. counting 1, 2, 3, 4 if that's what beats are labelled) * Better layout of text labels for region layers in segmentation mode when they are close together * Give text layer the same method for finding "nearest point" as region and note layers, should improve its editability
author Chris Cannam
date Thu, 22 Oct 2009 15:54:21 +0000
parents 2c59b0cd176b
children f4960f8ce798
comparison
equal deleted inserted replaced
551:c2ba2796cbee 552:2e8194a30f40
110 QString shortName = name; 110 QString shortName = name;
111 111
112 if (layer) { 112 if (layer) {
113 shortName = LayerFactory::getInstance()->getLayerPresentationName 113 shortName = LayerFactory::getInstance()->getLayerPresentationName
114 (LayerFactory::getInstance()->getLayerType(layer)); 114 (LayerFactory::getInstance()->getLayerType(layer));
115 if (layer->getLayerPresentationName() != "") {
116 name = layer->getLayerPresentationName();
117 }
115 } 118 }
116 119
120 bool nameDiffers = (name != shortName);
117 shortName = QString("&%1 %2").arg(i + 1).arg(shortName); 121 shortName = QString("&%1 %2").arg(i + 1).arg(shortName);
118 122
119 QString iconName = container->getPropertyContainerIconName(); 123 QString iconName = container->getPropertyContainerIconName();
120 124
121 QIcon icon(IconLoader().load(iconName)); 125 QIcon icon(IconLoader().load(iconName));
122 if (icon.isNull()) { 126 if (icon.isNull()) {
123 addTab(box, shortName); 127 addTab(box, shortName);
128 if (nameDiffers) {
129 setTabToolTip(i, name);
130 }
124 } else { 131 } else {
125 addTab(box, icon, QString("&%1").arg(i + 1)); 132 addTab(box, icon, QString("&%1").arg(i + 1));
126 setTabToolTip(i, name); 133 setTabToolTip(i, name);
127 } 134 }
128 135