00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __OPERATIONS_H__
00020 #define __OPERATIONS_H__
00021 #include "mainwindow.h"
00022 #include "octave_connection.h"
00023 #include "basewidget.h"
00024 #include "table.h"
00025 #include <QDialog>
00026 #include <QLineEdit>
00027 #include <QTreeWidget>
00028 #include <QComboBox>
00029 #include <QCheckBox>
00030
00031
00032
00033
00034 class Plot:public QDialog
00035 {
00036 Q_OBJECT
00037 public:
00038
00039 enum Type {PLOT,SEMILOGY, SEMILOGX, LOGLOG, POLAR};
00040 Plot(QWidget *parent=0, Plot::Type type=PLOT);
00041
00042
00043
00044 QString command();
00045
00046 private:
00047 QLineEdit *x_lineedit, *y_lineedit, *error_x_lineedit, *error_y_lineedit, *title_lineedit;
00048 QVBoxLayout *vlayout;
00049 QComboBox *style_combo, *color_combo, *pointStyle_combo;
00050 QTreeWidget *plots_tree;
00051 QCheckBox *no_title;
00052 Plot::Type type;
00053
00054 public slots:
00055 void add_callback();
00056 void remove_callback();
00057 void copy_clipboard_callback();
00058 };
00059
00060
00061
00062
00063
00064 class Operations:public QObject
00065 {
00066 Q_OBJECT
00067 public:
00068 Operations( QObject * parent = 0, BaseWidget **active_widget=0, MainWindow *main_window=0 );
00069 void setOctaveConnection(OctaveConnection *octave_connection);
00070 void setMatrix(QString matrix);
00071
00072 enum MenuResult {ACCEPTED, COPY_CLIPBOARD, CANCEL};
00073
00074 private:
00075 OctaveConnection *octave_connection;
00076 QString matrix;
00077 BaseWidget **active_widget;
00078 MainWindow *main_window;
00079
00080 bool copy_clipboard_ok;
00081
00082 public:
00083
00084
00085
00086
00087
00088
00089 bool input_dialog(QString title, QString label, QString &input);
00090
00091
00092
00093
00094
00095
00096 void simple_comand(QString title, QString label, QString _command);
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107 MenuResult menu_window(QString title, QStringList parameters_labels, QStringList ¶meters, QStringList output_labels, QStringList &output, QString help=QString(), bool accept_blank_parameters=false);
00108 public:
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 void compex_comand(QString title, QString _command, QStringList parameters_labels, QStringList ¶meters, QStringList output_labels, QStringList &output, QString help=QString(), bool is_table=false, bool accept_blank_parameters=false);
00121
00122 public slots:
00123
00124
00125
00126 void copy_clipboard_callback();
00127
00128
00129 void exit_callback();
00130 void cd_callback();
00131
00132
00133 void inverse_callback();
00134 void determinant_callback();
00135 void eigenvalues_callback();
00136 void transpose_callback();
00137 void submatrix_callback();
00138
00139
00140 void mean_callback();
00141 void median_callback();
00142 void std_callback();
00143 void cov_callback();
00144 void corrcoef_callback();
00145
00146
00147 void plot_callback();
00148 void axis_callback();
00149 void title_label_callback();
00150 void to_eps_callback();
00151 void to_pdf_callback();
00152 void to_png_callback();
00153 void semilogy_callback();
00154 void semilogx_callback();
00155 void log_log_callback();
00156 void polar_callback();
00157 void error_bars_callback();
00158
00159 void hist_callback();
00160
00161 void bar_callback();
00162
00163 void contour_callback();
00164
00165 void mesh_callback();
00166
00167 void suma_callback();
00168
00169 void producto_callback();
00170
00171 void exponente_callback();
00172
00173
00174 void editor_callback();
00175
00176
00177 void general_config_callback();
00178
00179 };
00180
00181
00182
00183
00184
00185 #endif