MantidUI.h 22.4 KB
Newer Older
Peterson, Peter's avatar
Peterson, Peter committed
1
2
3
#ifndef MANTIDUI_H
#define MANTIDUI_H

4
5
6
7
8
//----------------------------------
// Includes
//----------------------------------
#include "../ApplicationWindow.h"
#include "../Graph.h"
9
#include "MantidAlgorithmMetatype.h"
Peterson, Peter's avatar
Peterson, Peter committed
10

11
#include "MantidAPI/FrameworkManager.h"
12
#include "MantidAPI/Algorithm.h"
13
#include "MantidAPI/AlgorithmManager.h"
14
#include "MantidAPI/AlgorithmFactory.h"
15
#include "MantidAPI/AnalysisDataService.h"
16
#include "MantidAPI/IPeaksWorkspace_fwd.h"
17
#include "MantidAPI/MatrixWorkspace_fwd.h"
Harry Jeffery's avatar
Harry Jeffery committed
18
#include "MantidAPI/Workspace_fwd.h"
19

20
#include "MantidQtAPI/AlgorithmDialog.h"
21
22
#include "MantidQtAPI/QwtWorkspaceSpectrumData.h"

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <Poco/NObserver.h>

#include <QDockWidget>
#include <QTreeWidget>
#include <QProgressDialog>
#include <QMap>
#include <QMutex>

//----------------------------------
// Forward declarations
//----------------------------------
class Graph3D;
class ScriptingEnv;
class MantidMatrix;
class MantidDockWidget;
class AlgorithmDockWidget;
39
class RemoteClusterDockWidget;
40
41
class AlgorithmMonitor;
class InstrumentWindow;
42
43
namespace MantidQt
{
44
45
46
47
48
49
50
51
  namespace API
  {
    class Message;
  }
  namespace MantidWidgets
  {
    class FitPropertyBrowser;
  }
52
53
54
55
56
57
58
59
  namespace SliceViewer
  {
    class SliceViewerWindow;
  }
  namespace SpectrumView
  {
    class SpectrumView;
  }
60
}
61
62
namespace Ui
{
63
  class SequentialFitDialog;
64
65
}

Roman Tolchenov's avatar
Roman Tolchenov committed
66
67
68
69
70
71
72
namespace Mantid
{
  namespace API
  {
    class AlgorithmObserver;
  }
}
73
74

/**
75
MantidUI is the extension of QtiPlot's ApplicationWindow which deals with Mantid framework.
76

77
78
@author Roman Tolchenov, Tessella Support Services plc
@date 02/07/2008
79

80
Copyright &copy; 2008 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge National Laboratory & European Spallation Source
81

82
This file is part of Mantid.
83

84
85
86
87
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
88

89
90
91
92
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
93

94
95
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
96

97
98
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
99
100
101
102
*/

/// Required by Qt to use Mantid::API::Workspace_sptr as a parameter type in signals
Q_DECLARE_METATYPE(Mantid::API::Workspace_sptr)
103
104
105
  Q_DECLARE_METATYPE(Mantid::API::MatrixWorkspace_sptr)
  Q_DECLARE_METATYPE(Mantid::API::MatrixWorkspace_const_sptr)
  Q_DECLARE_METATYPE(std::string)
106

Peterson, Peter's avatar
Peterson, Peter committed
107
108
class MantidUI:public QObject
{
109
  Q_OBJECT
Peterson, Peter's avatar
Peterson, Peter committed
110
111
112

public:

113
114
115
116
117
  // Constructor
  MantidUI(ApplicationWindow *aw);

