[Eros-commits] r356 - in tags/diamondback/tests: . hello_qt …

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: snorri@code.ros.org
Date:  
To: eros-commits
Subject: [Eros-commits] r356 - in tags/diamondback/tests: . hello_qt hello_qt/include hello_qt/include/hello_qt hello_qt/resources hello_qt/resources/images hello_qt/src hello_qt/ui hello_world
Author: snorri
Date: 2011-07-24 19:16:00 -0700 (Sun, 24 Jul 2011)
New Revision: 356

Added:
tags/diamondback/tests/hello_qt/
tags/diamondback/tests/hello_qt/.cproject
tags/diamondback/tests/hello_qt/.project
tags/diamondback/tests/hello_qt/CMakeLists.txt
tags/diamondback/tests/hello_qt/Makefile
tags/diamondback/tests/hello_qt/include/
tags/diamondback/tests/hello_qt/include/hello_qt/
tags/diamondback/tests/hello_qt/include/hello_qt/main_window.hpp
tags/diamondback/tests/hello_qt/mainpage.dox
tags/diamondback/tests/hello_qt/manifest.xml
tags/diamondback/tests/hello_qt/resources/
tags/diamondback/tests/hello_qt/resources/images.qrc
tags/diamondback/tests/hello_qt/resources/images/
tags/diamondback/tests/hello_qt/resources/images/icon.png
tags/diamondback/tests/hello_qt/src/
tags/diamondback/tests/hello_qt/src/main.cpp
tags/diamondback/tests/hello_qt/src/main_window.cpp
tags/diamondback/tests/hello_qt/ui/
tags/diamondback/tests/hello_qt/ui/main_window.ui
Modified:
tags/diamondback/tests/hello_world/mainpage.dox
Log:
hello_qt : a simple non-ros qt test package.


Property changes on: tags/diamondback/tests/hello_qt
___________________________________________________________________
Added: svn:ignore
+ build

bin


Added: tags/diamondback/tests/hello_qt/.cproject
===================================================================
--- tags/diamondback/tests/hello_qt/.cproject                            (rev 0)
+++ tags/diamondback/tests/hello_qt/.cproject    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+    <storageModule moduleId="org.eclipse.cdt.core.settings">
+        <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.2011200138">
+            <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.2011200138" moduleId="org.eclipse.cdt.core.settings" name="Default">
+                <externalSettings/>
+                <extensions>
+                    <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+                    <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                    <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+                    <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                    <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                    <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                </extensions>
+            </storageModule>
+            <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+                <configuration artifactName="${ProjName}" buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.2011200138" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+                    <folderInfo id="cdt.managedbuild.toolchain.gnu.base.2011200138.795620002" name="/" resourcePath="">
+                        <toolChain id="cdt.managedbuild.toolchain.gnu.base.486270857" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
+                            <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1867349010" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
+                            <builder id="cdt.managedbuild.target.gnu.builder.base.83249026" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+                            <tool id="cdt.managedbuild.tool.gnu.archiver.base.1786416206" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+                            <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1465365367" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
+                            <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1936528422" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
+                            <tool id="cdt.managedbuild.tool.gnu.c.linker.base.929233917" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
+                            <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.828621237" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
+                            <tool id="cdt.managedbuild.tool.gnu.assembler.base.506443657" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
+                        </toolChain>
+                    </folderInfo>
+                </configuration>
+            </storageModule>
+            <storageModule moduleId="scannerConfiguration">
+                <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+                <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="specsFile">
+                        <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+                <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="makefileGenerator">
+                        <runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+                <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="specsFile">
+                        <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+                <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="specsFile">
+                        <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+                <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="specsFile">
+                        <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+                <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="specsFile">
+                        <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+                <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="specsFile">
+                        <runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+                <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+                    <buildOutputProvider>
+                        <openAction enabled="true" filePath=""/>
+                        <parser enabled="true"/>
+                    </buildOutputProvider>
+                    <scannerInfoProvider id="specsFile">
+                        <runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+                        <parser enabled="true"/>
+                    </scannerInfoProvider>
+                </profile>
+            </storageModule>
+            <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+        </cconfiguration>
+    </storageModule>
+    <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+        <project id="hello_qt.null.1194181893" name="hello_qt"/>
+    </storageModule>
+</cproject>



Property changes on: tags/diamondback/tests/hello_qt/.cproject
___________________________________________________________________
Added: svn:mime-type
+ text/plain

