1 /****************************************************************************
2 * MeshLab                                                           o o     *
3 * A versatile mesh processing toolbox                             o     o   *
4 *                                                                _   O  _   *
5 * Copyright(C) 2005-2008                                           \/)\/    *
6 * Visual Computing Lab                                            /\/|      *
7 * ISTI - Italian National Research Council                           |      *
8 *                                                                    \      *
9 * All rights reserved.                                                      *
10 *                                                                           *
11 * This program is free software; you can redistribute it and/or modify      *
12 * it under the terms of the GNU General Public License as published by      *
13 * the Free Software Foundation; either version 2 of the License, or         *
14 * (at your option) any later version.                                       *
15 *                                                                           *
16 * This program is distributed in the hope that it will be useful,           *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
19 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
20 * for more details.                                                         *
21 *                                                                           *
22 ****************************************************************************/
23 
24 #include "edit_slice_factory.h"
25 #include "editslice.h"
26 
EditSliceFactory()27 EditSliceFactory::EditSliceFactory()
28 {
29 	editSlice = new QAction(QIcon(":/images/iconslice.png"),"Slice mesh geometry", this);
30 
31 	actionList << editSlice;
32 
33 	foreach(QAction *editAction, actionList)
34 		editAction->setCheckable(true);
35 }
36 
37 //gets a list of actions available from this plugin
actions() const38 QList<QAction *> EditSliceFactory::actions() const
39 {
40 	return actionList;
41 }
42 
43 //get the edit tool for the given action
getMeshEditInterface(QAction * action)44 MeshEditInterface* EditSliceFactory::getMeshEditInterface(QAction *action)
45 {
46 	if(action == editSlice)
47 	{
48 		return new ExtraMeshSlidePlugin();
49 	} else assert(0); //should never be asked for an action that isn't here
50 }
51 
getEditToolDescription(QAction *)52 QString EditSliceFactory::getEditToolDescription(QAction *)
53 {
54 	return ExtraMeshSlidePlugin::Info();
55 }
56 
57  MESHLAB_PLUGIN_NAME_EXPORTER(EditSliceFactory)
58