Changeset 88 in flair-src


Ignore:
Timestamp:
Sep 28, 2016, 11:45:41 AM (4 years ago)
Author:
Sanahuja Guillaume
Message:

m

Location:
trunk
Files:
165 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/CMakeLists.txt

    r45 r88  
    33include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
    44
    5 SET(PROJECT_SOURCE_FILES
    6         src/Manager.cpp
    7         src/ConnectionLayout.cpp
    8         src/main.cpp
    9         src/UdtSocket.cpp
    10         src/DataPlot1D.cpp
    11         src/DataPlot2D.cpp
    12         src/RangeFinderPlot.cpp
    13         src/Picture.cpp
    14         src/DataRemote.cpp
    15         src/file_ui.cpp
    16         src/FormLayout.cpp
    17         src/Vector3DSpinBox.cpp
    18         src/DoubleSpinBox.cpp
    19         src/SpinBox.cpp
    20         src/CheckBox.cpp
    21         src/ComboBox.cpp
    22         src/Tab.cpp
    23         src/TabWidget.cpp
    24         src/GroupBox.cpp
    25         src/GridLayout.cpp
    26         src/Layout.cpp
    27         src/PushButton.cpp
    28         src/TextEdit.cpp
    29         src/Label.cpp
    30         src/Map.cpp
    31         src/mapwidget.cpp
    32         src/Landmark.cpp
    33         src/XmlWidget.cpp
    34 )
     5execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
     6                OUTPUT_VARIABLE GCC_VERSION)
     7
     8if (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
     9        if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
     10                ADD_DEFINITIONS("-std=c++11")
     11        else()
     12                ADD_DEFINITIONS("-std=c++0x")
     13        endif()
     14else()
     15        message(STATUS "GCC version < 4.3, c+11 is not supported!")
     16endif()
     17
     18FILE(GLOB PROJECT_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
    3519
    3620SET(FILES_TO_MOC
     
    5135        src/XmlWidget.h
    5236        src/ConnectionLayout.h
     37        src/ListWidget.h
    5338)
    5439
  • trunk/tools/FlairGCS/src/Layout.cpp

    r15 r88  
    2222#include <QGeoCoordinate>
    2323#include <QGridLayout>
     24#include "ListWidget.h"
     25#include <QStringList>
    2426
    2527Layout::Layout(QWidget *parent, XmlWidget *xml, QString name, QString type)
     
    248250    widget = new Label(this, row, col, name);
    249251  }
     252  if (type == "ListWidget") {
     253    // Parse the item list   
     254    QStringList items;
     255    int count = 0;
     256    while (dom.hasAttribute("item" + QString::number(count))) {
     257      QString item = dom.attribute("item" + QString::number(count));
     258      items.append(item);
     259      count++;
     260    }
     261    widget = new ListWidget(this, row, col, name, items);
     262  }
    250263
    251264  if (widget != NULL) {
Note: See TracChangeset for help on using the changeset viewer.