Added: tags/diamondback/tests/hello_qt/.project
===================================================================
--- tags/diamondback/tests/hello_qt/.project                            (rev 0)
+++ tags/diamondback/tests/hello_qt/.project    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+    <name>hello_qt</name>
+    <comment></comment>
+    <projects>
+    </projects>
+    <buildSpec>
+        <buildCommand>
+            <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+            <triggers>clean,full,incremental,</triggers>
+            <arguments>
+                <dictionary>
+                    <key>?name?</key>
+                    <value></value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.append_environment</key>
+                    <value>true</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+                    <value>all</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.buildArguments</key>
+                    <value></value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.buildCommand</key>
+                    <value>make</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+                    <value>clean</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.contents</key>
+                    <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+                    <value>false</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+                    <value>true</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+                    <value>true</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+                    <value>all</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.stopOnError</key>
+                    <value>true</value>
+                </dictionary>
+                <dictionary>
+                    <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+                    <value>true</value>
+                </dictionary>
+            </arguments>
+        </buildCommand>
+        <buildCommand>
+            <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+            <triggers>full,incremental,</triggers>
+            <arguments>
+            </arguments>
+        </buildCommand>
+    </buildSpec>
+    <natures>
+        <nature>org.eclipse.cdt.core.cnature</nature>
+        <nature>org.eclipse.cdt.core.ccnature</nature>
+        <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+        <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+    </natures>
+</projectDescription>



Property changes on: tags/diamondback/tests/hello_qt/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain

Added: tags/diamondback/tests/hello_qt/CMakeLists.txt
===================================================================
--- tags/diamondback/tests/hello_qt/CMakeLists.txt                            (rev 0)
+++ tags/diamondback/tests/hello_qt/CMakeLists.txt    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,63 @@
+##############################################################################
+# CMake
+##############################################################################
+
+cmake_minimum_required(VERSION 2.4.6)
+
+set(CMAKE_VERBOSE_MAKEFILE true)
+
+##############################################################################
+# YCS-ROS
+##############################################################################
+
+include($ENV{YCS_ROOT}/ycs_tools/ycs_build/ycsbuild.cmake)
+
+##############################################################################
+# Build
+##############################################################################
+
+# Set the build type.  Options are:
+#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
+#  Debug          : w/ debug symbols, w/o optimization
+#  Release        : w/o debug symbols, w/ optimization
+#  RelWithDebInfo : w/ debug symbols, w/ optimization
+#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
+# set(ROS_BUILD_TYPE Debug)
+
+##############################################################################
+# Init - the order of the preceding commands is important!
+##############################################################################
+
+ycsbuild_init()
+
+##############################################################################
+# Qt Environment
+##############################################################################
+
+rosbuild_include(eros_build eros_build_utilities)
+eros_prepare_qt4(QtCore QtGui) # Add the appropriate components to the component list here
+
+##############################################################################
+# Sections
+##############################################################################
+
+file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
+file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
+file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/hello_qt/*.hpp)
+
+QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
+QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
+QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})
+
+##############################################################################
+# Sources
+##############################################################################
+
+file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)
+
+##############################################################################
+# Binaries
+##############################################################################
+
+rosbuild_add_executable(hello_qt ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
+target_link_libraries(hello_qt ${QT_LIBRARIES})


Added: tags/diamondback/tests/hello_qt/Makefile
===================================================================
--- tags/diamondback/tests/hello_qt/Makefile                            (rev 0)
+++ tags/diamondback/tests/hello_qt/Makefile    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
\ No newline at end of file


Added: tags/diamondback/tests/hello_qt/include/hello_qt/main_window.hpp
===================================================================
--- tags/diamondback/tests/hello_qt/include/hello_qt/main_window.hpp                            (rev 0)
+++ tags/diamondback/tests/hello_qt/include/hello_qt/main_window.hpp    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,56 @@
+/**
+ * @file /include/hello_qt/main_window.hpp
+ *
+ * @brief Qt based gui for hello_qt.
+ *
+ * @date November 2010
+ **/
+#ifndef hello_qt_MAIN_WINDOW_H
+#define hello_qt_MAIN_WINDOW_H
+
+/*****************************************************************************
+** Includes
+*****************************************************************************/
+
+#include <QtGui/QMainWindow>
+#include "ui_main_window.h"
+
+/*****************************************************************************
+** Namespace
+*****************************************************************************/
+
+namespace hello_qt {
+
+/*****************************************************************************
+** Interface [MainWindow]
+*****************************************************************************/
+/**
+ * @brief Qt central, all operations relating to the view part here.
+ */
+class MainWindow : public QMainWindow {
+Q_OBJECT
+
+public:
+    MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+
+    void ReadSettings(); // Load up qt program settings at startup
+    void WriteSettings(); // Save qt program settings when closing
+
+    void closeEvent(QCloseEvent *event); // Overloaded function
+
+public slots:
+    // Put automatically triggered slots here (because of connectSlotsByName())
+    // void on_button_enable_clicked(bool check); // example only
+    void on_actionAbout_triggered();
+    // examples: typical ros style connection slots
+    // void on_button_connect_clicked(bool check );
+    // void on_checkbox_use_environment_stateChanged(int state);
+
+private:
+    Ui::MainWindowDesign ui;
+};
+
+}  // namespace hello_qt
+
+#endif // hello_qt_MAIN_WINDOW_H