  // Destructor
  ~MantidUI();
118

119
120
  //Clear the framework
  void shutdown();
121

122
123
  // Save settings to a persistent store
  void saveSettings() const;
Peterson, Peter's avatar
Peterson, Peter committed
124

125
126
  // Initialization
  void init();
127

128
129
  // Insert relevant items into a menu
  void addMenuItems(QMenu *menu);
Peterson, Peter's avatar
Peterson, Peter committed
130

131
132
  // Pointer to QtiPLot main window
  ApplicationWindow *appWindow(){return m_appWindow;}
133

134
135
  // Returns a list of open workspaces
  QStringList getWorkspaceNames();
Peterson, Peter's avatar
Peterson, Peter committed
136

137
138
  // Returns a list of registered algorithms
  QStringList getAlgorithmNames();
Peterson, Peter's avatar
Peterson, Peter committed
139

140
141
  // Returns the number of algorithms currently executing
  int runningAlgCount() const;
142

143
144
145
  // Create an algorithm using Mantid FrameworkManager
  // Create a pointer to the named algorithm and version
  Mantid::API::IAlgorithm_sptr createAlgorithm(const QString& algName, int version = -1);
146

147
148
  // Execute algorithm asinchronously
  bool executeAlgorithmAsync(Mantid::API::IAlgorithm_sptr alg, const bool wait = false);
149

150
151
  // Gets a pointer to workspace workspaceName
  Mantid::API::Workspace_const_sptr getWorkspace(const QString& workspaceName);
152

153
  // Deletes workspace from QtiPlot
154
  void deleteWorkspace(const QString& workspaceName);
155

156
157
  // Returns the name of selected workspace in exploreMantid window
  QString getSelectedWorkspaceName();
158

159
160
  // Returns the pointer of workspace selected in exploreMantid window
  Mantid::API::Workspace_const_sptr getSelectedWorkspace();
161

162
163
  // Returns the name and version of the algorithm selected in algorithm dock window
  void getSelectedAlgorithm(QString& algName, int& version);
164

165
166
  // Adjusts QtiPlot's main menu if a MantidMatrix becomes active (receives focus)
  bool menuAboutToShow(MdiSubWindow *w);
167

168
169
  // Prepares the contex menu for MantidMatrix
  void showContextMenu(QMenu& cm, MdiSubWindow* w);
170

171
172
  // Check if drop event can be accepted
  bool canAcceptDrop(QDragEnterEvent *e);
173
174
  // Handles workspace drop operation to QtiPlot (imports the workspace to MantidMatrix)
  bool drop(QDropEvent* e);
175

176
  //  *****      Plotting Methods     *****  //
177

178
179
  // Creates a 3D plot in QtiPlot if the active window is a MantidMatrix
  Graph3D *plot3DMatrix(int style);
180

181
182
  // Creates a 2D plot in QtiPlot if the active window is a MantidMatrix
  MultiLayer *plotSpectrogram(Graph::CurveType type);
183

184
185
  /// Create a Table form specified spectra in a MatrixWorkspace
  Table* createTableFromSpectraList(const QString& tableName, const QString& workspaceName, QList<int> indexList, bool errs=true, bool binCentres=false);
186

187
188
  // Copies selected rows from MantidMatrix to Y and errY columns of a new Table.
  Table* createTableFromSelectedRows(MantidMatrix *m, bool errs = true, bool binCentres=false);
189

190
191
  /// Create a 1d graph form a Table
  MultiLayer* createGraphFromTable(Table* t, int type = 0);
192

193
  // Shows 1D graphs of the spectra (rows) selected in a MantidMatrix
194
195
196
  MultiLayer* plotSelectedRows(const MantidMatrix * const m,
                               MantidQt::DistributionFlag distr = MantidQt::DistributionDefault,
                               bool errs = true);
197
198
  // Shows 1D graphs of the columns (bins) selected in a MantidMatrix
  MultiLayer* plotSelectedColumns(const MantidMatrix * const m, bool errs = true);
199

200
  AlgorithmMonitor* getAlgMonitor(){return m_algMonitor;}
201
  /// updates the algorithms tree
Nick Draper's avatar
Nick Draper committed
202
  void updateAlgorithms();
203
204
  /// Show the algorithm dock widget
  void showAlgWidget(bool on = true);
205

206
  /// Plot a 1D graph for an integrated mdworkspace
207
208
209
  MultiLayer*  plotMDList(const QStringList& wsNames, const int plotAxis, 
    const Mantid::API::MDNormalization normalization, const bool showError, MultiLayer* plotWindow = NULL,
    bool clearWindow = false);
210

211
  public slots:
212
213
    // Create a 1d graph form specified MatrixWorkspace and index
  MultiLayer* plot1D(const QStringList& wsnames, const QList<int>& indexList, bool spectrumPlot,
214
                     bool errs=true, Graph::CurveType style = Graph::Unspecified,
215
                     MultiLayer* plotWindow = NULL, bool clearWindow = false, bool waterfallPlot = false);
216
217

  MultiLayer* plot1D(const QString& wsName, const std::set<int>& indexList, bool spectrumPlot,
218
219
                     MantidQt::DistributionFlag distr = MantidQt::DistributionDefault,
                     bool errs=false,
220
                     MultiLayer* plotWindow = NULL, bool clearWindow = false, bool waterfallPlot = false);
221
222

