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, *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
00065 class Operations:public QObject
00066 {
00067 Q_OBJECT
00068 public:
00069 Operations( QObject * parent = 0, BaseWidget **active_widget=0, MainWindow *main_window=0 );
00070 void setOctaveConnection(OctaveConnection *octave_connection);
00071 void setMatrix(QString matrix);
00072 private:
00073 OctaveConnection *octave_connection;
00074 QString matrix;
00075 BaseWidget **active_widget;
00076 MainWindow *main_window;
00077 enum MenuResult {ACCEPTED, COPY_CLIPBOARD, CANCEL};
00078 bool copy_clipboard_ok;
00079
00080
00081
00082
00083
00084
00085 bool input_dialog(QString title, QString label, QString &input);
00086
00087
00088
00089
00090
00091
00092 void simple_comand(QString title, QString label, QString _command);
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 MenuResult menu_window(QString title, QStringList parameters_labels, QStringList ¶meters, QStringList output_labels, QStringList &output, QString help=QString(), bool accept_blank_parameters=false);
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115 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);
00116
00117 public slots:
00118
00119
00120
00121 void copy_clipboard_callback();
00122
00123
00124 void inverse_callback();
00125 void determinant_callback();
00126 void eigenvalues_callback();
00127 void transpose_callback();
00128 void submatrix_callback();
00129
00130
00131 void mean_callback();
00132 void median_callback();
00133 void std_callback();
00134 void cov_callback();
00135 void corrcoef_callback();
00136
00137
00138 void plot_callback();
00139 void axis_callback();
00140 void title_label_callback();
00141 void to_eps_callback();
00142 void to_pdf_callback();
00143 void to_png_callback();
00144 void semilogy_callback();
00145 void semilogx_callback();
00146 void log_log_callback();
00147 void polar_callback();
00148 void error_bars_callback();
00149
00150 void hist_callback();
00151
00152
00153 void editor_callback();
00154
00155
00156 void general_config_callback();
00157
00158 };
00159
00160
00161
00162
00163
00164 #endif