Added: tags/diamondback/tests/hello_qt/mainpage.dox
===================================================================
--- tags/diamondback/tests/hello_qt/mainpage.dox                            (rev 0)
+++ tags/diamondback/tests/hello_qt/mainpage.dox    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,12 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\section hello Hello Qt
+
+This is just a simple qt program written inside a ros package, but without ros api.
+
+This is useful if you want to test that your cross compiler is working with qt in the 
+ros build environment without actually trying to test any of the ros api.
+
+*/


Added: tags/diamondback/tests/hello_qt/manifest.xml
===================================================================
--- tags/diamondback/tests/hello_qt/manifest.xml                            (rev 0)
+++ tags/diamondback/tests/hello_qt/manifest.xml    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,23 @@
+<package>
+  <description brief="hello_qt">
+
+     Tests a simple qt only (no ros api) ros package. Useful when 
+     wanting to check that your cross compiler is working with 
+     your cross compiled qt.
+
+  </description>
+  <author>Daniel Stonier</author>
+  <license>BSD</license>
+  <review status="doc reviewed" notes=""/>
+  <url>http://ros.org/wiki/hello_qt</url>
+
+
+  <depend package="eros_build"/>
+  <!-- 
+    Note, you can turn this into a ros qt app by 
+    uncommenting the roscpp dependency.  
+  -->  
+  <!--  <depend package="roscpp"/> -->
+  <rosdep name="qt4"/>
+  
+</package>


Added: tags/diamondback/tests/hello_qt/resources/images/icon.png
===================================================================
(Binary files differ)


Property changes on: tags/diamondback/tests/hello_qt/resources/images/icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream

Added: tags/diamondback/tests/hello_qt/resources/images.qrc
===================================================================
--- tags/diamondback/tests/hello_qt/resources/images.qrc                            (rev 0)
+++ tags/diamondback/tests/hello_qt/resources/images.qrc    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/" >
+        <file>images/icon.png</file>
+    </qresource>
+</RCC>


Added: tags/diamondback/tests/hello_qt/src/main.cpp
===================================================================
--- tags/diamondback/tests/hello_qt/src/main.cpp                            (rev 0)
+++ tags/diamondback/tests/hello_qt/src/main.cpp    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,32 @@
+/**
+ * @file /src/main.cpp
+ *
+ * @brief Qt based gui.
+ *
+ * @date November 2010
+ **/
+/*****************************************************************************
+** Includes
+*****************************************************************************/
+
+#include <QtGui>
+#include <QApplication>
+#include "../include/hello_qt/main_window.hpp"
+
+/*****************************************************************************
+** Main
+*****************************************************************************/
+
+int main(int argc, char **argv) {
+
+    /*********************
+    ** Qt
+    **********************/
+    QApplication app(argc, argv);
+    hello_qt::MainWindow w;
+    w.show();
+    app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
+    int result = app.exec();
+
+    return result;
+}


