00001 /* Copyright (C) 2006 P.L. Lucas 00002 * 00003 * This program is free software; you can redistribute it and/or modify 00004 * it under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation; either version 2 of the License, or 00006 * (at your option) any later version. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 * GNU General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 59 Temple Place, Suite 330, 00016 * Boston, MA 02111-1307, USA. 00017 */ 00018 00019 #ifndef __TABLE_H__ 00020 #define __TABLE_H__ 00021 00022 #include <QTableWidget> 00023 #include "octave_connection.h" 00024 #include "ui_table_ui.h" 00025 #include "basewidget.h" 00026 00027 using namespace Ui; 00028 00029 /* 00030 Muestra la ventana con una tabla en la que se muestra una matriz dada. 00031 Las modificaciones en la tabla se verán reflejadas en la matriz. 00032 Cada vez que la tabla reciba el foco se actualizarán los datos de la tabla. 00033 */ 00034 00035 class Table:public BaseWidget 00036 { 00037 Q_OBJECT 00038 public: 00039 Table( QWidget * parent = 0 ); 00040 void setOctaveConnection(OctaveConnection *octave_connection); 00041 void setMatrix(QString matrix); 00042 QString getMatrix(); 00043 private: 00044 TableForm *table_form; 00045 OctaveConnection *octave_connection; 00046 QString matrix; 00047 void change_rows(); 00048 void change_cols(); 00049 public slots: 00050 void windowActivated ( QWidget * w ); 00051 void windowActivated(); 00052 void line_ready(QString line); 00053 void cellChanged ( int row, int col ); 00054 void rows_changed(); 00055 void cols_changed(); 00056 void order_changed(); 00057 }; 00058 00059 00060 #endif