Changeset 47 in flair-src for branches/mavlink/tools


Ignore:
Timestamp:
Jul 26, 2016, 5:04:31 PM (8 years ago)
Author:
Thomas Fuhrmann
Message:

GUI is working with ListWidget (display only)

Location:
branches/mavlink/tools/Controller/Mavlink
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/mavlink/tools/Controller/Mavlink/build_x86_64/CMakeFiles/mavlink_test.dir/CXX.includecache

    r46 r47  
    641641-
    642642
     643/home/tfuhrman/dev/flair/flair-dev/include/FlairCore/ListWidget.h
     644Widget.h
     645-
     646
    643647/home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Mutex.h
    644648Object.h
     
    748752GroupBox.h
    749753-
     754ListWidget.h
     755-
    750756mavlink.h
    751757/home/tfuhrman/dev/flair/flair-src/tools/Controller/Mavlink/src/mavlink.h
     
    757763-
    758764
    759 /home/tfuhrman/dev/flair/flair-src/tools/Controller/Mavlink/src/main.cpp
    760 FrameworkManager.h
    761 /home/tfuhrman/dev/flair/flair-src/tools/Controller/Mavlink/src/FrameworkManager.h
    762 Mavlink_test.h
    763 /home/tfuhrman/dev/flair/flair-src/tools/Controller/Mavlink/src/Mavlink_test.h
    764 stdio.h
    765 -
    766 tclap/CmdLine.h
    767 -
    768 
    769765/opt/robomap3/1.7.3/core2-64/sysroots/core2-64-poky-linux/usr/include/libxml2/libxml/SAX.h
    770766stdio.h
  • branches/mavlink/tools/Controller/Mavlink/build_x86_64/CMakeFiles/mavlink_test.dir/depend.internal

    r46 r47  
    157157 /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Label.h
    158158 /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Layout.h
     159 /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/ListWidget.h
    159160 /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Mutex.h
    160161 /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Object.h
  • branches/mavlink/tools/Controller/Mavlink/build_x86_64/CMakeFiles/mavlink_test.dir/depend.make

    r46 r47  
    156156CMakeFiles/mavlink_test.dir/src/Mavlink_test.cpp.o: /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Label.h
    157157CMakeFiles/mavlink_test.dir/src/Mavlink_test.cpp.o: /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Layout.h
     158CMakeFiles/mavlink_test.dir/src/Mavlink_test.cpp.o: /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/ListWidget.h
    158159CMakeFiles/mavlink_test.dir/src/Mavlink_test.cpp.o: /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Mutex.h
    159160CMakeFiles/mavlink_test.dir/src/Mavlink_test.cpp.o: /home/tfuhrman/dev/flair/flair-dev/include/FlairCore/Object.h
  • branches/mavlink/tools/Controller/Mavlink/src/Mavlink_test.cpp

    r46 r47  
    3434#include <ComboBox.h>
    3535#include <GroupBox.h>
     36#include <ListWidget.h>
    3637
    3738#include "mavlink.h"
     
    7374  // Show wpt group
    7475  show_wptGroupBox = new GroupBox(settingsTab->NewRow(), "Show waypoints");
    75   label_mission_wpt = new Label(show_wptGroupBox->NewRow(), "Label mission");
    76   label_mission_wpt->SetText("Mission wpt");
    77   label_entrance_wpt = new Label(show_wptGroupBox->LastRowLastCol(), "Label entrance");
    78   label_entrance_wpt->SetText("Entrance wpt");
    79   label_exit_wpt = new Label(show_wptGroupBox->LastRowLastCol(), "Label exit");
    80   label_exit_wpt->SetText("Exit wpt");
    81   label_mission_wpt_list = new Label(show_wptGroupBox->NewRow(), "Label mission list");
    82   label_entrance_wpt_list = new Label(show_wptGroupBox->LastRowLastCol(), "Label entrance list");
    83   label_exit_wpt_list = new Label(show_wptGroupBox->LastRowLastCol(), "Label exit list");
     76  list_mission_wpt = new ListWidget(show_wptGroupBox->NewRow(), "Mission wpt");
     77  list_entrance_wpt = new ListWidget(show_wptGroupBox->LastRowLastCol(), "Entrance wpt");
     78  list_exit_wpt = new ListWidget(show_wptGroupBox->LastRowLastCol(), "Exit wpt");
     79  btn_remove_mission_wpt = new PushButton(show_wptGroupBox->NewRow(), "Remove mission wpt");
     80  btn_remove_entrance_wpt = new PushButton(show_wptGroupBox->LastRowLastCol(), "Remove entrance wpt");
     81  btn_remove_exit_wpt = new PushButton(show_wptGroupBox->LastRowLastCol(), "Remove exit wpt");
     82 
     83
     84  // label_mission_wpt = new Label(show_wptGroupBox->NewRow(), "Label mission");
     85  // label_mission_wpt->SetText("Mission wpt");
     86  // label_entrance_wpt = new Label(show_wptGroupBox->LastRowLastCol(), "Label entrance");
     87  // label_entrance_wpt->SetText("Entrance wpt");
     88  // label_exit_wpt = new Label(show_wptGroupBox->LastRowLastCol(), "Label exit");
     89  // label_exit_wpt->SetText("Exit wpt");
     90  // label_mission_wpt_list = new Label(show_wptGroupBox->NewRow(), "Label mission list");
     91  // label_entrance_wpt_list = new Label(show_wptGroupBox->LastRowLastCol(), "Label entrance list");
     92  // label_exit_wpt_list = new Label(show_wptGroupBox->LastRowLastCol(), "Label exit list");
    8493
    8594  // Action wpt group
     
    92101
    93102  // Put some initial values in the labels
    94   label_mission_wpt_list->SetText("3/3\n5/3.5\n");
    95   label_entrance_wpt_list->SetText("1.5/2.5\n6/6.5\n");
    96   label_exit_wpt_list->SetText("7/7.5\n2/5\n");
    97 
    98   // cmb_box_mission_wpt = new ComboBox(settingsTab->NewRow(), "Mission wpt list");
    99   // cmb_box_mission_wpt->AddItem("7 - 7");
    100   // cmb_box_mission_wpt->AddItem("2.5 - 3");
    101   // cmb_box_mission_wpt->AddItem("3 - 6.5");
     103  // label_mission_wpt_list->SetText("3/3\n5/3.5\n");
     104  // label_entrance_wpt_list->SetText("1.5/2.5\n6/6.5\n");
     105  // label_exit_wpt_list->SetText("7/7.5\n2/5\n");
     106
     107  list_mission_wpt->AddItem("toto");
     108  list_entrance_wpt->AddItem("toto");
     109  list_entrance_wpt->AddItem("tata");
     110  list_exit_wpt->AddItem("toto");
     111
    102112
    103113  mavlinkSocket = new Socket((Thread *)this, "mavlink socket", "127.0.0.1:5000");
     
    131141        // Check the values of the buttons
    132142        // First tab
    133         if (btn_initialize->Clicked()) {
    134                 MissionInitialize();
    135     }
    136         if (btn_start_mission->Clicked()) {
    137                 MissionStart();
    138     }
    139         if (btn_stop_mission->Clicked()) {
    140                 MissionStop();
    141     }
    142         if (btn_kill->Clicked()) {
    143                 MissionKill();
    144     }
    145         // Second tab
    146         if (btn_add_mission_wpt->Clicked()) {
    147                 MissionWptAdd();
    148     }
    149         if (btn_add_entrance_wpt->Clicked()) {
    150                 EntranceWptAdd();
    151     }
    152         if (btn_add_exit_wpt->Clicked()) {
    153                 ExitWptAdd();
    154     }   
     143        if (btn_initialize->Clicked()) {
     144                MissionInitialize();
     145    }
     146        if (btn_start_mission->Clicked()) {
     147                MissionStart();
     148    }
     149        if (btn_stop_mission->Clicked()) {
     150                MissionStop();
     151    }
     152        if (btn_kill->Clicked()) {
     153                MissionKill();
     154    }
     155        // Second tab
     156        if (btn_add_mission_wpt->Clicked()) {
     157      std::ostringstream stringStream;
     158      stringStream.precision(3);
     159      stringStream << fixed;
     160      stringStream << latField->Value() << " - " << lonField->Value();
     161                list_mission_wpt->AddItem(stringStream.str());
     162    }
     163        if (btn_add_entrance_wpt->Clicked()) {
     164                EntranceWptAdd();
     165    }
     166        if (btn_add_exit_wpt->Clicked()) {
     167                ExitWptAdd();
     168    }
     169    if (btn_remove_mission_wpt->Clicked()) {
     170      list_mission_wpt->RemoveItem();
     171    }
     172    if (btn_remove_entrance_wpt->Clicked()) {
     173      list_entrance_wpt->RemoveItem();
     174    }
     175    if (btn_remove_exit_wpt->Clicked()) {
     176      list_exit_wpt->RemoveItem();
     177    }
    155178    if (btn_send_wpt->Clicked()) {
    156                 WptSend();
    157     }
    158         if (btn_clear_wpt->Clicked()) {
    159                 WptClear();
    160     }
    161         if (btn_loop->Clicked()) {
    162                 WptLoopSend();
     179                WptSend();
     180    }
     181        if (btn_clear_wpt->Clicked()) {
     182                WptClear();
     183    }
     184        if (btn_loop->Clicked()) {
     185                WptLoopSend();
    163186    }
    164187
  • branches/mavlink/tools/Controller/Mavlink/src/Mavlink_test.h

    r46 r47  
    3838  class ComboBox;
    3939  class GroupBox;
     40  class ListWidget;
    4041}
    4142}
     
    7778  // Show wpt groupbox
    7879  gui::GroupBox* show_wptGroupBox;
    79   gui::Label* label_mission_wpt;
    80   gui::Label* label_mission_wpt_list;
    81   gui::Label* label_entrance_wpt;
    82   gui::Label* label_entrance_wpt_list;
    83   gui::Label* label_exit_wpt;
    84   gui::Label* label_exit_wpt_list;
     80  gui::ListWidget* list_mission_wpt;
     81  gui::ListWidget* list_entrance_wpt;
     82  gui::ListWidget* list_exit_wpt;
     83  gui::PushButton* btn_remove_mission_wpt;
     84  gui::PushButton* btn_remove_entrance_wpt;
     85  gui::PushButton* btn_remove_exit_wpt; 
     86  // gui::Label* label_mission_wpt;
     87  // gui::Label* label_mission_wpt_list;
     88  // gui::Label* label_entrance_wpt;
     89  // gui::Label* label_entrance_wpt_list;
     90  // gui::Label* label_exit_wpt;
     91  // gui::Label* label_exit_wpt_list;
    8592
    8693  // Remove wpt groupbox
Note: See TracChangeset for help on using the changeset viewer.