#include <HYDROGUI_ObjListBox.h>
#include <HYDROGUI_ObjComboBox.h>
-#include <HYDROGUI_Tool.h>
+#include <HYDROGUI_Tool2.h>
#include <QGridLayout>
#include <QListWidget>
#include <QLabel>
{
myList->clear();
mySelection.Clear();
+ emit selectionChanged();
}
void HYDROGUI_ObjListBox::setSelectedObjects( const HYDROData_SequenceOfObjects& theObjects )
void HYDROGUI_ObjListBox::OnInclude()
{
Append( HYDROGUI_Tool::GetSelectedObjects( module() ) );
+ emit selectionChanged();
}
void HYDROGUI_ObjListBox::OnExclude()
{
QList<QListWidgetItem*> aSelection = myList->selectedItems();
foreach( QListWidgetItem* anItem, aSelection )
+ {
+ QString itemText = anItem->text();
+ for (int i=mySelection.Lower();i<=mySelection.Upper();i++)
+ {
+ QString name = mySelection(i)->GetName();
+ if (itemText == name)
+ {
+ mySelection.Remove(i);
+ break;
+ }
+ }
delete anItem;
+ }
+ emit selectionChanged();
}
void HYDROGUI_ObjListBox::Append( const HYDROData_SequenceOfObjects& theObjects )