mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 11:26:11 +00:00
removing unnecessary change mask dialog used at import tyme
This commit is contained in:
parent
45d972e48c
commit
0f9041d226
@ -1,149 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* An extendible mesh processor o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005, 2006 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.1 2006/01/30 06:32:33 buzzelli
|
||||
added a dialog used to select type of data being imported
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
#include "changeMaskDialog.h"
|
||||
#include "MeshModel.h"
|
||||
//#include <wrap/io_trimesh/io_mask.h>
|
||||
|
||||
ChangeMaskDialog::ChangeMaskDialog(int capability, QWidget *parent) : capability(capability), QDialog(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
mask = capability;
|
||||
|
||||
connect(okButton, SIGNAL(clicked()), this, SLOT(slotOkButtonPressed()));
|
||||
connect(AllButton,SIGNAL(clicked()),this,SLOT(slotSelectionAllButtonPressed()));
|
||||
connect(NoneButton,SIGNAL(clicked()),this,SLOT(slotSelectionNoneButtonPressed()));
|
||||
|
||||
AllButton->setChecked(true);
|
||||
setMaskCapability();
|
||||
}
|
||||
|
||||
void ChangeMaskDialog::setMaskCapability()
|
||||
{
|
||||
//vertices
|
||||
(capability & MeshModel::IOM_VERTQUALITY) ? check_iom_vertquality->setChecked(true) : check_iom_vertquality->setEnabled(false);
|
||||
(capability & MeshModel::IOM_VERTFLAGS) ? check_iom_vertflags->setChecked(true) : check_iom_vertflags->setEnabled(false);
|
||||
(capability & MeshModel::IOM_VERTCOLOR) ? check_iom_vertcolor->setChecked(true) : check_iom_vertcolor->setEnabled(false);
|
||||
(capability & MeshModel::IOM_VERTTEXCOORD) ? check_iom_verttexcoord->setChecked(true) :check_iom_verttexcoord->setEnabled(false);
|
||||
(capability & MeshModel::IOM_VERTNORMAL) ? check_iom_vertnormal->setChecked(true) : check_iom_vertnormal->setEnabled(false);
|
||||
|
||||
// faces
|
||||
(capability & MeshModel::IOM_FACEQUALITY) ? check_iom_facequality->setChecked(true) : check_iom_facequality->setEnabled(false);
|
||||
(capability & MeshModel::IOM_FACEFLAGS) ? check_iom_faceflags->setChecked(true) : check_iom_faceflags->setEnabled(false);
|
||||
(capability & MeshModel::IOM_FACECOLOR) ? check_iom_facecolor->setChecked(true) : check_iom_facecolor->setEnabled(false);
|
||||
(capability & MeshModel::IOM_FACENORMAL) ? check_iom_facenormal->setChecked(true) : check_iom_facenormal->setEnabled(false);
|
||||
|
||||
// wedges
|
||||
(capability & MeshModel::IOM_WEDGCOLOR) ? check_iom_wedgcolor->setChecked(true) : check_iom_wedgcolor->setEnabled(false);
|
||||
(capability & MeshModel::IOM_WEDGTEXCOORD) ? check_iom_wedgtexcoord->setChecked(true) :check_iom_wedgtexcoord->setEnabled(false);
|
||||
(capability & MeshModel::IOM_WEDGNORMAL) ? check_iom_wedgnormal->setChecked(true) : check_iom_wedgnormal->setEnabled(false);
|
||||
|
||||
// camera
|
||||
(capability & MeshModel::IOM_CAMERA) ? check_iom_camera->setChecked(true) : check_iom_camera->setEnabled(false);
|
||||
}
|
||||
|
||||
int ChangeMaskDialog::getNewMask()
|
||||
{
|
||||
return mask;
|
||||
}
|
||||
|
||||
void ChangeMaskDialog::slotOkButtonPressed()
|
||||
{
|
||||
int newmask = 0;
|
||||
|
||||
if( check_iom_vertflags->isChecked() ) { newmask |= MeshModel::IOM_VERTFLAGS; }
|
||||
if( check_iom_vertcolor->isChecked() ) { newmask |= MeshModel::IOM_VERTCOLOR; }
|
||||
if( check_iom_vertquality->isChecked() ) { newmask |= MeshModel::IOM_VERTQUALITY; }
|
||||
if( check_iom_verttexcoord->isChecked() ) { newmask |= MeshModel::IOM_VERTTEXCOORD; }
|
||||
if( check_iom_vertnormal->isChecked() ) { newmask |= MeshModel::IOM_VERTNORMAL; }
|
||||
|
||||
if( check_iom_faceflags->isChecked() ) { newmask |= MeshModel::IOM_FACEFLAGS; }
|
||||
if( check_iom_facecolor->isChecked() ) { newmask |= MeshModel::IOM_FACECOLOR; }
|
||||
if( check_iom_facequality->isChecked() ) { newmask |= MeshModel::IOM_FACEQUALITY; }
|
||||
if( check_iom_facenormal->isChecked() ) { newmask |= MeshModel::IOM_FACENORMAL; }
|
||||
|
||||
if( check_iom_wedgcolor->isChecked() ) { newmask |= MeshModel::IOM_WEDGCOLOR; }
|
||||
if( check_iom_wedgtexcoord->isChecked() ) { newmask |= MeshModel::IOM_WEDGTEXCOORD; }
|
||||
if( check_iom_wedgnormal->isChecked() ) { newmask |= MeshModel::IOM_WEDGNORMAL; }
|
||||
|
||||
if( check_iom_camera->isChecked() ) { newmask |= MeshModel::IOM_CAMERA; }
|
||||
|
||||
mask = newmask;
|
||||
}
|
||||
|
||||
void ChangeMaskDialog::slotSelectionAllButtonPressed()
|
||||
{
|
||||
//vertices
|
||||
if (capability & MeshModel::IOM_VERTQUALITY) check_iom_vertquality->setChecked(true);
|
||||
if (capability & MeshModel::IOM_VERTFLAGS) check_iom_vertflags->setChecked(true);
|
||||
if (capability & MeshModel::IOM_VERTCOLOR) check_iom_vertcolor->setChecked(true);
|
||||
if (capability & MeshModel::IOM_VERTTEXCOORD) check_iom_verttexcoord->setChecked(true);
|
||||
if (capability & MeshModel::IOM_VERTNORMAL) check_iom_vertnormal->setChecked(true);
|
||||
|
||||
// faces
|
||||
if (capability & MeshModel::IOM_FACEQUALITY) check_iom_facequality->setChecked(true);
|
||||
if (capability & MeshModel::IOM_FACEFLAGS) check_iom_faceflags->setChecked(true);
|
||||
if (capability & MeshModel::IOM_FACECOLOR) check_iom_facecolor->setChecked(true);
|
||||
if (capability & MeshModel::IOM_FACENORMAL) check_iom_facenormal->setChecked(true);
|
||||
|
||||
// wedges
|
||||
if (capability & MeshModel::IOM_WEDGCOLOR) check_iom_wedgcolor->setChecked(true);
|
||||
if (capability & MeshModel::IOM_WEDGTEXCOORD) check_iom_wedgtexcoord->setChecked(true);
|
||||
if (capability & MeshModel::IOM_WEDGNORMAL) check_iom_wedgnormal->setChecked(true);
|
||||
|
||||
// camera
|
||||
if (capability & MeshModel::IOM_CAMERA) check_iom_camera->setChecked(true);
|
||||
}
|
||||
|
||||
void ChangeMaskDialog::slotSelectionNoneButtonPressed()
|
||||
{
|
||||
//vertices
|
||||
if (capability & MeshModel::IOM_VERTQUALITY) check_iom_vertquality->setChecked(false);
|
||||
if (capability & MeshModel::IOM_VERTFLAGS) check_iom_vertflags->setChecked(false);
|
||||
if (capability & MeshModel::IOM_VERTCOLOR) check_iom_vertcolor->setChecked(false);
|
||||
if (capability & MeshModel::IOM_VERTTEXCOORD) check_iom_verttexcoord->setChecked(false);
|
||||
if (capability & MeshModel::IOM_VERTNORMAL) check_iom_vertnormal->setChecked(false);
|
||||
|
||||
// faces
|
||||
if (capability & MeshModel::IOM_FACEQUALITY) check_iom_facequality->setChecked(false);
|
||||
if (capability & MeshModel::IOM_FACEFLAGS) check_iom_faceflags->setChecked(false);
|
||||
if (capability & MeshModel::IOM_FACECOLOR) check_iom_facecolor->setChecked(false);
|
||||
if (capability & MeshModel::IOM_FACENORMAL) check_iom_facenormal->setChecked(false);
|
||||
|
||||
// wedges
|
||||
if (capability & MeshModel::IOM_WEDGCOLOR) check_iom_wedgcolor->setChecked(false);
|
||||
if (capability & MeshModel::IOM_WEDGTEXCOORD) check_iom_wedgtexcoord->setChecked(false);
|
||||
if (capability & MeshModel::IOM_WEDGNORMAL) check_iom_wedgnormal->setChecked(false);
|
||||
|
||||
// camera
|
||||
if (capability & MeshModel::IOM_CAMERA) check_iom_camera->setChecked(false);
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* An extendible mesh processor o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005, 2006 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.1 2006/01/30 06:32:33 buzzelli
|
||||
added a dialog used to select type of data being imported
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
#ifndef __CHANGEMASK_DIALOG_H
|
||||
#define __CHANGEMASK_DIALOG_H
|
||||
|
||||
#include "ui_changeMaskDialog.h"
|
||||
|
||||
class ChangeMaskDialog : public QDialog, Ui::ChangeMaskDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ChangeMaskDialog(int capability = 0, QWidget *parent = 0);
|
||||
|
||||
void setMaskCapability();
|
||||
int getNewMask();
|
||||
|
||||
private slots:
|
||||
void slotOkButtonPressed();
|
||||
void slotSelectionAllButtonPressed();
|
||||
void slotSelectionNoneButtonPressed();
|
||||
|
||||
private:
|
||||
int capability;
|
||||
int mask;
|
||||
};
|
||||
|
||||
#endif // __CHANGEMASK_DIALOG_H
|
||||
@ -1,315 +0,0 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>ChangeMaskDialog</class>
|
||||
<widget class="QDialog" name="ChangeMaskDialog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>395</width>
|
||||
<height>225</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Import options</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>180</y>
|
||||
<width>161</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton" >
|
||||
<property name="text" >
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton" >
|
||||
<property name="text" >
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget_3" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>180</y>
|
||||
<width>162</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSplitter" name="splitter" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>180</y>
|
||||
<width>158</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
</layout>
|
||||
<widget class="QSplitter" name="splitter_2" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
</layout>
|
||||
<widget class="QRadioButton" name="AllButton" >
|
||||
<property name="text" >
|
||||
<string>All</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="NoneButton" >
|
||||
<property name="text" >
|
||||
<string>None</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="check_iom_camera" >
|
||||
<property name="text" >
|
||||
<string>Camera</string>
|
||||
</property>
|
||||
<property name="checkable" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>111</width>
|
||||
<height>150</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Vert</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_vertflags" >
|
||||
<property name="text" >
|
||||
<string>Flags</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_vertcolor" >
|
||||
<property name="text" >
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_vertquality" >
|
||||
<property name="text" >
|
||||
<string>Quality</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_vertnormal" >
|
||||
<property name="text" >
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_verttexcoord" >
|
||||
<property name="text" >
|
||||
<string>TextCoord</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_3" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>20</y>
|
||||
<width>111</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Wedg</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_wedgcolor" >
|
||||
<property name="text" >
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_wedgtexcoord" >
|
||||
<property name="text" >
|
||||
<string>TexCoord</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_wedgnormal" >
|
||||
<property name="text" >
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>20</y>
|
||||
<width>111</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Face</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_faceflags" >
|
||||
<property name="text" >
|
||||
<string>Flags</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_facecolor" >
|
||||
<property name="text" >
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_facequality" >
|
||||
<property name="text" >
|
||||
<string>Quality</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_iom_facenormal" >
|
||||
<property name="text" >
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>check_iom_vertflags</tabstop>
|
||||
<tabstop>check_iom_vertcolor</tabstop>
|
||||
<tabstop>check_iom_vertquality</tabstop>
|
||||
<tabstop>check_iom_vertnormal</tabstop>
|
||||
<tabstop>check_iom_verttexcoord</tabstop>
|
||||
<tabstop>check_iom_faceflags</tabstop>
|
||||
<tabstop>check_iom_facecolor</tabstop>
|
||||
<tabstop>check_iom_facequality</tabstop>
|
||||
<tabstop>check_iom_facenormal</tabstop>
|
||||
<tabstop>check_iom_wedgcolor</tabstop>
|
||||
<tabstop>check_iom_wedgtexcoord</tabstop>
|
||||
<tabstop>check_iom_wedgnormal</tabstop>
|
||||
<tabstop>AllButton</tabstop>
|
||||
<tabstop>NoneButton</tabstop>
|
||||
<tabstop>check_iom_camera</tabstop>
|
||||
<tabstop>okButton</tabstop>
|
||||
<tabstop>cancelButton</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>ChangeMaskDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>278</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>96</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>ChangeMaskDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>369</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>179</x>
|
||||
<y>282</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Loading…
x
Reference in New Issue
Block a user