mainwindow.cpp
Go to the documentation of this file.
00001 /****************************************************************************
00002  * VCGLib                                                            o o     *
00003  * Visual and Computer Graphics Library                            o     o   *
00004  *                                                                _   O  _   *
00005  * Copyright(C) 2007                                                \/)\/    *
00006  * Visual Computing Lab                                            /\/|      *
00007  * ISTI - Italian National Research Council                           |      *
00008  *                                                                    \      *
00009  * All rights reserved.                                                      *
00010  *                                                                           *
00011  * This program is free software; you can redistribute it and/or modify      *   
00012  * it under the terms of the GNU General Public License as published by      *
00013  * the Free Software Foundation; either version 2 of the License, or         *
00014  * (at your option) any later version.                                       *
00015  *                                                                           *
00016  * This program is distributed in the hope that it will be useful,           *
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
00019  * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
00020  * for more details.                                                         *
00021  *                                                                           *
00022  ****************************************************************************/
00023 /****************************************************************************
00024   History
00025 
00026 $Log: not supported by cvs2svn $
00027 
00028 ****************************************************************************/
00029 
00030 
00031 #include "mainwindow.h"
00032 #include <QFileDialog>
00033 
00034 MainWindow::MainWindow (QWidget * parent):QMainWindow (parent)
00035 {
00036   ui.setupUi (this);
00037   //connections
00038 
00039   //from toolFrame to glArea
00040   connect (ui.drawModeComboBox, SIGNAL (currentIndexChanged(int)),
00041            ui.glArea, SLOT (selectDrawMode(int)));
00042 
00043   connect (ui.loadTetrahedronPushButton, SIGNAL (clicked()),
00044            ui.glArea, SLOT (loadTetrahedron()));
00045 
00046   connect (ui.loadDodecahedronPushButton, SIGNAL (clicked()),
00047            ui.glArea, SLOT (loadDodecahedron()));
00048 
00049  //from toolFrame to glArea through mainwindow
00050   connect (ui.loadMeshPushButton, SIGNAL (clicked()),
00051            this, SLOT (chooseMesh()));
00052   connect (this, SIGNAL (loadMesh(QString)),
00053            ui.glArea, SLOT(loadMesh(QString)));
00054 
00055   //from glArea to statusbar
00056   connect (ui.glArea, SIGNAL (setStatusBar(QString)),
00057            ui.statusbar, SLOT (showMessage(QString)));
00058 }
00059 
00060 // mesh chooser file dialog
00061 void MainWindow::chooseMesh()
00062 {
00063   QString fileName = QFileDialog::getOpenFileName(this,
00064                      tr("Open Mesh"), QDir::currentPath(),
00065                      tr("Poly Model (*.ply)"));
00066   if(!fileName.isEmpty())
00067     emit loadMesh(fileName);
00068 }


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:32:53