00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef APPLICATION_H
00033 #define APPLICATION_H
00034
00035 #include <QMainWindow>
00036 #include <q3listview.h>
00037 #include <Q3Header>
00038 #include <QHttp>
00039 #include <QFile>
00040 #include <QSplitter>
00041 #include <QDesktopServices>
00042 #include <QBuffer>
00043
00044 #include "Table.h"
00045 #include "ScriptingEnv.h"
00046 #include "Script.h"
00047
00048 class QPixmap;
00049 class QCloseEvent;
00050 class QDropEvent;
00051 class QTimerEvent;
00052 class QDragEnterEvent;
00053 class QTranslator;
00054 class QDockWidget;
00055 class QAction;
00056 class QActionGroup;
00057 class QWorkspace;
00058 class QLineEdit;
00059 class QTranslator;
00060 class QToolButton;
00061 class QShortcut;
00062 class QMenu;
00063 class QToolBar;
00064 class QAssistantClient;
00065
00066 class Matrix;
00067 class Table;
00068 class Graph;
00069 class ScalePicker;
00070 class Graph3D;
00071 class Note;
00072 class MultiLayer;
00073 class FunctionDialog;
00074 class Folder;
00075 class FolderListItem;
00076 class FolderListView;
00077 class ScriptWindow;
00078 class Plot3DDialog;
00079 class MyWidget;
00080 class TableStatistics;
00081 class CurveRangeDialog;
00082
00111 class ApplicationWindow: public QMainWindow, public scripted
00112 {
00113 Q_OBJECT
00114 public:
00115 ApplicationWindow();
00116 ApplicationWindow(const QStringList& l);
00117 ~ApplicationWindow();
00118
00119 enum ShowWindowsPolicy{HideAll, ActiveFolder, SubFolders};
00120
00121 QAssistantClient *assistant;
00122 ScriptWindow *scriptWindow;
00123 QTranslator *appTranslator, *qtTranslator;
00124 QDockWidget *logWindow, *explorerWindow;
00125 QTextEdit *results;
00126 #ifdef SCRIPTING_CONSOLE
00127 QDockWidget *consoleWindow;
00128 QTextEdit *console;
00129 #endif
00130 QWorkspace* ws;
00131 QToolBar *fileTools, *plotTools, *tableTools, *plot3DTools, *displayBar, *editTools, *plotMatrixBar;
00132 FolderListView *lv, *folders;
00133 QToolButton *btnResults;
00134 QWidgetList *hiddenWindows, *outWindows;
00135 QLineEdit *info;
00136 QWidget *lastModified;
00137
00138 public:
00143 QString generateUniqueName(const QString& name, bool increment = true);
00144
00145 public slots:
00147
00148 void open();
00149 ApplicationWindow* open(const QString& fn);
00150 ApplicationWindow* openProject(const QString& fn);
00151 ApplicationWindow* importOPJ(const QString& filename);
00152
00160 ApplicationWindow * plotFile(const QString& fn);
00161
00162 QWidgetList * windowsList();
00163 void updateWindowLists(MyWidget *w);
00167 void cascade();
00168
00169 void saveProjectAs();
00170 bool saveProject();
00171
00173 void modifiedProject();
00175 void savedProject();
00177 void modifiedProject(QWidget *w);
00179
00181
00182 void readSettings();
00183 void saveSettings();
00184 void applyUserSettings();
00185 void setSaveSettings(bool autoSaving, int min);
00186 void changeAppStyle(const QString& s);
00187 void changeAppFont(const QFont& f);
00188 void updateAppFonts();
00189 void setAppColors(const QColor& wc,const QColor& pc,const QColor& tpc);
00191
00193
00194 MultiLayer* copyGraph();
00195 MultiLayer* multilayerPlot(int c, int r, int style);
00196 MultiLayer* multilayerPlot(Table* w, const QStringList& colList, int style, int startRow = 0, int endRow = -1);
00198 MultiLayer* multilayerPlot(const QString& caption);
00200 MultiLayer* multilayerPlot(const QStringList& colList);
00201 void connectMultilayerPlot(MultiLayer *g);
00202 void addLayer();
00203 void deleteLayer();
00204
00206 MultiLayer* plotSpectrogram(Matrix *m, Graph::CurveType type);
00207 void plotGrayScale();
00208 MultiLayer* plotGrayScale(Matrix *m);
00209 void plotContour();
00210 MultiLayer* plotContour(Matrix *m);
00211 void plotColorMap();
00212 MultiLayer* plotColorMap(Matrix *m);
00213
00215 void autoArrangeLayers();
00216 void initMultilayerPlot(MultiLayer* g, const QString& name);
00217 void polishGraph(Graph *g, int style);
00218 void plot2VerticalLayers();
00219 void plot2HorizontalLayers();
00220 void plot4Layers();
00221 void plotStackedLayers();
00222 void plotStackedHistograms();
00224
00226
00227 Graph3D* openMatrixPlot3D(const QString& caption, const QString& matrix_name,
00228 double xl,double xr,double yl,double yr,double zl,double zr);
00229 Graph3D* dataPlot3D(Table* table,const QString& colName);
00230 Graph3D* dataPlotXYZ(Table* table,const QString& zColName, int type);
00231
00232 Graph3D* dataPlot3D(const QString& caption,const QString& formula,
00233 double xl, double xr, double yl, double yr, double zl, double zr);
00234 Graph3D* dataPlotXYZ(const QString& caption,const QString& formula,
00235 double xl, double xr, double yl, double yr, double zl, double zr);
00237
00239
00240 Graph3D* newPlot3D();
00241 Graph3D* newPlot3D(const QString& formula, double xl, double xr,
00242 double yl, double yr, double zl, double zr);
00243 Graph3D* newPlot3D(const QString& caption,const QString& formula,
00244 double xl, double xr,double yl, double yr, double zl, double zr);
00245 Graph3D* copySurfacePlot();
00246 void connectSurfacePlot(Graph3D *plot);
00247 void newSurfacePlot();
00248 void editSurfacePlot();
00249 void remove3DMatrixPlots(Matrix *m);
00250 void updateMatrixPlots(QWidget *);
00251 void add3DData();
00252 void change3DData();
00253 void change3DData(const QString& colName);
00254 void change3DMatrix();
00255 void change3DMatrix(const QString& matrix_name);
00256 void insertNew3DData(const QString& colName);
00257 void add3DMatrixPlot();
00258 void insert3DMatrixPlot(const QString& matrix_name);
00259 void initPlot3D(Graph3D *plot);
00260 void customPlot3D(Graph3D *plot);
00261 void setPlot3DOptions();
00262
00263 void plot3DWireframe();
00264 void plot3DHiddenLine();
00265 void plot3DPolygons();
00266 void plot3DWireSurface();
00267
00268 void plot3DMatrix(int style);
00269
00270 void plot3DRibbon();
00271 void plot3DScatter();
00272 void plot3DTrajectory();
00273 void plot3DBars();
00275
00277
00278 void newFunctionPlot(int type,QStringList &formulas, const QString& var,QList<double> &ranges, int points);
00279
00280 FunctionDialog* functionDialog();
00281 void showFunctionDialog();
00282 void showFunctionDialog(Graph * g, int curve);
00283 void addFunctionCurve();
00284 void clearFitFunctionsList();
00285 void saveFitFunctionsList(const QStringList& l);
00286 void clearSurfaceFunctionsList();
00287 void clearLogInfo();
00288 void clearParamFunctionsList();
00289 void clearPolarFunctionsList();
00290 void updateFunctionLists(int type, QStringList &formulas);
00291 void updateSurfaceFuncList(const QString& s);
00293
00295
00296 Matrix* cloneMatrix();
00298 Matrix* newMatrix(int rows = 32, int columns = 32);
00300 Matrix* newMatrix(const QString& caption, int r, int c);
00301 Matrix* matrix(const QString& name);
00302 Matrix* convertTableToMatrix();
00303 void initMatrix(Matrix* m, const QString& caption);
00304 void transposeMatrix();
00305 void invertMatrix();
00306 void matrixDeterminant();
00308
00310
00311
00312 Table* newTable();
00314 Table* newTable(const QString& fname, const QString &sep, int lines,
00315 bool renameCols, bool stripSpaces, bool simplifySpaces);
00317 Table* newTable(const QString& caption,int r, int c);
00318 Table* newTable(int r, int c, const QString& name = QString(),const QString& legend = QString());
00319 Table* newTable(const QString& caption, int r, int c, const QString& text);
00329 Table* newHiddenTable(const QString& name, const QString& label, int r, int c, const QString& text=QString());
00330 Table* table(const QString& name);
00331 Table* copyTable();
00332 Table* convertMatrixToTable();
00333 QWidgetList* tableList();
00334
00335 void connectTable(Table* w);
00336 void newWrksheetPlot(const QString& caption,int r, int c, const QString& text);
00337 void initTable(Table* w, const QString& caption);
00338 void customTable(Table* w);
00339 void customizeTables(const QColor& bgColor,const QColor& textColor,
00340 const QColor& headerColor,const QFont& textFont,
00341 const QFont& headerFont, bool showComments);
00342
00343 void setImportOptions(const QString& sep, int lines, bool rename, bool strip, bool simplify);
00344 void loadASCII();
00345 void loadMultiple();
00346 void loadMultipleASCIIFiles(const QStringList& fileNames, int importFileAs);
00347 void exportAllTables(const QString& sep, bool colNames, bool expSelection);
00348 void exportASCII(const QString& tableName, const QString& sep, bool colNames, bool expSelection);
00349
00351 void recalculateTable();
00352
00353 TableStatistics *newTableStatistics(Table *base, int type, QList<int>,
00354 const QString &caption=QString::null);
00356
00358
00359 void customGraph(Graph* g);
00360 void setGraphDefaultSettings(bool autoscale,bool scaleFonts,bool resizeLayers,bool antialiasing);
00361 void setLegendDefaultSettings(int frame, const QFont& font,
00362 const QColor& textCol, const QColor& backgroundCol);
00363 void setArrowDefaultSettings(int lineWidth, const QColor& c, Qt::PenStyle style,
00364 int headLength, int headAngle, bool fillHead);
00365
00366 void plotL();
00367 void plotP();
00368 void plotLP();
00369 void plotPie();
00370 void plotVerticalBars();
00371 void plotHorizontalBars();
00372 void plotArea();
00373 void plotVertSteps();
00374 void plotHorSteps();
00375 void plotSpline();
00376 void plotVerticalDropLines();
00377 void plotHistogram();
00378 void plotVectXYXY();
00379 void plotVectXYAM();
00380 void plotBoxDiagram();
00382
00384
00385 void intensityTable();
00386 void pixelLineProfile();
00387 void loadImage();
00388 void loadImage(const QString& fn);
00389 Matrix* importImage();
00390 Matrix* importImage(const QString& fn);
00392
00394
00395 void exportLayer();
00396 void exportGraph();
00397 void exportAllGraphs();
00398 void exportPDF();
00399 void print();
00400 void print(QWidget* w);
00401 void printAllPlots();
00403
00404 QStringList columnsList(Table::PlotDesignation plotType = Table::All);
00405
00406 void undo();
00407 void redo();
00408
00410
00411 MyWidget* copyWindow();
00412 void rename();
00413 void renameWindow();
00414
00416 void renameWindow(Q3ListViewItem *item, int, const QString &s);
00417
00419 bool renameWindow(MyWidget *w, const QString &text);
00420
00421 void maximizeWindow(Q3ListViewItem * lbi);
00422 void maximizeWindow();
00423 void minimizeWindow();
00425 void setWindowGeometry(int x, int y, int w, int h);
00426
00427 void updateWindowStatus(MyWidget* );
00428
00429 bool hidden(QWidget* window);
00430 void closeActiveWindow();
00431 void closeWindow(MyWidget* window);
00432
00434 void removeWindowFromLists(QWidget* w);
00435
00436 void hideWindow(MyWidget* window);
00437 void hideWindow();
00438 void hideActiveWindow();
00439 void activateWindow();
00440 void activateWindow(MyWidget *);
00441 void printWindow();
00443
00445 static void about();
00447 static QString versionString();
00448 void windowsMenuAboutToShow();
00449 void windowsMenuActivated( int id );
00450 void removeCurves(const QString& name);
00451 QStringList dependingPlots(const QString& caption);
00452 QStringList depending3DPlots(Matrix *m);
00453 QStringList multilayerDependencies(QWidget *w);
00454
00455 void saveAsTemplate();
00456 void openTemplate();
00457
00458 QString windowGeometryInfo(MyWidget *w);
00459 void restoreWindowGeometry(ApplicationWindow *app, MyWidget *w, const QString s);
00460
00461 void resizeActiveWindow();
00462 void resizeWindow();
00463
00465
00466 void setListView(const QString& caption,const QString& view);
00467 void renameListViewItem(const QString& oldName,const QString& newName);
00468 void setListViewDate(const QString& caption,const QString& date);
00469 QString listViewDate(const QString& caption);
00470 void setListViewSize(const QString& caption,const QString& size);
00471 void setListViewLabel(const QString& caption,const QString& label);
00473
00474 void updateColNames(const QString& oldName, const QString& newName);
00475 void updateTableNames(const QString& oldName, const QString& newName);
00476 void changeMatrixName(const QString& oldName, const QString& newName);
00477 void updateCurves(Table *t, const QString& name);
00478
00479 void showTable(const QString& curve);
00480 void showTable(int i);
00481
00482 void addColToTable();
00483 void cutSelection();
00484 void copySelection();
00485 void copyMarker();
00486 void pasteSelection();
00487 void clearSelection();
00488 void copyActiveLayer();
00489
00490 void newProject();
00491
00493 MultiLayer* newGraph(const QString& caption = tr("Graph"));
00494
00496
00497 Matrix* openMatrix(ApplicationWindow* app, const QStringList &flist);
00498 Table* openTable(ApplicationWindow* app, const QStringList &flist);
00499 TableStatistics* openTableStatistics(const QStringList &flist);
00500 Graph3D* openSurfacePlot(ApplicationWindow* app, const QStringList &lst);
00501 Graph* openGraph(ApplicationWindow* app, MultiLayer *plot, const QStringList &list);
00502
00503 void openRecentProject(int index);
00505
00507
00508 void insertTranslatedStrings();
00509 void translateActionsStrings();
00510 void init();
00511 void initGlobalConstants();
00512 void createActions();
00513 void initMainMenu();
00514 void initPlotMenu();
00515 void initTableMenu();
00516 void initTableAnalysisMenu();
00517 void initPlotDataMenu();
00518 void initToolBars();
00519 void initPlot3DToolBar();
00520 void disableActions();
00521 void hideToolbars();
00522 void customToolBars(QWidget* w);
00523 void customMenu(QWidget* w);
00524 void windowActivated(QWidget *w);
00526
00528
00529 void sortSelection();
00530 void sortActiveTable();
00531 void normalizeSelection();
00532 void normalizeActiveTable();
00533 void correlate();
00534 void autoCorrelate();
00535 void convolute();
00536 void deconvolute();
00537 void clearTable();
00538 void goToRow();
00540
00542
00543 void newLegend();
00544 void addTimeStamp();
00545 void drawLine();
00546 void drawArrow();
00547 void addText();
00548 void disableAddText();
00549 void addImage();
00550 void zoomIn();
00551 void zoomOut();
00552 void setAutoScale();
00553 void showRangeSelectors();
00554 void showCursor();
00555 void showScreenReader();
00556 void pickPointerCursor();
00557 void disableTools();
00558 void pickDataTool( QAction* action );
00559
00560 void updateLog(const QString& result);
00562
00564
00565 void deleteFitTables();
00566 void fitLinear();
00567 void fitSigmoidal();
00568 void fitGauss();
00569 void fitLorentz();
00570 void fitMultiPeak(int profile);
00571 void fitMultiPeakGauss();
00572 void fitMultiPeakLorentz();
00574
00576
00577 void differentiate();
00578 void analysis(const QString& whichFit);
00579 void analyzeCurve(Graph *g, const QString& whichFit, const QString& curveTitle);
00580 void showDataSetDialog(const QString& whichFit);
00582
00583 void addErrorBars();
00584 void defineErrorBars(const QString& name,int type,const QString& percent,int direction);
00585 void defineErrorBars(const QString& curveName,const QString& errColumnName, int direction);
00586 void movePoints();
00587 void removePoints();
00588
00590
00591 void closeEvent( QCloseEvent*);
00592 void timerEvent ( QTimerEvent *e);
00593 void dragEnterEvent( QDragEnterEvent* e );
00594 void dropEvent( QDropEvent* e );
00595 void customEvent( QEvent* e);
00597
00599
00600 void showFindDialogue();
00602 void showPlotDialog(int curveKey = -1);
00603 QDialog* showScaleDialog();
00604 QDialog* showPlot3dDialog();
00605 AxesDialog* showScalePageFromAxisDialog(int axisPos);
00606 AxesDialog* showAxisPageFromAxisDialog(int axisPos);
00607 void showAxisDialog();
00608 void showGridDialog();
00609 void showGeneralPlotDialog();
00610 void showResults(bool ok);
00611 void showResults(const QString& s, bool ok=true);
00612 void showTextDialog();
00613 void showLineDialog();
00614 void showTitleDialog();
00615 void showExportASCIIDialog();
00616 void showCurvesDialog();
00617 void showCurveRangeDialog();
00618 CurveRangeDialog* showCurveRangeDialog(Graph *g, int curve);
00619 void showPlotAssociations(int curve);
00620
00621 void showXAxisTitleDialog();
00622 void showYAxisTitleDialog();
00623 void showRightAxisTitleDialog();
00624 void showTopAxisTitleDialog();
00625 void showColumnOptionsDialog();
00626 void showRowsDialog();
00627 void showColsDialog();
00628 void showColMenu(int c);
00629 void showColumnValuesDialog();
00630
00631 void showGraphContextMenu();
00632 void showTableContextMenu(bool selection);
00633 void showWindowContextMenu();
00634 void showWindowTitleBarMenu();
00635 void showCurveContextMenu(int curveKey);
00636 void showCurvePlotDialog();
00637 void showCurveWorksheet();
00638 void showCurveWorksheet(Graph *g, int curveIndex);
00639 void showWindowPopupMenu(Q3ListViewItem *it, const QPoint &p, int);
00640
00642 void showListViewSelectionMenu(const QPoint &p);
00643
00645 void showListViewPopupMenu(const QPoint &p);
00646
00647 void showScriptWindow();
00648 void showMoreWindows();
00649 void showImportDialog();
00650 void showMarkerPopupMenu();
00651 void showHelp();
00652 static void showStandAloneHelp();
00653 void chooseHelpFolder();
00654 void showPlotWizard();
00655 void showFitPolynomDialog();
00656 void showIntegrationDialog();
00657 void showInterpolationDialog();
00658 void showExpGrowthDialog();
00659 void showExpDecayDialog();
00660 void showExpDecayDialog(int type);
00661 void showTwoExpDecayDialog();
00662 void showExpDecay3Dialog();
00663 void showRowStatistics();
00664 void showColStatistics();
00665 void showFitDialog();
00666 void showImageDialog();
00667 void showPlotGeometryDialog();
00668 void showLayerDialog();
00669 void showPreferencesDialog();
00670 void showMatrixDialog();
00671 void showMatrixSizeDialog();
00672 void showMatrixValuesDialog();
00673 void showSmoothSavGolDialog();
00674 void showSmoothFFTDialog();
00675 void showSmoothAverageDialog();
00676 void showSmoothDialog(int m);
00677 void showFilterDialog(int filter);
00678 void lowPassFilterDialog();
00679 void highPassFilterDialog();
00680 void bandPassFilterDialog();
00681 void bandBlockFilterDialog();
00682 void showFFTDialog();
00684
00685 void translateCurveHor();
00686 void translateCurveVert();
00687
00689 void removeCurve();
00690 void hideCurve();
00691 void hideOtherCurves();
00692 void showAllCurves();
00693 void setCurveFullRange();
00694
00695 void setAscValues();
00696 void setRandomValues();
00697 void setXCol();
00698 void setYCol();
00699 void setZCol();
00700 void setXErrCol();
00701 void setYErrCol();
00702 void disregardCol();
00703
00704 void updateConfirmOptions(bool askTables, bool askMatrixes, bool askPlots2D, bool askPlots3D, bool askNotes);
00705 void showAxis(int axis, int type, const QString& labelsColName, bool axisOn,
00706 int majTicksType, int minTicksType, bool labelsOn, const QColor& c,
00707 int format, int prec, int rotation, int baselineDist, const QString& formula, const QColor& labelsColor);
00708
00710
00711 void toggle3DAnimation(bool on = true);
00713 void togglePerspective(bool on = true);
00715 void resetRotation();
00717 void fitFrameToLayer();
00718 void setFramed3DPlot();
00719 void setBoxed3DPlot();
00720 void removeAxes3DPlot();
00721 void removeGrid3DPlot();
00722 void setHiddenLineGrid3DPlot();
00723 void setLineGrid3DPlot();
00724 void setPoints3DPlot();
00725 void setCrosses3DPlot();
00726 void setCones3DPlot();
00727 void setBars3DPlot();
00728 void setFilledMesh3DPlot();
00729 void setEmptyFloor3DPlot();
00730 void setFloorData3DPlot();
00731 void setFloorIso3DPlot();
00732 void setFloorGrid3DPlot(bool on);
00733 void setCeilGrid3DPlot(bool on);
00734 void setRightGrid3DPlot(bool on);
00735 void setLeftGrid3DPlot(bool on);
00736 void setFrontGrid3DPlot(bool on);
00737 void setBackGrid3DPlot(bool on);
00738 void pickPlotStyle( QAction* action );
00739 void pickCoordSystem( QAction* action);
00740 void pickFloorStyle( QAction* action);
00741 void custom3DActions(QWidget *w);
00742 void custom3DGrids(int grids);
00744
00745 void updateRecentProjectsList();
00746
00748 void receivedVersionFile(bool error);
00750 void searchForUpdates();
00751
00752 void showDonationDialog();
00754 void showSupportPage();
00756 void showDonationsPage();
00758 void showHomePage();
00760 void showForums();
00762 void showBugTracker();
00764 void downloadManual();
00766 void downloadTranslation();
00767 #ifdef QTIPLOT_DEMO
00769 void showDemoVersionMessage();
00770 #endif
00771
00772 void parseCommandLineArguments(const QStringList& args);
00773 void createLanguagesList();
00774 void switchToLanguage(int param);
00775 void switchToLanguage(const QString& locale);
00776
00777 bool alreadyUsedName(const QString& label);
00778 bool projectHas2DPlots();
00779 bool projectHas3DPlots();
00780 bool projectHasMatrices();
00781
00783 QWidget* window(const QString& name);
00784
00786 QStringList matrixNames();
00787
00789
00790
00791 Note* newNote(const QString& caption = QString());
00792 Note* openNote(ApplicationWindow* app, const QStringList &flist);
00793 void initNote(Note* m, const QString& caption);
00794 void saveNoteAs();
00796
00798
00799
00800 void addFolder();
00802 void deleteFolder();
00803
00805 bool deleteFolder(Folder *f);
00806
00808 void deleteSelectedItems();
00809
00811 void desactivateFolders();
00812
00814 void changeFolder(Folder *newFolder, bool force = false);
00815
00817 void folderItemChanged(Q3ListViewItem *it);
00819 void folderItemDoubleClicked(Q3ListViewItem *it);
00820
00822
00828 void showFolderPopupMenu(Q3ListViewItem *it, const QPoint &p, bool fromFolders);
00829
00831 void showFolderPopupMenu(Q3ListViewItem *it, const QPoint &p, int);
00832
00834 void startRenameFolder();
00835
00837 void startRenameFolder(Q3ListViewItem *item);
00838
00840 void renameFolder(Q3ListViewItem *it, int col, const QString &text);
00841
00843 void showAllFolderWindows();
00844
00846 void hideAllFolderWindows();
00847
00849 void hideFolderWindows(Folder *f);
00850
00852 void folderProperties();
00853
00855 void windowProperties();
00856
00858 void projectProperties();
00859
00860 void appendProject();
00861 void saveAsProject();
00862 void saveFolderAsProject(Folder *f);
00863 void saveFolder(Folder *folder, const QString& fn);
00864
00866 void addFolderListViewItem(Folder *f);
00867
00869 void addListViewItem(MyWidget *w);
00870
00872 void setShowWindowsPolicy(int p);
00873
00875 Folder* projectFolder();
00876
00878 void find(const QString& s, bool windowNames, bool labels, bool folderNames,
00879 bool caseSensitive, bool partialMatch, bool subfolders);
00880
00882 void dragFolderItems(QList<Q3ListViewItem *> items){draggedItems = items;};
00883
00885 void dropFolderItems(Q3ListViewItem *dest);
00886
00888
00892 void moveFolder(FolderListItem *src, FolderListItem *dest);
00894
00896
00897
00898 void scriptError(const QString &message, const QString &scriptName, int lineNumber);
00900 void executeNotes();
00902 void showScriptingLangDialog();
00904 void restartScriptingEnv();
00906 void scriptPrint(const QString &text);
00908 bool setScriptingLang(const QString &lang, bool force=false);
00910
00911 signals:
00912 void modified();
00913
00914
00915 public:
00916 bool d_scale_plots_on_print, d_print_cropmarks;
00917 bool d_show_table_comments;
00918 bool d_extended_plot_dialog;
00919 bool generateUniformFitPoints;
00920 bool generatePeakCurves;
00921 int peakCurvesColor;
00922
00924 bool fit_scale_errors;
00925
00927 int fitPoints;
00928
00929 bool pasteFitResultsToPlot;
00930
00932 bool writeFitResultsToLog;
00933
00935 int fit_output_precision;
00936
00938 int d_decimal_digits;
00939
00941 Folder *current_folder;
00943 ShowWindowsPolicy show_windows_policy;
00944 enum {MaxRecentProjects = 5};
00946 int d_file_version;
00947
00948 QColor workspaceColor, panelsColor, panelsTextColor;
00949 QString appStyle, workingDir;
00950
00952 QString templatesDir;
00953 bool smooth3DMesh, autoScaleFonts, autoResizeLayers, askForSupport, autoSearchUpdates;
00954 bool confirmCloseTable, confirmCloseMatrix, confirmClosePlot2D, confirmClosePlot3D;
00955 bool confirmCloseFolder, confirmCloseNotes;
00956 bool canvasFrameOn, titleOn, autoSave, drawBackbones, allAxesOn, autoscale2DPlots, antialiasing2DPlots;
00957 int majTicksStyle, minTicksStyle, legendFrameStyle, autoSaveTime, axesLineWidth, canvasFrameWidth;
00958 QColor legendBackground, legendTextColor, defaultArrowColor;
00959 int defaultArrowLineWidth, defaultArrowHeadLength, defaultArrowHeadAngle;
00960 bool defaultArrowHeadFill;
00961 Qt::PenStyle defaultArrowLineStyle;
00962 int majTicksLength, minTicksLength, defaultPlotMargin;
00963 int defaultCurveStyle, defaultCurveLineWidth, defaultSymbolSize;
00964 QFont appFont, plot3DTitleFont, plot3DNumbersFont, plot3DAxesFont;
00965 QFont tableTextFont, tableHeaderFont, plotAxesFont, plotLegendFont, plotNumbersFont, plotTitleFont;
00966 QColor tableBkgdColor, tableTextColor, tableHeaderColor;
00967 QString projectname,columnSeparator, helpFilePath, appLanguage;
00968 QString configFilePath, logInfo, fitPluginsPath, asciiDirPath, imagesDirPath;
00969 int logID,asciiID,closeID, exportID, printAllID, ignoredLines, savingTimerId, plot3DResolution;
00970 bool renameColumns, copiedLayer, strip_spaces, simplify_spaces;
00971 QStringList recentProjects, tableWindows;
00972 bool saved, showPlot3DProjection, showPlot3DLegend, orthogonal3DPlots, autoscale3DPlots;
00973 QStringList plot3DColors, locales;
00974 QStringList functions;
00975 QStringList xFunctions, yFunctions, rFunctions,thetaFunctions;
00976 QStringList fitFunctions;
00977 QStringList surfaceFunc;
00978
00980 QStringList renamedTables;
00981 Graph::MarkerType copiedMarkerType;
00982
00984
00985 QString auxMrkText;
00986 QFont auxMrkFont;
00987 QColor auxMrkColor, auxMrkBkgColor;
00988 QPoint auxMrkStart,auxMrkEnd;
00989 Qt::PenStyle auxMrkStyle;
00990 QString auxMrkFileName;
00991 int auxMrkBkg,auxMrkWidth;
00993
00994 bool startArrowOn, endArrowOn, fillArrowHead;
00995 int arrowHeadLength, arrowHeadAngle, specialPlotMenuID, statMenuID, panelMenuID, plot3dID;
00996 int plotMenuID, importMenuID, newMenuID, recentMenuID, setAsMenuID, fillMenuID, normMenuID;
00997 int translateMenuID, smoothMenuID, filterMenuID, fitExpMenuID, multiPeakMenuID;
00998
01000 bool autoSearchUpdatesRequest;
01001
01003 QString defaultScriptingLang;
01004
01005 private:
01006
01007 #ifdef QTIPLOT_DEMO
01008 int demoCloseTimerId;
01009 #endif
01010
01012 int convertOldToNewColorIndex(int cindex);
01013
01015 QList<Q3ListViewItem *> draggedItems;
01016
01018 QHttp http;
01020 QBuffer version_buffer;
01021
01022 Graph *lastCopiedLayer;
01023 QSplitter *explorerSplitter;
01024
01025 QMenu *windowsMenu,*view,*graph,*file,*format,*calcul,*edit,*dataMenu,*recent, *exportPlot;
01026 QMenu *help,*type,*import,*plot2D,*plot3D, *specialPlot, *panels,*stat,*decay, *filter;
01027 QMenu *matrixMenu, *plot3DMenu, *plotDataMenu, *tableMenu, *tablesDepend;
01028 QMenu *smooth, *normMenu, *translateMenu, *fillMenu, *setAsMenu, *multiPeakMenu;
01029 QMenu *scriptingMenu;
01030 QAction *actionEditCurveRange, *actionCurveFullRange, *actionShowAllCurves, *actionHideCurve, *actionHideOtherCurves;
01031 QAction *actionEditFunction, *actionRemoveCurve, *actionShowCurveWorksheet, *actionShowCurvePlotDialog;
01032 QAction *actionNewProject, *actionNewNote, *actionNewTable, *actionNewFunctionPlot, *actionNewSurfacePlot, *actionNewMatrix, *actionNewGraph;
01033 QAction *actionOpen, *actionLoadImage, *actionSaveProject, *actionSaveProjectAs, *actionImportImage;
01034 QAction *actionLoad, *actionLoadMultiple, *actionUndo, *actionRedo;
01035 QAction *actionCopyWindow;
01036 QAction *actionCutSelection, *actionCopySelection, *actionPasteSelection, *actionClearSelection;
01037 QAction *actionShowExplorer, *actionShowLog, *actionAddLayer, *actionShowLayerDialog, *actionAutomaticLayout;
01038 #ifdef SCRIPTING_CONSOLE
01039 QAction *actionShowConsole;
01040 #endif
01041
01042 QAction *actionExportGraph, *actionExportAllGraphs, *actionPrint, *actionPrintAllPlots, *actionShowExportASCIIDialog;
01043 QAction *actionShowImportDialog, *actionExportPDF;
01044 QAction *actionCloseAllWindows, *actionClearLogInfo, *actionShowPlotWizard, *actionShowConfigureDialog;
01045 QAction *actionShowCurvesDialog, *actionAddErrorBars, *actionAddFunctionCurve, *actionUnzoom, *actionNewLegend, *actionAddImage, *actionAddText;
01046 QAction *actionPlotL, *actionPlotP, *actionPlotLP, *actionPlotVerticalDropLines, *actionPlotSpline;
01047 QAction *actionPlotVertSteps, *actionPlotHorSteps, *actionPlotVerticalBars;
01048 QAction *actionPlotHorizontalBars, *actionPlotArea, *actionPlotPie, *actionPlotVectXYAM, *actionPlotVectXYXY;
01049 QAction *actionPlotHistogram, *actionPlotStackedHistograms, *actionPlot2VerticalLayers, *actionPlot2HorizontalLayers, *actionPlot4Layers, *actionPlotStackedLayers;
01050 QAction *actionPlot3DRibbon, *actionPlot3DBars, *actionPlot3DScatter, *actionPlot3DTrajectory;
01051 QAction *actionShowColStatistics, *actionShowRowStatistics, *actionShowIntDialog;
01052 QAction *actionDifferentiate, *actionFitLinear, *actionShowFitPolynomDialog;
01053 QAction *actionShowExpDecayDialog, *actionShowTwoExpDecayDialog, *actionShowExpDecay3Dialog;
01054 QAction *actionFitExpGrowth, *actionFitSigmoidal, *actionFitGauss, *actionFitLorentz, *actionShowFitDialog;
01055 QAction *actionShowAxisDialog, *actionShowTitleDialog;
01056 QAction *actionShowColumnOptionsDialog, *actionShowColumnValuesDialog, *actionShowColsDialog, *actionShowRowsDialog;
01057 QAction *actionTableRecalculate;
01058 QAction *actionAbout, *actionShowHelp, *actionChooseHelpFolder;
01059 QAction *actionRename, *actionCloseWindow, *actionConvertTable;
01060 QAction *actionAddColToTable, *actionDeleteLayer, *actionInterpolate;
01061 QAction *actionResizeActiveWindow, *actionHideActiveWindow;
01062 QAction *actionShowMoreWindows, *actionPixelLineProfile, *actionIntensityTable;
01063 QAction *actionShowLineDialog, *actionShowImageDialog, *actionShowTextDialog;
01064 QAction *actionActivateWindow, *actionMinimizeWindow, *actionMaximizeWindow, *actionHideWindow, *actionResizeWindow, *actionPrintWindow;
01065 QAction *actionShowPlotGeometryDialog, *actionEditSurfacePlot, *actionAdd3DData;
01066 QAction *actionMatrixDeterminant, *actionSetMatrixProperties;
01067 QAction *actionSetMatrixDimensions, *actionConvertMatrix, *actionSetMatrixValues, *actionTransposeMatrix, *actionInvertMatrix;
01068 QAction *actionPlot3DWireFrame, *actionPlot3DHiddenLine, *actionPlot3DPolygons, *actionPlot3DWireSurface;
01069 QAction *actionColorMap, *actionContourMap, *actionGrayMap;
01070 QAction *actionDeleteFitTables, *actionShowGridDialog, *actionTimeStamp;
01071 QAction *actionSmoothSavGol, *actionSmoothFFT, *actionSmoothAverage, *actionFFT;
01072 QAction *actionLowPassFilter, *actionHighPassFilter, *actionBandPassFilter, *actionBandBlockFilter;
01073 QAction *actionSortTable, *actionSortSelection, *actionNormalizeSelection;
01074 QAction *actionNormalizeTable, *actionConvolute, *actionDeconvolute, *actionCorrelate, *actionAutoCorrelate;
01075 QAction *actionTranslateHor, *actionTranslateVert, *actionSetAscValues, *actionSetRandomValues;
01076 QAction *actionSetXCol, *actionSetYCol, *actionSetZCol, *actionDisregardCol, *actionSetXErrCol, *actionSetYErrCol;
01077 QAction *actionBoxPlot, *actionMultiPeakGauss, *actionMultiPeakLorentz, *actionCheckUpdates;
01078 QAction *actionDonate, *actionHomePage, *actionDownloadManual, *actionTechnicalSupport, *actionTranslations;
01079 QAction *actionHelpForums, *actionHelpBugReports;
01080 QAction *actionShowPlotDialog, *actionShowScaleDialog, *actionOpenTemplate, *actionSaveTemplate;
01081 QAction *actionNextWindow, *actionPrevWindow;
01082 QAction *actionScriptingLang, *actionRestartScripting, *actionClearTable, *actionGoToRow;
01083 QAction *actionNoteExecute, *actionNoteExecuteAll, *actionNoteEvaluate, *actionSaveNote;
01084 QAction *actionShowScriptWindow;
01085 QAction *actionAnimate, *actionPerspective, *actionFitFrame, *actionResetRotation;
01086
01087 QActionGroup* dataTools;
01088 QAction *btnCursor, *btnSelect, *btnPicker, *btnRemovePoints, *btnMovePoints;
01089 QAction *btnZoomIn, *btnZoomOut, *btnPointer, *btnLine, *btnArrow;
01090
01091 QActionGroup* coord;
01092 QAction* Box;
01093 QAction* Frame;
01094 QAction* None;
01095
01096 QActionGroup* grids;
01097 QAction* front;
01098 QAction* back;
01099 QAction* right;
01100 QAction* left;
01101 QAction* ceil;
01102 QAction* floor;
01103
01104 QActionGroup* floorstyle;
01105 QAction* floordata;
01106 QAction* flooriso;
01107 QAction* floornone;
01108
01109 QActionGroup* plotstyle;
01110 QAction* wireframe;
01111 QAction* hiddenline;
01112 QAction* polygon;
01113 QAction* filledmesh;
01114 QAction* pointstyle;
01115 QAction* barstyle;
01116 QAction *conestyle, *crossHairStyle;
01117 };
01118 #endif