  MultiLayer* plot1D(const QMultiMap<QString,int>& toPlot, bool spectrumPlot,
223
224
225
                     MantidQt::DistributionFlag distr = MantidQt::DistributionDefault,
                     bool errs=false,
                     Graph::CurveType style = Graph::Unspecified,
226
                     MultiLayer* plotWindow = NULL, bool clearWindow = false, bool waterfallPlot = false);
227
228

  MultiLayer* plot1D(const QMultiMap<QString,std::set<int> >& toPlot, bool spectrumPlot,
229
230
                     MantidQt::DistributionFlag distr = MantidQt::DistributionDefault,
                     bool errs=false,
231
                     MultiLayer* plotWindow = NULL, bool clearWindow = false, bool waterfallPlot = false);
232
  
233
234
235
    /// Draw a color fill plot for each of the listed workspaces
    void drawColorFillPlots(const QStringList & wsNames, Graph::CurveType curveType = Graph::ColorMap);
    /// Draw a color fill plot for the named workspace
236
    MultiLayer* drawSingleColorFillPlot(const QString & wsName, Graph::CurveType curveType = Graph::ColorMap,
237
                                        MultiLayer* window = NULL, bool hidden = false);
238

239
    // Create a 1d graph form specified spectra in a MatrixWorkspace
240
241
242
    MultiLayer* plotSpectraRange(const QString& wsName, int i0, int i1, 
                                 MantidQt::DistributionFlag distr = MantidQt::DistributionDefault,
                                 bool errs=true);
243

244
245
    // Set properties of a 1d graph which plots data from a workspace
    static void setUpBinGraph(MultiLayer* ml, const QString& wsName, Mantid::API::MatrixWorkspace_const_sptr workspace);
246

247
248
    // Copy to a Table Y-values (and Err-values if errs==true) of bins with indeces from i0 to i1 (inclusive) from a workspace
    Table* createTableFromBins(const QString& wsName, Mantid::API::MatrixWorkspace_const_sptr workspace, const QList<int>& bins, bool errs=true,int fromRow = -1, int toRow = -1);
249

250
251
    // Copies selected columns (time bins) in a MantidMatrix to a Table
    Table* createTableFromSelectedColumns(MantidMatrix *m, bool errs);
252

253
254
    // Creates and shows a Table with detector ids for the workspace in the MantidMatrix
    Table* createTableDetectors(MantidMatrix *m);
255

256
257
258
    /// create and shows a Table for the workspace from the Python script
    Table* createDetectorTable(const QString &wsName);

259
260
261
262
263
264
265
    /// Create a table showing detector information for the given workspace and indices and optionally the data for that detector
    Table* createDetectorTable(const QString & wsName, const std::vector<int>& indices, bool include_data = false);
    /// Create the instrument detector table from a MatrixWorkspace
    Table* createDetectorTable(const QString & wsName, const Mantid::API::MatrixWorkspace_sptr & ws, 
      const std::vector<int>& indices, bool include_data = false);
    /// Create a table of detectors from a PeaksWorkspace
    Table* createDetectorTable(const QString & wsName, const Mantid::API::IPeaksWorkspace_sptr & ws);
266
267
    /// Triggers a workspace delete check
    void deletePressEvent();
268

269
270
271
272
273
274
    // Determine whether the workspace has a UB matrix
    bool hasUB(const QString& wsName);
    // Clear the UB via the ClearUB algorithm
    void clearUB(const QStringList& workspaces);
    //  *****                            *****  //
    void renameWorkspace(QStringList = QStringList());
275

276
277
278
279
280
281
    /**
    * Set the currently used fit property browser. Is needed because e.g. Muon Analysis is using its 
    * own fit browser.
    * @param newBrowser The browser to be used. If is null, is set to default one.
    */
    void setFitFunctionBrowser(MantidQt::MantidWidgets::FitPropertyBrowser* newBrowser);
282

283
public:
284

285
  // Return pointer to the fit function property browser
286
  MantidQt::MantidWidgets::FitPropertyBrowser* fitFunctionBrowser(){return m_fitFunction;}
287
288
289

