Isis 3 Programmer Reference
ProjectionConfigDialog.h
1 #ifndef ProjectionConfigDialog_h
2 #define ProjectionConfigDialog_h
3 
4 #include <QDialog>
5 
6 #include <QPointer>
7 
8 class QLabel;
9 class QPushButton;
10 class QTextEdit;
11 
12 namespace Isis {
13  class MosaicSceneWidget;
14  class Projection;
15  class Pvl;
16 
25  Q_OBJECT
26 
27  public:
28  ProjectionConfigDialog(MosaicSceneWidget *scene, QWidget *parent = NULL);
29  virtual ~ProjectionConfigDialog();
30 
31  void setQuickConfig(bool quick);
32 
33  signals:
34  void shown();
35 
36  public slots:
37  void applySettings();
38  void readSettings();
39 
40  protected:
41  void showEvent(QShowEvent *);
42 
43  private:
44  Q_DISABLE_COPY(ProjectionConfigDialog);
45  Pvl addMissingKeywords(Pvl mappingPvl);
47 
48  private slots:
49  void beginQuickLoad();
50  void loadFromFile();
51  void saveToFile();
52  void refreshWidgetStates();
53  void showErrors(int);
54 
55  private:
57  QPointer<QLabel> m_stateLabel;
59  QPointer<QLabel> m_errorsLabel;
61  QPointer<QTextEdit> m_mapFileEdit;
62 
64  QPointer<QPushButton> m_readFromFileButton;
65 
67  QPointer<QPushButton> m_applyButton;
69  QPointer<QPushButton> m_okayButton;
70 
72  QPointer<MosaicSceneWidget> m_scene;
73 
75  bool m_dirty;
76 
78  bool m_quick;
79  };
80 }
81 
82 #endif
Isis::ProjectionConfigDialog::m_scene
QPointer< MosaicSceneWidget > m_scene
The mosaic scene we're configuring the projection for.
Definition: ProjectionConfigDialog.h:72
Isis::ProjectionConfigDialog::applySettings
void applySettings()
Take the settings that have been configured and apply them to the mosaic scene.
Definition: ProjectionConfigDialog.cpp:172
QWidget
Isis::ProjectionConfigDialog::m_quick
bool m_quick
Should we minimize the user interaction?
Definition: ProjectionConfigDialog.h:78
Isis::ProjectionConfigDialog::loadFromFile
void loadFromFile()
Read mapping parameters from a file (prompts user for the file name).
Definition: ProjectionConfigDialog.cpp:277
Isis::MosaicSceneWidget
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
Isis::ProjectionConfigDialog::m_readFromFileButton
QPointer< QPushButton > m_readFromFileButton
This button corresponds to 'Load Map File...' and causes a prompt for file input.
Definition: ProjectionConfigDialog.h:64
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::ProjectionConfigDialog::m_applyButton
QPointer< QPushButton > m_applyButton
This button applies the current projection to the scene.
Definition: ProjectionConfigDialog.h:67
Isis::ProjectionConfigDialog::addMissingKeywords
Pvl addMissingKeywords(Pvl mappingPvl)
Get a modified mapping pvl that the mosaic scene will be compatible with.
Definition: ProjectionConfigDialog.cpp:217
Isis::ProjectionConfigDialog::createProjection
Projection * createProjection()
Convert the current text in the text edit to a projection.
Definition: ProjectionConfigDialog.cpp:249
Isis::ProjectionConfigDialog::saveToFile
void saveToFile()
Save mapping parameters to the given file.
Definition: ProjectionConfigDialog.cpp:325
Isis::ProjectionConfigDialog::m_errorsLabel
QPointer< QLabel > m_errorsLabel
This shows errors generated by trying to create a projection from the current mapping pvl.
Definition: ProjectionConfigDialog.h:59
Isis::ProjectionConfigDialog::m_mapFileEdit
QPointer< QTextEdit > m_mapFileEdit
This is the text area that a user can type in for editing the projection.
Definition: ProjectionConfigDialog.h:61
Isis::ProjectionConfigDialog::setQuickConfig
void setQuickConfig(bool quick)
Enable/disable minimal interaction mode.
Definition: ProjectionConfigDialog.cpp:164
Isis::ProjectionConfigDialog::readSettings
void readSettings()
Update the current widgets' states with the current settings in the mosaic scene.
Definition: ProjectionConfigDialog.cpp:189
Isis::ProjectionConfigDialog::refreshWidgetStates
void refreshWidgetStates()
Update the enabled/disabled states of the various widgets based on the current user inputs' states.
Definition: ProjectionConfigDialog.cpp:351
Isis::ProjectionConfigDialog::m_dirty
bool m_dirty
To reduce redundant computations, keep track of dirty state of the dialog.
Definition: ProjectionConfigDialog.h:75
Isis::ProjectionConfigDialog::m_okayButton
QPointer< QPushButton > m_okayButton
This button applies the current projection to the scene and closes the dialog.
Definition: ProjectionConfigDialog.h:69
Isis::ProjectionConfigDialog::beginQuickLoad
void beginQuickLoad()
If using quick load, this will prompt the user for an input file right after the show event.
Definition: ProjectionConfigDialog.cpp:266
Isis::ProjectionConfigDialog::showErrors
void showErrors(int)
This is called when "Show Errors" is checked.
Definition: ProjectionConfigDialog.cpp:389
Isis::ProjectionConfigDialog::ProjectionConfigDialog
ProjectionConfigDialog(MosaicSceneWidget *scene, QWidget *parent=NULL)
Create a projection configuration dialog.
Definition: ProjectionConfigDialog.cpp:29
QDialog
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
Isis::ProjectionConfigDialog
This is the configuration dialog for the MosaicSceneWidget's projection parameters (map file).
Definition: ProjectionConfigDialog.h:24
Isis::ProjectionConfigDialog::m_stateLabel
QPointer< QLabel > m_stateLabel
This shows a general idea of the current state of the mapping pvl (always shown)
Definition: ProjectionConfigDialog.h:57
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16