Isis 3 Programmer Reference
MosaicController.h
1 #ifndef MosaicWidgetController_H
2 #define MosaicWidgetController_H
3 
4 #include <QObject>
5 
6 #include <QPointer>
7 
8 class QAction;
9 template <typename A> class QFutureWatcher;
10 template <typename A> class QList;
11 class QMenu;
12 class QMutex;
13 class QProgressBar;
14 class QSettings;
15 class QStatusBar;
16 
17 // This is required since we have a slot with a QStringList
18 #include <QStringList>
19 
20 // This is the parent of the inner class
21 #include <functional>
22 
23 #include "ImageList.h"
24 #include "PvlObject.h"
25 #include "MosaicSceneWidget.h"
26 #include "ImageFileListWidget.h"
27 
28 namespace Isis {
29  class ControlNet;
30  class FileName;
31  class ImageReader;
32  class MosaicSceneWidget;
33  class ProgressBar;
34  class PvlObject;
35 
67  class MosaicController : public QObject {
68  Q_OBJECT
69 
70  public:
71  MosaicController(QStatusBar *status, QSettings &settings);
72  virtual ~MosaicController();
73 
74  MosaicSceneWidget *getMosaicScene() {
75  return m_scene;
76  }
77 
78  MosaicSceneWidget *getMosaicWorldScene() {
79  return m_worldScene;
80  }
81 
82  ImageFileListWidget *getImageFileList() {
83  return m_fileList;
84  }
85 
86  void addExportActions(QMenu &fileMenu);
87 
88  QProgressBar *getProgress();
89  void saveProject();
90 
91  QList<QAction *> getSettingsActions();
92  void saveSettings(QSettings &settings);
93 
94  signals:
98  void imagesAdded(ImageList images);
99  void imagesAdded(ImageList *images);
100 
101  void allImagesClosed();
102 
103  public slots:
104  void saveProject(QString filename);
105  void readProject(QString filename);
106  void openImages(QStringList filenames);
107  void openProjectImages(PvlObject projectImages);
108 
109  private slots:
110  void changeMaxThreads();
111  void imageClosed(QObject * image);
112  void imagesReady(ImageList);
113  void saveList();
114 
115  private:
116  void applyMaxThreadCount();
117  void convertV1ToV2(Pvl &project);
118 
119  private:
120  ImageList m_images;
121 
122  QPointer<ImageFileListWidget> m_fileList;
123  QPointer<MosaicSceneWidget> m_scene;
124  QPointer<MosaicSceneWidget> m_worldScene;
125  QPointer<ImageReader> m_imageReader;
126 
127  int m_maxThreads;
128 
129  // Cameras are not re-entrant and so this mutex will make sure they
130  // aren't overly abused
131  QMutex *m_mutex;
132  };
133 }
134 
135 #endif
136 
QProgressBar
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::MosaicController::convertV1ToV2
void convertV1ToV2(Pvl &project)
This converts qmos project files (no other project files existed) from their original version (file n...
Definition: MosaicController.cpp:297
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::MosaicController::imagesAdded
void imagesAdded(ImageList images)
Emitted when new images are available.
QMenu
Isis::ImageFileListWidget
A colored, grouped cube list.
Definition: ImageFileListWidget.h:64
Isis::MosaicSceneWidget
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
QStringList
Isis::ImageList
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
Isis::MosaicController
Definition: MosaicController.h:67
Isis::MosaicController::imageClosed
void imageClosed(QObject *image)
An open image is being deleted.
Definition: MosaicController.cpp:221
Isis::MosaicController::openImages
void openImages(QStringList filenames)
Handle opening cubes by filename.
Definition: MosaicController.cpp:157
Isis::MosaicController::MosaicController
MosaicController(QStatusBar *status, QSettings &settings)
MosaicWidget constructor.
Definition: MosaicController.cpp:44
QFutureWatcher
This is free and unencumbered software released into the public domain.
Definition: AbstractTableModel.h:24
QObject
QAction
Isis::MosaicController::~MosaicController
virtual ~MosaicController()
Free the allocated memory by this object.
Definition: MosaicController.cpp:80
Isis::MosaicController::addExportActions
void addExportActions(QMenu &fileMenu)
Add actions that are export-related to the menu.
Definition: MosaicController.cpp:91
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16