  MultiLayer* mergePlots(MultiLayer* g1, MultiLayer* g2);
  MantidMatrix* getMantidMatrix(const QString& wsName);
290

Doucet, Mathieu's avatar
Doucet, Mathieu committed
291
  void setIsRunning(bool running);
292
293
294
  bool createScriptInputDialog(const QString & alg_name, const QString & preset_values,
                               const QString & optional_msg,  const QStringList & enabled,
                               const QStringList & disabled);
295
  /// Group selected workspaces
296
297
298
299
  void groupWorkspaces();
  /// UnGroup selected groupworkspace
  void ungroupWorkspaces();
  /** save the workspace data to nexus file
300
  This method is useful when a project is saved from mantidplot
301
302
  */
  void savedatainNexusFormat(const std::string& fileName,const std::string & wsName);
303

304
  void loadWSFromFile(const std::string& wsname,const std::string& fileName);
305

306
  MantidMatrix* openMatrixWorkspace(const std::string& wsName, int lower, int upper);
307

308
309
  void saveProject(bool save);
  void enableSaveNexus(const QString & wsName);
310
  void disableSaveNexus();
311

312
313
314
signals:
  //A signal to indicate that we want a script to produce a dialog
  void showPropertyInputDialog(const QString & algName);
315
316
  // Broadcast that an algorithm is about to be created
  void algorithmAboutToBeCreated();
317

318
319
320
321
public:

signals:

322
323
324
325
  // These signals are to be fired from methods run in threads other than the main one
  // (e.g. handlers of algorithm notifications)

  void workspaces_cleared();
326
  void ADS_updated();
327
  void workspace_renamed(QString,QString);
328

329
330
331
332
333
  void needToCreateLoadDAEMantidMatrix(const QString&);

  // Display a critical error dialog box
  void needToShowCritical(const QString&);

334
335
336
  // Signals that the fit property browser has updated its X range
  void x_range_update(double, double);

337
  public slots:
338

339
340
341
    // Receives a new X range from a PeakPickerTool and re-emits it.
    void x_range_from_picker(double, double);
    void test();
342

343
    void showSequentialPlot(Ui::SequentialFitDialog* ui, MantidQt::MantidWidgets::FitPropertyBrowser* fitbrowser);
344

345
346
347
348
    // Import the workspace selected in the Workspace dock window
    void importWorkspace();
    void importBoxDataTable();
    void importTransposed();
349

350
351
    // Invoke the Vates Simple User Interface
    void showVatesSimpleInterface();
352

353
354
    // Invoke the plot of MD intensity vs non-integrated dimension.
    void showMDPlot();
355

356
357
    // Invoke a grid showing a table of MD summary list data.
    void showListData();
358

359
360
    // SpectrumViewer
    void showSpectrumViewer();
361

362
363
    // SliceViewer
    void showSliceViewer();
364

365
366
    // #539: For adding Workspace History display to MantidPlot
    void showAlgorithmHistory();
367

368
369
    // Import a workspace wsName
    void importWorkspace(const QString& wsName, bool showDlg = true, bool makeVisible = true);
370

371
372
    // Create a MantidMatrix from workspace wsName
    MantidMatrix *importMatrixWorkspace(const QString& wsName, int lower = -1, int upper = -1,
373
374
      bool showDlg = true, bool makeVisible = true);

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
    // Create a MantidMatrix from workspace wsName
    Table *importTableWorkspace(const QString& wsName, bool showDlg = true, bool makeVisible = true, bool transpose = false);

    void createLoadDAEMantidMatrix(const QString&);

    // Slots responding to MantidMatrix context menu commands
    void copyRowToTable();
    void copyColumnToTable();
    void copyRowToGraph();
    void copyColumnToGraph();
    void copyRowToGraphErr();
    void copyColumnToGraphErr();
    void copyDetectorsToTable();
    void copyValues();
    void copyRowsToWaterfall();
    // Slot callable from Workspace menu item
    void plotWholeAsWaterfall();
    /// Common method to convert a plot of a set of spectra into a waterfall plot
    void convertToWaterfall(MultiLayer* ml);

    // Execute algorithm given name and version
396
    void showAlgorithmDialog(const QString & algName, int version = -1);
397
    // Execute an algorithm with the given parameter list
398
    void showAlgorithmDialog(QString algName, QHash<QString, QString> paramList, Mantid::API::AlgorithmObserver *obs = NULL, int version = -1);
399
400
    // Execute an algorithm
    void executeAlgorithm(Mantid::API::IAlgorithm_sptr alg);
401
    // Execute a named algorithm using the given parameters
402
    void executeAlgorithm(const QString & algName, const QString & paramList, Mantid::API::AlgorithmObserver* obs);
403

404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
    // Find the name of the first input workspace for an algorithm
    QString findInputWorkspaceProperty(Mantid::API::IAlgorithm_sptr algorithm) const;
    // Show Qt critical error message box
    void showCritical(const QString&);
    // Show the dialog monitoring currently running algorithms
    void showAlgMonitor();
    // Called from ApplicationWindow to customize the main menu
    void mantidMenuAboutToShow();

