Isis 3 Developer Reference
MosaicController.h
Go to the documentation of this file.
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 
75  return m_scene;
76  }
77 
79  return m_worldScene;
80  }
81 
83  return m_fileList;
84  }
85 
86  void addExportActions(QMenu &fileMenu);
87 
89  void saveProject();
90 
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 
QList< QAction * > getSettingsActions()
Definition: MosaicController.cpp:131
QProgressBar * getProgress()
Definition: MosaicController.cpp:109
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
void imagesAdded(ImageList images)
Emitted when new images are available.
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
void openProjectImages(PvlObject projectImages)
Definition: MosaicController.cpp:162
virtual ~MosaicController()
Free the allocated memory by this object.
Definition: MosaicController.cpp:80
void saveSettings(QSettings &settings)
Definition: MosaicController.cpp:146
MosaicSceneWidget * getMosaicScene()
Definition: MosaicController.h:74
void readProject(QString filename)
Definition: MosaicController.cpp:235
MosaicController(QStatusBar *status, QSettings &settings)
MosaicWidget constructor.
Definition: MosaicController.cpp:44
void addExportActions(QMenu &fileMenu)
Add actions that are export-related to the menu.
Definition: MosaicController.cpp:91
Definition: AbstractTableModel.h:16
Definition: MosaicController.h:67
Container for cube-like labels.
Definition: Pvl.h:135
ImageFileListWidget * getImageFileList()
Definition: MosaicController.h:82
void openImages(QStringList filenames)
Handle opening cubes by filename.
Definition: MosaicController.cpp:157
A colored, grouped cube list.
Definition: ImageFileListWidget.h:64
MosaicSceneWidget * getMosaicWorldScene()
Definition: MosaicController.h:78
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74