Added: tags/diamondback/tests/hello_qt/src/main_window.cpp
===================================================================
--- tags/diamondback/tests/hello_qt/src/main_window.cpp                            (rev 0)
+++ tags/diamondback/tests/hello_qt/src/main_window.cpp    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,113 @@
+/**
+ * @file /src/main_window.cpp
+ *
+ * @brief Implementation for the qt gui.
+ *
+ * @date February 2011
+ **/
+/*****************************************************************************
+** Includes
+*****************************************************************************/
+
+#include <QtGui>
+#include <QMessageBox>
+#include <iostream>
+#include "../include/hello_qt/main_window.hpp"
+
+/*****************************************************************************
+** Namespaces
+*****************************************************************************/
+
+namespace hello_qt {
+
+using namespace Qt;
+
+/*****************************************************************************
+** Implementation [MainWindow]
+*****************************************************************************/
+
+MainWindow::MainWindow(QWidget *parent)
+    : QMainWindow(parent)
+{
+    ui.setupUi(this); // Calling this incidentally connects all ui's triggers to on_...() callbacks in this class.
+    QObject::connect(ui.actionAbout_Qt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt())); // qApp is a global variable for the application
+
+    ReadSettings();
+    setWindowIcon(QIcon(":/images/icon.png"));
+    ui.tab_manager->setCurrentIndex(0); // ensure the first tab is showing - qt-designer should have this already hardwired, but often loses it (settings?).
+
+    // example connection to the logging viewer
+    // ui.view_logging->setModel(qnode.loggingModel());
+}
+
+MainWindow::~MainWindow() {}
+
+/*****************************************************************************
+** Implementation [Slots]
+*****************************************************************************/
+
+/*
+ * These triggers whenever the button is clicked, regardless of whether it
+ * is already checked or not.
+ */
+
+//void MainWindow::on_button_connect_clicked(bool check ) {
+//    ui.button_connect->setEnabled(false);
+    // typical ros connect code.
+//    if ( ui.checkbox_use_environment->isChecked() ) {
+//        qnode.init(ui.line_edit_topic->text().toStdString());
+//    } else {
+//        qnode.init(ui.line_edit_master->text().toStdString(),
+//                   ui.line_edit_host->text().toStdString(),
+//                   ui.line_edit_topic->text().toStdString());
+//        ui.line_edit_master->setReadOnly(true);
+//        ui.line_edit_host->setReadOnly(true);
+//        ui.line_edit_topic->setReadOnly(true);
+//    }
+//}
+
+//void MainWindow::on_checkbox_use_environment_stateChanged(int state) {
+    // typical ros environment state changed code.
+//    bool enabled;
+//    if ( state == 0 ) {
+//        enabled = true;
+//    } else {
+//        enabled = false;
+//    }
+//    ui.line_edit_master->setEnabled(enabled);
+//    ui.line_edit_host->setEnabled(enabled);
+//    ui.line_edit_topic->setEnabled(enabled);
+//}
+
+/*****************************************************************************
+** Implementation [Menu]
+*****************************************************************************/
+
+void MainWindow::on_actionAbout_triggered() {
+    QMessageBox::about(this, tr("About ..."),tr("<h2>PACKAGE_NAME Test Program 0.10</h2><p>Copyright Yujin Robot</p><p>This package needs an about description.</p>"));
+}
+
+/*****************************************************************************
+** Implementation [Configuration]
+*****************************************************************************/
+
+void MainWindow::ReadSettings() {
+    QSettings settings("Qt-Ros Package", "hello_qt");
+    QRect rect = settings.value("geometry", QRect(200, 200, 400, 400)).toRect();
+    move(rect.topLeft());
+    resize(rect.size());
+}
+
+void MainWindow::WriteSettings() {
+    QSettings settings("Qt-Ros Package", "hello_qt");
+    settings.setValue("geometry", geometry());
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+    WriteSettings();
+    event->accept();
+}
+
+}  // namespace hello_qt
+