    void manageMantidWorkspaces();

    //Python related functions
    InstrumentWindow* getInstrumentView(const QString & wsName, int tab = -1);

    void showMantidInstrument();

    // Show instrument for the selected workspace
    void showMantidInstrumentSelected();

    // Show instrument. Workspace name is passed as the argument
    void showMantidInstrument(const QString&);

    // Show log files for selected workspace
    void showLogFileWindow();

429
430
431
    // Show sample material window for selected workspace
    void showSampleMaterialWindow();

432
433
434
435
436
437
438
439
440
441
442
443
444
    void insertMenu();

    // Customize MantidMatrix menu.
    void menuMantidMatrixAboutToShow();

    // Show / hide the FitPropertyBrowser
    void showFitPropertyBrowser(bool on = true);

    // Plot a spectrum in response from a InstrumentWindow signal
    MultiLayer* plotInstrumentSpectrum(const QString&,int);
    MultiLayer* plotInstrumentSpectrumList(const QString&,std::set<int>);

    void importString(const QString &logName, const QString &data);
445
446
447
    void importString(const QString &logName, const QString &data, const QString &sep, const QString &wsName = QString());
    void importStrSeriesLog(const QString &logName, const QString &data, const QString &wsName = QString());
    void importNumSeriesLog(const QString &wsName, const QString &logname, int filter);
448
449

    // Clear all Mantid related memory
450
    void clearAllMemory(const bool prompt = true);
451
452
453
454
    void releaseFreeMemory();
    // Ticket #672
    void saveNexusWorkspace();
    QString saveToString(const std::string &workingDir);
455
456
457

#ifdef _WIN32
public:
458
459
460
  // Shows 2D plot of current memory usage.
  void memoryImage();
  void memoryImage2();
461
462
#endif

463
464
465
466
private slots:

