| 1 |
greg |
1.1 |
|
| 2 |
|
|
#ifndef __MainWindow_H |
| 3 |
|
|
#define __MainWindow_H |
| 4 |
|
|
|
| 5 |
|
|
#include <QtGui/QMainWindow> |
| 6 |
|
|
#include "fvect.h" |
| 7 |
|
|
#include "rpaint.h" |
| 8 |
|
|
|
| 9 |
|
|
class QAction; |
| 10 |
|
|
class QDialog; |
| 11 |
|
|
class RvuWidget; |
| 12 |
|
|
|
| 13 |
|
|
namespace Ui |
| 14 |
|
|
{ |
| 15 |
|
|
class MainWindow; |
| 16 |
|
|
class exposureDialog; |
| 17 |
|
|
class parameterDialog; |
| 18 |
|
|
class viewDialog; |
| 19 |
|
|
class incrementsDialog; |
| 20 |
|
|
class commandsDialog; |
| 21 |
|
|
} |
| 22 |
|
|
|
| 23 |
|
|
class MainWindow : public QMainWindow |
| 24 |
|
|
{ |
| 25 |
|
|
Q_OBJECT |
| 26 |
|
|
|
| 27 |
|
|
public: |
| 28 |
|
|
MainWindow(int width, int height, const char* name, const char* id); |
| 29 |
|
|
~MainWindow(); |
| 30 |
|
|
|
| 31 |
|
|
RvuWidget* getRvuWidget() const; |
| 32 |
|
|
void resizeImage(int width, int height); |
| 33 |
|
|
void setStatus(const char*); |
| 34 |
|
|
void setProgress(int); |
| 35 |
|
|
void pick( int* x, int* y); |
| 36 |
|
|
protected: |
| 37 |
|
|
void closeEvent(QCloseEvent *event); |
| 38 |
|
|
void doSubmit(); |
| 39 |
|
|
void updatePositionLabels(); |
| 40 |
|
|
void runCommand(const char *command); |
| 41 |
|
|
void move(int direction, float amount); |
| 42 |
|
|
void refreshView(VIEW *nv); |
| 43 |
|
|
|
| 44 |
|
|
protected slots: |
| 45 |
|
|
void buttonPressed(); |
| 46 |
|
|
void redraw(); |
| 47 |
|
|
void traceRay(); |
| 48 |
|
|
void saveImage(); |
| 49 |
|
|
void saveCurrentImage(); |
| 50 |
|
|
void loadView(); |
| 51 |
|
|
void toggleToolBar(); |
| 52 |
|
|
void toggleTranslateTool(); |
| 53 |
|
|
void toggleStatusBar(); |
| 54 |
|
|
void moveXPlusOne(); |
| 55 |
|
|
void moveXPlusTwo(); |
| 56 |
|
|
void moveYPlusOne(); |
| 57 |
|
|
void moveYPlusTwo(); |
| 58 |
|
|
void moveZPlusOne(); |
| 59 |
|
|
void moveZPlusTwo(); |
| 60 |
|
|
void moveXMinusOne(); |
| 61 |
|
|
void moveXMinusTwo(); |
| 62 |
|
|
void moveYMinusOne(); |
| 63 |
|
|
void moveYMinusTwo(); |
| 64 |
|
|
void moveZMinusOne(); |
| 65 |
|
|
void moveZMinusTwo(); |
| 66 |
|
|
void showExposureDialog(); |
| 67 |
|
|
void hideExposureDialog(); |
| 68 |
|
|
void showParameterDialog(); |
| 69 |
|
|
void hideParameterDialog(); |
| 70 |
|
|
void adjustExposure(); |
| 71 |
|
|
void updatePointRadio(); |
| 72 |
|
|
void adjustParameters(); |
| 73 |
|
|
void showViewDialog(); |
| 74 |
|
|
void hideViewDialog(); |
| 75 |
|
|
void adjustView(); |
| 76 |
|
|
void toggleBackfaceVisibility(); |
| 77 |
|
|
void toggleIrradiance(); |
| 78 |
|
|
void toggleGrayscale(); |
| 79 |
|
|
void appendToRif(); |
| 80 |
|
|
void appendToView(); |
| 81 |
|
|
void showIncrementsDialog(); |
| 82 |
|
|
void hideIncrementsDialog(); |
| 83 |
|
|
void adjustIncrements(); |
| 84 |
|
|
void showCommandsDialog(); |
| 85 |
|
|
void showAbout(); |
| 86 |
|
|
/** Enable/disable elements of the UI while rendering. */ |
| 87 |
|
|
void enableInterface(bool enable); |
| 88 |
|
|
|
| 89 |
|
|
private: |
| 90 |
|
|
void createActions(); |
| 91 |
|
|
void connectSlots(); |
| 92 |
|
|
|
| 93 |
|
|
/** Our MainWindow GUI. */ |
| 94 |
|
|
Ui::MainWindow *m_ui; |
| 95 |
|
|
QAction *m_minimizeAction; |
| 96 |
|
|
QAction *m_maximizeAction; |
| 97 |
|
|
QAction *m_restoreAction; |
| 98 |
|
|
QAction *m_quitAction; |
| 99 |
|
|
|
| 100 |
|
|
/** Exposure Dialog */ |
| 101 |
|
|
QDialog *m_exposureDialog; |
| 102 |
|
|
Ui::exposureDialog *m_exposureDialogUi; |
| 103 |
|
|
|
| 104 |
|
|
/** Parameter Dialog */ |
| 105 |
|
|
QDialog *m_parameterDialog; |
| 106 |
|
|
Ui::parameterDialog *m_parameterDialogUi; |
| 107 |
|
|
|
| 108 |
|
|
/** View Dialog */ |
| 109 |
|
|
QDialog *m_viewDialog; |
| 110 |
|
|
Ui::viewDialog *m_viewDialogUi; |
| 111 |
|
|
|
| 112 |
|
|
/** Increments Dialog */ |
| 113 |
|
|
QDialog *m_incrementsDialog; |
| 114 |
|
|
Ui::incrementsDialog *m_incrementsDialogUi; |
| 115 |
|
|
float smallIncrement; |
| 116 |
|
|
float largeIncrement; |
| 117 |
|
|
|
| 118 |
|
|
/** Commands Dialog */ |
| 119 |
|
|
QDialog *m_commandsDialog; |
| 120 |
|
|
Ui::commandsDialog *m_commandsDialogUi; |
| 121 |
|
|
|
| 122 |
|
|
/** save image */ |
| 123 |
|
|
QString currentImageName; |
| 124 |
|
|
}; |
| 125 |
|
|
|
| 126 |
|
|
#endif |