Added: tags/diamondback/tests/hello_qt/ui/main_window.ui
===================================================================
--- tags/diamondback/tests/hello_qt/ui/main_window.ui                            (rev 0)
+++ tags/diamondback/tests/hello_qt/ui/main_window.ui    2011-07-25 02:16:00 UTC (rev 356)
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindowDesign</class>
+ <widget class="QMainWindow" name="MainWindowDesign">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>944</width>
+    <height>704</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>QKorus</string>
+  </property>
+  <property name="locale">
+   <locale language="English" country="Australia"/>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QHBoxLayout">
+    <item>
+     <widget class="QTabWidget" name="tab_manager">
+      <property name="minimumSize">
+       <size>
+        <width>100</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="locale">
+       <locale language="English" country="Australia"/>
+      </property>
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="tab_status">
+       <attribute name="title">
+        <string>Communications</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item>
+         <widget class="QGroupBox" name="groupBox_12">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="title">
+           <string>Logging</string>
+          </property>
+          <layout class="QGridLayout" name="gridLayout_3">
+           <item row="0" column="0">
+            <widget class="QListView" name="view_logging"/>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>944</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
+     <string>&amp;App</string>
+    </property>
+    <addaction name="action_Preferences"/>
+    <addaction name="separator"/>
+    <addaction name="actionAbout"/>
+    <addaction name="actionAbout_Qt"/>
+    <addaction name="separator"/>
+    <addaction name="action_Quit"/>
+   </widget>
+   <addaction name="menu_File"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QDockWidget" name="dock_status">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>318</width>
+     <height>363</height>
+    </size>
+   </property>
+   <property name="allowedAreas">
+    <set>Qt::RightDockWidgetArea</set>
+   </property>
+   <property name="windowTitle">
+    <string>Command Panel</string>
+   </property>
+   <attribute name="dockWidgetArea">
+    <number>2</number>
+   </attribute>
+   <widget class="QWidget" name="dockWidgetContents_2">
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QFrame" name="frame">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="frameShape">
+        <enum>QFrame::StyledPanel</enum>
+       </property>
+       <property name="frameShadow">
+        <enum>QFrame::Raised</enum>
+       </property>
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="QGroupBox" name="groupBox">
+          <property name="title">
+           <string>Ros Master</string>
+          </property>
+          <layout class="QGridLayout" name="gridLayout">
+           <item row="0" column="0">
+            <widget class="QLabel" name="label">
+             <property name="frameShape">
+              <enum>QFrame::StyledPanel</enum>
+             </property>
+             <property name="frameShadow">
+              <enum>QFrame::Raised</enum>
+             </property>
+             <property name="text">
+              <string>Master URL</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0" colspan="2">
+            <widget class="QLineEdit" name="line_edit_master">
+             <property name="text">
+              <string>http://192.168.1.2:11311/</string>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="0">
+            <widget class="QLabel" name="label_2">
+             <property name="frameShape">
+              <enum>QFrame::StyledPanel</enum>
+             </property>
+             <property name="frameShadow">
+              <enum>QFrame::Raised</enum>
+             </property>
+             <property name="text">
+              <string>Host IP</string>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="0" colspan="2">
+            <widget class="QLineEdit" name="line_edit_host">
+             <property name="text">
+              <string>192.168.1.67</string>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="0">
+            <widget class="QLabel" name="label_3">
+             <property name="frameShape">
+              <enum>QFrame::StyledPanel</enum>
+             </property>
+             <property name="frameShadow">
+              <enum>QFrame::Raised</enum>
+             </property>
+             <property name="text">
+              <string>Topic</string>
+             </property>
+            </widget>
+           </item>
+           <item row="5" column="0" colspan="2">
+            <widget class="QLineEdit" name="line_edit_topic">
+             <property name="text">
+              <string>/chatter</string>
+             </property>
+            </widget>
+           </item>
+           <item row="6" column="0" colspan="2">
+            <widget class="QCheckBox" name="checkbox_use_environment">
+             <property name="layoutDirection">
+              <enum>Qt::RightToLeft</enum>
+             </property>
+             <property name="text">
+              <string>Use environment variables</string>
+             </property>
+            </widget>
+           </item>
+           <item row="7" column="0" colspan="2">
+            <widget class="QCheckBox" name="checkbox_remember_settings">
+             <property name="layoutDirection">
+              <enum>Qt::RightToLeft</enum>
+             </property>
+             <property name="text">
+              <string>Remember settings on startup</string>
+             </property>
+            </widget>
+           </item>
+           <item row="8" column="0">
+            <spacer name="horizontalSpacer">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>170</width>
+               <height>21</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+           <item row="8" column="1">
+            <widget class="QPushButton" name="button_connect">
+             <property name="enabled">
+              <bool>false</bool>
+             </property>
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="toolTip">
+              <string>Set the target to the current joint trajectory state.</string>
+             </property>
+             <property name="statusTip">
+              <string>Clear all waypoints and set the target to the current joint trajectory state.</string>
+             </property>
+             <property name="text">
+              <string>Connect</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <spacer name="verticalSpacer_3">
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>233</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="quit_button">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Quit</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <action name="action_Quit">
+   <property name="text">
+    <string>&amp;Quit</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+   <property name="shortcutContext">
+    <enum>Qt::ApplicationShortcut</enum>
+   </property>
+  </action>
+  <action name="action_Preferences">
+   <property name="text">
+    <string>&amp;Preferences</string>
+   </property>
+  </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>&amp;About</string>
+   </property>
+  </action>
+  <action name="actionAbout_Qt">
+   <property name="text">
+    <string>About &amp;Qt</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>action_Quit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindowDesign</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>299</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>quit_button</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindowDesign</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>859</x>
+     <y>552</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>469</x>
+     <y>299</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>


Modified: tags/diamondback/tests/hello_world/mainpage.dox
===================================================================
--- tags/diamondback/tests/hello_world/mainpage.dox    2011-07-25 02:15:30 UTC (rev 355)
+++ tags/diamondback/tests/hello_world/mainpage.dox    2011-07-25 02:16:00 UTC (rev 356)
@@ -4,7 +4,7 @@


\section hello Hello World

-This is just a simple c++ hello world program written inside a ros package.
+This is just a simple c++ hello world program written inside a ros package, but without ros api.

This is useful if you want to test that your cross compiler is working in the ros
build environment without actually trying to test any of the ros api.

_______________________________________________
Eros-commits mailing list

https://code.ros.org/mailman/listinfo/eros-commits