Ignore:
Timestamp:
Jul 27, 2016, 5:42:27 PM (5 years ago)
Author:
Thomas Fuhrmann
Message:

Default xml configuration is working with ListWidget?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mavlink/lib/FlairCore/src/ListWidget.cpp

    r49 r53  
    1919#include "LayoutPosition.h"
    2020
     21#include <sstream>
     22#include <iostream>
     23
    2124using std::string;
     25using std::ostringstream;
    2226
    2327namespace flair {
     
    2630ListWidget::ListWidget(const LayoutPosition *position, string name)
    2731    : Widget(position->getLayout(), name, string("ListWidget")) {
    28  
     32  size_t count = 0;
     33  while (1) {
     34    string item;
     35    ostringstream item_prop;
     36    item_prop << "item" << count;
     37    if(GetPersistentXmlProp(item_prop.str(), item)) {
     38      SetVolatileXmlProp(item_prop.str(), item);
     39      items.push_back(item);
     40    } else {
     41      break;
     42    }
     43    count++;
     44  }
    2945  // value_changed = true;
    3046  SetVolatileXmlProp("row", position->Row());
     
    4763
    4864void ListWidget::XmlEvent(void) {
     65  std::cout << "FlairCore ListWidget XmlEvent" << std::endl;
    4966  // GetMutex();
    5067  // if (GetPersistentXmlProp("value", box_value))
Note: See TracChangeset for help on using the changeset viewer.