  // slot for file open dialogs created from the main app menu, or the workspaces dock window
  void loadFileDialogAccept();
467

Peterson, Peter's avatar
Peterson, Peter committed
468
469
private:

470
471
472
  // Notification handlers and corresponding observers.
  void handleLoadDAEFinishedNotification(const Poco::AutoPtr<Mantid::API::Algorithm::FinishedNotification>& pNf);
  Poco::NObserver<MantidUI, Mantid::API::Algorithm::FinishedNotification> m_finishedLoadDAEObserver;
Peterson, Peter's avatar
Peterson, Peter committed
473

474
475
  void handleAddWorkspace(Mantid::API::WorkspaceAddNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::WorkspaceAddNotification> m_addObserver;
Peterson, Peter's avatar
Peterson, Peter committed
476

477
478
  void handleReplaceWorkspace(Mantid::API::WorkspaceAfterReplaceNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::WorkspaceAfterReplaceNotification> m_replaceObserver;
Peterson, Peter's avatar
Peterson, Peter committed
479

480
481
  void handleDeleteWorkspace(Mantid::API::WorkspacePostDeleteNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::WorkspacePostDeleteNotification> m_deleteObserver;
482
483
484

  void handleClearADS(Mantid::API::ClearADSNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::ClearADSNotification> m_clearADSObserver;
485

486
  //handles rename workspace notification
487
488
  void handleRenameWorkspace(Mantid::API::WorkspaceRenameNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::WorkspaceRenameNotification> m_renameObserver;
489

490
491
492
  //handles notification send by Groupworkspaces algorithm 
  void handleGroupWorkspaces(Mantid::API::WorkspacesGroupedNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::WorkspacesGroupedNotification> m_groupworkspacesObserver;
493

494
  //handles notification send by UnGroupworkspaces algorithm 
495
496
  void handleUnGroupWorkspace(Mantid::API::WorkspaceUnGroupingNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::WorkspaceUnGroupingNotification> m_ungroupworkspaceObserver;
497

498
499
500
501
  //handles notification send by a WorkspaceGroup instance
  void handleWorkspaceGroupUpdate(Mantid::API::GroupUpdatedNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::API::GroupUpdatedNotification> m_workspaceGroupUpdateObserver;

502
503
504
505
  // handles notification send by ConfigService, change on pythonscripts.directories
  void handleConfigServiceUpdate(Mantid::Kernel::ConfigValChangeNotification_ptr pNf);
  Poco::NObserver<MantidUI, Mantid::Kernel::ConfigValChangeNotification> m_configServiceObserver;

506
507
  //#678
  //for savenexus algorithm
508
  void executeSaveNexus();
509

510
511
  void copyWorkspacestoVector(const QList<QTreeWidgetItem*> &list,std::vector<std::string> &inputWS);
  void PopulateData(Mantid::API::Workspace_sptr ws_ptr,QTreeWidgetItem*  wsid_item);
512

513
514
  /// This creates an algorithm dialog.
  MantidQt::API::AlgorithmDialog * createAlgorithmDialog(Mantid::API::IAlgorithm_sptr alg);
515

516
517
  /// This method accepts user inputs and executes loadraw/load nexus algorithm
  std::string extractLogTime(Mantid::Kernel::DateAndTime value,bool useAbsoluteDate, Mantid::Kernel::DateAndTime start);
518

519
520
521
  ///extracts the files from a mimedata object that have a .py extension
  QStringList extractPyFiles(const QList<QUrl>& urlList) const;

522
523
524
525
  // Whether new plots shoul re-use the same plot instance (for every different type of plot).
  // The name comes from: these plots are normally opened from the context menu of the workspaces dock window
  bool workspacesDockPlot1To1();

526
527
528
529
530
  // Private variables

  ApplicationWindow *m_appWindow;             // QtiPlot main ApplicationWindow
  MantidDockWidget *m_exploreMantid;          // Dock window for manipulating workspaces
  AlgorithmDockWidget *m_exploreAlgorithms;   // Dock window for using algorithms
531
  RemoteClusterDockWidget *m_exploreRemoteTasks;   // Dock window for using remote tasks
532
533
534
535
  /// Current fit property browser being used
  MantidQt::MantidWidgets::FitPropertyBrowser* m_fitFunction; 
  /// Default fit property browser (the one docked on the left)
  MantidQt::MantidWidgets::FitPropertyBrowser* m_defaultFitFunction;
536
537
538
539
540
541
542
543
544
545

  QAction *actionCopyRowToTable;
  QAction *actionCopyRowToGraph;
  QAction *actionCopyRowToGraphErr;
  QAction *actionWaterfallPlot;
  QAction *actionCopyColumnToTable;
  QAction *actionCopyColumnToGraph;
  QAction *actionCopyColumnToGraphErr;
  QAction *actionToggleMantid;
  QAction *actionToggleAlgorithms;
546
  QAction *actionToggleRemoteTasks;
547
548
549
550
551
552
553
554
  QAction *actionToggleFitFunction;
  QAction *actionCopyDetectorsToTable;
  QAction *actionCopyValues;

  QMenu *mantidMenu;
  QMenu *menuMantidMatrix;             //  MantidMatrix specific menu
  AlgorithmMonitor *m_algMonitor;      //  Class for monitoring running algorithms

555
  // keep track of the last shown, which will be refreshed or killed/rebuilt if showing only one inst. window
556
557
558
559
560
561
  // QPointer handles when events, etc. destroy these windows
  QPointer<InstrumentWindow> m_lastShownInstrumentWin;
  QPointer<MantidQt::SliceViewer::SliceViewerWindow> m_lastShownSliceViewWin;
  QPointer<MantidQt::SpectrumView::SpectrumView> m_lastShownSpectrumViewerWin;
  QPointer<MultiLayer> m_lastShownColorFillWin;
  QPointer<MultiLayer> m_lastShown1DPlotWin;
562

563
564
565
566
567
568
  // Map of <workspace_name,update_interval> pairs. Positive update_intervals mean
  // UpdateDAE must be launched after LoadDAE for this workspace
  QMap<std::string,int> m_DAE_map;

  // Stores dependent mdi windows. If the 'key' window closes, all 'value' ones must be closed as well.
  std::multimap<MdiSubWindow*,MdiSubWindow*> m_mdiDependency;
569
  QMdiSubWindow *m_vatesSubWindow; ///< Holder for the Vates interface sub-window
570

Keith Brown's avatar
Keith Brown committed
571
572
  //prevents some repeated code realtating to log names
  void formatLogName(QString &label, const QString &wsName);
Peterson, Peter's avatar
Peterson, Peter committed
573
574
};

575

576
#endif