// %flair:license{ // This file is part of the Flair framework distributed under the // CECILL-C License, Version 1.0. // %flair:license} // created: 2016/07/26 // filename: ListWidget.cpp // // author: Thomas Fuhrmann // Copyright Heudiasyc UMR UTC/CNRS 7253 // // version: $Id: $ // // purpose: Class displaying a QListWidget on the ground station // // /*********************************************************************/ #include "ListWidget.h" #include "Layout.h" #include "LayoutPosition.h" using std::string; namespace flair { namespace gui { ListWidget::ListWidget(const LayoutPosition *position, string name) : Widget(position->getLayout(), name, string("ListWidget")) { // value_changed = true; SetVolatileXmlProp("row", position->Row()); SetVolatileXmlProp("col", position->Col()); delete position; SendXml(); } ListWidget::~ListWidget() { core::Object::ObjectName(); } void ListWidget::AddItem(string name) { SetVolatileXmlProp("item", name); SendXml(); } void ListWidget::RemoveItem(void) { SetVolatileXmlProp("delete", 0); SendXml(); } void ListWidget::XmlEvent(void) { // GetMutex(); // if (GetPersistentXmlProp("value", box_value)) // SetValueChanged(); // ReleaseMutex(); } } // end namespace gui } // end namespace flair