00001 /* 00002 * Software License Agreement (BSD License) 00003 * 00004 * Point Cloud Library (PCL) - www.pointclouds.org 00005 * Copyright (c) 2012, Jeremie Papon. 00006 * 00007 * All rights reserved. 00008 * 00009 * Redistribution and use in source and binary forms, with or without 00010 * modification, are permitted provided that the following conditions 00011 * are met: 00012 * 00013 * * Redistributions of source code must retain the above copyright 00014 * notice, this list of conditions and the following disclaimer. 00015 * * Redistributions in binary form must reproduce the above 00016 * copyright notice, this list of conditions and the following 00017 * disclaimer in the documentation and/or other materials provided 00018 * with the distribution. 00019 * * Neither the name of Willow Garage, Inc. nor the names of its 00020 * contributors may be used to endorse or promote products derived 00021 * from this software without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00024 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00025 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00026 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00027 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00028 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00029 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00030 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00031 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00032 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00033 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00034 * POSSIBILITY OF SUCH DAMAGE. 00035 * 00036 */ 00037 00038 #ifndef CLOUD_COMPOSER_H_ 00039 #define CLOUD_COMPOSER_H_ 00040 00041 #include <pcl/apps/cloud_composer/qt.h> 00042 00043 //PCL 00044 #include <pcl/point_cloud.h> 00045 #include <pcl/point_types.h> 00046 00047 #include <ui_cloud_composer_main_window.h> 00048 class QTreeView; 00049 00050 namespace pcl 00051 { 00052 namespace cloud_composer 00053 { 00054 class ProjectModel; 00055 class CloudViewer; 00056 class CloudCommand; 00057 class ToolFactory; 00058 class ToolBoxModel; 00059 class SignalMultiplexer; 00060 00072 class ComposerMainWindow : public QMainWindow, private Ui::ComposerMainWindow 00073 { 00074 Q_OBJECT 00075 public: 00076 explicit ComposerMainWindow (QWidget *parent = 0); 00077 ~ComposerMainWindow (); 00078 00079 signals: 00081 void 00082 activeProjectChanged (ProjectModel* new_model, ProjectModel* previous_model); 00083 00085 void 00086 insertNewCloudFromFile (); 00087 00089 void 00090 insertNewCloudFromRGBandDepth (); 00091 00093 void 00094 saveSelectedCloudToFile (); 00095 00096 public slots: 00097 //Slots for File Menu Actions 00098 void 00099 on_action_new_project__triggered (/*QString name = "unsaved project"*/); 00100 void 00101 on_action_open_cloud_as_new_project__triggered (); 00102 void 00103 on_action_open_project__triggered (); 00104 void 00105 on_action_save_project__triggered (); 00106 void 00107 on_action_save_project_as__triggered (); 00108 void 00109 on_action_save_selected_cloud__triggered (); 00110 void 00111 on_action_exit__triggered (); 00112 00113 //Slots for Edit Menu Actions 00114 void 00115 on_action_insert_from_file__triggered (); 00116 void 00117 on_action_insert_from_openNi_source__triggered (); 00118 void 00119 on_action_insert_from_rgb_depth__triggered (); 00120 00121 00122 00123 void 00124 setCurrentModel (ProjectModel* model); 00125 00126 void 00127 setMouseStyleAction (interactor_styles::INTERACTOR_STYLES selected_style); 00128 00129 void 00130 enqueueToolAction (AbstractTool* tool); 00131 00132 private: 00133 void 00134 connectFileActions (); 00135 void 00136 connectEditActions (); 00137 00138 void 00139 connectViewActions (); 00140 00141 void 00142 initializeCloudBrowser (); 00143 void 00144 initializeCloudViewer (); 00145 void 00146 initializeItemInspector (); 00147 00148 void 00149 initializeToolBox (); 00150 void 00151 initializePlugins (); 00152 00153 00155 ProjectModel* current_model_; 00156 QItemSelectionModel* current_selection_model_; 00157 00158 QMap <QString, ProjectModel*> name_model_map_; 00159 00160 QUndoGroup *undo_group_; 00161 00162 QItemSelectionModel* tool_selection_model_; 00163 ToolBoxModel* tool_box_model_; 00164 00165 SignalMultiplexer* multiplexer_; 00166 00167 QActionGroup* mouse_style_group_; 00168 }; 00169 00170 } 00171 } 00172 00173 00174 00175 00176 #endif // CLOUD_COMPOSER_H